0004944c <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 ) {
4944c: 7007 moveq #7,%d0
#define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) {
4944e: 4e56 0000 linkw %fp,#0 49452: 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;
49456: 2268 0010 moveal %a0@(16),%a1
#define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) {
4945a: 2f0a movel %a2,%sp@-
IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info;
4945c: 2469 0034 moveal %a1@(52),%a2
switch( node->type ) {
49460: 2250 moveal %a0@,%a1 49462: b0a9 0048 cmpl %a1@(72),%d0 49466: 6526 bcss 4948e <IMFS_Set_handlers+0x42> 49468: 2029 0048 movel %a1@(72),%d0 4946c: d080 addl %d0,%d0 4946e: 303b 0808 movew %pc@(49478 <IMFS_Set_handlers+0x2c>,%d0:l),%d0 49472: 48c0 extl %d0 49474: 4efb 0802 jmp %pc@(49478 <IMFS_Set_handlers+0x2c>,%d0:l)
49478: 0016 026 <== NOT EXECUTED 4947a: 0010 020 <== NOT EXECUTED 4947c: 0050 0120 <== NOT EXECUTED 4947e: 002c 054 <== NOT EXECUTED 49480: 002c 054 <== NOT EXECUTED 49482: 001e 036 <== NOT EXECUTED 49484: 001e 036 <== NOT EXECUTED 49486: 003e 076 <== NOT EXECUTED
case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers;
49488: 216a 0008 0008 movel %a2@(8),%a0@(8)
loc->handlers = &IMFS_fifo_handlers; break; } return 0; }
4948e: 245f moveal %sp@+,%a2 49490: 4280 clrl %d0 49492: 4e5e unlk %fp 49494: 4e75 rts 49496: 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;
49498: 216a 0004 0008 movel %a2@(4),%a0@(8)
loc->handlers = &IMFS_fifo_handlers; break; } return 0; }
4949e: 245f moveal %sp@+,%a2 494a0: 4e5e unlk %fp 494a2: 4e75 rts 494a4: 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;
494a6: 203c 0005 c8d4 movel #379092,%d0
loc->handlers = &IMFS_fifo_handlers; break; } return 0; }
494ac: 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;
494ae: 2140 0008 movel %d0,%a0@(8)
loc->handlers = &IMFS_fifo_handlers; break; } return 0; }
494b2: 4280 clrl %d0 494b4: 4e75 rts 494b6: 245f moveal %sp@+,%a2
break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers;
494b8: 203c 0005 c7f8 movel #378872,%d0
break; } return 0; }
494be: 4e5e unlk %fp
break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers;
494c0: 2140 0008 movel %d0,%a0@(8)
break; } return 0; }
494c4: 4280 clrl %d0 494c6: 4e75 rts 494c8: 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;
494ca: 203c 0005 c89c movel #379036,%d0
loc->handlers = &IMFS_fifo_handlers; break; } return 0; }
494d0: 4e5e unlk %fp
switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers;
494d2: 2140 0008 movel %d0,%a0@(8)
loc->handlers = &IMFS_fifo_handlers; break; } return 0; }
494d6: 4280 clrl %d0 494d8: 4e75 rts
0004ea28 <IMFS_chown>: int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) {
4ea28: 4e56 ffe8 linkw %fp,#-24 4ea2c: 206e 0008 moveal %fp@(8),%a0 4ea30: 48d7 041c moveml %d2-%d4/%a2,%sp@
IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access;
4ea34: 2450 moveal %a0@,%a2
*/ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4ea36: 4284 clrl %d4
int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) {
4ea38: 362e 000e movew %fp@(14),%d3 4ea3c: 342e 0012 movew %fp@(18),%d2
/* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid();
4ea40: 4eb9 0004 fecc jsr 4fecc <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4ea46: 4281 clrl %d1 4ea48: 3800 movew %d0,%d4 4ea4a: 322a 0038 movew %a2@(56),%d1 4ea4e: b284 cmpl %d4,%d1 4ea50: 6704 beqs 4ea56 <IMFS_chown+0x2e>
4ea52: 4a40 tstw %d0 <== NOT EXECUTED 4ea54: 6628 bnes 4ea7e <IMFS_chown+0x56> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner;
4ea56: 3543 0038 movew %d3,%a2@(56)
jnode->st_gid = group;
4ea5a: 3542 003a movew %d2,%a2@(58)
IMFS_update_ctime( jnode );
4ea5e: 42a7 clrl %sp@- 4ea60: 486e fff8 pea %fp@(-8) 4ea64: 4eb9 0004 404c jsr 4404c <gettimeofday> 4ea6a: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
4ea70: 508f addql #8,%sp
#endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode );
4ea72: 4280 clrl %d0
return 0; }
4ea74: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4ea7a: 4e5e unlk %fp 4ea7c: 4e75 rts
#if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM );
4ea7e: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 4ea84: 7201 moveq #1,%d1 <== NOT EXECUTED 4ea86: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ea88: 70ff moveq #-1,%d0 <== NOT EXECUTED
jnode->st_gid = group; IMFS_update_ctime( jnode ); return 0; }
4ea8a: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 <== NOT EXECUTED
#if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM );
4ea90: 2081 movel %d1,%a0@ <== NOT EXECUTED
jnode->st_gid = group; IMFS_update_ctime( jnode ); return 0; }
4ea92: 4e5e unlk %fp <== NOT EXECUTED 4ea94: 4e75 rts <== NOT EXECUTED
... 0004d1d8 <IMFS_create_node>: IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) {
4d1d8: 4e56 fffc linkw %fp,#-4 4d1dc: 2f0a movel %a2,%sp@- 4d1de: 246e 0008 moveal %fp@(8),%a2 4d1e2: 2f02 movel %d2,%sp@- 4d1e4: 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 )
4d1e8: 4a8a tstl %a2 4d1ea: 660e bnes 4d1fa <IMFS_create_node+0x22>
4d1ec: 4280 clrl %d0 <== NOT EXECUTED
node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; }
4d1ee: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 4d1f2: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4d1f6: 4e5e unlk %fp <== NOT EXECUTED 4d1f8: 4e75 rts <== NOT EXECUTED
return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
4d1fa: 2079 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a0 4d200: 2028 002c movel %a0@(44),%d0 4d204: 4680 notl %d0 4d206: c0ae 0014 andl %fp@(20),%d0 4d20a: 2f00 movel %d0,%sp@- 4d20c: 2f2e 0010 movel %fp@(16),%sp@- 4d210: 2f02 movel %d2,%sp@- 4d212: 4eb9 0004 d120 jsr 4d120 <IMFS_allocate_node>
if ( !node )
4d218: 4fef 000c lea %sp@(12),%sp 4d21c: 4a80 tstl %d0 4d21e: 67ce beqs 4d1ee <IMFS_create_node+0x16>
return NULL; /* * Set the type specific information */ switch (type) {
4d220: 7207 moveq #7,%d1 4d222: b282 cmpl %d2,%d1 4d224: 641c bccs 4d242 <IMFS_create_node+0x6a>
case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0);
4d226: 4879 0005 cc46 pea 5cc46 <IMFS_LIMITS_AND_OPTIONS+0x30> <== NOT EXECUTED 4d22c: 4879 0005 cc91 pea 5cc91 <__FUNCTION__.5851> <== NOT EXECUTED 4d232: 4878 005c pea 5c <DBL_MANT_DIG+0x27> <== NOT EXECUTED 4d236: 4879 0005 cc48 pea 5cc48 <IMFS_LIMITS_AND_OPTIONS+0x32> <== NOT EXECUTED 4d23c: 4eb9 0004 a49c jsr 4a49c <__assert_func> <== NOT EXECUTED
return NULL; /* * Set the type specific information */ switch (type) {
4d242: 323b 2a08 movew %pc@(4d24c <IMFS_create_node+0x74>,%d2:l:2),%d1 4d246: 48c1 extl %d1 4d248: 4efb 1802 jmp %pc@(4d24c <IMFS_create_node+0x74>,%d1:l)
4d24c: ffda 0177732 <== NOT EXECUTED 4d24e: 0134 00f0 btst %d0,%a4@(fffffff0,%d0:w) <== NOT EXECUTED 4d252: 0010 020 <== NOT EXECUTED 4d254: 0010 020 <== NOT EXECUTED 4d256: 0068 0150 <== NOT EXECUTED 4d258: 0056 0126 <== NOT EXECUTED 4d25a: 00b6 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;
4d260: 2040 moveal %d0,%a0 4d262: 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;
4d266: 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;
4d268: 206a 0010 moveal %a2@(16),%a0 4d26c: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d270: 2210 movel %a0@,%d1 4d272: 5281 addql #1,%d1 4d274: 2081 movel %d1,%a0@
} /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access;
4d276: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d278: 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;
4d27c: 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 );
4d280: 2f00 movel %d0,%sp@- 4d282: 4868 004c pea %a0@(76) 4d286: 2d40 fffc movel %d0,%fp@(-4) 4d28a: 4eb9 0004 6798 jsr 46798 <_Chain_Append>
node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node;
4d290: 202e fffc movel %fp@(-4),%d0 4d294: 508f addql #8,%sp
}
4d296: 242e fff4 movel %fp@(-12),%d2 4d29a: 246e fff8 moveal %fp@(-8),%a2 4d29e: 4e5e unlk %fp 4d2a0: 4e75 rts
node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0;
4d2a2: 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;
4d2a4: 4281 clrl %d1 <== NOT EXECUTED 4d2a6: 4282 clrl %d2 <== NOT EXECUTED
node->info.linearfile.direct = 0;
4d2a8: 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;
4d2ac: 2141 004c movel %d1,%a0@(76) <== NOT EXECUTED 4d2b0: 2142 0050 movel %d2,%a0@(80) <== NOT EXECUTED
node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0;
4d2b4: 2040 moveal %d0,%a0
node->info.file.indirect = 0;
4d2b6: 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;
4d2b8: 4281 clrl %d1 4d2ba: 4282 clrl %d2
node->info.file.indirect = 0;
4d2bc: 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;
4d2c0: 2141 004c movel %d1,%a0@(76) 4d2c4: 2142 0050 movel %d2,%a0@(80)
node->info.file.indirect = 0; node->info.file.doubly_indirect = 0;
4d2c8: 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;
4d2cc: 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;
4d2ce: 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;
4d2d2: 206a 0010 moveal %a2@(16),%a0 4d2d6: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d2da: 2210 movel %a0@,%d1 4d2dc: 5281 addql #1,%d1 4d2de: 2081 movel %d1,%a0@
} /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access;
4d2e0: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d2e2: 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;
4d2e6: 2348 0008 movel %a0,%a1@(8) 4d2ea: 2f00 movel %d0,%sp@- 4d2ec: 4868 004c pea %a0@(76) 4d2f0: 2d40 fffc movel %d0,%fp@(-4) 4d2f4: 4eb9 0004 6798 jsr 46798 <_Chain_Append>
node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node;
4d2fa: 202e fffc movel %fp@(-4),%d0 4d2fe: 508f addql #8,%sp 4d300: 6094 bras 4d296 <IMFS_create_node+0xbe>
node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; case IMFS_FIFO: node->info.fifo.pipe = NULL;
4d302: 2240 moveal %d0,%a1 4d304: 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;
4d308: 206a 0010 moveal %a2@(16),%a0
node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d30c: 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;
4d30e: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d312: 2210 movel %a0@,%d1 4d314: 5281 addql #1,%d1 4d316: 2081 movel %d1,%a0@
} /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access;
4d318: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d31a: 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;
4d31e: 2348 0008 movel %a0,%a1@(8) 4d322: 2f00 movel %d0,%sp@- 4d324: 4868 004c pea %a0@(76) 4d328: 2d40 fffc movel %d0,%fp@(-4) 4d32c: 4eb9 0004 6798 jsr 46798 <_Chain_Append>
node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node;
4d332: 202e fffc movel %fp@(-4),%d0 4d336: 508f addql #8,%sp 4d338: 6000 ff5c braw 4d296 <IMFS_create_node+0xbe>
case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major;
4d33c: 226e 0018 moveal %fp@(24),%a1 4d340: 2040 moveal %d0,%a0 4d342: 2151 004c movel %a1@,%a0@(76)
node->info.device.minor = info->device.minor;
4d346: 5889 addql #4,%a1 4d348: 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;
4d34c: 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;
4d34e: 206a 0010 moveal %a2@(16),%a0 4d352: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d356: 2210 movel %a0@,%d1 4d358: 5281 addql #1,%d1 4d35a: 2081 movel %d1,%a0@
} /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access;
4d35c: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d35e: 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;
4d362: 2348 0008 movel %a0,%a1@(8) 4d366: 2f00 movel %d0,%sp@- 4d368: 4868 004c pea %a0@(76) 4d36c: 2d40 fffc movel %d0,%fp@(-4) 4d370: 4eb9 0004 6798 jsr 46798 <_Chain_Append>
node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node;
4d376: 202e fffc movel %fp@(-4),%d0 4d37a: 508f addql #8,%sp 4d37c: 6000 ff18 braw 4d296 <IMFS_create_node+0xbe>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
4d380: 2240 moveal %d0,%a1
the_chain->permanent_null = NULL;
4d382: 2040 moveal %d0,%a0
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
4d384: 43e9 0050 lea %a1@(80),%a1 4d388: 2149 004c movel %a1,%a0@(76)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4d38c: 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;
4d38e: 42a8 0050 clrl %a0@(80)
the_chain->last = _Chain_Head(the_chain);
4d392: 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;
4d396: 206a 0010 moveal %a2@(16),%a0
node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d39a: 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;
4d39c: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d3a0: 2210 movel %a0@,%d1 4d3a2: 5281 addql #1,%d1 4d3a4: 2081 movel %d1,%a0@
} /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access;
4d3a6: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count;
4d3a8: 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;
4d3ac: 2348 0008 movel %a0,%a1@(8) 4d3b0: 2f00 movel %d0,%sp@- 4d3b2: 4868 004c pea %a0@(76) 4d3b6: 2d40 fffc movel %d0,%fp@(-4) 4d3ba: 4eb9 0004 6798 jsr 46798 <_Chain_Append>
node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node;
4d3c0: 202e fffc movel %fp@(-4),%d0 4d3c4: 508f addql #8,%sp 4d3c6: 6000 fece braw 4d296 <IMFS_create_node+0xbe>
... 00043ede <IMFS_dump>: * NOTE: Assuming the "/" directory is bad. * Not checking that the starting directory is in an IMFS is bad. */ void IMFS_dump( void ) {
43ede: 4e56 0000 linkw %fp,#0
fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" );
43ee2: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0
* NOTE: Assuming the "/" directory is bad. * Not checking that the starting directory is in an IMFS is bad. */ void IMFS_dump( void ) {
43ee8: 2f0a movel %a2,%sp@-
fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" );
43eea: 2f28 0008 movel %a0@(8),%sp@- 43eee: 45f9 0005 4320 lea 54320 <fwrite>,%a2 43ef4: 4878 0034 pea 34 <OPER2+0x20> 43ef8: 4878 0001 pea 1 <ADD> 43efc: 4879 0006 272a pea 6272a <IntUartPollCallbacks.6601+0x11a> 43f02: 4e92 jsr %a2@
fprintf(stdout, "/\n" );
43f04: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 43f0a: 2f28 0008 movel %a0@(8),%sp@- 43f0e: 4878 0002 pea 2 <DOUBLE_FLOAT> 43f12: 4878 0001 pea 1 <ADD> 43f16: 4879 0006 275f pea 6275f <IntUartPollCallbacks.6601+0x14f> 43f1c: 4e92 jsr %a2@
IMFS_dump_directory( rtems_filesystem_root.node_access, 0 );
43f1e: 4fef 001c lea %sp@(28),%sp 43f22: 2079 0006 4144 moveal 64144 <rtems_current_user_env>,%a0 43f28: 4297 clrl %sp@ 43f2a: 2f28 0018 movel %a0@(24),%sp@- 43f2e: 4eb9 0004 3dea jsr 43dea <IMFS_dump_directory>
fprintf(stdout, "*************** End of Dump ***************\n" );
43f34: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 43f3a: 2f28 0008 movel %a0@(8),%sp@- 43f3e: 4878 0039 pea 39 <DBL_MANT_DIG+0x4> 43f42: 4878 0001 pea 1 <ADD> 43f46: 4879 0006 2762 pea 62762 <IntUartPollCallbacks.6601+0x152> 43f4c: 4e92 jsr %a2@
}
43f4e: 246e fffc moveal %fp@(-4),%a2
void IMFS_dump( void ) { fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" ); fprintf(stdout, "/\n" ); IMFS_dump_directory( rtems_filesystem_root.node_access, 0 ); fprintf(stdout, "*************** End of Dump ***************\n" );
43f52: 4fef 0018 lea %sp@(24),%sp
}
43f56: 4e5e unlk %fp 43f58: 4e75 rts
... 00043dea <IMFS_dump_directory>: void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) {
43dea: 4e56 ffe0 linkw %fp,#-32 43dee: 206e 0008 moveal %fp@(8),%a0 43df2: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43df6: 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 );
43dfa: 4a88 tstl %a0 43dfc: 6700 008c beqw 43e8a <IMFS_dump_directory+0xa0>
assert( level >= 0 );
43e00: 4a83 tstl %d3 43e02: 6d00 00be bltw 43ec2 <IMFS_dump_directory+0xd8>
assert( the_directory->type == IMFS_DIRECTORY );
43e06: 7001 moveq #1,%d0 43e08: b0a8 0048 cmpl %a0@(72),%d0 43e0c: 6600 0098 bnew 43ea6 <IMFS_dump_directory+0xbc>
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
43e10: 2808 movel %a0,%d4 43e12: 0684 0000 0050 addil #80,%d4
the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
43e18: 2668 004c moveal %a0@(76),%a3 43e1c: b88b cmpl %a3,%d4 43e1e: 6750 beqs 43e70 <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 );
43e20: 2a03 movel %d3,%d5 43e22: 45f9 0005 4320 lea 54320 <fwrite>,%a2 43e28: 49f9 0004 3bd2 lea 43bd2 <IMFS_print_jnode>,%a4 43e2e: 5285 addql #1,%d5 43e30: 4bf9 0004 3dea lea 43dea <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;
43e36: 4282 clrl %d2
for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." );
43e38: 2079 0006 4210 moveal 64210 <_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++ )
43e3e: 5282 addql #1,%d2
fprintf(stdout, "...." );
43e40: 2f28 0008 movel %a0@(8),%sp@- 43e44: 4878 0004 pea 4 <CONTEXT_ARG> 43e48: 4878 0001 pea 1 <ADD> 43e4c: 4879 0006 2725 pea 62725 <IntUartPollCallbacks.6601+0x115> 43e52: 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++ )
43e54: 4fef 0010 lea %sp@(16),%sp 43e58: b483 cmpl %d3,%d2 43e5a: 6fdc bles 43e38 <IMFS_dump_directory+0x4e>
fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode );
43e5c: 2f0b movel %a3,%sp@- 43e5e: 4e94 jsr %a4@
if ( the_jnode->type == IMFS_DIRECTORY )
43e60: 588f addql #4,%sp 43e62: 7001 moveq #1,%d0 43e64: b0ab 0048 cmpl %a3@(72),%d0 43e68: 6710 beqs 43e7a <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 ) {
43e6a: 2653 moveal %a3@,%a3
assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
43e6c: b88b cmpl %a3,%d4 43e6e: 66c6 bnes 43e36 <IMFS_dump_directory+0x4c>
fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } }
43e70: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 43e76: 4e5e unlk %fp 43e78: 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 );
43e7a: 2f05 movel %d5,%sp@- 43e7c: 2f0b movel %a3,%sp@- 43e7e: 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 ) {
43e80: 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 );
43e82: 508f addql #8,%sp
assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
43e84: b88b cmpl %a3,%d4 43e86: 66ae bnes 43e36 <IMFS_dump_directory+0x4c> 43e88: 60e6 bras 43e70 <IMFS_dump_directory+0x86>
rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory );
43e8a: 4879 0006 26e6 pea 626e6 <IntUartPollCallbacks.6601+0xd6> <== NOT EXECUTED 43e90: 4879 0006 27b4 pea 627b4 <__FUNCTION__.6602> <== NOT EXECUTED 43e96: 4878 0084 pea 84 <DBL_MANT_DIG+0x4f> <== NOT EXECUTED 43e9a: 4879 0006 263a pea 6263a <IntUartPollCallbacks.6601+0x2a> <== NOT EXECUTED 43ea0: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED
assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY );
43ea6: 4879 0006 26ff pea 626ff <IntUartPollCallbacks.6601+0xef> <== NOT EXECUTED 43eac: 4879 0006 27b4 pea 627b4 <__FUNCTION__.6602> <== NOT EXECUTED 43eb2: 4878 0088 pea 88 <DBL_MANT_DIG+0x53> <== NOT EXECUTED 43eb6: 4879 0006 263a pea 6263a <IntUartPollCallbacks.6601+0x2a> <== NOT EXECUTED 43ebc: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED
IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 );
43ec2: 4879 0006 26f4 pea 626f4 <IntUartPollCallbacks.6601+0xe4> <== NOT EXECUTED 43ec8: 4879 0006 27b4 pea 627b4 <__FUNCTION__.6602> <== NOT EXECUTED 43ece: 4878 0086 pea 86 <DBL_MANT_DIG+0x51> <== NOT EXECUTED 43ed2: 4879 0006 263a pea 6263a <IntUartPollCallbacks.6601+0x2a> <== NOT EXECUTED 43ed8: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED
000496d2 <IMFS_eval_path>: const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
496d2: 4e56 ffb0 linkw %fp,#-80 496d6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 496da: 286e 0014 moveal %fp@(20),%a4 496de: 2c0e movel %fp,%d6 496e0: 280e movel %fp,%d4
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
496e2: 4282 clrl %d2 496e4: 5986 subql #4,%d6 496e6: 0684 ffff ffdb addil #-37,%d4 496ec: 2a3c 0004 9fc4 movel #303044,%d5
/* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
496f2: 2e3c 0004 9f1c movel #302876,%d7
const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
496f8: 2a6e 0008 moveal %fp@(8),%a5 496fc: 246e 000c moveal %fp@(12),%a2
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
49700: 2654 moveal %a4@,%a3
* Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
49702: 2f06 movel %d6,%sp@- 49704: 2045 moveal %d5,%a0 49706: 2f04 movel %d4,%sp@- 49708: 2f0a movel %a2,%sp@- 4970a: 4875 2800 pea %a5@(00000000,%d2:l) 4970e: 4e90 jsr %a0@
pathnamelen -= len; i += len; if ( !pathloc->node_access )
49710: 2054 moveal %a4@,%a0
* 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 );
49712: 2600 movel %d0,%d3
pathnamelen -= len; i += len; if ( !pathloc->node_access )
49714: 4fef 0010 lea %sp@(16),%sp
*/ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len;
49718: 202e fffc movel %fp@(-4),%d0
i += len; if ( !pathloc->node_access )
4971c: 4a88 tstl %a0 4971e: 6700 00f8 beqw 49818 <IMFS_eval_path+0x146>
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len;
49722: d480 addl %d0,%d2
*/ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len;
49724: 95c0 subal %d0,%a2
rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH )
49726: 4a83 tstl %d3 49728: 6662 bnes 4978c <IMFS_eval_path+0xba>
* 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 ) {
4972a: 7201 moveq #1,%d1 4972c: b2a8 0048 cmpl %a0@(72),%d1 49730: 6600 0132 bnew 49864 <IMFS_eval_path+0x192>
if ( node->info.directory.mt_fs != NULL ) {
49734: 2068 0058 moveal %a0@(88),%a0 49738: 4a88 tstl %a0 4973a: 6700 0128 beqw 49864 <IMFS_eval_path+0x192>
newloc = node->info.directory.mt_fs->mt_fs_root;
4973e: 2268 0028 moveal %a0@(40),%a1
*pathloc = newloc;
49742: 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;
49748: 2628 0024 movel %a0@(36),%d3 4974c: 2228 0020 movel %a0@(32),%d1 49750: 2028 001c movel %a0@(28),%d0
*pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len],
49754: 2f0c movel %a4,%sp@- 49756: 206e fffc moveal %fp@(-4),%a0 4975a: 9488 subl %a0,%d2 4975c: 2f2e 0010 movel %fp@(16),%sp@- 49760: 4872 8800 pea %a2@(00000000,%a0:l) 49764: 4875 2800 pea %a5@(00000000,%d2:l) 49768: 2051 moveal %a1@,%a0
*/ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc;
4976a: 2943 0008 movel %d3,%a4@(8) 4976e: 2941 0004 movel %d1,%a4@(4) 49772: 2880 movel %d0,%a4@ 49774: 2949 000c movel %a1,%a4@(12)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
49778: 4e90 jsr %a0@ 4977a: 4fef 0010 lea %sp@(16),%sp 4977e: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
49780: 2003 movel %d3,%d0 49782: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49788: 4e5e unlk %fp 4978a: 4e75 rts
/* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY )
4978c: 7001 moveq #1,%d0 4978e: b0ab 0048 cmpl %a3@(72),%d0 49792: 6700 00b8 beqw 4984c <IMFS_eval_path+0x17a>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access;
49796: 2648 moveal %a0,%a3
switch( type ) {
49798: 7003 moveq #3,%d0 4979a: b083 cmpl %d3,%d0 4979c: 671c beqs 497ba <IMFS_eval_path+0xe8> 4979e: 7204 moveq #4,%d1 497a0: b283 cmpl %d3,%d1 497a2: 6700 008e beqw 49832 <IMFS_eval_path+0x160> 497a6: 103c 0002 moveb #2,%d0 497aa: b083 cmpl %d3,%d0 497ac: 6748 beqs 497f6 <IMFS_eval_path+0x124>
/* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
497ae: 7004 moveq #4,%d0 497b0: b083 cmpl %d3,%d0 497b2: 6600 ff4e bnew 49702 <IMFS_eval_path+0x30>
497b6: 6000 ff72 braw 4972a <IMFS_eval_path+0x58> <== NOT EXECUTED
case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) {
497ba: 2028 0048 movel %a0@(72),%d0 497be: 7203 moveq #3,%d1 497c0: b280 cmpl %d0,%d1 497c2: 6700 00d8 beqw 4989c <IMFS_eval_path+0x1ca>
node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) {
497c6: 7204 moveq #4,%d1 497c8: b280 cmpl %d0,%d1 497ca: 6700 00ea beqw 498b6 <IMFS_eval_path+0x1e4>
/* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY )
497ce: 7201 moveq #1,%d1 497d0: b280 cmpl %d0,%d1 497d2: 6600 0104 bnew 498d8 <IMFS_eval_path+0x206>
/* * 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 ) {
497d6: 206b 0058 moveal %a3@(88),%a0 497da: 4a88 tstl %a0 497dc: 6600 ff60 bnew 4973e <IMFS_eval_path+0x6c>
/* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
497e0: 2f04 movel %d4,%sp@- 497e2: 2047 moveal %d7,%a0 497e4: 2f0b movel %a3,%sp@- 497e6: 4e90 jsr %a0@
if ( !node )
497e8: 508f addql #8,%sp
/* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
497ea: 2640 moveal %d0,%a3
if ( !node )
497ec: 4a80 tstl %d0 497ee: 6728 beqs 49818 <IMFS_eval_path+0x146>
/* * Set the node access to the point we have found. */ pathloc->node_access = node;
497f0: 288b movel %a3,%a4@
break;
497f2: 6000 ff0e braw 49702 <IMFS_eval_path+0x30>
case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
497f6: 2279 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a1 497fc: b1e9 0018 cmpal %a1@(24),%a0 49800: 6700 ff00 beqw 49702 <IMFS_eval_path+0x30>
/* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) {
49804: 226c 0010 moveal %a4@(16),%a1
/* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access ==
49808: b1e9 001c cmpal %a1@(28),%a0 4980c: 6700 00e4 beqw 498f2 <IMFS_eval_path+0x220>
pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent )
49810: 2668 0008 moveal %a0@(8),%a3 49814: 4a8b tstl %a3 49816: 66d8 bnes 497f0 <IMFS_eval_path+0x11e>
* 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 );
49818: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4981e: 76ff moveq #-1,%d3 49820: 7c02 moveq #2,%d6 49822: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
49824: 2003 movel %d3,%d0
* 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 );
49826: 2086 movel %d6,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
49828: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4982e: 4e5e unlk %fp 49830: 4e75 rts
case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
49832: 4eb9 0004 eb8c jsr 4eb8c <__errno> 49838: 76ff moveq #-1,%d3 4983a: 7a5b moveq #91,%d5 4983c: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
4983e: 2003 movel %d3,%d0
case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
49840: 2085 movel %d5,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
49842: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49848: 4e5e unlk %fp 4984a: 4e75 rts
/* * 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 ) )
4984c: 4878 0001 pea 1 <ADD> 49850: 2f0c movel %a4,%sp@- 49852: 4eb9 0004 94da jsr 494da <IMFS_evaluate_permission> 49858: 508f addql #8,%sp 4985a: 4a80 tstl %d0 4985c: 6724 beqs 49882 <IMFS_eval_path+0x1b0> 4985e: 2054 moveal %a4@,%a0 49860: 6000 ff34 braw 49796 <IMFS_eval_path+0xc4>
flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc );
49864: 2f0c movel %a4,%sp@- 49866: 4eb9 0004 944c jsr 4944c <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) )
4986c: 2eae 0010 movel %fp@(16),%sp@
flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc );
49870: 2600 movel %d0,%d3
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) )
49872: 2f0c movel %a4,%sp@- 49874: 4eb9 0004 94da jsr 494da <IMFS_evaluate_permission> 4987a: 508f addql #8,%sp 4987c: 4a80 tstl %d0 4987e: 6600 ff00 bnew 49780 <IMFS_eval_path+0xae>
rtems_set_errno_and_return_minus_one( EACCES );
49882: 4eb9 0004 eb8c jsr 4eb8c <__errno> 49888: 76ff moveq #-1,%d3 4988a: 780d moveq #13,%d4 4988c: 2040 moveal %d0,%a0
return result; }
4988e: 2003 movel %d3,%d0
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES );
49890: 2084 movel %d4,%a0@
return result; }
49892: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49898: 4e5e unlk %fp 4989a: 4e75 rts
* If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 );
4989c: 42a7 clrl %sp@- 4989e: 2f0c movel %a4,%sp@- 498a0: 4eb9 0004 9566 jsr 49566 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
498a6: 2654 moveal %a4@,%a3
if ( !node )
498a8: 508f addql #8,%sp 498aa: 4a8b tstl %a3 498ac: 672a beqs 498d8 <IMFS_eval_path+0x206>
} else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access;
498ae: 202b 0048 movel %a3@(72),%d0 498b2: 6000 ff1a braw 497ce <IMFS_eval_path+0xfc>
if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 );
498b6: 42a7 clrl %sp@- 498b8: 2f0c movel %a4,%sp@- 498ba: 4eb9 0004 95c6 jsr 495c6 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
498c0: 2654 moveal %a4@,%a3
if ( result == -1 )
498c2: 508f addql #8,%sp 498c4: 72ff moveq #-1,%d1 498c6: b280 cmpl %d0,%d1 498c8: 66e4 bnes 498ae <IMFS_eval_path+0x1dc>
498ca: 2600 movel %d0,%d3 <== NOT EXECUTED
if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
498cc: 2003 movel %d3,%d0 <== NOT EXECUTED 498ce: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED 498d4: 4e5e unlk %fp <== NOT EXECUTED 498d6: 4e75 rts <== NOT EXECUTED
/* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR );
498d8: 4eb9 0004 eb8c jsr 4eb8c <__errno> 498de: 76ff moveq #-1,%d3 498e0: 7e14 moveq #20,%d7 498e2: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
498e4: 2003 movel %d3,%d0
/* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR );
498e6: 2087 movel %d7,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
498e8: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 498ee: 4e5e unlk %fp 498f0: 4e75 rts
*/ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node;
498f2: 2069 0014 moveal %a1@(20),%a0
*pathloc = newloc;
498f6: 2969 0018 0010 movel %a1@(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;
498fc: 2829 0010 movel %a1@(16),%d4 49900: 2629 000c movel %a1@(12),%d3 49904: 2229 0008 movel %a1@(8),%d1
*pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
49908: 2f0c movel %a4,%sp@- 4990a: 226e fffc moveal %fp@(-4),%a1 4990e: 9489 subl %a1,%d2 49910: 2f2e 0010 movel %fp@(16),%sp@- 49914: 4872 9800 pea %a2@(00000000,%a1:l) 49918: 4875 2800 pea %a5@(00000000,%d2:l) 4991c: 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;
4991e: 2943 0004 movel %d3,%a4@(4) 49922: 2948 000c movel %a0,%a4@(12)
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
49926: 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;
49928: 2944 0008 movel %d4,%a4@(8) 4992c: 2881 movel %d1,%a4@
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
4992e: 4e90 jsr %a0@ 49930: 4fef 0010 lea %sp@(16),%sp 49934: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; }
49936: 2003 movel %d3,%d0 49938: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4993e: 4e5e unlk %fp 49940: 4e75 rts
00049566 <IMFS_evaluate_hard_link>: /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK )
49566: 7003 moveq #3,%d0
int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
49568: 4e56 0000 linkw %fp,#0 4956c: 2f0a movel %a2,%sp@- 4956e: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *jnode = node->node_access;
49572: 2052 moveal %a2@,%a0
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK )
49574: b0a8 0048 cmpl %a0@(72),%d0 49578: 6640 bnes 495ba <IMFS_evaluate_hard_link+0x54>
/* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node;
4957a: 24a8 004c movel %a0@(76),%a2@
IMFS_Set_handlers( node );
4957e: 2f0a movel %a2,%sp@- 49580: 4eb9 0004 944c jsr 4944c <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) )
49586: 2f2e 000c movel %fp@(12),%sp@- 4958a: 2f0a movel %a2,%sp@- 4958c: 4eb9 0004 94da jsr 494da <IMFS_evaluate_permission> 49592: 4fef 000c lea %sp@(12),%sp 49596: 4a80 tstl %d0 49598: 670a beqs 495a4 <IMFS_evaluate_hard_link+0x3e>
rtems_set_errno_and_return_minus_one( EACCES ); return result; }
4959a: 246e fffc moveal %fp@(-4),%a2
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) )
4959e: 4280 clrl %d0
rtems_set_errno_and_return_minus_one( EACCES ); return result; }
495a0: 4e5e unlk %fp 495a2: 4e75 rts
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES );
495a4: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED
return result; }
495aa: 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 );
495ae: 2040 moveal %d0,%a0 <== NOT EXECUTED 495b0: 720d moveq #13,%d1 <== NOT EXECUTED 495b2: 70ff moveq #-1,%d0 <== NOT EXECUTED
return result; }
495b4: 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 );
495b6: 2081 movel %d1,%a0@ <== NOT EXECUTED
return result; }
495b8: 4e75 rts <== NOT EXECUTED
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000);
495ba: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 495c0: 4eb9 0004 6458 jsr 46458 <rtems_fatal_error_occurred> <== NOT EXECUTED
00049942 <IMFS_evaluate_link>: int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
49942: 4e56 ffec linkw %fp,#-20 49946: 2079 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a0 4994c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 49950: 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 );
49954: 4bf9 0004 95c6 lea 495c6 <IMFS_evaluate_sym_link>,%a5
/* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags );
4995a: 49f9 0004 9566 lea 49566 <IMFS_evaluate_hard_link>,%a4
int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
49960: 242e 000c movel %fp@(12),%d2
/* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
49964: 4281 clrl %d1
/* * Increment and check the link counter. */ rtems_filesystem_link_counts ++;
49966: 3028 0030 movew %a0@(48),%d0
{ IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access;
4996a: 2453 moveal %a3@,%a2
/* * Increment and check the link counter. */ rtems_filesystem_link_counts ++;
4996c: 5280 addql #1,%d0
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4996e: 3200 movew %d0,%d1
/* * Increment and check the link counter. */ rtems_filesystem_link_counts ++;
49970: 3140 0030 movew %d0,%a0@(48)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
49974: 7005 moveq #5,%d0 49976: b081 cmpl %d1,%d0 49978: 6564 bcss 499de <IMFS_evaluate_link+0x9c>
/* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK )
4997a: 202a 0048 movel %a2@(72),%d0 4997e: 7203 moveq #3,%d1 49980: b280 cmpl %d0,%d1 49982: 6740 beqs 499c4 <IMFS_evaluate_link+0x82>
result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK )
49984: 7204 moveq #4,%d1 49986: b280 cmpl %d0,%d1 49988: 671a beqs 499a4 <IMFS_evaluate_link+0x62>
result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) );
4998a: 5780 subql #3,%d0 4998c: 7201 moveq #1,%d1 4998e: b280 cmpl %d0,%d1 49990: 64d2 bccs 49964 <IMFS_evaluate_link+0x22> 49992: 4280 clrl %d0
/* * Clear link counter. */ rtems_filesystem_link_counts = 0;
49994: 4241 clrw %d1 49996: 3141 0030 movew %d1,%a0@(48)
return result; }
4999a: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 499a0: 4e5e unlk %fp 499a2: 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 );
499a4: 2f02 movel %d2,%sp@- 499a6: 2f0b movel %a3,%sp@- 499a8: 4e95 jsr %a5@ 499aa: 508f addql #8,%sp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) );
499ac: 4a80 tstl %d0 499ae: 6620 bnes 499d0 <IMFS_evaluate_link+0x8e> 499b0: 202a 0048 movel %a2@(72),%d0 499b4: 7201 moveq #1,%d1 499b6: 5780 subql #3,%d0 499b8: 2079 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a0 499be: b280 cmpl %d0,%d1 499c0: 64a2 bccs 49964 <IMFS_evaluate_link+0x22>
499c2: 60ce bras 49992 <IMFS_evaluate_link+0x50> <== NOT EXECUTED
/* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags );
499c4: 2f02 movel %d2,%sp@- 499c6: 2f0b movel %a3,%sp@- 499c8: 4e94 jsr %a4@ 499ca: 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 ) ) );
499cc: 4a80 tstl %d0 499ce: 67e0 beqs 499b0 <IMFS_evaluate_link+0x6e> 499d0: 2079 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a0
/* * Clear link counter. */ rtems_filesystem_link_counts = 0;
499d6: 4241 clrw %d1 499d8: 3141 0030 movew %d1,%a0@(48) 499dc: 60bc bras 4999a <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;
499de: 4241 clrw %d1 499e0: 3141 0030 movew %d1,%a0@(48)
rtems_set_errno_and_return_minus_one( ELOOP );
499e4: 4eb9 0004 eb8c jsr 4eb8c <__errno> 499ea: 725c moveq #92,%d1 499ec: 2040 moveal %d0,%a0 499ee: 70ff moveq #-1,%d0
*/ rtems_filesystem_link_counts = 0; return result; }
499f0: 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 );
499f6: 2081 movel %d1,%a0@
*/ rtems_filesystem_link_counts = 0; return result; }
499f8: 4e5e unlk %fp 499fa: 4e75 rts
000494da <IMFS_evaluate_permission>: int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) {
494da: 4e56 fff4 linkw %fp,#-12 494de: 206e 0008 moveal %fp@(8),%a0 494e2: 48d7 040c moveml %d2-%d3/%a2,%sp@
if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access;
494e6: 2450 moveal %a0@,%a2
int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) {
494e8: 262e 000c movel %fp@(12),%d3
} jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid();
494ec: 4eb9 0004 a814 jsr 4a814 <geteuid> 494f2: 3400 movew %d0,%d2
st_gid = getegid();
494f4: 4eb9 0004 a800 jsr 4a800 <getegid>
* Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid )
494fa: 4281 clrl %d1 494fc: 0282 0000 ffff andil #65535,%d2 49502: 322a 0038 movew %a2@(56),%d1 49506: b282 cmpl %d2,%d1 49508: 6742 beqs 4954c <IMFS_evaluate_permission+0x72>
flags_to_test <<= 6; else if ( st_gid == jnode->st_gid )
4950a: 4281 clrl %d1 4950c: 0280 0000 ffff andil #65535,%d0 49512: 322a 003a movew %a2@(58),%d1 49516: b280 cmpl %d0,%d1 49518: 6718 beqs 49532 <IMFS_evaluate_permission+0x58>
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4951a: 2003 movel %d3,%d0 <== NOT EXECUTED 4951c: c0aa 002e andl %a2@(46),%d0 <== NOT EXECUTED 49520: b083 cmpl %d3,%d0 <== NOT EXECUTED 49522: 57c0 seq %d0 <== NOT EXECUTED
return 1; return 0; }
49524: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4952a: 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 )
4952c: 49c0 extbl %d0 <== NOT EXECUTED
return 1; return 0; }
4952e: 4480 negl %d0 <== NOT EXECUTED 49530: 4e75 rts <== NOT EXECUTED
flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3;
49532: e78b lsll #3,%d3
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
49534: 2003 movel %d3,%d0 49536: c0aa 002e andl %a2@(46),%d0 4953a: b083 cmpl %d3,%d0 4953c: 57c0 seq %d0
return 1; return 0; }
4953e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49544: 4e5e unlk %fp
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
49546: 49c0 extbl %d0
return 1; return 0; }
49548: 4480 negl %d0 4954a: 4e75 rts
*/ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6;
4954c: ed8b lsll #6,%d3
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4954e: 2003 movel %d3,%d0 49550: c0aa 002e andl %a2@(46),%d0 49554: b083 cmpl %d3,%d0 49556: 57c0 seq %d0
return 1; return 0; }
49558: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4955e: 4e5e unlk %fp
/* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
49560: 49c0 extbl %d0
return 1; return 0; }
49562: 4480 negl %d0 49564: 4e75 rts
000495c6 <IMFS_evaluate_sym_link>: /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK )
495c6: 7004 moveq #4,%d0
int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
495c8: 4e56 fff0 linkw %fp,#-16 495cc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 495d0: 246e 0008 moveal %fp@(8),%a2 495d4: 242e 000c movel %fp@(12),%d2
IMFS_jnode_t *jnode = node->node_access;
495d8: 2252 moveal %a2@,%a1
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK )
495da: b0a9 0048 cmpl %a1@(72),%d0 495de: 6600 00e6 bnew 496c6 <IMFS_evaluate_sym_link+0x100>
rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent )
495e2: 2029 0008 movel %a1@(8),%d0 495e6: 6700 00d2 beqw 496ba <IMFS_evaluate_sym_link+0xf4>
/* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent;
495ea: 2480 movel %d0,%a2@
rtems_filesystem_get_sym_start_loc(
495ec: 2069 004c moveal %a1@(76),%a0 495f0: 762f moveq #47,%d3 495f2: 1210 moveb %a0@,%d1 495f4: 1001 moveb %d1,%d0 495f6: 49c0 extbl %d0 495f8: b680 cmpl %d0,%d3 495fa: 670c beqs 49608 <IMFS_evaluate_sym_link+0x42> 495fc: 163c 005c moveb #92,%d3 49600: b680 cmpl %d0,%d3 49602: 6704 beqs 49608 <IMFS_evaluate_sym_link+0x42> 49604: 4a01 tstb %d1 49606: 6662 bnes 4966a <IMFS_evaluate_sym_link+0xa4> 49608: 2679 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a3 4960e: 204a moveal %a2,%a0 49610: 7601 moveq #1,%d3 49612: 20eb 0018 movel %a3@(24),%a0@+ 49616: 20eb 001c movel %a3@(28),%a0@+ 4961a: 20eb 0020 movel %a3@(32),%a0@+ 4961e: 20eb 0024 movel %a3@(36),%a0@+ 49622: 20ab 0028 movel %a3@(40),%a0@ 49626: 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] ),
4962a: d688 addl %a0,%d3 4962c: 2f03 movel %d3,%sp@- 4962e: 4eb9 0004 ff58 jsr 4ff58 <strlen>
/* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path(
49634: 2e8a movel %a2,%sp@ 49636: 2f02 movel %d2,%sp@- 49638: 2f00 movel %d0,%sp@- 4963a: 2f03 movel %d3,%sp@- 4963c: 4eb9 0004 96d2 jsr 496d2 <IMFS_eval_path> 49642: 2600 movel %d0,%d3
strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node );
49644: 2f0a movel %a2,%sp@- 49646: 4eb9 0004 944c jsr 4944c <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) )
4964c: 2f02 movel %d2,%sp@- 4964e: 2f0a movel %a2,%sp@- 49650: 4eb9 0004 94da jsr 494da <IMFS_evaluate_permission> 49656: 4fef 001c lea %sp@(28),%sp 4965a: 4a80 tstl %d0 4965c: 6742 beqs 496a0 <IMFS_evaluate_sym_link+0xda>
rtems_set_errno_and_return_minus_one( EACCES ); return result; }
4965e: 2003 movel %d3,%d0 49660: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 49666: 4e5e unlk %fp 49668: 4e75 rts
* root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc(
4966a: 4203 clrb %d3
* 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] ),
4966c: d688 addl %a0,%d3 4966e: 2f03 movel %d3,%sp@- 49670: 4eb9 0004 ff58 jsr 4ff58 <strlen>
/* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path(
49676: 2e8a movel %a2,%sp@ 49678: 2f02 movel %d2,%sp@- 4967a: 2f00 movel %d0,%sp@- 4967c: 2f03 movel %d3,%sp@- 4967e: 4eb9 0004 96d2 jsr 496d2 <IMFS_eval_path> 49684: 2600 movel %d0,%d3
strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node );
49686: 2f0a movel %a2,%sp@- 49688: 4eb9 0004 944c jsr 4944c <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) )
4968e: 2f02 movel %d2,%sp@- 49690: 2f0a movel %a2,%sp@- 49692: 4eb9 0004 94da jsr 494da <IMFS_evaluate_permission> 49698: 4fef 001c lea %sp@(28),%sp 4969c: 4a80 tstl %d0 4969e: 66be bnes 4965e <IMFS_evaluate_sym_link+0x98>
rtems_set_errno_and_return_minus_one( EACCES );
496a0: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 496a6: 76ff moveq #-1,%d3 <== NOT EXECUTED 496a8: 740d moveq #13,%d2 <== NOT EXECUTED 496aa: 2040 moveal %d0,%a0 <== NOT EXECUTED
return result; }
496ac: 2003 movel %d3,%d0 <== 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 );
496ae: 2082 movel %d2,%a0@ <== NOT EXECUTED
return result; }
496b0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 496b6: 4e5e unlk %fp <== NOT EXECUTED 496b8: 4e75 rts <== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 );
496ba: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 496c0: 4eb9 0004 6458 jsr 46458 <rtems_fatal_error_occurred> <== NOT EXECUTED
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000);
496c6: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 496cc: 4eb9 0004 6458 jsr 46458 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004d3cc <IMFS_fchmod>: int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) {
4d3cc: 4e56 fff8 linkw %fp,#-8 4d3d0: 206e 0008 moveal %fp@(8),%a0 4d3d4: 2f0a movel %a2,%sp@-
IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access;
4d3d6: 2450 moveal %a0@,%a2
int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) {
4d3d8: 2f02 movel %d2,%sp@-
* Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4d3da: 4282 clrl %d2
/* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid();
4d3dc: 4eb9 0004 a814 jsr 4a814 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4d3e2: 4281 clrl %d1 4d3e4: 3400 movew %d0,%d2 4d3e6: 322a 0038 movew %a2@(56),%d1 4d3ea: b282 cmpl %d2,%d1 4d3ec: 6704 beqs 4d3f2 <IMFS_fchmod+0x26>
4d3ee: 4a40 tstw %d0 <== NOT EXECUTED 4d3f0: 663c bnes 4d42e <IMFS_fchmod+0x62> <== NOT EXECUTED
/* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4d3f2: 222e 000c movel %fp@(12),%d1 4d3f6: 202a 002e movel %a2@(46),%d0 4d3fa: 0281 0000 0fff andil #4095,%d1 4d400: 0280 ffff f000 andil #-4096,%d0 4d406: 8280 orl %d0,%d1 4d408: 2541 002e movel %d1,%a2@(46)
IMFS_update_ctime( jnode );
4d40c: 42a7 clrl %sp@- 4d40e: 486e fff8 pea %fp@(-8) 4d412: 4eb9 0004 a828 jsr 4a828 <gettimeofday> 4d418: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
4d41e: 508f addql #8,%sp
*/ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode );
4d420: 4280 clrl %d0
return 0; }
4d422: 242e fff0 movel %fp@(-16),%d2 4d426: 246e fff4 moveal %fp@(-12),%a2 4d42a: 4e5e unlk %fp 4d42c: 4e75 rts
*/ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM );
4d42e: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; }
4d434: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED
*/ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM );
4d438: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d43a: 7201 moveq #1,%d1 <== NOT EXECUTED 4d43c: 70ff moveq #-1,%d0 <== NOT EXECUTED
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; }
4d43e: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4d442: 4e5e unlk %fp <== NOT EXECUTED
*/ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM );
4d444: 2081 movel %d1,%a0@ <== NOT EXECUTED
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; }
4d446: 4e75 rts
0004d448 <IMFS_fcntl>: int cmd, rtems_libio_t *iop ) { return 0; }
4d448: 4280 clrl %d0
int IMFS_fcntl( int cmd, rtems_libio_t *iop ) {
4d44a: 4e56 0000 linkw %fp,#0
return 0; }
4d44e: 4e5e unlk %fp 4d450: 4e75 rts
... 000535f8 <IMFS_fdatasync>: int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; }
535f8: 4280 clrl %d0
#include "imfs.h" int IMFS_fdatasync( rtems_libio_t *iop ) {
535fa: 4e56 0000 linkw %fp,#0
return 0; }
535fe: 4e5e unlk %fp 53600: 4e75 rts
... 00049e58 <IMFS_fifo_close>: } int IMFS_fifo_close( rtems_libio_t *iop ) {
49e58: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49e5c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 49e60: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
49e64: 266a 0038 moveal %a2@(56),%a3 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
49e68: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49e6a: 486b 004c pea %a3@(76) <== NOT EXECUTED 49e6e: 4eb9 0004 cb5c jsr 4cb5c <pipe_release> <== NOT EXECUTED
if (! err) {
49e74: 508f addql #8,%sp <== NOT EXECUTED
rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop);
49e76: 2400 movel %d0,%d2 <== NOT EXECUTED
if (! err) {
49e78: 670e beqs 49e88 <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);
49e7a: 6d40 blts 49ebc <IMFS_fifo_close+0x64> <== NOT EXECUTED
}
49e7c: 2002 movel %d2,%d0 <== NOT EXECUTED 49e7e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49e84: 4e5e unlk %fp <== NOT EXECUTED 49e86: 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;
49e88: 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)
49e8e: 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;
49e90: 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)
49e94: 4eb9 0004 ab06 jsr 4ab06 <rtems_libio_is_file_open> <== NOT EXECUTED 49e9a: 588f addql #4,%sp <== NOT EXECUTED 49e9c: 4a80 tstl %d0 <== NOT EXECUTED 49e9e: 66dc bnes 49e7c <IMFS_fifo_close+0x24> <== NOT EXECUTED 49ea0: 4a6b 0032 tstw %a3@(50) <== NOT EXECUTED 49ea4: 66d6 bnes 49e7c <IMFS_fifo_close+0x24> <== NOT EXECUTED
free(jnode);
49ea6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 49ea8: 4eb9 0004 a688 jsr 4a688 <free> <== NOT EXECUTED 49eae: 588f addql #4,%sp <== NOT EXECUTED
} IMFS_FIFO_RETURN(err); }
49eb0: 2002 movel %d2,%d0 <== NOT EXECUTED 49eb2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49eb8: 4e5e unlk %fp <== NOT EXECUTED 49eba: 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);
49ebc: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 49ec2: 4482 negl %d2 <== NOT EXECUTED 49ec4: 2040 moveal %d0,%a0 <== NOT EXECUTED 49ec6: 2082 movel %d2,%a0@ <== NOT EXECUTED 49ec8: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
49eca: 2002 movel %d2,%d0 <== NOT EXECUTED 49ecc: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49ed2: 4e5e unlk %fp <== NOT EXECUTED
49ed4: 4e75 rts
00049ce8 <IMFS_fifo_ioctl>: int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) {
49ce8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49cec: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49cf0: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 49cf4: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 49cf8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int err; if (command == FIONBIO) {
49cfa: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 49d00: 6724 beqs 49d26 <IMFS_fifo_ioctl+0x3e> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
49d02: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49d04: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49d08: 2f09 movel %a1,%sp@- <== NOT EXECUTED 49d0a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49d0c: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49d10: 4eb9 0004 c6f6 jsr 4c6f6 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
49d16: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 49d1a: 4a80 tstl %d0 <== NOT EXECUTED 49d1c: 6d46 blts 49d64 <IMFS_fifo_ioctl+0x7c> <== NOT EXECUTED
}
49d1e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d22: 4e5e unlk %fp <== NOT EXECUTED 49d24: 4e75 rts <== NOT EXECUTED
) { int err; if (command == FIONBIO) { if (buffer == NULL)
49d26: 4a89 tstl %a1 <== NOT EXECUTED 49d28: 6724 beqs 49d4e <IMFS_fifo_ioctl+0x66> <== NOT EXECUTED
err = -EFAULT; else { if (*(int *)buffer)
49d2a: 4a91 tstl %a1@ <== NOT EXECUTED 49d2c: 6710 beqs 49d3e <IMFS_fifo_ioctl+0x56> <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
49d2e: 7201 moveq #1,%d1 <== NOT EXECUTED 49d30: 4280 clrl %d0 <== NOT EXECUTED
} else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); }
49d32: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d36: 4e5e unlk %fp <== NOT EXECUTED
if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY;
49d38: 83a8 0014 orl %d1,%a0@(20) <== NOT EXECUTED
} else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); }
49d3c: 4e75 rts <== NOT EXECUTED
err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
49d3e: 72fe moveq #-2,%d1 <== NOT EXECUTED 49d40: 4280 clrl %d0 <== NOT EXECUTED
} else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); }
49d42: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d46: 4e5e unlk %fp <== NOT EXECUTED
err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
49d48: c3a8 0014 andl %d1,%a0@(20) <== NOT EXECUTED
} else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); }
49d4c: 4e75 rts <== NOT EXECUTED
} } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err);
49d4e: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED
) { int err; if (command == FIONBIO) { if (buffer == NULL)
49d54: 740e moveq #14,%d2 <== NOT EXECUTED
} } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err);
49d56: 2040 moveal %d0,%a0 <== NOT EXECUTED 49d58: 70ff moveq #-1,%d0 <== NOT EXECUTED 49d5a: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
49d5c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d60: 4e5e unlk %fp <== NOT EXECUTED 49d62: 4e75 rts <== NOT EXECUTED
} } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err);
49d64: 2400 movel %d0,%d2 <== NOT EXECUTED 49d66: 4482 negl %d2 <== NOT EXECUTED 49d68: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 49d6e: 2040 moveal %d0,%a0 <== NOT EXECUTED 49d70: 70ff moveq #-1,%d0 <== NOT EXECUTED 49d72: 2082 movel %d2,%a0@ <== NOT EXECUTED 49d74: 60e6 bras 49d5c <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
00049c84 <IMFS_fifo_lseek>: rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
49c84: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49c88: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49c8c: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
49c90: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49c92: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 49c96: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49c9a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49c9e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 49ca2: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49ca6: 4eb9 0004 c698 jsr 4c698 <pipe_lseek> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
49cac: 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);
49cb0: 2800 movel %d0,%d4 <== NOT EXECUTED 49cb2: 2600 movel %d0,%d3 <== NOT EXECUTED 49cb4: 5bc2 smi %d2 <== NOT EXECUTED 49cb6: 49c2 extbl %d2 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
49cb8: 4a82 tstl %d2 <== NOT EXECUTED 49cba: 6b0e bmis 49cca <IMFS_fifo_lseek+0x46> <== NOT EXECUTED
}
49cbc: 2203 movel %d3,%d1 <== NOT EXECUTED 49cbe: 2002 movel %d2,%d0 <== NOT EXECUTED 49cc0: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49cc6: 4e5e unlk %fp <== NOT EXECUTED 49cc8: 4e75 rts <== NOT EXECUTED
rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err);
49cca: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 49cd0: 4484 negl %d4 <== NOT EXECUTED 49cd2: 2040 moveal %d0,%a0 <== NOT EXECUTED 49cd4: 74ff moveq #-1,%d2 <== NOT EXECUTED 49cd6: 76ff moveq #-1,%d3 <== NOT EXECUTED 49cd8: 2084 movel %d4,%a0@ <== NOT EXECUTED
}
49cda: 2203 movel %d3,%d1 <== NOT EXECUTED 49cdc: 2002 movel %d2,%d0 <== NOT EXECUTED 49cde: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49ce4: 4e5e unlk %fp <== NOT EXECUTED
49ce6: 4e75 rts
00049ed6 <IMFS_fifo_open>: rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
49ed6: 4e56 0000 linkw %fp,#0 49eda: 206e 0008 moveal %fp@(8),%a0 49ede: 2f02 movel %d2,%sp@-
IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop);
49ee0: 2f08 movel %a0,%sp@- 49ee2: 2068 0038 moveal %a0@(56),%a0 49ee6: 41e8 004c lea %a0@(76),%a0 49eea: 2f08 movel %a0,%sp@- 49eec: 4eb9 0004 cc7c jsr 4cc7c <fifo_open>
IMFS_FIFO_RETURN(err);
49ef2: 508f addql #8,%sp
uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop);
49ef4: 2400 movel %d0,%d2
IMFS_FIFO_RETURN(err);
49ef6: 6d0a blts 49f02 <IMFS_fifo_open+0x2c>
}
49ef8: 2002 movel %d2,%d0 <== NOT EXECUTED 49efa: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49efe: 4e5e unlk %fp <== NOT EXECUTED 49f00: 4e75 rts <== NOT EXECUTED
) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err);
49f02: 4eb9 0004 eb8c jsr 4eb8c <__errno> 49f08: 4482 negl %d2 49f0a: 2040 moveal %d0,%a0 49f0c: 2082 movel %d2,%a0@ 49f0e: 74ff moveq #-1,%d2
}
49f10: 2002 movel %d2,%d0 49f12: 242e fffc movel %fp@(-4),%d2 49f16: 4e5e unlk %fp 49f18: 4e75 rts
... 00049dea <IMFS_fifo_read>: ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) {
49dea: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49dee: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49df2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49df4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
49df6: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49df8: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49dfc: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info;
49e00: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
49e04: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49e08: 4eb9 0004 c756 jsr 4c756 <pipe_read> <== NOT EXECUTED
if (err > 0)
49e0e: 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);
49e12: 2400 movel %d0,%d2 <== NOT EXECUTED
if (err > 0)
49e14: 6f22 bles 49e38 <IMFS_fifo_read+0x4e> <== NOT EXECUTED
IMFS_update_atime(jnode);
49e16: 42a7 clrl %sp@- <== NOT EXECUTED 49e18: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49e1c: 4eb9 0004 a828 jsr 4a828 <gettimeofday> <== NOT EXECUTED 49e22: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 49e28: 508f addql #8,%sp <== NOT EXECUTED
IMFS_FIFO_RETURN(err); }
49e2a: 2002 movel %d2,%d0 <== NOT EXECUTED 49e2c: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49e30: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49e34: 4e5e unlk %fp <== NOT EXECUTED 49e36: 4e75 rts <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err);
49e38: 4a80 tstl %d0 <== NOT EXECUTED 49e3a: 67ee beqs 49e2a <IMFS_fifo_read+0x40> <== NOT EXECUTED 49e3c: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 49e42: 4482 negl %d2 <== NOT EXECUTED 49e44: 2040 moveal %d0,%a0 <== NOT EXECUTED 49e46: 2082 movel %d2,%a0@ <== NOT EXECUTED 49e48: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
49e4a: 2002 movel %d2,%d0 <== NOT EXECUTED 49e4c: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49e50: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49e54: 4e5e unlk %fp <== NOT EXECUTED
49e56: 4e75 rts
00049d76 <IMFS_fifo_write>: ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
49d76: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49d7a: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49d7e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49d80: 2f02 movel %d2,%sp@- <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
49d82: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49d84: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49d88: 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;
49d8c: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
49d90: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49d94: 4eb9 0004 c94c jsr 4c94c <pipe_write> <== NOT EXECUTED
if (err > 0) {
49d9a: 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);
49d9e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (err > 0) {
49da0: 6f28 bles 49dca <IMFS_fifo_write+0x54> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
49da2: 42a7 clrl %sp@- <== NOT EXECUTED 49da4: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49da8: 4eb9 0004 a828 jsr 4a828 <gettimeofday> <== NOT EXECUTED 49dae: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 49db2: 508f addql #8,%sp <== NOT EXECUTED 49db4: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 49db8: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED
} IMFS_FIFO_RETURN(err); }
49dbc: 2002 movel %d2,%d0 <== NOT EXECUTED 49dbe: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49dc2: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49dc6: 4e5e unlk %fp <== NOT EXECUTED 49dc8: 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);
49dca: 4a80 tstl %d0 <== NOT EXECUTED 49dcc: 67ee beqs 49dbc <IMFS_fifo_write+0x46> <== NOT EXECUTED 49dce: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 49dd4: 4482 negl %d2 <== NOT EXECUTED 49dd6: 2040 moveal %d0,%a0 <== NOT EXECUTED 49dd8: 2082 movel %d2,%a0@ <== NOT EXECUTED 49dda: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
49ddc: 2002 movel %d2,%d0 <== NOT EXECUTED 49dde: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49de2: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49de6: 4e5e unlk %fp <== NOT EXECUTED
49de8: 4e75 rts
00049f1c <IMFS_find_match_in_dir>: IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) {
49f1c: 4e56 fff0 linkw %fp,#-16 49f20: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49f24: 246e 0008 moveal %fp@(8),%a2 49f28: 242e 000c movel %fp@(12),%d2
/* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory );
49f2c: 4a8a tstl %a2 49f2e: 6776 beqs 49fa6 <IMFS_find_match_in_dir+0x8a>
if ( !name )
49f30: 4a82 tstl %d2 49f32: 6756 beqs 49f8a <IMFS_find_match_in_dir+0x6e>
/* * Check for "." and ".." */ if ( !strcmp( name, dotname ) )
49f34: 4879 0005 c87c pea 5c87c <dotname> 49f3a: 47f9 0004 fa94 lea 4fa94 <strcmp>,%a3 49f40: 2f02 movel %d2,%sp@- 49f42: 4e93 jsr %a3@ 49f44: 508f addql #8,%sp 49f46: 4a80 tstl %d0 49f48: 6714 beqs 49f5e <IMFS_find_match_in_dir+0x42>
return directory; if ( !strcmp( name, dotdotname ) )
49f4a: 4879 0005 c87e pea 5c87e <dotdotname> 49f50: 2f02 movel %d2,%sp@- 49f52: 4e93 jsr %a3@ 49f54: 508f addql #8,%sp 49f56: 4a80 tstl %d0 49f58: 6610 bnes 49f6a <IMFS_find_match_in_dir+0x4e>
return directory->Parent;
49f5a: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; }
49f5e: 200a movel %a2,%d0 <== NOT EXECUTED 49f60: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 49f66: 4e5e unlk %fp <== NOT EXECUTED 49f68: 4e75 rts <== NOT EXECUTED
if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first;
49f6a: 286a 004c moveal %a2@(76),%a4
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
49f6e: 45ea 0050 lea %a2@(80),%a2 49f72: b5cc cmpal %a4,%a2 49f74: 6714 beqs 49f8a <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 ) )
49f76: 486c 000c pea %a4@(12) 49f7a: 2f02 movel %d2,%sp@- 49f7c: 4e93 jsr %a3@ 49f7e: 508f addql #8,%sp 49f80: 4a80 tstl %d0 49f82: 6714 beqs 49f98 <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 ) {
49f84: 2854 moveal %a4@,%a4
if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first;
49f86: b5cc cmpal %a4,%a2 49f88: 66ec bnes 49f76 <IMFS_find_match_in_dir+0x5a> 49f8a: 95ca subal %a2,%a2
if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; }
49f8c: 200a movel %a2,%d0 49f8e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49f94: 4e5e unlk %fp 49f96: 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 ) )
49f98: 244c moveal %a4,%a2
return the_jnode; } return 0; }
49f9a: 200a movel %a2,%d0 49f9c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49fa2: 4e5e unlk %fp 49fa4: 4e75 rts
/* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory );
49fa6: 4879 0005 d04f pea 5d04f <_global_impure_ptr+0x1b1> <== NOT EXECUTED 49fac: 4879 0005 c881 pea 5c881 <__FUNCTION__.5388> <== NOT EXECUTED 49fb2: 4878 002a pea 2a <OPER2+0x16> <== NOT EXECUTED 49fb6: 4879 0005 c830 pea 5c830 <IMFS_fifo_handlers+0x38> <== NOT EXECUTED 49fbc: 4eb9 0004 a49c jsr 4a49c <__assert_func> <== NOT EXECUTED
... 0004f814 <IMFS_freenodinfo>: int IMFS_freenodinfo( rtems_filesystem_location_info_t *pathloc /* IN */ ) { return 0; }
4f814: 4280 clrl %d0
*/ int IMFS_freenodinfo( rtems_filesystem_location_info_t *pathloc /* IN */ ) {
4f816: 4e56 0000 linkw %fp,#0
return 0; }
4f81a: 4e5e unlk %fp 4f81c: 4e75 rts
... 0004f820 <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 ) {
4f820: 4e56 ffd8 linkw %fp,#-40 4f824: 206e 0008 moveal %fp@(8),%a0 4f828: 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;
4f82c: 47ee ffec lea %fp@(-20),%a3 4f830: 49f9 0004 ed44 lea 4ed44 <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 );
4f836: 4bf9 0004 36c8 lea 436c8 <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;
4f83c: 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;
4f840: 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;
4f844: 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;
4f848: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4f84e: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4f854: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4f85a: 2d68 002c fffc movel %a0@(44),%fp@(-4)
*/ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent;
4f860: 242a 0008 movel %a2@(8),%d2
loc.node_access = (void *)jnode;
4f864: 2d4a ffec movel %a2,%fp@(-20)
IMFS_Set_handlers( &loc );
4f868: 2f0b movel %a3,%sp@- 4f86a: 4e94 jsr %a4@
if ( jnode->type != IMFS_DIRECTORY ) {
4f86c: 588f addql #4,%sp
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4f86e: 200a movel %a2,%d0 4f870: 0680 0000 0050 addil #80,%d0 4f876: 7201 moveq #1,%d1 4f878: b2aa 0048 cmpl %a2@(72),%d1 4f87c: 6634 bnes 4f8b2 <IMFS_fsunmount+0x92> 4f87e: b0aa 004c cmpl %a2@(76),%d0 4f882: 672e beqs 4f8b2 <IMFS_fsunmount+0x92>
result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) {
4f884: 4a8a tstl %a2 4f886: 671e beqs 4f8a6 <IMFS_fsunmount+0x86>
if ( jnode->type == IMFS_DIRECTORY ) {
4f888: 7001 moveq #1,%d0 4f88a: b0aa 0048 cmpl %a2@(72),%d0 4f88e: 66d0 bnes 4f860 <IMFS_fsunmount+0x40> 4f890: 200a movel %a2,%d0 4f892: 0680 0000 0050 addil #80,%d0 4f898: b0aa 004c cmpl %a2@(76),%d0 4f89c: 67c2 beqs 4f860 <IMFS_fsunmount+0x40>
if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode );
4f89e: 246a 004c moveal %a2@(76),%a2
} } } while (jnode != NULL);
4f8a2: 4a8a tstl %a2 4f8a4: 66ba bnes 4f860 <IMFS_fsunmount+0x40> 4f8a6: 4280 clrl %d0
return 0; }
4f8a8: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4f8ae: 4e5e unlk %fp 4f8b0: 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 );
4f8b2: 2f0b movel %a3,%sp@- 4f8b4: 42a7 clrl %sp@- 4f8b6: 4e95 jsr %a5@
if (result != 0)
4f8b8: 508f addql #8,%sp 4f8ba: 4a80 tstl %d0 4f8bc: 6604 bnes 4f8c2 <IMFS_fsunmount+0xa2> 4f8be: 2442 moveal %d2,%a2 4f8c0: 60c2 bras 4f884 <IMFS_fsunmount+0x64>
if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL);
4f8c2: 70ff moveq #-1,%d0 <== NOT EXECUTED
return 0; }
4f8c4: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4f8ca: 4e5e unlk %fp <== NOT EXECUTED 4f8cc: 4e75 rts <== NOT EXECUTED
... 00049fc4 <IMFS_get_token>: const char *path, int pathlen, char *token, int *token_len ) {
49fc4: 4e56 ffec linkw %fp,#-20 49fc8: 206e 0008 moveal %fp@(8),%a0 49fcc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49fd0: 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) ) {
49fd4: 742f moveq #47,%d2
register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i];
49fd6: 1210 moveb %a0@,%d1
const char *path, int pathlen, char *token, int *token_len ) {
49fd8: 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) ) {
49fdc: 1001 moveb %d1,%d0
const char *path, int pathlen, char *token, int *token_len ) {
49fde: 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) ) {
49fe2: 49c0 extbl %d0 49fe4: b480 cmpl %d0,%d2 49fe6: 6700 00ac beqw 4a094 <IMFS_get_token+0xd0> 49fea: 765c moveq #92,%d3 49fec: b680 cmpl %d0,%d3 49fee: 6700 00a4 beqw 4a094 <IMFS_get_token+0xd0> 49ff2: 4a01 tstb %d1 49ff4: 6700 00bc beqw 4a0b2 <IMFS_get_token+0xee> 49ff8: 4a89 tstl %a1 49ffa: 6f00 0098 blew 4a094 <IMFS_get_token+0xd0>
token[i] = c;
49ffe: 4280 clrl %d0 4a000: 1481 moveb %d1,%a2@
return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i];
4a002: 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) ) {
4a004: 762f moveq #47,%d3
return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i];
4a006: 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) ) {
4a00a: 1401 moveb %d1,%d2 4a00c: 49c2 extbl %d2 4a00e: b682 cmpl %d2,%d3 4a010: 6726 beqs 4a038 <IMFS_get_token+0x74> 4a012: 163c 005c moveb #92,%d3 4a016: b682 cmpl %d2,%d3 4a018: 671e beqs 4a038 <IMFS_get_token+0x74> 4a01a: 4a01 tstb %d1 4a01c: 671a beqs 4a038 <IMFS_get_token+0x74> 4a01e: b089 cmpl %a1,%d0 4a020: 6c16 bges 4a038 <IMFS_get_token+0x74>
token[i] = c;
4a022: 1581 0800 moveb %d1,%a2@(00000000,%d0:l)
if ( i == IMFS_NAME_MAX )
4a026: 7220 moveq #32,%d1 4a028: b280 cmpl %d0,%d1 4a02a: 66d6 bnes 4a002 <IMFS_get_token+0x3e> 4a02c: 7004 moveq #4,%d0
else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; }
4a02e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a034: 4e5e unlk %fp 4a036: 4e75 rts
i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') {
4a038: 4a32 08ff tstb %a2@(ffffffff,%d0:l) 4a03c: 6706 beqs 4a044 <IMFS_get_token+0x80>
token[i] = '\0';
4a03e: 4201 clrb %d1 4a040: 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 )
4a044: 4879 0005 c898 pea 5c898 <__FUNCTION__.5388+0x17> 4a04a: 47f9 0004 fa94 lea 4fa94 <strcmp>,%a3
/* * Set token_len to the number of characters copied. */ *token_len = i;
4a050: 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 )
4a052: 2f0a movel %a2,%sp@- 4a054: 4e93 jsr %a3@ 4a056: 508f addql #8,%sp 4a058: 4a80 tstl %d0 4a05a: 671e beqs 4a07a <IMFS_get_token+0xb6>
type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 )
4a05c: 4879 0005 c899 pea 5c899 <__FUNCTION__.5388+0x18> 4a062: 2f0a movel %a2,%sp@- 4a064: 4e93 jsr %a3@ 4a066: 508f addql #8,%sp 4a068: 4a80 tstl %d0 4a06a: 661c bnes 4a088 <IMFS_get_token+0xc4> 4a06c: 103c 0001 moveb #1,%d0
type = IMFS_CURRENT_DIR; } return type; }
4a070: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a076: 4e5e unlk %fp 4a078: 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 )
4a07a: 103c 0002 moveb #2,%d0
else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; }
4a07e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a084: 4e5e unlk %fp 4a086: 4e75 rts
*/ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 )
4a088: 7003 moveq #3,%d0
type = IMFS_CURRENT_DIR; } return type; }
4a08a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a090: 4e5e unlk %fp 4a092: 4e75 rts
/* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c;
4a094: 1481 moveb %d1,%a2@
if ( (token[i] != '\0') && pathlen ) {
4a096: 4a89 tstl %a1 4a098: 6710 beqs 4a0aa <IMFS_get_token+0xe6>
type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0';
4a09a: 7001 moveq #1,%d0 4a09c: 7201 moveq #1,%d1
/* * Set token_len to the number of characters copied. */ *token_len = i;
4a09e: 2881 movel %d1,%a4@
else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; }
4a0a0: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a0a6: 4e5e unlk %fp 4a0a8: 4e75 rts
i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') {
4a0aa: 4281 clrl %d1 4a0ac: 4280 clrl %d0
/* * Set token_len to the number of characters copied. */ *token_len = i;
4a0ae: 2881 movel %d1,%a4@ 4a0b0: 60ee bras 4a0a0 <IMFS_get_token+0xdc>
/* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c;
4a0b2: 4280 clrl %d0 4a0b4: 4281 clrl %d1 4a0b6: 4212 clrb %a2@ 4a0b8: 60e4 bras 4a09e <IMFS_get_token+0xda>
... 0004a0bc <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) {
4a0bc: 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 ) {
4a0be: 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,
4a0c2: 2079 0005 d6a8 moveal 5d6a8 <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 ) {
4a0c8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a0cc: 246e 0008 moveal %fp@(8),%a2 4a0d0: 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) {
4a0d4: b088 cmpl %a0,%d0 4a0d6: 6716 beqs 4a0ee <IMFS_initialize_support+0x32> 4a0d8: 4200 clrb %d0 4a0da: 7220 moveq #32,%d1 4a0dc: 5280 addql #1,%d0 4a0de: b288 cmpl %a0,%d1 4a0e0: 670c beqs 4a0ee <IMFS_initialize_support+0x32> 4a0e2: 7605 moveq #5,%d3 4a0e4: d281 addl %d1,%d1 4a0e6: b680 cmpl %d0,%d3 4a0e8: 66f2 bnes 4a0dc <IMFS_initialize_support+0x20>
4a0ea: 307c 0080 moveaw #128,%a0 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid)
4a0ee: 23c8 0005 e6ac movel %a0,5e6ac <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();
4a0f4: 4eb9 0004 d19e jsr 4d19e <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 ) );
4a0fa: 4878 000c pea c <OPER1>
* 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;
4a0fe: 41f9 0005 cc16 lea 5cc16 <IMFS_LIMITS_AND_OPTIONS>,%a0
/* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
4a104: 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;
4a108: 2550 0038 movel %a0@,%a2@(56) 4a10c: 41f9 0005 cc1a lea 5cc1a <IMFS_LIMITS_AND_OPTIONS+0x4>,%a0 4a112: 2550 003c movel %a0@,%a2@(60) 4a116: 41f9 0005 cc1e lea 5cc1e <IMFS_LIMITS_AND_OPTIONS+0x8>,%a0 4a11c: 2550 0040 movel %a0@,%a2@(64) 4a120: 41f9 0005 cc22 lea 5cc22 <IMFS_LIMITS_AND_OPTIONS+0xc>,%a0 4a126: 2550 0044 movel %a0@,%a2@(68) 4a12a: 41f9 0005 cc26 lea 5cc26 <IMFS_LIMITS_AND_OPTIONS+0x10>,%a0 4a130: 2550 0048 movel %a0@,%a2@(72) 4a134: 41f9 0005 cc2a lea 5cc2a <IMFS_LIMITS_AND_OPTIONS+0x14>,%a0 4a13a: 2550 004c movel %a0@,%a2@(76) 4a13e: 41f9 0005 cc2e lea 5cc2e <IMFS_LIMITS_AND_OPTIONS+0x18>,%a0 4a144: 2550 0050 movel %a0@,%a2@(80) 4a148: 41f9 0005 cc32 lea 5cc32 <IMFS_LIMITS_AND_OPTIONS+0x1c>,%a0 4a14e: 2550 0054 movel %a0@,%a2@(84) 4a152: 41f9 0005 cc36 lea 5cc36 <IMFS_LIMITS_AND_OPTIONS+0x20>,%a0 4a158: 2550 0058 movel %a0@,%a2@(88) 4a15c: 41f9 0005 cc3a lea 5cc3a <IMFS_LIMITS_AND_OPTIONS+0x24>,%a0 4a162: 2550 005c movel %a0@,%a2@(92) 4a166: 41f9 0005 cc3e lea 5cc3e <IMFS_LIMITS_AND_OPTIONS+0x28>,%a0 4a16c: 2550 0060 movel %a0@,%a2@(96) 4a170: 41f9 0005 cc42 lea 5cc42 <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;
4a176: 256e 000c 0028 movel %fp@(12),%a2@(40)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
4a17c: 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();
4a180: 2540 001c movel %d0,%a2@(28)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
4a184: 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 ) );
4a188: 4eb9 0004 a59c jsr 4a59c <calloc>
if ( !fs_info ) {
4a18e: 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 ) );
4a190: 2040 moveal %d0,%a0
if ( !fs_info ) {
4a192: 4a80 tstl %d0 4a194: 672e beqs 4a1c4 <IMFS_initialize_support+0x108>
/* * Set st_ino for the root to 1. */ fs_info->ino_count = 1;
4a196: 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;
4a198: 226a 001c moveal %a2@(28),%a1
/* * Set st_ino for the root to 1. */ fs_info->ino_count = 1;
4a19c: 2080 movel %d0,%a0@
fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count;
4a19e: 7001 moveq #1,%d0
/* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers;
4a1a0: 216e 0010 0004 movel %fp@(16),%a0@(4)
fs_info->directory_handlers = directory_handlers;
4a1a6: 2142 0008 movel %d2,%a0@(8)
jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count;
4a1aa: 2340 0034 movel %d0,%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;
4a1ae: 2548 0034 movel %a0,%a2@(52)
jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize();
4a1b2: 4eb9 0004 c6a2 jsr 4c6a2 <rtems_pipe_initialize>
return 0; }
4a1b8: 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();
4a1be: 4280 clrl %d0
return 0; }
4a1c0: 4e5e unlk %fp 4a1c2: 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);
4a1c4: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 4a1c8: 4eb9 0004 a688 jsr 4a688 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
4a1ce: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 4a1d4: 588f addql #4,%sp <== NOT EXECUTED 4a1d6: 720c moveq #12,%d1 <== NOT EXECUTED 4a1d8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a1da: 70ff moveq #-1,%d0 <== NOT EXECUTED
/* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; }
4a1dc: 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);
4a1e2: 2081 movel %d1,%a0@ <== NOT EXECUTED
/* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; }
4a1e4: 4e5e unlk %fp <== NOT EXECUTED
4a1e6: 4e75 rts
00043348 <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 )
43348: 4280 clrl %d0 4334a: 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 */ ) {
4334c: 4e56 ffbc linkw %fp,#-68 43350: 206e 0008 moveal %fp@(8),%a0 43354: 2f03 movel %d3,%sp@-
int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access;
43356: 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 */ ) {
43358: 2f02 movel %d2,%sp@- 4335a: 242e 0010 movel %fp@(16),%d2
int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access;
4335e: 2d48 ffe0 movel %a0,%fp@(-32)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
43362: 3028 0032 movew %a0@(50),%d0 43366: b280 cmpl %d0,%d1 43368: 6578 bcss 433e2 <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 );
4336a: 2f02 movel %d2,%sp@- 4336c: 260e movel %fp,%d3 4336e: 0683 ffff ffbf addil #-65,%d3 43374: 4eb9 0005 573c jsr 5573c <strlen> 4337a: 588f addql #4,%sp 4337c: 486e fffc pea %fp@(-4) 43380: 2f03 movel %d3,%sp@- 43382: 2f00 movel %d0,%sp@- 43384: 2f02 movel %d2,%sp@- 43386: 4eb9 0004 f978 jsr 4f978 <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(
4338c: 486e ffe0 pea %fp@(-32) 43390: 2f3c 0000 a1ff movel #41471,%sp@- 43396: 2f03 movel %d3,%sp@- 43398: 4878 0003 pea 3 <DIVIDE> 4339c: 2f2e 000c movel %fp@(12),%sp@- 433a0: 4eb9 0004 eb50 jsr 4eb50 <IMFS_create_node>
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node )
433a6: 4fef 0024 lea %sp@(36),%sp 433aa: 4a80 tstl %d0 433ac: 674e beqs 433fc <IMFS_link+0xb4>
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++;
433ae: 206e ffe0 moveal %fp@(-32),%a0 433b2: 3028 0032 movew %a0@(50),%d0 433b6: 5280 addql #1,%d0 433b8: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( info.hard_link.link_node );
433bc: 42a7 clrl %sp@- 433be: 486e fff4 pea %fp@(-12) 433c2: 4eb9 0004 404c jsr 4404c <gettimeofday> 433c8: 206e ffe0 moveal %fp@(-32),%a0
return 0;
433cc: 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 );
433ce: 4280 clrl %d0 433d0: 216e fff4 0044 movel %fp@(-12),%a0@(68)
return 0; }
433d6: 242e ffb4 movel %fp@(-76),%d2 433da: 262e ffb8 movel %fp@(-72),%d3 433de: 4e5e unlk %fp 433e0: 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 );
433e2: 4eb9 0005 43c0 jsr 543c0 <__errno> 433e8: 741f moveq #31,%d2 433ea: 2040 moveal %d0,%a0 433ec: 70ff moveq #-1,%d0 433ee: 2082 movel %d2,%a0@
*/ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; }
433f0: 242e ffb4 movel %fp@(-76),%d2 433f4: 262e ffb8 movel %fp@(-72),%d3 433f8: 4e5e unlk %fp 433fa: 4e75 rts
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM );
433fc: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED
*/ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; }
43402: 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 );
43406: 2040 moveal %d0,%a0 <== NOT EXECUTED 43408: 720c moveq #12,%d1 <== NOT EXECUTED 4340a: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; }
4340c: 262e ffb8 movel %fp@(-72),%d3 <== NOT EXECUTED 43410: 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 );
43412: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; }
43414: 4e75 rts <== NOT EXECUTED
... 0005250c <IMFS_memfile_addblock>: MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) {
5250c: 4e56 0000 linkw %fp,#0 52510: 206e 0008 moveal %fp@(8),%a0 52514: 2f0a movel %a2,%sp@-
block_p memory; block_p *block_entry_ptr; assert( the_jnode );
52516: 4a88 tstl %a0 52518: 6764 beqs 5257e <IMFS_memfile_addblock+0x72>
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
5251a: 7005 moveq #5,%d0 5251c: b0a8 0048 cmpl %a0@(72),%d0 52520: 6640 bnes 52562 <IMFS_memfile_addblock+0x56>
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 );
52522: 4878 0001 pea 1 <ADD> 52526: 2f2e 000c movel %fp@(12),%sp@- 5252a: 2f08 movel %a0,%sp@- 5252c: 4eb9 0005 2028 jsr 52028 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
52532: 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 );
52536: 2440 moveal %d0,%a2
if ( *block_entry_ptr )
52538: 4a92 tstl %a2@ 5253a: 670a beqs 52546 <IMFS_memfile_addblock+0x3a>
#endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory;
5253c: 4280 clrl %d0
return 0; }
5253e: 246e fffc moveal %fp@(-4),%a2 52542: 4e5e unlk %fp 52544: 4e75 rts
#if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block();
52546: 4eb9 0005 2004 jsr 52004 <memfile_alloc_block>
if ( !memory )
5254c: 4a80 tstl %d0 5254e: 6706 beqs 52556 <IMFS_memfile_addblock+0x4a>
return 1; *block_entry_ptr = memory;
52550: 2480 movel %d0,%a2@ 52552: 4280 clrl %d0 52554: 60e8 bras 5253e <IMFS_memfile_addblock+0x32>
return 0; }
52556: 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 )
5255a: 103c 0001 moveb #1,%d0 <== NOT EXECUTED
return 1; *block_entry_ptr = memory; return 0; }
5255e: 4e5e unlk %fp <== NOT EXECUTED 52560: 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 );
52562: 4879 0006 2be0 pea 62be0 <CSWTCH.8+0x60> <== NOT EXECUTED 52568: 4879 0006 2cf9 pea 62cf9 <__FUNCTION__.6022> <== NOT EXECUTED 5256e: 4878 016d pea 16d <DBL_MANT_DIG+0x138> <== NOT EXECUTED 52572: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52578: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
) { block_p memory; block_p *block_entry_ptr; assert( the_jnode );
5257e: 4879 0006 2b90 pea 62b90 <CSWTCH.8+0x10> <== NOT EXECUTED 52584: 4879 0006 2cf9 pea 62cf9 <__FUNCTION__.6022> <== NOT EXECUTED 5258a: 4878 0169 pea 169 <DBL_MANT_DIG+0x134> <== NOT EXECUTED 5258e: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52594: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
0005259a <IMFS_memfile_extend>: MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) {
5259a: 4e56 ffdc linkw %fp,#-36 5259e: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 525a2: 246e 0008 moveal %fp@(8),%a2 525a6: 262e 000c movel %fp@(12),%d3 525aa: 282e 0010 movel %fp@(16),%d4
/* * Perform internal consistency checks */ assert( the_jnode );
525ae: 4a8a tstl %a2 525b0: 6700 0102 beqw 526b4 <IMFS_memfile_extend+0x11a>
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
525b4: 7005 moveq #5,%d0 525b6: b0aa 0048 cmpl %a2@(72),%d0 525ba: 6600 0114 bnew 526d0 <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 )
525be: 2439 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d2 525c4: 2202 movel %d2,%d1 525c6: e489 lsrl #2,%d1 525c8: 2001 movel %d1,%d0 525ca: 5280 addql #1,%d0 525cc: 4c01 0800 mulsl %d1,%d0 525d0: 4285 clrl %d5 525d2: 5280 addql #1,%d0 525d4: 4c01 0800 mulsl %d1,%d0 525d8: 5380 subql #1,%d0 525da: 4c02 0800 mulsl %d2,%d0 525de: 2c00 movel %d0,%d6 525e0: 2005 movel %d5,%d0 525e2: 2206 movel %d6,%d1 525e4: 9284 subl %d4,%d1 525e6: 9183 subxl %d3,%d0 525e8: 6f00 00b2 blew 5269c <IMFS_memfile_extend+0x102>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size )
525ec: 2a2a 004c movel %a2@(76),%d5 525f0: 2c2a 0050 movel %a2@(80),%d6 525f4: 2003 movel %d3,%d0 525f6: 2204 movel %d4,%d1 525f8: 9286 subl %d6,%d1 525fa: 9185 subxl %d5,%d0 525fc: 6f62 bles 52660 <IMFS_memfile_extend+0xc6>
/* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
525fe: 47f9 0005 ff8c lea 5ff8c <__divdi3>,%a3 52604: 2202 movel %d2,%d1 52606: 5bc0 smi %d0 52608: 49c0 extbl %d0 5260a: 2840 moveal %d0,%a4 5260c: 2a41 moveal %d1,%a5 5260e: 2f0d movel %a5,%sp@- 52610: 2f00 movel %d0,%sp@- 52612: 2f04 movel %d4,%sp@- 52614: 2f03 movel %d3,%sp@- 52616: 4e93 jsr %a3@ 52618: 4fef 0010 lea %sp@(16),%sp 5261c: 2401 movel %d1,%d2
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
5261e: 2f0d movel %a5,%sp@- 52620: 2f0c movel %a4,%sp@- 52622: 2f06 movel %d6,%sp@- 52624: 2f05 movel %d5,%sp@- 52626: 4e93 jsr %a3@ 52628: 4fef 0010 lea %sp@(16),%sp 5262c: 2841 moveal %d1,%a4
/* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) {
5262e: b282 cmpl %d2,%d1 52630: 621a bhis 5264c <IMFS_memfile_extend+0xb2> 52632: 2a01 movel %d1,%d5 52634: 47f9 0005 250c lea 5250c <IMFS_memfile_addblock>,%a3
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
5263a: 2f05 movel %d5,%sp@- 5263c: 2f0a movel %a2,%sp@- 5263e: 4e93 jsr %a3@ 52640: 508f addql #8,%sp 52642: 4a80 tstl %d0 52644: 6626 bnes 5266c <IMFS_memfile_extend+0xd2>
/* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) {
52646: 5285 addql #1,%d5 52648: ba82 cmpl %d2,%d5 5264a: 63ee blss 5263a <IMFS_memfile_extend+0xa0>
/* * Set the new length of the file. */ the_jnode->info.file.size = new_length;
5264c: 4280 clrl %d0 5264e: 2543 004c movel %d3,%a2@(76) 52652: 2544 0050 movel %d4,%a2@(80)
return 0; }
52656: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 5265c: 4e5e unlk %fp 5265e: 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 )
52660: 4280 clrl %d0
* Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; }
52662: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52668: 4e5e unlk %fp 5266a: 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-- ) {
5266c: ba8c cmpl %a4,%d5 <== NOT EXECUTED 5266e: 6514 bcss 52684 <IMFS_memfile_extend+0xea> <== NOT EXECUTED 52670: 47f9 0005 228c lea 5228c <IMFS_memfile_remove_block>,%a3 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
52676: 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-- ) {
52678: 5385 subql #1,%d5 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
5267a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5267c: 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-- ) {
5267e: 508f addql #8,%sp <== NOT EXECUTED 52680: ba8c cmpl %a4,%d5 <== NOT EXECUTED 52682: 64f2 bccs 52676 <IMFS_memfile_extend+0xdc> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC );
52684: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 5268a: 721c moveq #28,%d1 <== NOT EXECUTED 5268c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5268e: 70ff moveq #-1,%d0 <== NOT EXECUTED
* Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; }
52690: 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 );
52696: 2081 movel %d1,%a0@ <== NOT EXECUTED
* Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; }
52698: 4e5e unlk %fp <== NOT EXECUTED 5269a: 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 );
5269c: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 526a2: 7416 moveq #22,%d2 <== NOT EXECUTED 526a4: 2040 moveal %d0,%a0 <== NOT EXECUTED 526a6: 70ff moveq #-1,%d0 <== NOT EXECUTED 526a8: 2082 movel %d2,%a0@ <== NOT EXECUTED
* Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; }
526aa: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 526b0: 4e5e unlk %fp <== NOT EXECUTED 526b2: 4e75 rts <== NOT EXECUTED
/* * Perform internal consistency checks */ assert( the_jnode );
526b4: 4879 0006 2b90 pea 62b90 <CSWTCH.8+0x10> <== NOT EXECUTED 526ba: 4879 0006 2d0f pea 62d0f <__FUNCTION__.5973> <== NOT EXECUTED 526c0: 4878 0131 pea 131 <DBL_MANT_DIG+0xfc> <== NOT EXECUTED 526c4: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 526ca: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
526d0: 4879 0006 2be0 pea 62be0 <CSWTCH.8+0x60> <== NOT EXECUTED 526d6: 4879 0006 2d0f pea 62d0f <__FUNCTION__.5973> <== NOT EXECUTED 526dc: 4878 0135 pea 135 <DBL_MANT_DIG+0x100> <== NOT EXECUTED 526e0: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 526e6: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
00052028 <IMFS_memfile_get_block_pointer>: #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) {
52028: 4e56 fff0 linkw %fp,#-16 5202c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 52030: 246e 0008 moveal %fp@(8),%a2 52034: 242e 000c movel %fp@(12),%d2
/* * Perform internal consistency checks */ assert( the_jnode );
52038: 4a8a tstl %a2 5203a: 6700 01b2 beqw 521ee <IMFS_memfile_get_block_pointer+0x1c6>
if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE );
5203e: 7005 moveq #5,%d0 52040: b0aa 0048 cmpl %a2@(72),%d0 52044: 6600 01c4 bnew 5220a <IMFS_memfile_get_block_pointer+0x1e2>
/* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) {
52048: 2239 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d1 5204e: e489 lsrl #2,%d1 52050: 2001 movel %d1,%d0 52052: 5380 subql #1,%d0 52054: b082 cmpl %d2,%d0 52056: 6446 bccs 5209e <IMFS_memfile_get_block_pointer+0x76>
/* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) {
52058: 2001 movel %d1,%d0 <== NOT EXECUTED 5205a: 5280 addql #1,%d0 <== NOT EXECUTED 5205c: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 52060: 2040 moveal %d0,%a0 <== NOT EXECUTED 52062: 5388 subql #1,%a0 <== NOT EXECUTED 52064: b1c2 cmpal %d2,%a0 <== NOT EXECUTED 52066: 6500 00c2 bcsw 5212a <IMFS_memfile_get_block_pointer+0x102><== NOT EXECUTED
#if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT;
5206a: 9481 subl %d1,%d2 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect;
5206c: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED
fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
52070: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 52074: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) {
52078: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 5207c: 6700 0086 beqw 52104 <IMFS_memfile_get_block_pointer+0xdc><== NOT EXECUTED
if ( !p ) {
52080: 4a88 tstl %a0 <== NOT EXECUTED 52082: 6750 beqs 520d4 <IMFS_memfile_get_block_pointer+0xac><== NOT EXECUTED
if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ];
52084: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 52088: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
5208a: 4a88 tstl %a0 <== NOT EXECUTED 5208c: 6760 beqs 520ee <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 ];
5208e: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 52092: 2008 movel %a0,%d0 <== NOT EXECUTED
/* * This means the requested block number is out of range. */ return 0; }
52094: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5209a: 4e5e unlk %fp <== NOT EXECUTED 5209c: 4e75 rts <== NOT EXECUTED
if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect;
5209e: 206a 0054 moveal %a2@(84),%a0
if ( malloc_it ) {
520a2: 4aae 0010 tstl %fp@(16) 520a6: 6776 beqs 5211e <IMFS_memfile_get_block_pointer+0xf6>
if ( !p ) {
520a8: 4a88 tstl %a0 520aa: 6710 beqs 520bc <IMFS_memfile_get_block_pointer+0x94>
} if ( !p ) return 0; return &info->indirect[ my_block ];
520ac: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 520b0: 2008 movel %a0,%d0
/* * This means the requested block number is out of range. */ return 0; }
520b2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 520b8: 4e5e unlk %fp 520ba: 4e75 rts
p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block();
520bc: 4eb9 0005 2004 jsr 52004 <memfile_alloc_block> 520c2: 2040 moveal %d0,%a0
if ( !p )
520c4: 4a80 tstl %d0 520c6: 674a beqs 52112 <IMFS_memfile_get_block_pointer+0xea>
return 0; info->indirect = p;
520c8: 2540 0054 movel %d0,%a2@(84)
} if ( !p ) return 0; return &info->indirect[ my_block ];
520cc: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 520d0: 2008 movel %a0,%d0 520d2: 60de bras 520b2 <IMFS_memfile_get_block_pointer+0x8a>
p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block();
520d4: 4eb9 0005 2004 jsr 52004 <memfile_alloc_block> <== NOT EXECUTED 520da: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p )
520dc: 4a80 tstl %d0 <== NOT EXECUTED 520de: 6732 beqs 52112 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0; info->doubly_indirect = p;
520e0: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED
} p1 = (block_p *)p[ doubly ];
520e4: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 520e8: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
520ea: 4a88 tstl %a0 <== NOT EXECUTED 520ec: 66a0 bnes 5208e <IMFS_memfile_get_block_pointer+0x66><== NOT EXECUTED
p1 = memfile_alloc_block();
520ee: 4eb9 0005 2004 jsr 52004 <memfile_alloc_block> <== NOT EXECUTED 520f4: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p1 )
520f6: 4a80 tstl %d0 <== NOT EXECUTED 520f8: 6718 beqs 52112 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0; p[ doubly ] = (block_p) p1;
520fa: 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 ];
520fc: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 52100: 2008 movel %a0,%d0 <== NOT EXECUTED 52102: 6090 bras 52094 <IMFS_memfile_get_block_pointer+0x6c><== NOT EXECUTED
} return (block_p *)&p1[ singly ]; } if ( !p )
52104: 4a88 tstl %a0 <== NOT EXECUTED 52106: 670a beqs 52112 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0; p = (block_p *)p[ doubly ];
52108: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED
if ( !p )
5210c: 4a88 tstl %a0 <== NOT EXECUTED 5210e: 6600 ff7e bnew 5208e <IMFS_memfile_get_block_pointer+0x66><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
52112: 4280 clrl %d0 <== NOT EXECUTED
/* * This means the requested block number is out of range. */ return 0; }
52114: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5211a: 4e5e unlk %fp <== NOT EXECUTED 5211c: 4e75 rts <== NOT EXECUTED
info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p )
5211e: 4a88 tstl %a0 52120: 67f0 beqs 52112 <IMFS_memfile_get_block_pointer+0xea>
return 0; return &info->indirect[ my_block ];
52122: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 52126: 2008 movel %a0,%d0 52128: 6088 bras 520b2 <IMFS_memfile_get_block_pointer+0x8a>
#endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) {
5212a: 2600 movel %d0,%d3 <== NOT EXECUTED 5212c: 5283 addql #1,%d3 <== NOT EXECUTED 5212e: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 52132: 5383 subql #1,%d3 <== NOT EXECUTED 52134: b682 cmpl %d2,%d3 <== NOT EXECUTED 52136: 65da bcss 52112 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
52138: 9480 subl %d0,%d2 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
5213a: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 5213e: 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;
52142: 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;
52146: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 5214a: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) {
5214e: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 52152: 6778 beqs 521cc <IMFS_memfile_get_block_pointer+0x1a4><== NOT EXECUTED
if ( !p ) {
52154: 4a88 tstl %a0 <== NOT EXECUTED 52156: 6756 beqs 521ae <IMFS_memfile_get_block_pointer+0x186><== NOT EXECUTED
if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ];
52158: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 5215c: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
5215e: 4a88 tstl %a0 <== NOT EXECUTED 52160: 6730 beqs 52192 <IMFS_memfile_get_block_pointer+0x16a><== NOT EXECUTED
if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ];
52162: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 52166: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p2 ) {
52168: 4a88 tstl %a0 <== NOT EXECUTED 5216a: 6710 beqs 5217c <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 ];
5216c: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 52170: 2008 movel %a0,%d0 <== NOT EXECUTED
/* * This means the requested block number is out of range. */ return 0; }
52172: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 52178: 4e5e unlk %fp <== NOT EXECUTED 5217a: 4e75 rts <== NOT EXECUTED
p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block();
5217c: 4eb9 0005 2004 jsr 52004 <memfile_alloc_block> <== NOT EXECUTED 52182: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p2 )
52184: 4a80 tstl %d0 <== NOT EXECUTED 52186: 678a beqs 52112 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0; p1[ doubly ] = (block_p) p2;
52188: 2480 movel %d0,%a2@ <== NOT EXECUTED
} return (block_p *)&p2[ singly ];
5218a: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 5218e: 2008 movel %a0,%d0 <== NOT EXECUTED 52190: 60e0 bras 52172 <IMFS_memfile_get_block_pointer+0x14a><== NOT EXECUTED
info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block();
52192: 4eb9 0005 2004 jsr 52004 <memfile_alloc_block> <== NOT EXECUTED 52198: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p1 )
5219a: 4a80 tstl %d0 <== NOT EXECUTED 5219c: 6700 ff74 beqw 52112 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0; p[ triply ] = (block_p) p1;
521a0: 2480 movel %d0,%a2@ <== NOT EXECUTED
} p2 = (block_p *)p1[ doubly ];
521a2: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 521a6: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p2 ) {
521a8: 4a88 tstl %a0 <== NOT EXECUTED 521aa: 66c0 bnes 5216c <IMFS_memfile_get_block_pointer+0x144><== NOT EXECUTED 521ac: 60ce bras 5217c <IMFS_memfile_get_block_pointer+0x154><== NOT EXECUTED
p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block();
521ae: 4eb9 0005 2004 jsr 52004 <memfile_alloc_block> <== NOT EXECUTED 521b4: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p )
521b6: 4a80 tstl %d0 <== NOT EXECUTED 521b8: 6700 ff58 beqw 52112 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
return 0; info->triply_indirect = p;
521bc: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED
} p1 = (block_p *) p[ triply ];
521c0: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 521c4: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
521c6: 4a88 tstl %a0 <== NOT EXECUTED 521c8: 6698 bnes 52162 <IMFS_memfile_get_block_pointer+0x13a><== NOT EXECUTED 521ca: 60c6 bras 52192 <IMFS_memfile_get_block_pointer+0x16a><== NOT EXECUTED
p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p )
521cc: 4a88 tstl %a0 <== NOT EXECUTED 521ce: 6700 ff42 beqw 52112 <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 ];
521d2: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED
if ( !p1 )
521d6: 4a88 tstl %a0 <== NOT EXECUTED 521d8: 6700 ff38 beqw 52112 <IMFS_memfile_get_block_pointer+0xea><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
521dc: 2004 movel %d4,%d0 <== NOT EXECUTED 521de: e588 lsll #2,%d0 <== NOT EXECUTED 521e0: d0b0 3c00 addl %a0@(00000000,%d3:l:4),%d0 <== NOT EXECUTED
/* * This means the requested block number is out of range. */ return 0; }
521e4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 521ea: 4e5e unlk %fp <== NOT EXECUTED 521ec: 4e75 rts <== NOT EXECUTED
/* * Perform internal consistency checks */ assert( the_jnode );
521ee: 4879 0006 2b90 pea 62b90 <CSWTCH.8+0x10> <== NOT EXECUTED 521f4: 4879 0006 2c6a pea 62c6a <__FUNCTION__.6332> <== NOT EXECUTED 521fa: 4878 0388 pea 388 <DBL_MANT_DIG+0x353> <== NOT EXECUTED 521fe: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52204: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE );
5220a: 4879 0006 2be0 pea 62be0 <CSWTCH.8+0x60> <== NOT EXECUTED 52210: 4879 0006 2c6a pea 62c6a <__FUNCTION__.6332> <== NOT EXECUTED 52216: 4878 038c pea 38c <DBL_MANT_DIG+0x357> <== NOT EXECUTED 5221a: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52220: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
00052ba4 <IMFS_memfile_read>: IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) {
52ba4: 4e56 ffc0 linkw %fp,#-64 52ba8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52bac: 246e 0008 moveal %fp@(8),%a2 52bb0: 2a6e 0014 moveal %fp@(20),%a5 52bb4: 262e 0018 movel %fp@(24),%d3 52bb8: 282e 000c movel %fp@(12),%d4 52bbc: 2a2e 0010 movel %fp@(16),%d5
/* * Perform internal consistency checks */ assert( the_jnode );
52bc0: 4a8a tstl %a2 52bc2: 6700 0266 beqw 52e2a <IMFS_memfile_read+0x286>
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ||
52bc6: 202a 0048 movel %a2@(72),%d0 52bca: 2040 moveal %d0,%a0 52bcc: 5b88 subql #5,%a0 52bce: 7c01 moveq #1,%d6 52bd0: bc88 cmpl %a0,%d6 52bd2: 6500 023a bcsw 52e0e <IMFS_memfile_read+0x26a>
/* * Error checks on arguments */ assert( dest );
52bd6: 4a8d tstl %a5 52bd8: 6700 01fc beqw 52dd6 <IMFS_memfile_read+0x232>
/* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length )
52bdc: 4a83 tstl %d3 52bde: 6700 01c2 beqw 52da2 <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) {
52be2: 7e06 moveq #6,%d7 52be4: be80 cmpl %d0,%d7 52be6: 6700 0136 beqw 52d1e <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 )
52bea: 2043 moveal %d3,%a0 52bec: d1c5 addal %d5,%a0 52bee: 2408 movel %a0,%d2 52bf0: 4281 clrl %d1 52bf2: 206a 004c moveal %a2@(76),%a0 52bf6: 226a 0050 moveal %a2@(80),%a1 52bfa: 2c08 movel %a0,%d6 52bfc: 2e09 movel %a1,%d7 52bfe: 9e82 subl %d2,%d7 52c00: 9d81 subxl %d1,%d6 52c02: 6c04 bges 52c08 <IMFS_memfile_read+0x64>
my_length = the_jnode->info.file.size - start;
52c04: 2609 movel %a1,%d3 52c06: 9685 subl %d5,%d3
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
52c08: 2439 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d2 52c0e: 2202 movel %d2,%d1 52c10: 5bc0 smi %d0 52c12: 49c0 extbl %d0 52c14: 2640 moveal %d0,%a3 52c16: 2841 moveal %d1,%a4 52c18: 2f0c movel %a4,%sp@- 52c1a: 2f00 movel %d0,%sp@- 52c1c: 2f05 movel %d5,%sp@- 52c1e: 2f04 movel %d4,%sp@- 52c20: 4eb9 0006 0344 jsr 60344 <__moddi3> 52c26: 4fef 0010 lea %sp@(16),%sp 52c2a: 2e01 movel %d1,%d7
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
52c2c: 2f0c movel %a4,%sp@- 52c2e: 2f0b movel %a3,%sp@- 52c30: 2f05 movel %d5,%sp@- 52c32: 2f04 movel %d4,%sp@- 52c34: 4eb9 0005 ff8c jsr 5ff8c <__divdi3> 52c3a: 4fef 0010 lea %sp@(16),%sp 52c3e: 2801 movel %d1,%d4
if ( start_offset ) {
52c40: 4a87 tstl %d7 52c42: 6700 00d2 beqw 52d16 <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 );
52c46: 42a7 clrl %sp@- 52c48: 2f01 movel %d1,%sp@- 52c4a: 2f0a movel %a2,%sp@- 52c4c: 4eb9 0005 2028 jsr 52028 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
52c52: 4fef 000c lea %sp@(12),%sp 52c56: 4a80 tstl %d0 52c58: 6700 01ec beqw 52e46 <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;
52c5c: 9487 subl %d7,%d2 52c5e: 2643 moveal %d3,%a3 52c60: b483 cmpl %d3,%d2 52c62: 6500 0116 bcsw 52d7a <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 );
52c66: 2f0b movel %a3,%sp@- 52c68: 2040 moveal %d0,%a0 52c6a: de90 addl %a0@,%d7
dest += to_copy; block++;
52c6c: 5284 addql #1,%d4
my_length -= to_copy;
52c6e: 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 );
52c70: 2f07 movel %d7,%sp@-
dest += to_copy;
52c72: 2e0d movel %a5,%d7 52c74: 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 );
52c76: 2f0d movel %a5,%sp@- 52c78: 4eb9 0005 4be0 jsr 54be0 <memcpy>
dest += to_copy; block++; my_length -= to_copy;
52c7e: 2439 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d2 52c84: 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 ) {
52c88: b483 cmpl %d3,%d2 52c8a: 623c bhis 52cc8 <IMFS_memfile_read+0x124> 52c8c: 49f9 0005 2028 lea 52028 <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 );
52c92: 4bf9 0005 4be0 lea 54be0 <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 );
52c98: 42a7 clrl %sp@- 52c9a: 2f04 movel %d4,%sp@- 52c9c: 2f0a movel %a2,%sp@- 52c9e: 4e94 jsr %a4@
assert( block_ptr );
52ca0: 4fef 000c lea %sp@(12),%sp 52ca4: 4a80 tstl %d0 52ca6: 6700 0112 beqw 52dba <IMFS_memfile_read+0x216>
if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
52caa: 2040 moveal %d0,%a0
dest += to_copy; block++;
52cac: 5284 addql #1,%d4
my_length -= to_copy;
52cae: 9682 subl %d2,%d3
copied += to_copy;
52cb0: 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 );
52cb2: 2f02 movel %d2,%sp@- 52cb4: 2f10 movel %a0@,%sp@- 52cb6: 2f07 movel %d7,%sp@-
dest += to_copy;
52cb8: 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 );
52cba: 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 ) {
52cbc: 4fef 000c lea %sp@(12),%sp 52cc0: b6b9 0006 4654 cmpl 64654 <imfs_memfile_bytes_per_block>,%d3 52cc6: 64d0 bccs 52c98 <IMFS_memfile_read+0xf4>
* Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) {
52cc8: 4a83 tstl %d3 52cca: 672a beqs 52cf6 <IMFS_memfile_read+0x152>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
52ccc: 42a7 clrl %sp@- 52cce: 2f04 movel %d4,%sp@- 52cd0: 2f0a movel %a2,%sp@- 52cd2: 4eb9 0005 2028 jsr 52028 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
52cd8: 4fef 000c lea %sp@(12),%sp 52cdc: 4a80 tstl %d0 52cde: 6700 0112 beqw 52df2 <IMFS_memfile_read+0x24e>
if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length );
52ce2: 2040 moveal %d0,%a0
copied += my_length;
52ce4: 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 );
52ce6: 2f03 movel %d3,%sp@- 52ce8: 2f10 movel %a0@,%sp@- 52cea: 2f07 movel %d7,%sp@- 52cec: 4eb9 0005 4be0 jsr 54be0 <memcpy>
copied += my_length;
52cf2: 4fef 000c lea %sp@(12),%sp
} IMFS_update_atime( the_jnode );
52cf6: 42a7 clrl %sp@- 52cf8: 486e fff8 pea %fp@(-8) 52cfc: 4eb9 0004 404c jsr 4404c <gettimeofday> 52d02: 256e fff8 003c movel %fp@(-8),%a2@(60)
return copied;
52d08: 200b movel %a3,%d0 52d0a: 508f addql #8,%sp
}
52d0c: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 52d12: 4e5e unlk %fp 52d14: 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 ) {
52d16: 2e0d movel %a5,%d7 52d18: 97cb subal %a3,%a3 52d1a: 6000 ff6c braw 52c88 <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))
52d1e: 2843 moveal %d3,%a4 <== NOT EXECUTED 52d20: 97cb subal %a3,%a3 <== NOT EXECUTED 52d22: 202a 004c movel %a2@(76),%d0 <== NOT EXECUTED 52d26: 222a 0050 movel %a2@(80),%d1 <== NOT EXECUTED 52d2a: 2c0b movel %a3,%d6 <== NOT EXECUTED 52d2c: 2e0c movel %a4,%d7 <== NOT EXECUTED 52d2e: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 52d32: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED 52d36: 9285 subl %d5,%d1 <== NOT EXECUTED 52d38: 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;
52d3a: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
52d3e: 9e81 subl %d1,%d7 <== NOT EXECUTED 52d40: 9d80 subxl %d0,%d6 <== NOT EXECUTED 52d42: 6f06 bles 52d4a <IMFS_memfile_read+0x1a6> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
52d44: 262e ffec movel %fp@(-20),%d3 <== NOT EXECUTED 52d48: 9685 subl %d5,%d3 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
52d4a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 52d4c: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 52d50: 2f0d movel %a5,%sp@- <== NOT EXECUTED 52d52: 4eb9 0005 4be0 jsr 54be0 <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
52d58: 42a7 clrl %sp@- <== NOT EXECUTED 52d5a: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 52d5e: 4eb9 0004 404c jsr 4404c <gettimeofday> <== NOT EXECUTED 52d64: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED
return my_length;
52d6a: 2003 movel %d3,%d0 <== NOT EXECUTED 52d6c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
} IMFS_update_atime( the_jnode ); return copied; }
52d70: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52d76: 4e5e unlk %fp <== NOT EXECUTED 52d78: 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;
52d7a: 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 );
52d7c: 2040 moveal %d0,%a0
dest += to_copy; block++;
52d7e: 5284 addql #1,%d4
my_length -= to_copy;
52d80: 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 );
52d82: 2f0b movel %a3,%sp@- 52d84: de90 addl %a0@,%d7 52d86: 2f07 movel %d7,%sp@-
dest += to_copy;
52d88: 2e0d movel %a5,%d7 52d8a: 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 );
52d8c: 2f0d movel %a5,%sp@- 52d8e: 4eb9 0005 4be0 jsr 54be0 <memcpy>
dest += to_copy; block++; my_length -= to_copy;
52d94: 2439 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d2 52d9a: 4fef 000c lea %sp@(12),%sp 52d9e: 6000 fee8 braw 52c88 <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 );
52da2: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 52da8: 7e16 moveq #22,%d7 <== NOT EXECUTED 52daa: 2040 moveal %d0,%a0 <== NOT EXECUTED 52dac: 70ff moveq #-1,%d0 <== NOT EXECUTED 52dae: 2087 movel %d7,%a0@ <== NOT EXECUTED
} IMFS_update_atime( the_jnode ); return copied; }
52db0: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52db6: 4e5e unlk %fp <== NOT EXECUTED 52db8: 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 );
52dba: 4879 0006 2c10 pea 62c10 <CSWTCH.8+0x90> <== NOT EXECUTED 52dc0: 4879 0006 2c9c pea 62c9c <__FUNCTION__.6159> <== NOT EXECUTED 52dc6: 4878 02a7 pea 2a7 <DBL_MANT_DIG+0x272> <== NOT EXECUTED 52dca: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52dd0: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
/* * Error checks on arguments */ assert( dest );
52dd6: 4879 0006 2c65 pea 62c65 <CSWTCH.8+0xe5> <== NOT EXECUTED 52ddc: 4879 0006 2c9c pea 62c9c <__FUNCTION__.6159> <== NOT EXECUTED 52de2: 4878 025a pea 25a <DBL_MANT_DIG+0x225> <== NOT EXECUTED 52de6: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52dec: 4eb9 0004 fc30 jsr 4fc30 <__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 );
52df2: 4879 0006 2c10 pea 62c10 <CSWTCH.8+0x90> <== NOT EXECUTED 52df8: 4879 0006 2c9c pea 62c9c <__FUNCTION__.6159> <== NOT EXECUTED 52dfe: 4878 02b9 pea 2b9 <DBL_MANT_DIG+0x284> <== NOT EXECUTED 52e02: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52e08: 4eb9 0004 fc30 jsr 4fc30 <__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 ||
52e0e: 4879 0006 2c1a pea 62c1a <CSWTCH.8+0x9a> <== NOT EXECUTED 52e14: 4879 0006 2c9c pea 62c9c <__FUNCTION__.6159> <== NOT EXECUTED 52e1a: 4878 0251 pea 251 <DBL_MANT_DIG+0x21c> <== NOT EXECUTED 52e1e: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52e24: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
/* * Perform internal consistency checks */ assert( the_jnode );
52e2a: 4879 0006 2b90 pea 62b90 <CSWTCH.8+0x10> <== NOT EXECUTED 52e30: 4879 0006 2c9c pea 62c9c <__FUNCTION__.6159> <== NOT EXECUTED 52e36: 4878 024c pea 24c <DBL_MANT_DIG+0x217> <== NOT EXECUTED 52e3a: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52e40: 4eb9 0004 fc30 jsr 4fc30 <__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 );
52e46: 4879 0006 2c10 pea 62c10 <CSWTCH.8+0x90> <== NOT EXECUTED 52e4c: 4879 0006 2c9c pea 62c9c <__FUNCTION__.6159> <== NOT EXECUTED 52e52: 4878 0296 pea 296 <DBL_MANT_DIG+0x261> <== NOT EXECUTED 52e56: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52e5c: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
000522d8 <IMFS_memfile_remove>: */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) {
522d8: 4e56 ffe0 linkw %fp,#-32 522dc: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 522e0: 286e 0008 moveal %fp@(8),%a4
/* * Perform internal consistency checks */ assert( the_jnode );
522e4: 4a8c tstl %a4 522e6: 6700 010c beqw 523f4 <IMFS_memfile_remove+0x11c>
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
522ea: 7005 moveq #5,%d0 522ec: b0ac 0048 cmpl %a4@(72),%d0 522f0: 6600 011e bnew 52410 <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;
522f4: 2839 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d4 522fa: e48c lsrl #2,%d4
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
522fc: 4aac 0054 tstl %a4@(84) 52300: 670e beqs 52310 <IMFS_memfile_remove+0x38>
if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free );
52302: 2f04 movel %d4,%sp@- 52304: 486c 0054 pea %a4@(84) 52308: 4eb9 0005 2226 jsr 52226 <memfile_free_blocks_in_table> 5230e: 508f addql #8,%sp
} if ( info->doubly_indirect ) {
52310: 206c 0058 moveal %a4@(88),%a0 52314: 4a88 tstl %a0 52316: 674a beqs 52362 <IMFS_memfile_remove+0x8a>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
52318: 2239 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 5231e: 2001 movel %d1,%d0 <== NOT EXECUTED 52320: 47f9 0005 2226 lea 52226 <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED 52326: e488 lsrl #2,%d0 <== NOT EXECUTED 52328: 672e beqs 52358 <IMFS_memfile_remove+0x80> <== NOT EXECUTED 5232a: 4280 clrl %d0 <== NOT EXECUTED 5232c: 4282 clrl %d2 <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
5232e: e588 lsll #2,%d0 <== NOT EXECUTED 52330: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 52334: 6710 beqs 52346 <IMFS_memfile_remove+0x6e> <== NOT EXECUTED
memfile_free_blocks_in_table(
52336: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52338: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 5233c: 4e93 jsr %a3@ <== NOT EXECUTED 5233e: 2239 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 52344: 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++ ) {
52346: 5282 addql #1,%d2 <== NOT EXECUTED 52348: 2601 movel %d1,%d3 <== NOT EXECUTED 5234a: 2002 movel %d2,%d0 <== NOT EXECUTED 5234c: e48b lsrl #2,%d3 <== NOT EXECUTED 5234e: b483 cmpl %d3,%d2 <== NOT EXECUTED 52350: 6406 bccs 52358 <IMFS_memfile_remove+0x80> <== NOT EXECUTED 52352: 206c 0058 moveal %a4@(88),%a0 <== NOT EXECUTED 52356: 60d6 bras 5232e <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 );
52358: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5235a: 486c 0058 pea %a4@(88) <== NOT EXECUTED 5235e: 4e93 jsr %a3@ <== NOT EXECUTED 52360: 508f addql #8,%sp <== NOT EXECUTED
} if ( info->triply_indirect ) {
52362: 206c 005c moveal %a4@(92),%a0 52366: 4a88 tstl %a0 52368: 677e beqs 523e8 <IMFS_memfile_remove+0x110>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
5236a: 2239 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 52370: 2001 movel %d1,%d0 <== NOT EXECUTED 52372: 47f9 0005 2226 lea 52226 <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED 52378: e488 lsrl #2,%d0 <== NOT EXECUTED 5237a: 6762 beqs 523de <IMFS_memfile_remove+0x106> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
5237c: 2450 moveal %a0@,%a2 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
5237e: 4a8a tstl %a2 <== NOT EXECUTED 52380: 675c beqs 523de <IMFS_memfile_remove+0x106> <== NOT EXECUTED 52382: 4286 clrl %d6 <== NOT EXECUTED 52384: 4285 clrl %d5 <== NOT EXECUTED
break; for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
52386: 4a80 tstl %d0 <== NOT EXECUTED 52388: 6728 beqs 523b2 <IMFS_memfile_remove+0xda> <== NOT EXECUTED 5238a: 4280 clrl %d0 <== NOT EXECUTED 5238c: 4282 clrl %d2 <== NOT EXECUTED
if ( p[j] ) {
5238e: e588 lsll #2,%d0 <== NOT EXECUTED 52390: 4ab2 0800 tstl %a2@(00000000,%d0:l) <== NOT EXECUTED 52394: 6710 beqs 523a6 <IMFS_memfile_remove+0xce> <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
52396: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52398: 4872 0800 pea %a2@(00000000,%d0:l) <== NOT EXECUTED 5239c: 4e93 jsr %a3@ <== NOT EXECUTED 5239e: 2239 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 523a4: 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++ ) {
523a6: 5282 addql #1,%d2 <== NOT EXECUTED 523a8: 2601 movel %d1,%d3 <== NOT EXECUTED 523aa: 2002 movel %d2,%d0 <== NOT EXECUTED 523ac: e48b lsrl #2,%d3 <== NOT EXECUTED 523ae: b483 cmpl %d3,%d2 <== NOT EXECUTED 523b0: 65dc bcss 5238e <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(
523b2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 523b4: 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++ ) {
523b8: 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(
523ba: 2f06 movel %d6,%sp@- <== NOT EXECUTED 523bc: 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++ ) {
523be: 2239 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 523c4: 2001 movel %d1,%d0 <== NOT EXECUTED 523c6: 508f addql #8,%sp <== NOT EXECUTED 523c8: e488 lsrl #2,%d0 <== NOT EXECUTED 523ca: ba80 cmpl %d0,%d5 <== NOT EXECUTED 523cc: 6410 bccs 523de <IMFS_memfile_remove+0x106> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */
523ce: 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];
523d0: 206c 005c moveal %a4@(92),%a0 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
523d4: 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];
523d6: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
523da: 4a8a tstl %a2 <== NOT EXECUTED 523dc: 66a8 bnes 52386 <IMFS_memfile_remove+0xae> <== NOT EXECUTED
} } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table(
523de: 2f04 movel %d4,%sp@- <== NOT EXECUTED 523e0: 486c 005c pea %a4@(92) <== NOT EXECUTED 523e4: 4e93 jsr %a3@ <== NOT EXECUTED 523e6: 508f addql #8,%sp <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free ); } return 0; }
523e8: 4280 clrl %d0 523ea: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 523f0: 4e5e unlk %fp 523f2: 4e75 rts
/* * Perform internal consistency checks */ assert( the_jnode );
523f4: 4879 0006 2b90 pea 62b90 <CSWTCH.8+0x10> <== NOT EXECUTED 523fa: 4879 0006 2cae pea 62cae <__FUNCTION__.6084> <== NOT EXECUTED 52400: 4878 01ee pea 1ee <DBL_MANT_DIG+0x1b9> <== NOT EXECUTED 52404: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 5240a: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
52410: 4879 0006 2be0 pea 62be0 <CSWTCH.8+0x60> <== NOT EXECUTED 52416: 4879 0006 2cae pea 62cae <__FUNCTION__.6084> <== NOT EXECUTED 5241c: 4878 01f2 pea 1f2 <DBL_MANT_DIG+0x1bd> <== NOT EXECUTED 52420: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52426: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
0005228c <IMFS_memfile_remove_block>: MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) {
5228c: 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 );
52290: 42a7 clrl %sp@- <== NOT EXECUTED 52292: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 52296: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 5229a: 4eb9 0005 2028 jsr 52028 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
522a0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 522a4: 4a80 tstl %d0 <== NOT EXECUTED 522a6: 6714 beqs 522bc <IMFS_memfile_remove_block+0x30> <== NOT EXECUTED
if ( block_ptr ) { ptr = *block_ptr;
522a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 522aa: 2210 movel %a0@,%d1 <== NOT EXECUTED
*block_ptr = 0;
522ac: 4290 clrl %a0@ <== NOT EXECUTED
memfile_free_block( ptr );
522ae: 2f01 movel %d1,%sp@- <== NOT EXECUTED 522b0: 4eb9 0005 1fea jsr 51fea <memfile_free_block> <== NOT EXECUTED
} return 1; }
522b6: 7001 moveq #1,%d0 <== NOT EXECUTED 522b8: 4e5e unlk %fp <== NOT EXECUTED 522ba: 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 );
522bc: 4879 0006 2c10 pea 62c10 <CSWTCH.8+0x90> <== NOT EXECUTED 522c2: 4879 0006 2cdf pea 62cdf <__FUNCTION__.6048> <== NOT EXECUTED 522c8: 4878 0196 pea 196 <DBL_MANT_DIG+0x161> <== NOT EXECUTED 522cc: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 522d2: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
00052812 <IMFS_memfile_write>: IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) {
52812: 4e56 ffd0 linkw %fp,#-48 52816: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5281a: 246e 0008 moveal %fp@(8),%a2 5281e: 2a6e 0014 moveal %fp@(20),%a5 52822: 262e 0018 movel %fp@(24),%d3 52826: 282e 000c movel %fp@(12),%d4 5282a: 2a2e 0010 movel %fp@(16),%d5
/* * Perform internal consistency checks */ assert( the_jnode );
5282e: 4a8a tstl %a2 52830: 6700 01f8 beqw 52a2a <IMFS_memfile_write+0x218>
if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
52834: 7405 moveq #5,%d2 52836: b4aa 0048 cmpl %a2@(72),%d2 5283a: 6600 01d2 bnew 52a0e <IMFS_memfile_write+0x1fc>
/* * Error check arguments */ assert( source );
5283e: 4a8d tstl %a5 52840: 6700 0204 beqw 52a46 <IMFS_memfile_write+0x234>
/* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length )
52844: 4a83 tstl %d3 52846: 6700 0190 beqw 529d8 <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 ) {
5284a: 2043 moveal %d3,%a0 5284c: d1c5 addal %d5,%a0 5284e: 2208 movel %a0,%d1 52850: 4280 clrl %d0 52852: 2c2a 004c movel %a2@(76),%d6 52856: 2e2a 0050 movel %a2@(80),%d7 5285a: 9e81 subl %d1,%d7 5285c: 9d80 subxl %d0,%d6 5285e: 6d00 011e bltw 5297e <IMFS_memfile_write+0x16c>
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
52862: 2439 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d2 52868: 2202 movel %d2,%d1 5286a: 5bc0 smi %d0 5286c: 49c0 extbl %d0 5286e: 2640 moveal %d0,%a3 52870: 2841 moveal %d1,%a4 52872: 2f0c movel %a4,%sp@- 52874: 2f00 movel %d0,%sp@- 52876: 2f05 movel %d5,%sp@- 52878: 2f04 movel %d4,%sp@- 5287a: 4eb9 0006 0344 jsr 60344 <__moddi3> 52880: 4fef 0010 lea %sp@(16),%sp 52884: 2e01 movel %d1,%d7
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
52886: 2f0c movel %a4,%sp@- 52888: 2f0b movel %a3,%sp@- 5288a: 2f05 movel %d5,%sp@- 5288c: 2f04 movel %d4,%sp@- 5288e: 4eb9 0005 ff8c jsr 5ff8c <__divdi3> 52894: 4fef 0010 lea %sp@(16),%sp 52898: 2801 movel %d1,%d4
if ( start_offset ) {
5289a: 4a87 tstl %d7 5289c: 6700 00d8 beqw 52976 <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 );
528a0: 42a7 clrl %sp@- 528a2: 2f01 movel %d1,%sp@- 528a4: 2f0a movel %a2,%sp@- 528a6: 4eb9 0005 2028 jsr 52028 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
528ac: 4fef 000c lea %sp@(12),%sp 528b0: 4a80 tstl %d0 528b2: 6700 01ca beqw 52a7e <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;
528b6: 9487 subl %d7,%d2 528b8: b682 cmpl %d2,%d3 528ba: 6500 00f2 bcsw 529ae <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 );
528be: 2f02 movel %d2,%sp@- 528c0: 2040 moveal %d0,%a0
src += to_copy;
528c2: 47f5 2800 lea %a5@(00000000,%d2:l),%a3
block++; my_length -= to_copy;
528c6: 9682 subl %d2,%d3
copied += to_copy;
528c8: 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++;
528ca: 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 );
528cc: 2f0d movel %a5,%sp@- 528ce: de90 addl %a0@,%d7 528d0: 2f07 movel %d7,%sp@- 528d2: 4eb9 0005 4be0 jsr 54be0 <memcpy>
src += to_copy; block++; my_length -= to_copy; copied += to_copy;
528d8: 2439 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d2 528de: 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 ) {
528e2: b483 cmpl %d3,%d2 528e4: 623c bhis 52922 <IMFS_memfile_write+0x110> 528e6: 49f9 0005 2028 lea 52028 <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 );
528ec: 4bf9 0005 4be0 lea 54be0 <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 );
528f2: 42a7 clrl %sp@- 528f4: 2f04 movel %d4,%sp@- 528f6: 2f0a movel %a2,%sp@- 528f8: 4e94 jsr %a4@
assert( block_ptr );
528fa: 4fef 000c lea %sp@(12),%sp 528fe: 4a80 tstl %d0 52900: 6700 00f0 beqw 529f2 <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 );
52904: 2f02 movel %d2,%sp@- 52906: 2040 moveal %d0,%a0
src += to_copy; block++;
52908: 5284 addql #1,%d4
my_length -= to_copy;
5290a: 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(
5290c: 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 );
5290e: 2f0b movel %a3,%sp@- 52910: 2f10 movel %a0@,%sp@-
src += to_copy;
52912: 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 );
52914: 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 ) {
52916: 4fef 000c lea %sp@(12),%sp 5291a: b6b9 0006 4654 cmpl 64654 <imfs_memfile_bytes_per_block>,%d3 52920: 64d0 bccs 528f2 <IMFS_memfile_write+0xe0>
*/ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) {
52922: 4a83 tstl %d3 52924: 672a beqs 52950 <IMFS_memfile_write+0x13e>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
52926: 42a7 clrl %sp@- 52928: 2f04 movel %d4,%sp@- 5292a: 2f0a movel %a2,%sp@- 5292c: 4eb9 0005 2028 jsr 52028 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
52932: 4fef 000c lea %sp@(12),%sp 52936: 4a80 tstl %d0 52938: 6700 0128 beqw 52a62 <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 );
5293c: 2f03 movel %d3,%sp@- 5293e: 2040 moveal %d0,%a0
my_length = 0; copied += to_copy;
52940: 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 );
52942: 2f0b movel %a3,%sp@- 52944: 2f10 movel %a0@,%sp@- 52946: 4eb9 0005 4be0 jsr 54be0 <memcpy>
my_length = 0; copied += to_copy;
5294c: 4fef 000c lea %sp@(12),%sp
} IMFS_mtime_ctime_update( the_jnode );
52950: 42a7 clrl %sp@- 52952: 486e fff8 pea %fp@(-8) 52956: 4eb9 0004 404c jsr 4404c <gettimeofday> 5295c: 202e fff8 movel %fp@(-8),%d0
return copied;
52960: 508f addql #8,%sp
memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode );
52962: 2540 0044 movel %d0,%a2@(68) 52966: 2540 0040 movel %d0,%a2@(64)
return copied; }
5296a: 2005 movel %d5,%d0 5296c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 52972: 4e5e unlk %fp 52974: 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 ) {
52976: 264d moveal %a5,%a3 52978: 4285 clrl %d5 5297a: 6000 ff66 braw 528e2 <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 );
5297e: 2f08 movel %a0,%sp@- 52980: 2f00 movel %d0,%sp@- 52982: 2f0a movel %a2,%sp@- 52984: 4eb9 0005 259a jsr 5259a <IMFS_memfile_extend>
if ( status )
5298a: 4fef 000c lea %sp@(12),%sp 5298e: 4a80 tstl %d0 52990: 6700 fed0 beqw 52862 <IMFS_memfile_write+0x50>
rtems_set_errno_and_return_minus_one( ENOSPC );
52994: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 5299a: 7aff moveq #-1,%d5 <== NOT EXECUTED 5299c: 781c moveq #28,%d4 <== NOT EXECUTED 5299e: 2040 moveal %d0,%a0 <== NOT EXECUTED
} IMFS_mtime_ctime_update( the_jnode ); return copied; }
529a0: 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 );
529a2: 2084 movel %d4,%a0@ <== NOT EXECUTED
} IMFS_mtime_ctime_update( the_jnode ); return copied; }
529a4: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 529aa: 4e5e unlk %fp <== NOT EXECUTED 529ac: 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;
529ae: 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 );
529b0: 2040 moveal %d0,%a0
src += to_copy;
529b2: 47f5 2800 lea %a5@(00000000,%d2:l),%a3
block++; my_length -= to_copy;
529b6: 9682 subl %d2,%d3
copied += to_copy;
529b8: 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++;
529ba: 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 );
529bc: 2f02 movel %d2,%sp@- 529be: 2f0d movel %a5,%sp@- 529c0: de90 addl %a0@,%d7 529c2: 2f07 movel %d7,%sp@- 529c4: 4eb9 0005 4be0 jsr 54be0 <memcpy>
src += to_copy; block++; my_length -= to_copy; copied += to_copy;
529ca: 2439 0006 4654 movel 64654 <imfs_memfile_bytes_per_block>,%d2 529d0: 4fef 000c lea %sp@(12),%sp 529d4: 6000 ff0c braw 528e2 <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 );
529d8: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 529de: 7aff moveq #-1,%d5 <== NOT EXECUTED 529e0: 7c16 moveq #22,%d6 <== NOT EXECUTED 529e2: 2040 moveal %d0,%a0 <== NOT EXECUTED
} IMFS_mtime_ctime_update( the_jnode ); return copied; }
529e4: 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 );
529e6: 2086 movel %d6,%a0@ <== NOT EXECUTED
} IMFS_mtime_ctime_update( the_jnode ); return copied; }
529e8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 529ee: 4e5e unlk %fp <== NOT EXECUTED 529f0: 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 );
529f2: 4879 0006 2c10 pea 62c10 <CSWTCH.8+0x90> <== NOT EXECUTED 529f8: 4879 0006 2c89 pea 62c89 <__FUNCTION__.6251> <== NOT EXECUTED 529fe: 4878 0330 pea 330 <DBL_MANT_DIG+0x2fb> <== NOT EXECUTED 52a02: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52a08: 4eb9 0004 fc30 jsr 4fc30 <__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 );
52a0e: 4879 0006 2be0 pea 62be0 <CSWTCH.8+0x60> <== NOT EXECUTED 52a14: 4879 0006 2c89 pea 62c89 <__FUNCTION__.6251> <== NOT EXECUTED 52a1a: 4878 02e7 pea 2e7 <DBL_MANT_DIG+0x2b2> <== NOT EXECUTED 52a1e: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52a24: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
/* * Perform internal consistency checks */ assert( the_jnode );
52a2a: 4879 0006 2b90 pea 62b90 <CSWTCH.8+0x10> <== NOT EXECUTED 52a30: 4879 0006 2c89 pea 62c89 <__FUNCTION__.6251> <== NOT EXECUTED 52a36: 4878 02e3 pea 2e3 <DBL_MANT_DIG+0x2ae> <== NOT EXECUTED 52a3a: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52a40: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
/* * Error check arguments */ assert( source );
52a46: 4879 0006 22f3 pea 622f3 <IMFS_ops+0x2d3> <== NOT EXECUTED 52a4c: 4879 0006 2c89 pea 62c89 <__FUNCTION__.6251> <== NOT EXECUTED 52a52: 4878 02ef pea 2ef <DBL_MANT_DIG+0x2ba> <== NOT EXECUTED 52a56: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52a5c: 4eb9 0004 fc30 jsr 4fc30 <__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 );
52a62: 4879 0006 2c10 pea 62c10 <CSWTCH.8+0x90> <== NOT EXECUTED 52a68: 4879 0006 2c89 pea 62c89 <__FUNCTION__.6251> <== NOT EXECUTED 52a6e: 4878 0346 pea 346 <DBL_MANT_DIG+0x311> <== NOT EXECUTED 52a72: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52a78: 4eb9 0004 fc30 jsr 4fc30 <__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 );
52a7e: 4879 0006 2c10 pea 62c10 <CSWTCH.8+0x90> <== NOT EXECUTED 52a84: 4879 0006 2c89 pea 62c89 <__FUNCTION__.6251> <== NOT EXECUTED 52a8a: 4878 031c pea 31c <DBL_MANT_DIG+0x2e7> <== NOT EXECUTED 52a8e: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52a94: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
0004a1e8 <IMFS_mknod>: const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
4a1e8: 4e56 ffb0 linkw %fp,#-80 4a1ec: 48d7 007c moveml %d2-%d6,%sp@ 4a1f0: 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 );
4a1f4: 260e movel %fp,%d3 4a1f6: 0683 ffff ffc7 addil #-57,%d3 4a1fc: 2f02 movel %d2,%sp@-
const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
4a1fe: 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 );
4a202: 4eb9 0004 ff58 jsr 4ff58 <strlen> 4a208: 588f addql #4,%sp 4a20a: 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 */ ) {
4a20e: 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 );
4a212: 2f03 movel %d3,%sp@-
const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
4a214: 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 );
4a218: 2f00 movel %d0,%sp@- 4a21a: 2f02 movel %d2,%sp@- 4a21c: 4eb9 0004 9fc4 jsr 49fc4 <IMFS_get_token>
/* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) )
4a222: 4fef 0010 lea %sp@(16),%sp 4a226: 2004 movel %d4,%d0 4a228: 0280 0000 f000 andil #61440,%d0 4a22e: 0c80 0000 4000 cmpil #16384,%d0 4a234: 675e beqs 4a294 <IMFS_mknod+0xac>
type = IMFS_DIRECTORY; else if ( S_ISREG(mode) )
4a236: 0c80 0000 8000 cmpil #32768,%d0 4a23c: 6750 beqs 4a28e <IMFS_mknod+0xa6>
type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
4a23e: 0c80 0000 6000 cmpil #24576,%d0 4a244: 673c beqs 4a282 <IMFS_mknod+0x9a> 4a246: 0c80 0000 2000 cmpil #8192,%d0 4a24c: 6734 beqs 4a282 <IMFS_mknod+0x9a>
type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode))
4a24e: 0c80 0000 1000 cmpil #4096,%d0 4a254: 6642 bnes 4a298 <IMFS_mknod+0xb0> 4a256: 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(
4a25a: 486e ffe8 pea %fp@(-24) 4a25e: 2f04 movel %d4,%sp@- 4a260: 2f03 movel %d3,%sp@- 4a262: 2f00 movel %d0,%sp@- 4a264: 2f2e 0018 movel %fp@(24),%sp@- 4a268: 4eb9 0004 d1d8 jsr 4d1d8 <IMFS_create_node>
new_name, mode, &info ); if ( !new_node )
4a26e: 4fef 0014 lea %sp@(20),%sp 4a272: 4a80 tstl %d0 4a274: 673a beqs 4a2b0 <IMFS_mknod+0xc8> 4a276: 4280 clrl %d0
rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; }
4a278: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 4a27e: 4e5e unlk %fp 4a280: 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 );
4a282: 2d46 ffe8 movel %d6,%fp@(-24) 4a286: 7002 moveq #2,%d0 4a288: 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) ) {
4a28c: 60cc bras 4a25a <IMFS_mknod+0x72>
/* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) )
4a28e: 303c 0005 movew #5,%d0 4a292: 60c6 bras 4a25a <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 );
4a294: 7001 moveq #1,%d0 4a296: 60c2 bras 4a25a <IMFS_mknod+0x72>
4a298: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 4a29e: 7416 moveq #22,%d2 <== NOT EXECUTED 4a2a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a2a2: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a2a4: 2082 movel %d2,%a0@ <== NOT EXECUTED
if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; }
4a2a6: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED 4a2ac: 4e5e unlk %fp <== NOT EXECUTED 4a2ae: 4e75 rts <== NOT EXECUTED
mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM );
4a2b0: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 4a2b6: 720c moveq #12,%d1 <== NOT EXECUTED 4a2b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a2ba: 70ff moveq #-1,%d0 <== NOT EXECUTED
return 0; }
4a2bc: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED
mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM );
4a2c2: 2081 movel %d1,%a0@ <== NOT EXECUTED
return 0; }
4a2c4: 4e5e unlk %fp <== NOT EXECUTED
4a2c6: 4e75 rts
000434f8 <IMFS_mount>: /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
434f8: 7001 moveq #1,%d0
#include <rtems/seterr.h> int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) {
434fa: 4e56 0000 linkw %fp,#0 434fe: 226e 0008 moveal %fp@(8),%a1
IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access;
43502: 2069 0008 moveal %a1@(8),%a0
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
43506: b0a8 0048 cmpl %a0@(72),%d0 4350a: 660a bnes 43516 <IMFS_mount+0x1e>
/* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry;
4350c: 2149 0058 movel %a1,%a0@(88) 43510: 4280 clrl %d0
return 0; }
43512: 4e5e unlk %fp 43514: 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 );
43516: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 4351c: 7214 moveq #20,%d1 <== NOT EXECUTED 4351e: 2040 moveal %d0,%a0 <== NOT EXECUTED 43520: 70ff moveq #-1,%d0 <== NOT EXECUTED
* the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; }
43522: 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 );
43524: 2081 movel %d1,%a0@ <== NOT EXECUTED
* the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; }
43526: 4e75 rts
0004a2c8 <IMFS_node_type>: #include "imfs.h" rtems_filesystem_node_types_t IMFS_node_type( rtems_filesystem_location_info_t *pathloc /* IN */ ) {
4a2c8: 4e56 0000 linkw %fp,#0 4a2cc: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *node; node = pathloc->node_access; return node->type; }
4a2d0: 4e5e unlk %fp
#include "imfs.h" rtems_filesystem_node_types_t IMFS_node_type( rtems_filesystem_location_info_t *pathloc /* IN */ ) {
4a2d2: 2050 moveal %a0@,%a0
IMFS_jnode_t *node; node = pathloc->node_access; return node->type; }
4a2d4: 2028 0048 movel %a0@(72),%d0 4a2d8: 4e75 rts
... 00043bd2 <IMFS_print_jnode>: */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) {
43bd2: 4e56 0000 linkw %fp,#0 43bd6: 2f0a movel %a2,%sp@- 43bd8: 246e 0008 moveal %fp@(8),%a2
assert( the_jnode );
43bdc: 4a8a tstl %a2 43bde: 6700 01ee beqw 43dce <IMFS_print_jnode+0x1fc>
fprintf(stdout, "%s", the_jnode->name );
43be2: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 43be8: 2f28 0008 movel %a0@(8),%sp@- 43bec: 486a 000c pea %a2@(12) 43bf0: 4eb9 0005 3758 jsr 53758 <fputs>
switch( the_jnode->type ) {
43bf6: 202a 0048 movel %a2@(72),%d0 43bfa: 508f addql #8,%sp 43bfc: 7207 moveq #7,%d1 43bfe: b280 cmpl %d0,%d1 43c00: 6434 bccs 43c36 <IMFS_print_jnode+0x64>
fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type );
43c02: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43c04: 4879 0006 26d8 pea 626d8 <IntUartPollCallbacks.6601+0xc8> <== NOT EXECUTED 43c0a: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 <== NOT EXECUTED 43c10: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43c14: 4eb9 0005 35ec jsr 535ec <fprintf> <== NOT EXECUTED
assert(0);
43c1a: 4879 0006 1d99 pea 61d99 <rtems_filesystem_mount_table_size+0x309><== NOT EXECUTED 43c20: 4879 0006 27c8 pea 627c8 <__FUNCTION__.6571> <== NOT EXECUTED 43c26: 4878 006c pea 6c <DBL_MANT_DIG+0x37> <== NOT EXECUTED 43c2a: 4879 0006 263a pea 6263a <IntUartPollCallbacks.6601+0x2a> <== NOT EXECUTED 43c30: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED
) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) {
43c36: 323b 0a08 movew %pc@(43c40 <IMFS_print_jnode+0x6e>,%d0:l:2),%d1 43c3a: 48c1 extl %d1 43c3c: 4efb 1802 jmp %pc@(43c40 <IMFS_print_jnode+0x6e>,%d1:l)
43c40: ffc2 0177702 <== NOT EXECUTED 43c42: 0162 bchg %d0,%a2@- <== NOT EXECUTED 43c44: 012a 00f0 btst %d0,%a2@(240) <== NOT EXECUTED 43c48: 00b6 0082 004a oril #8519754,%d6 <== NOT EXECUTED 43c4e: 0010 020 <== NOT EXECUTED
fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" );
43c50: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 <== NOT EXECUTED 43c56: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43c5a: 4878 0012 pea 12 <INVALID_OPERATION+0x2> <== NOT EXECUTED 43c5e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 43c62: 4879 0006 26c5 pea 626c5 <IntUartPollCallbacks.6601+0xb5> <== NOT EXECUTED 43c68: 4eb9 0005 4320 jsr 54320 <fwrite> <== NOT EXECUTED
assert(0);
43c6e: 4879 0006 1d99 pea 61d99 <rtems_filesystem_mount_table_size+0x309><== NOT EXECUTED 43c74: 4879 0006 27c8 pea 627c8 <__FUNCTION__.6571> <== NOT EXECUTED 43c7a: 4878 0067 pea 67 <DBL_MANT_DIG+0x32> <== NOT EXECUTED 43c7e: 4879 0006 263a pea 6263a <IntUartPollCallbacks.6601+0x2a> <== NOT EXECUTED 43c84: 4eb9 0004 46a8 jsr 446a8 <__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)",
43c8a: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 43c8e: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 43c92: 4879 0006 2696 pea 62696 <IntUartPollCallbacks.6601+0x86> <== NOT EXECUTED 43c98: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 <== NOT EXECUTED 43c9e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43ca2: 4eb9 0005 35ec jsr 535ec <fprintf> <== NOT EXECUTED
fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); }
43ca8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43cac: 203c 0006 2da2 movel #404898,%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;
43cb2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43cb6: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
43cba: 4e5e unlk %fp <== NOT EXECUTED
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43cbc: 4ef9 0005 5050 jmp 55050 <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 ")",
43cc2: 2f2a 0050 movel %a2@(80),%sp@- 43cc6: 4879 0006 26a5 pea 626a5 <IntUartPollCallbacks.6601+0x95> 43ccc: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 43cd2: 2f28 0008 movel %a0@(8),%sp@- 43cd6: 4eb9 0005 35ec jsr 535ec <fprintf>
fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); }
43cdc: 246e fffc moveal %fp@(-4),%a2
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43ce0: 203c 0006 2da2 movel #404898,%d0
); #else fprintf(stdout, " (file %" PRId32 ")", (uint32_t)the_jnode->info.file.size ); #endif break;
43ce6: 4fef 000c lea %sp@(12),%sp
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43cea: 2d40 0008 movel %d0,%fp@(8)
}
43cee: 4e5e unlk %fp
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43cf0: 4ef9 0005 5050 jmp 55050 <puts>
fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" );
43cf6: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 <== NOT EXECUTED 43cfc: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43d00: 4878 0013 pea 13 <INVALID_OPERATION+0x3> <== NOT EXECUTED 43d04: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 43d08: 4879 0006 26b1 pea 626b1 <IntUartPollCallbacks.6601+0xa1> <== NOT EXECUTED 43d0e: 4eb9 0005 4320 jsr 54320 <fwrite> <== NOT EXECUTED
assert(0);
43d14: 4879 0006 1d99 pea 61d99 <rtems_filesystem_mount_table_size+0x309><== NOT EXECUTED 43d1a: 4879 0006 27c8 pea 627c8 <__FUNCTION__.6571> <== NOT EXECUTED 43d20: 4878 0062 pea 62 <DBL_MANT_DIG+0x2d> <== NOT EXECUTED 43d24: 4879 0006 263a pea 6263a <IntUartPollCallbacks.6601+0x2a> <== NOT EXECUTED 43d2a: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" );
43d30: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 <== NOT EXECUTED 43d36: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43d3a: 4878 0013 pea 13 <INVALID_OPERATION+0x3> <== NOT EXECUTED 43d3e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 43d42: 4879 0006 26b1 pea 626b1 <IntUartPollCallbacks.6601+0xa1> <== NOT EXECUTED 43d48: 4eb9 0005 4320 jsr 54320 <fwrite> <== NOT EXECUTED
assert(0);
43d4e: 4879 0006 1d99 pea 61d99 <rtems_filesystem_mount_table_size+0x309><== NOT EXECUTED 43d54: 4879 0006 27c8 pea 627c8 <__FUNCTION__.6571> <== NOT EXECUTED 43d5a: 4878 005d pea 5d <DBL_MANT_DIG+0x28> <== NOT EXECUTED 43d5e: 4879 0006 263a pea 6263a <IntUartPollCallbacks.6601+0x2a> <== NOT EXECUTED 43d64: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED
case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
43d6a: 2f2a 0050 movel %a2@(80),%sp@- 43d6e: 2f2a 004c movel %a2@(76),%sp@- 43d72: 4879 0006 2683 pea 62683 <IntUartPollCallbacks.6601+0x73> 43d78: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 43d7e: 2f28 0008 movel %a0@(8),%sp@- 43d82: 4eb9 0005 35ec jsr 535ec <fprintf>
fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); }
43d88: 246e fffc moveal %fp@(-4),%a2
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43d8c: 203c 0006 2da2 movel #404898,%d0
break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break;
43d92: 4fef 0010 lea %sp@(16),%sp
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43d96: 2d40 0008 movel %d0,%fp@(8)
}
43d9a: 4e5e unlk %fp
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43d9c: 4ef9 0005 5050 jmp 55050 <puts>
assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" );
43da2: 2079 0006 4210 moveal 64210 <_impure_ptr>,%a0 43da8: 2f28 0008 movel %a0@(8),%sp@- 43dac: 4878 002f pea 2f <OPER2+0x1b> 43db0: 4eb9 0005 362c jsr 5362c <fputc>
fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); }
43db6: 246e fffc moveal %fp@(-4),%a2
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43dba: 203c 0006 2da2 movel #404898,%d0
fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); break;
43dc0: 508f addql #8,%sp
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43dc2: 2d40 0008 movel %d0,%fp@(8)
}
43dc6: 4e5e unlk %fp
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
43dc8: 4ef9 0005 5050 jmp 55050 <puts>
void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode );
43dce: 4879 0006 2630 pea 62630 <IntUartPollCallbacks.6601+0x20> <== NOT EXECUTED 43dd4: 4879 0006 27c8 pea 627c8 <__FUNCTION__.6571> <== NOT EXECUTED 43dda: 4878 0038 pea 38 <DBL_MANT_DIG+0x3> <== NOT EXECUTED 43dde: 4879 0006 263a pea 6263a <IntUartPollCallbacks.6601+0x2a> <== NOT EXECUTED 43de4: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED
0004353c <IMFS_readlink>: IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK )
4353c: 7004 moveq #4,%d0
int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) {
4353e: 4e56 fff4 linkw %fp,#-12 43542: 206e 0008 moveal %fp@(8),%a0 43546: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
IMFS_jnode_t *node; int i; node = loc->node_access;
4354a: 2450 moveal %a0@,%a2
int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) {
4354c: 266e 000c moveal %fp@(12),%a3 43550: 242e 0010 movel %fp@(16),%d2
IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK )
43554: b0aa 0048 cmpl %a2@(72),%d0 43558: 663c bnes 43596 <IMFS_readlink+0x5a>
rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
4355a: 4a82 tstl %d2 4355c: 672c beqs 4358a <IMFS_readlink+0x4e> 4355e: 206a 004c moveal %a2@(76),%a0 43562: 1210 moveb %a0@,%d1 43564: 6724 beqs 4358a <IMFS_readlink+0x4e>
int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL );
43566: 91c8 subal %a0,%a0 43568: 4280 clrl %d0
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
4356a: 5280 addql #1,%d0
buf[i] = node->info.sym_link.name[i];
4356c: 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++ )
43570: 2040 moveal %d0,%a0 43572: b082 cmpl %d2,%d0 43574: 640a bccs 43580 <IMFS_readlink+0x44> 43576: 226a 004c moveal %a2@(76),%a1 4357a: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 4357e: 66ea bnes 4356a <IMFS_readlink+0x2e>
buf[i] = node->info.sym_link.name[i]; return i; }
43580: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 43586: 4e5e unlk %fp 43588: 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++ )
4358a: 4280 clrl %d0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i]; return i; }
4358c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 43592: 4e5e unlk %fp <== NOT EXECUTED 43594: 4e75 rts <== NOT EXECUTED
int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL );
43596: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 4359c: 7216 moveq #22,%d1 <== NOT EXECUTED 4359e: 2040 moveal %d0,%a0 <== NOT EXECUTED 435a0: 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; }
435a2: 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 );
435a8: 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; }
435aa: 4e5e unlk %fp <== NOT EXECUTED 435ac: 4e75 rts <== NOT EXECUTED
... 000435b0 <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 */ ) {
435b0: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED
IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access;
435b4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) {
435b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
435ba: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED 435be: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access;
435c2: 2450 moveal %a0@,%a2 <== NOT EXECUTED
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
435c4: 486a 000c pea %a2@(12) <== NOT EXECUTED 435c8: 4eb9 0005 5754 jsr 55754 <strncpy> <== NOT EXECUTED
if ( the_jnode->Parent != NULL )
435ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 435d2: 4aaa 0008 tstl %a2@(8) <== NOT EXECUTED 435d6: 670a beqs 435e2 <IMFS_rename+0x32> <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
435d8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435da: 4eb9 0004 870c jsr 4870c <_Chain_Extract> <== NOT EXECUTED 435e0: 588f addql #4,%sp <== NOT EXECUTED
rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access;
435e2: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 435e6: 2050 moveal %a0@,%a0 <== NOT EXECUTED
the_jnode->Parent = new_parent;
435e8: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node );
435ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435ee: 4868 004c pea %a0@(76) <== NOT EXECUTED 435f2: 4eb9 0004 86d4 jsr 486d4 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode );
435f8: 42a7 clrl %sp@- <== NOT EXECUTED 435fa: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 435fe: 4eb9 0004 404c jsr 4404c <gettimeofday> <== NOT EXECUTED 43604: 256e fff8 0044 movel %fp@(-8),%a2@(68) <== NOT EXECUTED
return 0; }
4360a: 4280 clrl %d0 <== NOT EXECUTED 4360c: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 43610: 4e5e unlk %fp <== NOT EXECUTED
43612: 4e75 rts
0004a2dc <IMFS_rmnod>: int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) {
4a2dc: 4e56 fff8 linkw %fp,#-8 4a2e0: 2f0b movel %a3,%sp@- 4a2e2: 266e 000c moveal %fp@(12),%a3 4a2e6: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access;
4a2e8: 2453 moveal %a3@,%a2
/* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) {
4a2ea: 4aaa 0008 tstl %a2@(8) 4a2ee: 670e beqs 4a2fe <IMFS_rmnod+0x22>
*/ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
4a2f0: 2f0a movel %a2,%sp@- 4a2f2: 4eb9 0004 b92c jsr 4b92c <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL;
4a2f8: 588f addql #4,%sp 4a2fa: 42aa 0008 clrl %a2@(8)
/* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--;
4a2fe: 302a 0032 movew %a2@(50),%d0 4a302: 5380 subql #1,%d0 4a304: 3540 0032 movew %d0,%a2@(50)
IMFS_update_ctime( the_jnode );
4a308: 42a7 clrl %sp@- 4a30a: 486e fff8 pea %fp@(-8) 4a30e: 4eb9 0004 a828 jsr 4a828 <gettimeofday> 4a314: 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) ) {
4a31a: 2f0a movel %a2,%sp@- 4a31c: 4eb9 0004 ab06 jsr 4ab06 <rtems_libio_is_file_open> 4a322: 4fef 000c lea %sp@(12),%sp 4a326: 4a80 tstl %d0 4a328: 6628 bnes 4a352 <IMFS_rmnod+0x76> 4a32a: 4a6a 0032 tstw %a2@(50) 4a32e: 6622 bnes 4a352 <IMFS_rmnod+0x76>
/* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access )
4a330: 2079 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a0 4a336: 2653 moveal %a3@,%a3 4a338: b7e8 0004 cmpal %a0@(4),%a3 4a33c: 6736 beqs 4a374 <IMFS_rmnod+0x98> 4a33e: 47f9 0004 a688 lea 4a688 <free>,%a3
/* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) {
4a344: 7004 moveq #4,%d0 4a346: b0aa 0048 cmpl %a2@(72),%d0 4a34a: 6714 beqs 4a360 <IMFS_rmnod+0x84>
if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode );
4a34c: 2f0a movel %a2,%sp@- 4a34e: 4e93 jsr %a3@ 4a350: 588f addql #4,%sp
} return 0; }
4a352: 246e fff0 moveal %fp@(-16),%a2 4a356: 4280 clrl %d0 4a358: 266e fff4 moveal %fp@(-12),%a3 4a35c: 4e5e unlk %fp 4a35e: 4e75 rts
/* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name )
4a360: 202a 004c movel %a2@(76),%d0 4a364: 67e6 beqs 4a34c <IMFS_rmnod+0x70>
free( (void*) the_jnode->info.sym_link.name );
4a366: 2f00 movel %d0,%sp@- 4a368: 4e93 jsr %a3@ 4a36a: 588f addql #4,%sp
} free( the_jnode );
4a36c: 2f0a movel %a2,%sp@- 4a36e: 4e93 jsr %a3@ 4a370: 588f addql #4,%sp 4a372: 60de bras 4a352 <IMFS_rmnod+0x76>
/* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL;
4a374: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED 4a378: 47f9 0004 a688 lea 4a688 <free>,%a3 <== NOT EXECUTED
/* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) {
4a37e: 7004 moveq #4,%d0 <== NOT EXECUTED 4a380: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 4a384: 66c6 bnes 4a34c <IMFS_rmnod+0x70> <== NOT EXECUTED 4a386: 60d8 bras 4a360 <IMFS_rmnod+0x84> <== NOT EXECUTED
0004a388 <IMFS_stat>: IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) {
4a388: 7007 moveq #7,%d0
int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) {
4a38a: 4e56 0000 linkw %fp,#0 4a38e: 206e 0008 moveal %fp@(8),%a0 4a392: 226e 000c moveal %fp@(12),%a1
IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access;
4a396: 2050 moveal %a0@,%a0
switch ( the_jnode->type ) {
4a398: b0a8 0048 cmpl %a0@(72),%d0 4a39c: 6414 bccs 4a3b2 <IMFS_stat+0x2a>
case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP );
4a39e: 4eb9 0004 eb8c jsr 4eb8c <__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; }
4a3a4: 4e5e unlk %fp <== NOT EXECUTED
case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP );
4a3a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a3a8: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a3aa: 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; }
4a3b0: 4e75 rts <== NOT EXECUTED
IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) {
4a3b2: 2028 0048 movel %a0@(72),%d0 4a3b6: d080 addl %d0,%d0 4a3b8: 303b 0808 movew %pc@(4a3c2 <IMFS_stat+0x3a>,%d0:l),%d0 4a3bc: 48c0 extl %d0 4a3be: 4efb 0802 jmp %pc@(4a3c2 <IMFS_stat+0x3a>,%d0:l)
4a3c2: ffdc 0177734 <== NOT EXECUTED 4a3c4: ffdc 0177734 <== NOT EXECUTED 4a3c6: 0096 ffdc 0010 oril #-2359280,%d6 <== NOT EXECUTED 4a3cc: 0052 0122 <== NOT EXECUTED 4a3ce: 0052 0122 <== NOT EXECUTED 4a3d0: 0010 020 <== NOT EXECUTED
break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
4a3d2: 2368 0034 0008 movel %a0@(52),%a1@(8) <== NOT EXECUTED
buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime;
4a3d8: 2368 003c 0026 movel %a0@(60),%a1@(38) <== NOT EXECUTED
buf->st_mtime = the_jnode->stat_mtime;
4a3de: 2368 0040 002e movel %a0@(64),%a1@(46) <== NOT EXECUTED
default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode;
4a3e4: 2368 002e 000c movel %a0@(46),%a1@(12) <== NOT EXECUTED
buf->st_nlink = the_jnode->st_nlink;
4a3ea: 3368 0032 0010 movew %a0@(50),%a1@(16) <== NOT EXECUTED
case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0;
4a3f0: 4280 clrl %d0 <== NOT EXECUTED 4a3f2: 4281 clrl %d1 <== 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;
4a3f4: 3368 0038 0012 movew %a0@(56),%a1@(18) <== NOT EXECUTED
case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0;
4a3fa: 2340 001e movel %d0,%a1@(30) <== NOT EXECUTED 4a3fe: 2341 0022 movel %d1,%a1@(34) <== 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;
4a402: 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;
4a404: 3368 003a 0014 movew %a0@(58),%a1@(20) <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime;
4a40a: 2368 0044 0036 movel %a0@(68),%a1@(54) <== NOT EXECUTED
return 0; }
4a410: 4e5e unlk %fp 4a412: 4e75 rts
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;
4a414: 2028 004c movel %a0@(76),%d0 4a418: 2228 0050 movel %a0@(80),%d1
break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
4a41c: 2368 0034 0008 movel %a0@(52),%a1@(8)
buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime;
4a422: 2368 003c 0026 movel %a0@(60),%a1@(38)
buf->st_mtime = the_jnode->stat_mtime;
4a428: 2368 0040 002e movel %a0@(64),%a1@(46)
rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink;
4a42e: 3368 0032 0010 movew %a0@(50),%a1@(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;
4a434: 2368 0044 0036 movel %a0@(68),%a1@(54)
default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode;
4a43a: 2368 002e 000c movel %a0@(46),%a1@(12)
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid;
4a440: 3368 0038 0012 movew %a0@(56),%a1@(18)
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;
4a446: 2340 001e movel %d0,%a1@(30) 4a44a: 2341 0022 movel %d1,%a1@(34)
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;
4a44e: 4280 clrl %d0
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;
4a450: 3368 003a 0014 movew %a0@(58),%a1@(20) 4a456: 60b8 bras 4a410 <IMFS_stat+0x88>
switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4a458: 2028 0050 movel %a0@(80),%d0 4a45c: 2368 004c 0016 movel %a0@(76),%a1@(22)
break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
4a462: 2368 0034 0008 movel %a0@(52),%a1@(8)
buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime;
4a468: 2368 003c 0026 movel %a0@(60),%a1@(38)
buf->st_mtime = the_jnode->stat_mtime;
4a46e: 2368 0040 002e movel %a0@(64),%a1@(46)
rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink;
4a474: 3368 0032 0010 movew %a0@(50),%a1@(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;
4a47a: 2368 0044 0036 movel %a0@(68),%a1@(54)
default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode;
4a480: 2368 002e 000c movel %a0@(46),%a1@(12)
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid;
4a486: 3368 0038 0012 movew %a0@(56),%a1@(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 );
4a48c: 2340 001a movel %d0,%a1@(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;
4a490: 4280 clrl %d0
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;
4a492: 3368 003a 0014 movew %a0@(58),%a1@(20) 4a498: 6000 ff76 braw 4a410 <IMFS_stat+0x88>
00043614 <IMFS_symlink>: int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) {
43614: 4e56 ffc4 linkw %fp,#-60 43618: 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 );
4361a: 260e movel %fp,%d3 4361c: 0683 ffff ffc7 addil #-57,%d3
int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) {
43622: 2f02 movel %d2,%sp@- 43624: 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 );
43628: 2f02 movel %d2,%sp@- 4362a: 4eb9 0005 573c jsr 5573c <strlen> 43630: 588f addql #4,%sp 43632: 486e fffc pea %fp@(-4) 43636: 2f03 movel %d3,%sp@- 43638: 2f00 movel %d0,%sp@- 4363a: 2f02 movel %d2,%sp@- 4363c: 4eb9 0004 f978 jsr 4f978 <IMFS_get_token>
/* * Duplicate link name */ info.sym_link.name = strdup(link_name);
43642: 2f2e 000c movel %fp@(12),%sp@- 43646: 4eb9 0005 52ac jsr 552ac <strdup>
if (info.sym_link.name == NULL) {
4364c: 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);
43650: 2d40 ffe8 movel %d0,%fp@(-24)
if (info.sym_link.name == NULL) {
43654: 6730 beqs 43686 <IMFS_symlink+0x72>
* 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(
43656: 486e ffe8 pea %fp@(-24) 4365a: 2f3c 0000 a1ff movel #41471,%sp@- 43660: 2f03 movel %d3,%sp@- 43662: 4878 0004 pea 4 <CONTEXT_ARG> 43666: 2f2e 0008 movel %fp@(8),%sp@- 4366a: 4eb9 0004 eb50 jsr 4eb50 <IMFS_create_node>
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) {
43670: 4fef 0014 lea %sp@(20),%sp 43674: 4a80 tstl %d0 43676: 6728 beqs 436a0 <IMFS_symlink+0x8c>
free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; }
43678: 242e ffbc movel %fp@(-68),%d2
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) {
4367c: 4280 clrl %d0
free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; }
4367e: 262e ffc0 movel %fp@(-64),%d3 43682: 4e5e unlk %fp 43684: 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);
43686: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 4368c: 740c moveq #12,%d2 <== NOT EXECUTED 4368e: 2040 moveal %d0,%a0 <== NOT EXECUTED 43690: 70ff moveq #-1,%d0 <== NOT EXECUTED 43692: 2082 movel %d2,%a0@ <== NOT EXECUTED
free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; }
43694: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED 43698: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 4369c: 4e5e unlk %fp <== NOT EXECUTED 4369e: 4e75 rts <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name);
436a0: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 436a4: 4eb9 0004 3fbc jsr 43fbc <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
436aa: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED
} return 0; }
436b0: 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);
436b4: 2040 moveal %d0,%a0 <== NOT EXECUTED 436b6: 720c moveq #12,%d1 <== NOT EXECUTED 436b8: 588f addql #4,%sp <== NOT EXECUTED 436ba: 70ff moveq #-1,%d0 <== NOT EXECUTED
} return 0; }
436bc: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 436c0: 4e5e unlk %fp <== NOT EXECUTED
&info ); if (new_node == NULL) { free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM);
436c2: 2081 movel %d1,%a0@ <== NOT EXECUTED
} return 0; }
436c4: 4e75 rts <== NOT EXECUTED
... 000436c8 <IMFS_unlink>: /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) {
436c8: 7003 moveq #3,%d0
int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) {
436ca: 4e56 ffd0 linkw %fp,#-48 436ce: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 436d2: 246e 000c moveal %fp@(12),%a2 436d6: 242e 0008 movel %fp@(8),%d2
IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access;
436da: 2652 moveal %a2@,%a3
/* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) {
436dc: b0ab 0048 cmpl %a3@(72),%d0 436e0: 671a beqs 436fc <IMFS_unlink+0x34>
/* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc );
436e2: 2f0a movel %a2,%sp@- 436e4: 206a 0008 moveal %a2@(8),%a0 436e8: 2f02 movel %d2,%sp@- 436ea: 2068 0034 moveal %a0@(52),%a0 436ee: 4e90 jsr %a0@
return result;
436f0: 508f addql #8,%sp
}
436f2: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 436f8: 4e5e unlk %fp 436fa: 4e75 rts
* free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node )
436fc: 202b 004c movel %a3@(76),%d0 43700: 6700 0090 beqw 43792 <IMFS_unlink+0xca>
rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc;
43704: 41ea 0004 lea %a2@(4),%a0
the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link );
43708: 260e movel %fp,%d3 4370a: 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)
43710: 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;
43712: 2d58 ffe8 movel %a0@+,%fp@(-24) 43716: 2d58 ffec movel %a0@+,%fp@(-20) 4371a: 2d58 fff0 movel %a0@+,%fp@(-16) 4371e: 2d50 fff4 movel %a0@,%fp@(-12)
the_link.node_access = node->info.hard_link.link_node;
43722: 2d40 ffe4 movel %d0,%fp@(-28)
IMFS_Set_handlers( &the_link );
43726: 2f03 movel %d3,%sp@- 43728: 4eb9 0004 ed44 jsr 4ed44 <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)
4372e: 206b 004c moveal %a3@(76),%a0 43732: 4281 clrl %d1 43734: 588f addql #4,%sp 43736: 3028 0032 movew %a0@(50),%d0 4373a: 3200 movew %d0,%d1 4373c: b881 cmpl %d1,%d4 4373e: 6730 beqs 43770 <IMFS_unlink+0xa8>
if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --;
43740: 5380 subql #1,%d0 43742: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( node->info.hard_link.link_node );
43746: 42a7 clrl %sp@- 43748: 486e fff8 pea %fp@(-8) 4374c: 4eb9 0004 404c jsr 4404c <gettimeofday> 43752: 206b 004c moveal %a3@(76),%a0 43756: 508f addql #8,%sp 43758: 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 );
4375e: 2f0a movel %a2,%sp@- 43760: 206a 0008 moveal %a2@(8),%a0 43764: 2f02 movel %d2,%sp@- 43766: 2068 0034 moveal %a0@(52),%a0 4376a: 4e90 jsr %a0@
return result;
4376c: 508f addql #8,%sp 4376e: 6082 bras 436f2 <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 );
43770: 2f03 movel %d3,%sp@- 43772: 2f02 movel %d2,%sp@- 43774: 206e ffec moveal %fp@(-20),%a0 43778: 2068 0034 moveal %a0@(52),%a0 4377c: 4e90 jsr %a0@
if ( result != 0 )
4377e: 508f addql #8,%sp 43780: 4a80 tstl %d0 43782: 6700 ff5e beqw 436e2 <IMFS_unlink+0x1a> 43786: 70ff moveq #-1,%d0
*/ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; }
43788: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 4378e: 4e5e unlk %fp 43790: 4e75 rts
*/ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL );
43792: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 43798: 7216 moveq #22,%d1 <== NOT EXECUTED 4379a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4379c: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; }
4379e: 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 );
437a4: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; }
437a6: 4e5e unlk %fp <== NOT EXECUTED 437a8: 4e75 rts <== NOT EXECUTED
... 000437ac <IMFS_unmount>: /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
437ac: 7001 moveq #1,%d0
#include <rtems/seterr.h> int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) {
437ae: 4e56 0000 linkw %fp,#0 437b2: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access;
437b6: 2068 0008 moveal %a0@(8),%a0
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
437ba: b0a8 0048 cmpl %a0@(72),%d0 437be: 6610 bnes 437d0 <IMFS_unmount+0x24>
/* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL )
437c0: 4aa8 0058 tstl %a0@(88) 437c4: 671c beqs 437e2 <IMFS_unmount+0x36>
/* * 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;
437c6: 42a8 0058 clrl %a0@(88) 437ca: 4280 clrl %d0
return 0; }
437cc: 4e5e unlk %fp 437ce: 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 );
437d0: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 437d6: 7214 moveq #20,%d1 <== NOT EXECUTED 437d8: 2040 moveal %d0,%a0 <== NOT EXECUTED 437da: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/ node->info.directory.mt_fs = NULL; return 0; }
437dc: 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 );
437de: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/ node->info.directory.mt_fs = NULL; return 0; }
437e0: 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 */
437e2: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 437e8: 7216 moveq #22,%d1 <== NOT EXECUTED 437ea: 2040 moveal %d0,%a0 <== NOT EXECUTED 437ec: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/ node->info.directory.mt_fs = NULL; return 0; }
437ee: 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 */
437f0: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/ node->info.directory.mt_fs = NULL; return 0; }
437f2: 4e75 rts
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 dd36 moveal 5dd36 <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>
(*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 aba4 jsr 4aba4 <malloc_deferred_frees_initialize>
/* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) {
428d8: 2079 0005 dd3a moveal 5dd3a <rtems_malloc_sbrk_helpers>,%a0 428de: 4a88 tstl %a0 428e0: 6712 beqs 428f4 <RTEMS_Malloc_Initialize+0x40>
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 dd35 tstb 5dd35 <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 d77c tstb 5d77c <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 d6b0 movel 5d6b0 <RTEMS_Malloc_Heap>,%sp@- 42912: 4eb9 0004 6c60 jsr 46c60 <_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>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
42920: 2f39 0005 d6b0 movel 5d6b0 <RTEMS_Malloc_Heap>,%sp@- 42926: 2439 0005 edb0 movel 5edb0 <rtems_malloc_statistics>,%d2 4292c: 4eb9 0004 7824 jsr 47824 <_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 edb0 movel %d0,5edb0 <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 f41c jsr 4f41c <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 dd35 tstb 5dd35 <rtems_unified_work_area> 4295e: 66c0 bnes 42920 <RTEMS_Malloc_Initialize+0x6c> 42960: 4878 0004 pea 4 <CONTEXT_ARG> 42964: 2f02 movel %d2,%sp@- 42966: 2f03 movel %d3,%sp@- 42968: 2f39 0005 d6b0 movel 5d6b0 <RTEMS_Malloc_Heap>,%sp@- 4296e: 4eb9 0004 6c60 jsr 46c60 <_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>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
4297c: 4878 001a pea 1a <OPER2+0x6> <== NOT EXECUTED 42980: 4eb9 0004 6458 jsr 46458 <rtems_fatal_error_occurred> <== NOT EXECUTED
... 00044832 <Stack_check_Dump_threads_usage>: static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) {
44832: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 44836: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4483a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread )
4483e: 4a8a tstl %a2 <== NOT EXECUTED 44840: 6700 00c2 beqw 44904 <Stack_check_Dump_threads_usage+0xd2><== NOT EXECUTED
return; if ( !print_handler )
44844: 2879 000a 39f8 moveal a39f8 <print_handler>,%a4 <== NOT EXECUTED 4484a: 4a8c tstl %a4 <== NOT EXECUTED 4484c: 6700 00b6 beqw 44904 <Stack_check_Dump_threads_usage+0xd2><== NOT EXECUTED
/* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) {
44850: 70ff moveq #-1,%d0 <== NOT EXECUTED 44852: b08a cmpl %a2,%d0 <== NOT EXECUTED 44854: 6700 00d8 beqw 4492e <Stack_check_Dump_threads_usage+0xfc><== NOT EXECUTED
current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack;
44858: 47ea 00be lea %a2@(190),%a3 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack);
4485c: 2413 movel %a3@,%d2 <== NOT EXECUTED 4485e: 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);
44864: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 44868: 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 );
4486e: 282a 00fe movel %a2@(254),%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);
44872: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44874: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44876: 4eb9 0004 47fe jsr 447fe <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
4487c: 508f addql #8,%sp <== NOT EXECUTED 4487e: 4a80 tstl %d0 <== NOT EXECUTED 44880: 6700 00e2 beqw 44964 <Stack_check_Dump_threads_usage+0x132><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
44884: d682 addl %d2,%d3 <== NOT EXECUTED 44886: 9680 subl %d0,%d3 <== NOT EXECUTED
else used = 0; if ( the_thread ) {
44888: 4a8a tstl %a2 <== NOT EXECUTED 4488a: 6700 00e0 beqw 4496c <Stack_check_Dump_threads_usage+0x13a><== NOT EXECUTED
(*print_handler)(
4488e: 486e fffb pea %fp@(-5) <== NOT EXECUTED 44892: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 44896: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4489a: 4eb9 0004 a924 jsr 4a924 <rtems_object_get_name> <== NOT EXECUTED 448a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 448a2: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 448a6: 4879 0009 9250 pea 99250 <IntUartPollCallbacks.6601+0x20> <== NOT EXECUTED 448ac: 2f39 000a 39f4 movel a39f4 <print_context>,%sp@- <== NOT EXECUTED 448b2: 4e94 jsr %a4@ <== NOT EXECUTED
); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)(
448b4: 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)(
448b8: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)(
448bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 448be: 2f04 movel %d4,%sp@- <== NOT EXECUTED 448c0: 2013 movel %a3@,%d0 <== NOT EXECUTED 448c2: 5380 subql #1,%d0 <== NOT EXECUTED 448c4: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 448c8: 2f08 movel %a0,%sp@- <== NOT EXECUTED 448ca: 4879 0009 926b pea 9926b <IntUartPollCallbacks.6601+0x3b> <== NOT EXECUTED 448d0: 2f39 000a 39f4 movel a39f4 <print_context>,%sp@- <== NOT EXECUTED 448d6: 2079 000a 39f8 moveal a39f8 <print_handler>,%a0 <== NOT EXECUTED 448dc: 4e90 jsr %a0@ <== NOT EXECUTED
stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) {
448de: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 448e2: 4ab9 000a 39f0 tstl a39f0 <Stack_check_Initialized> <== NOT EXECUTED 448e8: 6724 beqs 4490e <Stack_check_Dump_threads_usage+0xdc><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used );
448ea: 2f03 movel %d3,%sp@- <== NOT EXECUTED 448ec: 4879 0009 9296 pea 99296 <IntUartPollCallbacks.6601+0x66> <== NOT EXECUTED 448f2: 2f39 000a 39f4 movel a39f4 <print_context>,%sp@- <== NOT EXECUTED 448f8: 2079 000a 39f8 moveal a39f8 <print_handler>,%a0 <== NOT EXECUTED 448fe: 4e90 jsr %a0@ <== NOT EXECUTED 44900: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
} }
44904: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4490a: 4e5e unlk %fp <== NOT EXECUTED 4490c: 4e75 rts <== NOT EXECUTED
current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" );
4490e: 4879 0009 9289 pea 99289 <IntUartPollCallbacks.6601+0x59> <== NOT EXECUTED 44914: 2f39 000a 39f4 movel a39f4 <print_context>,%sp@- <== NOT EXECUTED 4491a: 2079 000a 39f8 moveal a39f8 <print_handler>,%a0 <== NOT EXECUTED 44920: 4e90 jsr %a0@ <== NOT EXECUTED 44922: 508f addql #8,%sp <== NOT EXECUTED
} else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } }
44924: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4492a: 4e5e unlk %fp <== NOT EXECUTED 4492c: 4e75 rts <== NOT EXECUTED
/* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) {
4492e: 4ab9 000a 6944 tstl a6944 <Stack_check_Interrupt_stack+0x4><== NOT EXECUTED 44934: 67ce beqs 44904 <Stack_check_Dump_threads_usage+0xd2><== NOT EXECUTED 44936: 47f9 000a 6940 lea a6940 <Stack_check_Interrupt_stack>,%a3 <== NOT EXECUTED 4493c: 4284 clrl %d4 <== NOT EXECUTED 4493e: 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);
44940: 2413 movel %a3@,%d2 <== NOT EXECUTED 44942: 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);
44948: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 4494c: 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);
44952: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44954: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44956: 4eb9 0004 47fe jsr 447fe <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
4495c: 508f addql #8,%sp <== NOT EXECUTED 4495e: 4a80 tstl %d0 <== NOT EXECUTED 44960: 6600 ff22 bnew 44884 <Stack_check_Dump_threads_usage+0x52><== NOT EXECUTED 44964: 4283 clrl %d3 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) {
44966: 4a8a tstl %a2 <== NOT EXECUTED 44968: 6600 ff24 bnew 4488e <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 );
4496c: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 44970: 4879 0009 925d pea 9925d <IntUartPollCallbacks.6601+0x2d> <== NOT EXECUTED 44976: 2f39 000a 39f4 movel a39f4 <print_context>,%sp@- <== NOT EXECUTED 4497c: 4e94 jsr %a4@ <== NOT EXECUTED
} (*print_handler)(
4497e: 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 );
44982: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
} (*print_handler)(
44986: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44988: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4498a: 2013 movel %a3@,%d0 <== NOT EXECUTED 4498c: 5380 subql #1,%d0 <== NOT EXECUTED 4498e: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 44992: 2f08 movel %a0,%sp@- <== NOT EXECUTED 44994: 4879 0009 926b pea 9926b <IntUartPollCallbacks.6601+0x3b> <== NOT EXECUTED 4499a: 2f39 000a 39f4 movel a39f4 <print_context>,%sp@- <== NOT EXECUTED 449a0: 2079 000a 39f8 moveal a39f8 <print_handler>,%a0 <== NOT EXECUTED 449a6: 4e90 jsr %a0@ <== NOT EXECUTED
stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) {
449a8: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 449ac: 4ab9 000a 39f0 tstl a39f0 <Stack_check_Initialized> <== NOT EXECUTED 449b2: 6600 ff36 bnew 448ea <Stack_check_Dump_threads_usage+0xb8><== NOT EXECUTED 449b6: 6000 ff56 braw 4490e <Stack_check_Dump_threads_usage+0xdc><== NOT EXECUTED
000447fe <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++)
447fe: 70fc moveq #-4,%d0 <== NOT EXECUTED
*/ void *Stack_check_find_high_water_mark( const void *s, size_t n ) {
44800: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS;
44804: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 44808: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
4480c: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 44810: d088 addl %a0,%d0 <== NOT EXECUTED 44812: b088 cmpl %a0,%d0 <== NOT EXECUTED 44814: 6310 blss 44826 <Stack_check_find_high_water_mark+0x28><== NOT EXECUTED
if (*base != U32_PATTERN)
44816: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 4481c: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4481e: 660c bnes 4482c <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++)
44820: 5888 addql #4,%a0 <== NOT EXECUTED 44822: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 44824: 65f0 bcss 44816 <Stack_check_find_high_water_mark+0x18><== NOT EXECUTED 44826: 4280 clrl %d0 <== NOT EXECUTED
if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; }
44828: 4e5e unlk %fp <== NOT EXECUTED 4482a: 4e75 rts <== NOT EXECUTED
*/ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base;
4482c: 2008 movel %a0,%d0 <== NOT EXECUTED
#endif return (void *)0; }
4482e: 4e5e unlk %fp <== NOT EXECUTED
44830: 4e75 rts
00044a34 <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) {
44a34: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 44a38: 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");
44a3c: 4879 0009 92fd pea 992fd <IntUartPollCallbacks.6601+0xcd> <== NOT EXECUTED 44a42: 47f9 0004 79dc lea 479dc <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) {
44a48: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 44a4c: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack);
44a50: 286a 00c2 moveal %a2@(194),%a4 <== NOT EXECUTED
char name [32]; printk("BLOWN STACK!!!\n");
44a54: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
44a56: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a58: 4879 0009 930d pea 9930d <IntUartPollCallbacks.6601+0xdd> <== NOT EXECUTED 44a5e: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
44a60: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 44a64: 4879 0009 932a pea 9932a <IntUartPollCallbacks.6601+0xfa> <== NOT EXECUTED 44a6a: 4e93 jsr %a3@ <== NOT EXECUTED
printk(
44a6c: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 44a70: 4879 0009 933c pea 9933c <IntUartPollCallbacks.6601+0x10c> <== NOT EXECUTED 44a76: 4e93 jsr %a3@ <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk(
44a78: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 44a7c: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED 44a80: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 44a84: 4eb9 0004 a924 jsr 4a924 <rtems_object_get_name> <== NOT EXECUTED 44a8a: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 44a8e: 2e80 movel %d0,%sp@ <== NOT EXECUTED 44a90: 4879 0009 9350 pea 99350 <IntUartPollCallbacks.6601+0x120> <== NOT EXECUTED 44a96: 4e93 jsr %a3@ <== NOT EXECUTED
"task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk(
44a98: 202a 00be movel %a2@(190),%d0 <== NOT EXECUTED 44a9c: 206a 00c2 moveal %a2@(194),%a0 <== NOT EXECUTED 44aa0: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 44aa4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 44aa6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44aa8: 4879 0009 9366 pea 99366 <IntUartPollCallbacks.6601+0x136> <== NOT EXECUTED 44aae: 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) {
44ab0: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44ab4: 4a02 tstb %d2 <== NOT EXECUTED 44ab6: 670a beqs 44ac2 <Stack_check_report_blown_task+0x8e><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81);
44ab8: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED 44abc: 4eb9 0004 b2ac jsr 4b2ac <rtems_fatal_error_occurred> <== NOT EXECUTED
(unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk(
44ac2: 486c 0018 pea %a4@(24) <== NOT EXECUTED 44ac6: 486c 0008 pea %a4@(8) <== NOT EXECUTED 44aca: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 44ace: 4879 0009 9397 pea 99397 <IntUartPollCallbacks.6601+0x167> <== NOT EXECUTED 44ad4: 4e93 jsr %a3@ <== NOT EXECUTED 44ad6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81);
44ada: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED 44ade: 4eb9 0004 b2ac jsr 4b2ac <rtems_fatal_error_occurred> <== NOT EXECUTED
0004cacc <TOD_MICROSECONDS_TO_TICKS>: uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { return (microseconds / rtems_configuration_get_microseconds_per_tick()); }
4cacc: 41f9 0006 4fd0 lea 64fd0 <Configuration+0xc>,%a0
#include <rtems/score/tod.h> uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) {
4cad2: 4e56 0000 linkw %fp,#0
return (microseconds / rtems_configuration_get_microseconds_per_tick()); }
4cad6: 202e 0008 movel %fp@(8),%d0 4cada: 4e5e unlk %fp 4cadc: 4c50 0000 remul %a0@,%d0,%d0 4cae0: 4e75 rts
... 00047864 <TOD_MILLISECONDS_TO_TICKS>: #include <rtems/score/tod.h> uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) {
47864: 4e56 0000 linkw %fp,#0 47868: 2039 0005 ed30 movel 5ed30 <Configuration+0xc>,%d0 4786e: 2f02 movel %d2,%sp@- 47870: 243c 0000 03e8 movel #1000,%d2 47876: 4c42 0000 remul %d2,%d0,%d0
return (milliseconds / rtems_configuration_get_milliseconds_per_tick()); }
4787a: 242e 0008 movel %fp@(8),%d2 4787e: 4c40 2002 remul %d0,%d2,%d2 47882: 2002 movel %d2,%d0 47884: 241f movel %sp@+,%d2 47886: 4e5e unlk %fp 47888: 4e75 rts
... 00046704 <_API_Mutex_Lock>: API_Mutex_Control *the_mutex ) { ISR_Level level; _ISR_Disable( level );
46704: 203c 0000 0700 movel #1792,%d0
#include <rtems/score/apimutex.h> void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) {
4670a: 4e56 0000 linkw %fp,#0 4670e: 206e 0008 moveal %fp@(8),%a0
ISR_Level level; _ISR_Disable( level );
46712: 40c1 movew %sr,%d1 46714: 8081 orl %d1,%d0 46716: 46c0 movew %d0,%sr
_CORE_mutex_Seize(
46718: 2f01 movel %d1,%sp@- 4671a: 42a7 clrl %sp@- 4671c: 4878 0001 pea 1 <ADD> 46720: 2f28 0008 movel %a0@(8),%sp@- 46724: 4868 0010 pea %a0@(16) 46728: 4eb9 0004 6958 jsr 46958 <_CORE_mutex_Seize> 4672e: 4fef 0014 lea %sp@(20),%sp
the_mutex->Object.id, true, 0, level ); }
46732: 4e5e unlk %fp 46734: 4e75 rts
... 00046764 <_API_Mutex_Unlock>: #include <rtems/score/apimutex.h> void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) {
46764: 4e56 0000 linkw %fp,#0
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
46768: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 4676e: 5280 addql #1,%d0 46770: 206e 0008 moveal %fp@(8),%a0 46774: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch(); _CORE_mutex_Surrender(
4677a: 42a7 clrl %sp@- 4677c: 2f28 0008 movel %a0@(8),%sp@- 46780: 4868 0010 pea %a0@(16) 46784: 4eb9 0004 6a08 jsr 46a08 <_CORE_mutex_Surrender>
&the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch();
4678a: 4fef 000c lea %sp@(12),%sp
}
4678e: 4e5e unlk %fp
_CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch();
46790: 4ef9 0004 7dbc jmp 47dbc <_Thread_Enable_dispatch>
... 00046684 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) {
46684: 4e56 0000 linkw %fp,#0
_Chain_Append( &_API_extensions_List, &the_extension->Node );
46688: 2f2e 0008 movel %fp@(8),%sp@- 4668c: 4879 0005 f0a4 pea 5f0a4 <_API_extensions_List> 46692: 4eb9 0004 6798 jsr 46798 <_Chain_Append> 46698: 508f addql #8,%sp
}
4669a: 4e5e unlk %fp 4669c: 4e75 rts
... 0004eb44 <_Barrier_Translate_core_barrier_return_code>: }; rtems_status_code _Barrier_Translate_core_barrier_return_code ( CORE_barrier_Status the_barrier_status ) {
4eb44: 41f9 0005 d86c lea 5d86c <_Barrier_Translate_core_barrier_return_code_>,%a0 4eb4a: 4e56 0000 linkw %fp,#0
#if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Barrier_Translate_core_barrier_return_code_[the_barrier_status]; }
4eb4e: 202e 0008 movel %fp@(8),%d0 4eb52: 4e5e unlk %fp 4eb54: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4eb58: 4e75 rts
... 00048bdc <_CORE_RWLock_Obtain_for_writing>: * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level );
48bdc: 203c 0000 0700 movel #1792,%d0
Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) {
48be2: 4e56 fff4 linkw %fp,#-12 48be6: 206e 0008 moveal %fp@(8),%a0 48bea: 48d7 001c moveml %d2-%d4,%sp@ 48bee: 282e 000c movel %fp@(12),%d4 48bf2: 242e 0010 movel %fp@(16),%d2 48bf6: 262e 0014 movel %fp@(20),%d3
ISR_Level level; Thread_Control *executing = _Thread_Executing;
48bfa: 2279 0006 1d12 moveal 61d12 <_Thread_Executing>,%a1
* Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level );
48c00: 40c1 movew %sr,%d1 48c02: 8081 orl %d1,%d0 48c04: 46c0 movew %d0,%sr
switch ( the_rwlock->current_state ) {
48c06: 4aa8 0044 tstl %a0@(68) 48c0a: 6614 bnes 48c20 <_CORE_RWLock_Obtain_for_writing+0x44>
case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
48c0c: 7002 moveq #2,%d0 48c0e: 2140 0044 movel %d0,%a0@(68)
_ISR_Enable( level );
48c12: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
48c14: 42a9 0034 clrl %a1@(52)
_CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ }
48c18: 4cd7 001c moveml %sp@,%d2-%d4 48c1c: 4e5e unlk %fp 48c1e: 4e75 rts
/* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) {
48c20: 4a02 tstb %d2 48c22: 6610 bnes 48c34 <_CORE_RWLock_Obtain_for_writing+0x58>
_ISR_Enable( level );
48c24: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
48c26: 7002 moveq #2,%d0
_CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ }
48c28: 4cd7 001c moveml %sp@,%d2-%d4
* If the thread is not willing to wait, then return immediately. */ if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
48c2c: 2340 0034 movel %d0,%a1@(52)
_CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ }
48c30: 4e5e unlk %fp 48c32: 4e75 rts
*/ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
48c34: 7001 moveq #1,%d0
* We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id;
48c36: 2344 0020 movel %d4,%a1@(32)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
48c3a: 42a9 0034 clrl %a1@(52)
/* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue;
48c3e: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
48c42: 2340 0030 movel %d0,%a1@(48) 48c46: 2140 0030 movel %d0,%a0@(48)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level );
48c4a: 46c1 movew %d1,%sr
_Thread_queue_Enqueue_with_handler(
48c4c: 2d43 000c movel %d3,%fp@(12) 48c50: 203c 0004 8d48 movel #298312,%d0 48c56: 2d48 0008 movel %a0,%fp@(8) 48c5a: 2d40 0010 movel %d0,%fp@(16)
_CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ }
48c5e: 4cd7 001c moveml %sp@,%d2-%d4 48c62: 4e5e unlk %fp
executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler(
48c64: 4ef9 0004 a5b4 jmp 4a5b4 <_Thread_queue_Enqueue_with_handler>
... 00048d48 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) {
48d48: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location );
48d4c: 486e fffc pea %fp@(-4) 48d50: 2f2e 0008 movel %fp@(8),%sp@- 48d54: 4eb9 0004 a090 jsr 4a090 <_Thread_Get>
switch ( location ) {
48d5a: 508f addql #8,%sp 48d5c: 4aae fffc tstl %fp@(-4) 48d60: 6618 bnes 48d7a <_CORE_RWLock_Timeout+0x32>
#if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread );
48d62: 2f00 movel %d0,%sp@- 48d64: 4eb9 0004 aa24 jsr 4aa24 <_Thread_queue_Process_timeout>
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
48d6a: 588f addql #4,%sp 48d6c: 2039 0006 1c58 movel 61c58 <_Thread_Dispatch_disable_level>,%d0 48d72: 5380 subql #1,%d0 48d74: 23c0 0006 1c58 movel %d0,61c58 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch(); break; } }
48d7a: 4e5e unlk %fp 48d7c: 4e75 rts
... 0004de44 <_CORE_barrier_Initialize>: void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) {
4de44: 4e56 0000 linkw %fp,#0
the_barrier->Attributes = *the_barrier_attributes;
4de48: 226e 000c moveal %fp@(12),%a1
the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize(
4de4c: 4878 0003 pea 3 <DIVIDE>
void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) {
4de50: 206e 0008 moveal %fp@(8),%a0
the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize(
4de54: 2f3c 0001 0000 movel #65536,%sp@- 4de5a: 42a7 clrl %sp@-
CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes;
4de5c: 2011 movel %a1@,%d0 4de5e: 2229 0004 movel %a1@(4),%d1 4de62: 2140 0040 movel %d0,%a0@(64) 4de66: 2141 0044 movel %d1,%a0@(68)
the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize(
4de6a: 2f08 movel %a0,%sp@-
CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0;
4de6c: 42a8 0048 clrl %a0@(72)
_Thread_queue_Initialize(
4de70: 4eb9 0004 8584 jsr 48584 <_Thread_queue_Initialize> 4de76: 4fef 0010 lea %sp@(16),%sp
&the_barrier->Wait_queue, THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_BARRIER, CORE_BARRIER_TIMEOUT ); }
4de7a: 4e5e unlk %fp 4de7c: 4e75 rts
... 0004de80 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) {
4de80: 4e56 fff4 linkw %fp,#-12 4de84: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4de88: 246e 0008 moveal %fp@(8),%a2 4de8c: 47f9 0004 81a8 lea 481a8 <_Thread_queue_Dequeue>,%a3
Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) {
4de92: 4282 clrl %d2 4de94: 2f0a movel %a2,%sp@- 4de96: 4e93 jsr %a3@ 4de98: 588f addql #4,%sp 4de9a: 4a80 tstl %d0 4de9c: 670c beqs 4deaa <_CORE_barrier_Release+0x2a> 4de9e: 2f0a movel %a2,%sp@-
#if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++;
4dea0: 5282 addql #1,%d2
{ Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) {
4dea2: 4e93 jsr %a3@ 4dea4: 588f addql #4,%sp 4dea6: 4a80 tstl %d0 4dea8: 66f4 bnes 4de9e <_CORE_barrier_Release+0x1e>
#endif count++; } the_barrier->number_of_waiting_threads = 0; return count; }
4deaa: 2002 movel %d2,%d0
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; } the_barrier->number_of_waiting_threads = 0;
4deac: 42aa 0048 clrl %a2@(72)
return count; }
4deb0: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4deb6: 4e5e unlk %fp 4deb8: 4e75 rts
... 0004debc <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level );
4debc: 203c 0000 0700 movel #1792,%d0
Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) {
4dec2: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing; ISR_Level level; executing = _Thread_Executing;
4dec6: 2279 0005 efbe moveal 5efbe <_Thread_Executing>,%a1
Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) {
4decc: 48d7 001c moveml %d2-%d4,%sp@ 4ded0: 242e 000c movel %fp@(12),%d2 4ded4: 262e 0014 movel %fp@(20),%d3
Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
4ded8: 42a9 0034 clrl %a1@(52)
Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) {
4dedc: 206e 0008 moveal %fp@(8),%a0 4dee0: 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 );
4dee4: 40c1 movew %sr,%d1 4dee6: 8081 orl %d1,%d0 4dee8: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
4deea: 2028 0048 movel %a0@(72),%d0 4deee: 5280 addql #1,%d0 4def0: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
4def4: 4aa8 0040 tstl %a0@(64) 4def8: 6606 bnes 4df00 <_CORE_barrier_Wait+0x44>
if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) {
4defa: b0a8 0044 cmpl %a0@(68),%d0 4defe: 672e beqs 4df2e <_CORE_barrier_Wait+0x72> 4df00: 7001 moveq #1,%d0
} } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id;
4df02: 2342 0020 movel %d2,%a1@(32)
return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue;
4df06: 2348 0044 movel %a0,%a1@(68) 4df0a: 2140 0030 movel %d0,%a0@(48)
executing->Wait.id = id; _ISR_Enable( level );
4df0e: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4df10: 2d43 000c movel %d3,%fp@(12) 4df14: 203c 0004 8668 movel #296552,%d0 4df1a: 2d48 0008 movel %a0,%fp@(8) 4df1e: 2d40 0010 movel %d0,%fp@(16)
}
4df22: 4cd7 001c moveml %sp@,%d2-%d4 4df26: 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 );
4df28: 4ef9 0004 8308 jmp 48308 <_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;
4df2e: 7001 moveq #1,%d0 4df30: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
4df34: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4df36: 2d44 0010 movel %d4,%fp@(16) 4df3a: 2d42 000c movel %d2,%fp@(12) 4df3e: 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 ); }
4df42: 4cd7 001c moveml %sp@,%d2-%d4 4df46: 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 );
4df48: 4ef9 0004 de80 jmp 4de80 <_CORE_barrier_Release>
... 00059f8c <_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 ) {
59f8c: 4e56 ffe0 linkw %fp,#-32 59f90: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 59f94: 266e 0008 moveal %fp@(8),%a3 59f98: 282e 000c movel %fp@(12),%d4 59f9c: 242e 0010 movel %fp@(16),%d2 59fa0: 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 ) {
59fa4: b4ab 004c cmpl %a3@(76),%d2 59fa8: 6262 bhis 5a00c <_CORE_message_queue_Broadcast+0x80>
* 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 ) {
59faa: 4aab 0048 tstl %a3@(72) 59fae: 664c bnes 59ffc <_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))) {
59fb0: 2f0b movel %a3,%sp@- 59fb2: 49f9 0005 c6d8 lea 5c6d8 <_Thread_queue_Dequeue>,%a4 59fb8: 4283 clrl %d3
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
59fba: 4bf9 0006 35e8 lea 635e8 <memcpy>,%a5 59fc0: 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 =
59fc2: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
59fc4: 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 =
59fc6: 4a80 tstl %d0 59fc8: 6722 beqs 59fec <_CORE_message_queue_Broadcast+0x60> 59fca: 2f02 movel %d2,%sp@-
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1;
59fcc: 5283 addql #1,%d3 59fce: 2f04 movel %d4,%sp@- 59fd0: 2f2a 002c movel %a2@(44),%sp@- 59fd4: 4e95 jsr %a5@
buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size;
59fd6: 206a 0028 moveal %a2@(40),%a0 59fda: 4fef 000c lea %sp@(12),%sp 59fde: 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))) {
59fe0: 2f0b movel %a3,%sp@- 59fe2: 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 =
59fe4: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
59fe6: 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 =
59fe8: 4a80 tstl %d0 59fea: 66de bnes 59fca <_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;
59fec: 2045 moveal %d5,%a0 59fee: 4280 clrl %d0 59ff0: 2083 movel %d3,%a0@
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
59ff2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59ff8: 4e5e unlk %fp 59ffa: 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;
59ffc: 2045 moveal %d5,%a0 59ffe: 4280 clrl %d0
#endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
5a000: 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;
5a006: 4290 clrl %a0@
#endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
5a008: 4e5e unlk %fp 5a00a: 4e75 rts
{ Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) {
5a00c: 7001 moveq #1,%d0 <== NOT EXECUTED
#endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
5a00e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 5a014: 4e5e unlk %fp <== NOT EXECUTED
5a016: 4e75 rts
00053ca4 <_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 ) {
53ca4: 4e56 0000 linkw %fp,#0 53ca8: 2f0a movel %a2,%sp@-
/* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush(
53caa: 2f2e 0010 movel %fp@(16),%sp@- 53cae: 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 ) {
53cb2: 246e 0008 moveal %fp@(8),%a2
/* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush(
53cb6: 2f0a movel %a2,%sp@- 53cb8: 4eb9 0004 db3c jsr 4db3c <_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 )
53cbe: 4fef 000c lea %sp@(12),%sp 53cc2: 4aaa 0048 tstl %a2@(72) 53cc6: 6612 bnes 53cda <_CORE_message_queue_Close+0x36>
(void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers );
53cc8: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
}
53cce: 246e fffc moveal %fp@(-4),%a2 53cd2: 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 );
53cd4: 4ef9 0004 e86c jmp 4e86c <_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 );
53cda: 2f0a movel %a2,%sp@- 53cdc: 4eb9 0005 3cf8 jsr 53cf8 <_CORE_message_queue_Flush_support>
(void) _Workspace_Free( the_message_queue->message_buffers );
53ce2: 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 );
53ce8: 588f addql #4,%sp
(void) _Workspace_Free( the_message_queue->message_buffers ); }
53cea: 246e fffc moveal %fp@(-4),%a2 53cee: 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 );
53cf0: 4ef9 0004 e86c jmp 4e86c <_Workspace_Free>
... 0004fe54 <_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)) {
4fe54: 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 ) {
4fe56: 4e56 fff4 linkw %fp,#-12 4fe5a: 202e 0014 movel %fp@(20),%d0 4fe5e: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fe62: 246e 0008 moveal %fp@(8),%a2 4fe66: 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)) {
4fe6a: c280 andl %d0,%d1
) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages;
4fe6c: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
4fe70: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
4fe74: 2540 004c movel %d0,%a2@(76)
CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler;
4fe78: 42aa 0060 clrl %a2@(96)
the_message_queue->notify_argument = the_argument;
4fe7c: 42aa 0064 clrl %a2@(100)
/* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) {
4fe80: 4a81 tstl %d1 4fe82: 6620 bnes 4fea4 <_CORE_message_queue_Initialize+0x50> 4fe84: 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));
4fe86: 2601 movel %d1,%d3 4fe88: 0683 0000 0014 addil #20,%d3
/* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages *
4fe8e: 2003 movel %d3,%d0 4fe90: 4c02 0800 mulsl %d2,%d0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size)
4fe94: b280 cmpl %d0,%d1 4fe96: 631c blss 4feb4 <_CORE_message_queue_Initialize+0x60>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true;
4fe98: 4200 clrb %d0
}
4fe9a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fea0: 4e5e unlk %fp 4fea2: 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);
4fea4: 2200 movel %d0,%d1 4fea6: 5881 addql #4,%d1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
4fea8: 76fc moveq #-4,%d3 4feaa: c283 andl %d3,%d1
} if (allocated_message_size < maximum_message_size)
4feac: b280 cmpl %d0,%d1 4feae: 64d6 bccs 4fe86 <_CORE_message_queue_Initialize+0x32>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true;
4feb0: 4200 clrb %d0 <== NOT EXECUTED 4feb2: 60e6 bras 4fe9a <_CORE_message_queue_Initialize+0x46><== NOT EXECUTED
return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
4feb4: 2f00 movel %d0,%sp@- 4feb6: 4eb9 0005 2cd4 jsr 52cd4 <_Workspace_Allocate>
_Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0)
4febc: 588f addql #4,%sp
return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
4febe: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0)
4fec2: 67d4 beqs 4fe98 <_CORE_message_queue_Initialize+0x44>
/* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize (
4fec4: 2f03 movel %d3,%sp@- 4fec6: 2f02 movel %d2,%sp@- 4fec8: 2f00 movel %d0,%sp@- 4feca: 486a 0068 pea %a2@(104) 4fece: 4eb9 0005 51e8 jsr 551e8 <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize(
4fed4: 4878 0006 pea 6 <EXTENDSFDF> 4fed8: 7001 moveq #1,%d0 4feda: 206e 000c moveal %fp@(12),%a0 4fede: b090 cmpl %a0@,%d0 4fee0: 57c0 seq %d0 4fee2: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 4fee6: 49c0 extbl %d0 4fee8: 4480 negl %d0
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
4feea: 41ea 0054 lea %a2@(84),%a0 4feee: 2f00 movel %d0,%sp@- 4fef0: 2548 0050 movel %a0,%a2@(80)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4fef4: 41ea 0050 lea %a2@(80),%a0 4fef8: 2548 0058 movel %a0,%a2@(88) 4fefc: 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;
4fefe: 42aa 0054 clrl %a2@(84) 4ff02: 4eb9 0005 2074 jsr 52074 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true;
4ff08: 4fef 0020 lea %sp@(32),%sp
}
4ff0c: 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(
4ff12: 7001 moveq #1,%d0
STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; }
4ff14: 4e5e unlk %fp 4ff16: 4e75 rts
0004ff18 <_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 );
4ff18: 203c 0000 0700 movel #1792,%d0
void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) {
4ff1e: 4e56 ffe8 linkw %fp,#-24
ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing;
4ff22: 2279 0006 97b2 moveal 697b2 <_Thread_Executing>,%a1
void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) {
4ff28: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4ff2c: 282e 000c movel %fp@(12),%d4 4ff30: 286e 001c moveal %fp@(28),%a4 4ff34: 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;
4ff38: 42a9 0034 clrl %a1@(52)
void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) {
4ff3c: 262e 0010 movel %fp@(16),%d3 4ff40: 206e 0014 moveal %fp@(20),%a0 4ff44: 242e 0018 movel %fp@(24),%d2
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 );
4ff48: 40c1 movew %sr,%d1 4ff4a: 8081 orl %d1,%d0 4ff4c: 46c0 movew %d0,%sr
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4ff4e: 200a movel %a2,%d0 4ff50: 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));
4ff56: 266a 0050 moveal %a2@(80),%a3
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4ff5a: b08b cmpl %a3,%d0 4ff5c: 6700 0088 beqw 4ffe6 <_CORE_message_queue_Seize+0xce>
{ Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
4ff60: 2253 moveal %a3@,%a1
the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1;
4ff62: 53aa 0048 subql #1,%a2@(72)
the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain);
4ff66: 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;
4ff6a: 2549 0050 movel %a1,%a2@(80)
new_first->previous = _Chain_Head(the_chain);
4ff6e: 234c 0004 movel %a4,%a1@(4)
_ISR_Enable( level );
4ff72: 46c1 movew %d1,%sr
*size_p = the_message->Contents.size; _Thread_Executing->Wait.count =
4ff74: 2279 0006 97b2 moveal 697b2 <_Thread_Executing>,%a1
_CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer,
4ff7a: 240b movel %a3,%d2 4ff7c: 0682 0000 0010 addil #16,%d2
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
4ff82: 49f9 0005 8950 lea 58950 <memcpy>,%a4
the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size;
4ff88: 20ab 000c movel %a3@(12),%a0@
_Thread_Executing->Wait.count =
4ff8c: 236b 0008 0024 movel %a3@(8),%a1@(36) 4ff92: 2f10 movel %a0@,%sp@- 4ff94: 2f02 movel %d2,%sp@- 4ff96: 2f03 movel %d3,%sp@- 4ff98: 4e94 jsr %a4@
* is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
4ff9a: 2f0a movel %a2,%sp@- 4ff9c: 4eb9 0005 1c98 jsr 51c98 <_Thread_queue_Dequeue>
if ( !the_thread ) {
4ffa2: 4fef 0010 lea %sp@(16),%sp
* is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
4ffa6: 2040 moveal %d0,%a0
if ( !the_thread ) {
4ffa8: 4a80 tstl %d0 4ffaa: 6700 0088 beqw 50034 <_CORE_message_queue_Seize+0x11c>
*/ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option;
4ffae: 2028 0030 movel %a0@(48),%d0
CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority;
4ffb2: 2768 0024 0008 movel %a0@(36),%a3@(8) 4ffb8: 2740 000c movel %d0,%a3@(12)
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
4ffbc: 2f00 movel %d0,%sp@- 4ffbe: 2f28 002c movel %a0@(44),%sp@- 4ffc2: 2f02 movel %d2,%sp@- 4ffc4: 4e94 jsr %a4@
the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message(
4ffc6: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 4ffcc: 4fef 000c lea %sp@(12),%sp 4ffd0: 2d4b 000c movel %a3,%fp@(12) 4ffd4: 2d4a 0008 movel %a2,%fp@(8)
executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); }
4ffd8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4ffde: 4e5e unlk %fp
the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message(
4ffe0: 4ef9 0005 5230 jmp 55230 <_CORE_message_queue_Insert_message>
return; } #endif } if ( !wait ) {
4ffe6: 4a02 tstb %d2 4ffe8: 6612 bnes 4fffc <_CORE_message_queue_Seize+0xe4>
_ISR_Enable( level );
4ffea: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
4ffec: 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 ); }
4ffee: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
#endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
4fff4: 2340 0034 movel %d0,%a1@(52)
executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); }
4fff8: 4e5e unlk %fp 4fffa: 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;
4fffc: 7001 moveq #1,%d0 4fffe: 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;
50002: 2348 0028 movel %a0,%a1@(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;
50006: 2343 002c movel %d3,%a1@(44)
return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id;
5000a: 2344 0020 movel %d4,%a1@(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;
5000e: 234a 0044 movel %a2,%a1@(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 );
50012: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
50014: 2d4c 000c movel %a4,%fp@(12) 50018: 49f9 0005 2158 lea 52158 <_Thread_queue_Timeout>,%a4 5001e: 2d4a 0008 movel %a2,%fp@(8) 50022: 2d4c 0010 movel %a4,%fp@(16)
}
50026: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5002c: 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 );
5002e: 4ef9 0005 1df8 jmp 51df8 <_Thread_queue_Enqueue_with_handler>
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
50034: 45ea 0068 lea %a2@(104),%a2 50038: 2d4b 000c movel %a3,%fp@(12) 5003c: 2d4a 0008 movel %a2,%fp@(8)
}
50040: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 50046: 4e5e unlk %fp 50048: 4ef9 0004 fd88 jmp 4fd88 <_Chain_Append>
... 00050050 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) {
50050: 4e56 ffec linkw %fp,#-20 50054: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 50058: 246e 0008 moveal %fp@(8),%a2 5005c: 242e 0010 movel %fp@(16),%d2 50060: 282e 001c movel %fp@(28),%d4 50064: 162e 0023 moveb %fp@(35),%d3
CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) {
50068: b4aa 004c cmpl %a2@(76),%d2 5006c: 6228 bhis 50096 <_CORE_message_queue_Submit+0x46>
} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) {
5006e: 202a 0048 movel %a2@(72),%d0 50072: 672e beqs 500a2 <_CORE_message_queue_Submit+0x52>
/* * 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 ) {
50074: b0aa 0044 cmpl %a2@(68),%d0 50078: 6500 00ba bcsw 50134 <_CORE_message_queue_Submit+0xe4>
/* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) {
5007c: 4a03 tstb %d3 5007e: 6700 00f4 beqw 50174 <_CORE_message_queue_Submit+0x124>
/* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) {
50082: 2039 0006 9792 movel 69792 <_ISR_Nest_level>,%d0 50088: 6754 beqs 500de <_CORE_message_queue_Submit+0x8e> 5008a: 7003 moveq #3,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif }
5008c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50092: 4e5e unlk %fp 50094: 4e75 rts
) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) {
50096: 7001 moveq #1,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif }
50098: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5009e: 4e5e unlk %fp 500a0: 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 );
500a2: 2f0a movel %a2,%sp@- 500a4: 4eb9 0005 1c98 jsr 51c98 <_Thread_queue_Dequeue>
if ( the_thread ) {
500aa: 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 );
500ac: 2640 moveal %d0,%a3
if ( the_thread ) {
500ae: 4a80 tstl %d0 500b0: 6700 00ce beqw 50180 <_CORE_message_queue_Submit+0x130>
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
500b4: 2f02 movel %d2,%sp@- 500b6: 2f2e 000c movel %fp@(12),%sp@- 500ba: 2f2b 002c movel %a3@(44),%sp@- 500be: 4eb9 0005 8950 jsr 58950 <memcpy>
_CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size;
500c4: 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;
500c8: 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;
500cc: 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;
500ce: 2082 movel %d2,%a0@
the_thread->Wait.count = (uint32_t) submit_type;
500d0: 2744 0024 movel %d4,%a3@(36)
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif }
500d4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 500da: 4e5e unlk %fp 500dc: 4e75 rts
* Thus the unusual choice to open a new scope and declare * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing;
500de: 2079 0006 97b2 moveal 697b2 <_Thread_Executing>,%a0
ISR_Level level; _ISR_Disable( level );
500e4: 203c 0000 0700 movel #1792,%d0 500ea: 40c1 movew %sr,%d1 500ec: 8081 orl %d1,%d0 500ee: 46c0 movew %d0,%sr 500f0: 7001 moveq #1,%d0
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id;
500f2: 216e 0014 0020 movel %fp@(20),%a0@(32) 500f8: 2540 0030 movel %d0,%a2@(48)
executing->Wait.return_argument_second.immutable_object = buffer;
500fc: 202e 000c movel %fp@(12),%d0
executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type;
50100: 2144 0024 movel %d4,%a0@(36)
_ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer;
50104: 2140 002c movel %d0,%a0@(44)
executing->Wait.option = (uint32_t) size;
50108: 2142 0030 movel %d2,%a0@(48)
Thread_Control *executing = _Thread_Executing; ISR_Level level; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue;
5010c: 214a 0044 movel %a2,%a0@(68)
executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level );
50110: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
50112: 4879 0005 2158 pea 52158 <_Thread_queue_Timeout> 50118: 2f2e 0024 movel %fp@(36),%sp@- 5011c: 2f0a movel %a2,%sp@- 5011e: 4eb9 0005 1df8 jsr 51df8 <_Thread_queue_Enqueue_with_handler>
} return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
50124: 4fef 000c lea %sp@(12),%sp
executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
50128: 7007 moveq #7,%d0
} return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif }
5012a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50130: 4e5e unlk %fp 50132: 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 *)
50134: 486a 0068 pea %a2@(104) 50138: 4eb9 0004 fde8 jsr 4fde8 <_Chain_Get> 5013e: 2640 moveal %d0,%a3
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
50140: 2f02 movel %d2,%sp@- 50142: 2f2e 000c movel %fp@(12),%sp@- 50146: 486b 0010 pea %a3@(16) 5014a: 4eb9 0005 8950 jsr 58950 <memcpy>
_CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size;
50150: 2742 000c movel %d2,%a3@(12)
CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority;
50154: 2744 0008 movel %d4,%a3@(8)
_CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message(
50158: 2f04 movel %d4,%sp@- 5015a: 2f0b movel %a3,%sp@- 5015c: 2f0a movel %a2,%sp@- 5015e: 4eb9 0005 5230 jsr 55230 <_CORE_message_queue_Insert_message>
the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
50164: 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(
50168: 4280 clrl %d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif }
5016a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50170: 4e5e unlk %fp 50172: 4e75 rts
/* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) {
50174: 7002 moveq #2,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif }
50176: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5017c: 4e5e unlk %fp 5017e: 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 ) {
50180: 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 ) {
50184: b0aa 0044 cmpl %a2@(68),%d0 50188: 6400 fef2 bccw 5007c <_CORE_message_queue_Submit+0x2c> 5018c: 60a6 bras 50134 <_CORE_message_queue_Submit+0xe4>
... 0004b9d8 <_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 ) {
4b9d8: 4e56 0000 linkw %fp,#0
{ Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing;
4b9dc: 2279 0005 efbe moveal 5efbe <_Thread_Executing>,%a1 4b9e2: 2f0a movel %a2,%sp@- 4b9e4: 206e 0008 moveal %fp@(8),%a0 4b9e8: 246e 000c moveal %fp@(12),%a2 4b9ec: 2f02 movel %d2,%sp@-
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
4b9ee: 42a9 0034 clrl %a1@(52)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
4b9f2: 4aa8 004e tstl %a0@(78) 4b9f6: 673a beqs 4ba32 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
the_mutex->lock = CORE_MUTEX_LOCKED;
4b9f8: 42a8 004e clrl %a0@(78)
the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1;
4b9fc: 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;
4b9fe: 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;
4ba04: 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;
4ba08: 2141 0052 movel %d1,%a0@(82)
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
4ba0c: 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;
4ba10: 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 ) ||
4ba14: b280 cmpl %d0,%d1 4ba16: 672e beqs 4ba46 <_CORE_mutex_Seize_interrupt_trylock+0x6e> 4ba18: 123c 0003 moveb #3,%d1 4ba1c: b280 cmpl %d0,%d1 4ba1e: 674e beqs 4ba6e <_CORE_mutex_Seize_interrupt_trylock+0x96>
executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p );
4ba20: 2012 movel %a2@,%d0 4ba22: 46c0 movew %d0,%sr 4ba24: 4280 clrl %d0
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); }
4ba26: 242e fff8 movel %fp@(-8),%d2 4ba2a: 246e fffc moveal %fp@(-4),%a2 4ba2e: 4e5e unlk %fp 4ba30: 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 ) ) {
4ba32: b3e8 005a cmpal %a0@(90),%a1 4ba36: 671a beqs 4ba52 <_CORE_mutex_Seize_interrupt_trylock+0x7a> 4ba38: 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 );
4ba3c: 7001 moveq #1,%d0 4ba3e: 246e fffc moveal %fp@(-4),%a2 4ba42: 4e5e unlk %fp 4ba44: 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++;
4ba46: 52a9 001c addql #1,%a1@(28)
} if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p );
4ba4a: 2012 movel %a2@,%d0 4ba4c: 46c0 movew %d0,%sr 4ba4e: 4280 clrl %d0 4ba50: 60d4 bras 4ba26 <_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 ) {
4ba52: 2028 0040 movel %a0@(64),%d0 4ba56: 6658 bnes 4bab0 <_CORE_mutex_Seize_interrupt_trylock+0xd8>
case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++;
4ba58: 52a8 0052 addql #1,%a0@(82)
_ISR_Enable( *level_p );
4ba5c: 2012 movel %a2@,%d0 4ba5e: 46c0 movew %d0,%sr 4ba60: 242e fff8 movel %fp@(-8),%d2 4ba64: 4280 clrl %d0 4ba66: 246e fffc moveal %fp@(-4),%a2 4ba6a: 4e5e unlk %fp 4ba6c: 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++;
4ba6e: 2429 001c movel %a1@(28),%d2 4ba72: 2002 movel %d2,%d0 4ba74: 5280 addql #1,%d0 4ba76: 2340 001c movel %d0,%a1@(28)
{ Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority;
4ba7a: 2029 0014 movel %a1@(20),%d0
*/ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling;
4ba7e: 2228 004a movel %a0@(74),%d1
current = executing->current_priority; if ( current == ceiling ) {
4ba82: b081 cmpl %d1,%d0 4ba84: 6700 0082 beqw 4bb08 <_CORE_mutex_Seize_interrupt_trylock+0x130>
_ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) {
4ba88: 6244 bhis 4bace <_CORE_mutex_Seize_interrupt_trylock+0xf6>
); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
4ba8a: 7206 moveq #6,%d1
the_mutex->lock = CORE_MUTEX_UNLOCKED;
4ba8c: 7001 moveq #1,%d0
); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
4ba8e: 2341 0034 movel %d1,%a1@(52)
the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */
4ba92: 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;
4ba96: 2140 004e movel %d0,%a0@(78)
the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */
4ba9a: 2342 001c movel %d2,%a1@(28)
_ISR_Enable( *level_p );
4ba9e: 2012 movel %a2@,%d0 4baa0: 46c0 movew %d0,%sr 4baa2: 242e fff8 movel %fp@(-8),%d2 4baa6: 4280 clrl %d0 4baa8: 246e fffc moveal %fp@(-4),%a2 4baac: 4e5e unlk %fp 4baae: 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 ) {
4bab0: 7201 moveq #1,%d1 4bab2: b280 cmpl %d0,%d1 4bab4: 6682 bnes 4ba38 <_CORE_mutex_Seize_interrupt_trylock+0x60>
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;
4bab6: 7002 moveq #2,%d0 4bab8: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( *level_p );
4babc: 2012 movel %a2@,%d0 4babe: 46c0 movew %d0,%sr 4bac0: 242e fff8 movel %fp@(-8),%d2 4bac4: 4280 clrl %d0 4bac6: 246e fffc moveal %fp@(-4),%a2 4baca: 4e5e unlk %fp 4bacc: 4e75 rts
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
4bace: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 4bad4: 5280 addql #1,%d0 4bad6: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level>
return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p );
4badc: 2012 movel %a2@,%d0 4bade: 46c0 movew %d0,%sr
_Thread_Change_priority(
4bae0: 42a7 clrl %sp@- 4bae2: 2f28 004a movel %a0@(74),%sp@- 4bae6: 2f28 005a movel %a0@(90),%sp@- 4baea: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority>
the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch();
4baf0: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4baf6: 242e fff8 movel %fp@(-8),%d2 4bafa: 4fef 000c lea %sp@(12),%sp 4bafe: 4280 clrl %d0 4bb00: 246e fffc moveal %fp@(-4),%a2 4bb04: 4e5e unlk %fp 4bb06: 4e75 rts
Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p );
4bb08: 2012 movel %a2@,%d0 4bb0a: 46c0 movew %d0,%sr 4bb0c: 242e fff8 movel %fp@(-8),%d2 4bb10: 4280 clrl %d0 4bb12: 246e fffc moveal %fp@(-4),%a2 4bb16: 4e5e unlk %fp 4bb18: 4e75 rts
... 00046a08 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) {
46a08: 4e56 0000 linkw %fp,#0 46a0c: 2f0a movel %a2,%sp@- 46a0e: 246e 0008 moveal %fp@(8),%a2
Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder;
46a12: 206a 005a moveal %a2@(90),%a0
* allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) {
46a16: 4a2a 0044 tstb %a2@(68) 46a1a: 6712 beqs 46a2e <_CORE_mutex_Surrender+0x26>
if ( !_Thread_Is_executing( holder ) )
46a1c: b1f9 0005 efbe cmpal 5efbe <_Thread_Executing>,%a0 46a22: 670a beqs 46a2e <_CORE_mutex_Surrender+0x26>
} } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; }
46a24: 246e fffc moveal %fp@(-4),%a2
* discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { if ( !_Thread_Is_executing( holder ) )
46a28: 7003 moveq #3,%d0
} } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; }
46a2a: 4e5e unlk %fp 46a2c: 4e75 rts
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count )
46a2e: 202a 0052 movel %a2@(82),%d0 46a32: 6768 beqs 46a9c <_CORE_mutex_Surrender+0x94>
return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--;
46a34: 5380 subql #1,%d0 46a36: 2540 0052 movel %d0,%a2@(82)
if ( the_mutex->nest_count != 0 ) {
46a3a: 6660 bnes 46a9c <_CORE_mutex_Surrender+0x94> 46a3c: 202a 0046 movel %a2@(70),%d0
/* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
46a40: 7202 moveq #2,%d1 46a42: b280 cmpl %d0,%d1 46a44: 6700 0084 beqw 46aca <_CORE_mutex_Surrender+0xc2> 46a48: 123c 0003 moveb #3,%d1 46a4c: b280 cmpl %d0,%d1 46a4e: 677a beqs 46aca <_CORE_mutex_Surrender+0xc2>
} first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL;
46a50: 42aa 005a clrl %a2@(90)
/* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
46a54: 7202 moveq #2,%d1
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; the_mutex->holder_id = 0;
46a56: 42aa 005e clrl %a2@(94)
/* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
46a5a: b280 cmpl %d0,%d1 46a5c: 6748 beqs 46aa6 <_CORE_mutex_Surrender+0x9e> 46a5e: 123c 0003 moveb #3,%d1 46a62: b280 cmpl %d0,%d1 46a64: 6740 beqs 46aa6 <_CORE_mutex_Surrender+0x9e>
/* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
46a66: 2f0a movel %a2,%sp@- 46a68: 4eb9 0004 81a8 jsr 481a8 <_Thread_queue_Dequeue> 46a6e: 588f addql #4,%sp 46a70: 2040 moveal %d0,%a0 46a72: 4a80 tstl %d0 46a74: 6700 0090 beqw 46b06 <_CORE_mutex_Surrender+0xfe>
#endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1;
46a78: 7201 moveq #1,%d1
} else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id;
46a7a: 2568 0008 005e movel %a0@(8),%a2@(94)
the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) {
46a80: 202a 0046 movel %a2@(70),%d0
#endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1;
46a84: 2541 0052 movel %d1,%a2@(82)
switch ( the_mutex->Attributes.discipline ) {
46a88: 123c 0002 moveb #2,%d1
} else #endif { the_mutex->holder = the_thread;
46a8c: 2548 005a movel %a0,%a2@(90)
the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) {
46a90: b280 cmpl %d0,%d1 46a92: 6764 beqs 46af8 <_CORE_mutex_Surrender+0xf0> 46a94: 123c 0003 moveb #3,%d1 46a98: b280 cmpl %d0,%d1 46a9a: 6734 beqs 46ad0 <_CORE_mutex_Surrender+0xc8>
} } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; }
46a9c: 246e fffc moveal %fp@(-4),%a2
} break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED;
46aa0: 4280 clrl %d0
return CORE_MUTEX_STATUS_SUCCESSFUL; }
46aa2: 4e5e unlk %fp 46aa4: 4e75 rts
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 &&
46aa6: 4aa8 001c tstl %a0@(28) 46aaa: 66ba bnes 46a66 <_CORE_mutex_Surrender+0x5e>
holder->real_priority != holder->current_priority ) {
46aac: 2028 0018 movel %a0@(24),%d0 46ab0: b0a8 0014 cmpl %a0@(20),%d0 46ab4: 67b0 beqs 46a66 <_CORE_mutex_Surrender+0x5e>
_Thread_Change_priority( holder, holder->real_priority, true );
46ab6: 4878 0001 pea 1 <ADD> 46aba: 2f00 movel %d0,%sp@- 46abc: 2f08 movel %a0,%sp@- 46abe: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> 46ac4: 4fef 000c lea %sp@(12),%sp 46ac8: 609c bras 46a66 <_CORE_mutex_Surrender+0x5e>
the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--;
46aca: 53a8 001c subql #1,%a0@(28) 46ace: 6080 bras 46a50 <_CORE_mutex_Surrender+0x48>
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++;
46ad0: 52a8 001c addql #1,%a0@(28)
if (the_mutex->Attributes.priority_ceiling <
46ad4: 202a 004a movel %a2@(74),%d0
the_thread->current_priority){
46ad8: b0a8 0014 cmpl %a0@(20),%d0 46adc: 64be bccs 46a9c <_CORE_mutex_Surrender+0x94>
_Thread_Change_priority(
46ade: 42a7 clrl %sp@- 46ae0: 2f00 movel %d0,%sp@- 46ae2: 2f08 movel %a0,%sp@- 46ae4: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority>
} } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; }
46aea: 246e fffc moveal %fp@(-4),%a2
the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < the_thread->current_priority){ _Thread_Change_priority(
46aee: 4fef 000c lea %sp@(12),%sp 46af2: 4280 clrl %d0
} } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; }
46af4: 4e5e unlk %fp 46af6: 4e75 rts 46af8: 246e fffc moveal %fp@(-4),%a2
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++;
46afc: 4280 clrl %d0 46afe: 52a8 001c addql #1,%a0@(28)
} } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; }
46b02: 4e5e unlk %fp 46b04: 4e75 rts
} break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED;
46b06: 7001 moveq #1,%d0 46b08: 2540 004e movel %d0,%a2@(78)
return CORE_MUTEX_STATUS_SUCCESSFUL; }
46b0c: 246e fffc moveal %fp@(-4),%a2
} break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED;
46b10: 4200 clrb %d0
return CORE_MUTEX_STATUS_SUCCESSFUL; }
46b12: 4e5e unlk %fp 46b14: 4e75 rts
... 00046b24 <_CORE_semaphore_Initialize>: void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) {
46b24: 4e56 0000 linkw %fp,#0 46b28: 226e 000c moveal %fp@(12),%a1
the_semaphore->Attributes = *the_semaphore_attributes; the_semaphore->count = initial_value; _Thread_queue_Initialize(
46b2c: 4878 0003 pea 3 <DIVIDE> 46b30: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) {
46b34: 206e 0008 moveal %fp@(8),%a0
the_semaphore->Attributes = *the_semaphore_attributes;
46b38: 2011 movel %a1@,%d0 46b3a: 2229 0004 movel %a1@(4),%d1
the_semaphore->count = initial_value;
46b3e: 216e 0010 0048 movel %fp@(16),%a0@(72)
CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { the_semaphore->Attributes = *the_semaphore_attributes;
46b44: 2140 0040 movel %d0,%a0@(64) 46b48: 2141 0044 movel %d1,%a0@(68)
the_semaphore->count = initial_value; _Thread_queue_Initialize(
46b4c: 7201 moveq #1,%d1 46b4e: b2a9 0004 cmpl %a1@(4),%d1 46b52: 57c0 seq %d0 46b54: 49c0 extbl %d0 46b56: 4480 negl %d0 46b58: 2f00 movel %d0,%sp@- 46b5a: 2f08 movel %a0,%sp@- 46b5c: 4eb9 0004 8584 jsr 48584 <_Thread_queue_Initialize> 46b62: 4fef 0010 lea %sp@(16),%sp
_CORE_semaphore_Is_priority( the_semaphore_attributes ) ? THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_SEMAPHORE, CORE_SEMAPHORE_TIMEOUT ); }
46b66: 4e5e unlk %fp 46b68: 4e75 rts
... 0004f8b8 <_CORE_semaphore_Seize>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level );
4f8b8: 203c 0000 0700 movel #1792,%d0
CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) {
4f8be: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing; ISR_Level level; executing = _Thread_Executing;
4f8c2: 2279 0006 405a moveal 6405a <_Thread_Executing>,%a1
CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) {
4f8c8: 48d7 001c moveml %d2-%d4,%sp@ 4f8cc: 282e 000c movel %fp@(12),%d4 4f8d0: 262e 0014 movel %fp@(20),%d3
Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
4f8d4: 42a9 0034 clrl %a1@(52)
CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) {
4f8d8: 206e 0008 moveal %fp@(8),%a0 4f8dc: 242e 0010 movel %fp@(16),%d2
Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level );
4f8e0: 40c1 movew %sr,%d1 4f8e2: 8081 orl %d1,%d0 4f8e4: 46c0 movew %d0,%sr
if ( the_semaphore->count != 0 ) {
4f8e6: 2028 0048 movel %a0@(72),%d0 4f8ea: 6642 bnes 4f92e <_CORE_semaphore_Seize+0x76>
/* * If the semaphore was not available and the caller was not willing * to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) {
4f8ec: 4a02 tstb %d2 4f8ee: 6610 bnes 4f900 <_CORE_semaphore_Seize+0x48>
_ISR_Enable( level );
4f8f0: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
4f8f2: 7001 moveq #1,%d0
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); }
4f8f4: 4cd7 001c moveml %sp@,%d2-%d4
* to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
4f8f8: 2340 0034 movel %d0,%a1@(52)
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); }
4f8fc: 4e5e unlk %fp 4f8fe: 4e75 rts 4f900: 7001 moveq #1,%d0
* If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id;
4f902: 2344 0020 movel %d4,%a1@(32)
/* * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue;
4f906: 2348 0044 movel %a0,%a1@(68) 4f90a: 2140 0030 movel %d0,%a0@(48)
executing->Wait.id = id; _ISR_Enable( level );
4f90e: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
4f910: 2d43 000c movel %d3,%fp@(12) 4f914: 203c 0004 bd10 movel #310544,%d0 4f91a: 2d48 0008 movel %a0,%fp@(8) 4f91e: 2d40 0010 movel %d0,%fp@(16)
}
4f922: 4cd7 001c moveml %sp@,%d2-%d4 4f926: 4e5e unlk %fp
*/ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
4f928: 4ef9 0004 b9b0 jmp 4b9b0 <_Thread_queue_Enqueue_with_handler>
executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1;
4f92e: 5380 subql #1,%d0 4f930: 2140 0048 movel %d0,%a0@(72)
_ISR_Enable( level );
4f934: 46c1 movew %d1,%sr
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); }
4f936: 4cd7 001c moveml %sp@,%d2-%d4 4f93a: 4e5e unlk %fp 4f93c: 4e75 rts
... 00046b6c <_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 ) {
46b6c: 4e56 0000 linkw %fp,#0 46b70: 2f0a movel %a2,%sp@- 46b72: 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)) ) {
46b76: 2f0a movel %a2,%sp@- 46b78: 4eb9 0004 81a8 jsr 481a8 <_Thread_queue_Dequeue> 46b7e: 588f addql #4,%sp 46b80: 4a80 tstl %d0 46b82: 670a beqs 46b8e <_CORE_semaphore_Surrender+0x22>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; }
46b84: 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)) ) {
46b88: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; }
46b8a: 4e5e unlk %fp 46b8c: 4e75 rts
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level );
46b8e: 203c 0000 0700 movel #1792,%d0 46b94: 40c1 movew %sr,%d1 46b96: 8081 orl %d1,%d0 46b98: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
46b9a: 202a 0048 movel %a2@(72),%d0 46b9e: b0aa 0040 cmpl %a2@(64),%d0 46ba2: 6412 bccs 46bb6 <_CORE_semaphore_Surrender+0x4a>
the_semaphore->count += 1;
46ba4: 5280 addql #1,%d0 46ba6: 2540 0048 movel %d0,%a2@(72) 46baa: 4280 clrl %d0
else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level );
46bac: 46c1 movew %d1,%sr
} return status; }
46bae: 246e fffc moveal %fp@(-4),%a2 46bb2: 4e5e unlk %fp 46bb4: 4e75 rts
(*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
46bb6: 7004 moveq #4,%d0 <== NOT EXECUTED
the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level );
46bb8: 46c1 movew %d1,%sr <== NOT EXECUTED 46bba: 60f2 bras 46bae <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED
0004762c <_CORE_spinlock_Initialize>: void _CORE_spinlock_Initialize( CORE_spinlock_Control *the_spinlock, CORE_spinlock_Attributes *the_spinlock_attributes ) {
4762c: 4e56 0000 linkw %fp,#0 47630: 206e 0008 moveal %fp@(8),%a0 47634: 226e 000c moveal %fp@(12),%a1
the_spinlock->Attributes = *the_spinlock_attributes; the_spinlock->lock = 0; the_spinlock->users = 0; the_spinlock->holder = 0; }
47638: 4e5e unlk %fp
CORE_spinlock_Control *the_spinlock, CORE_spinlock_Attributes *the_spinlock_attributes ) { the_spinlock->Attributes = *the_spinlock_attributes;
4763a: 2091 movel %a1@,%a0@
the_spinlock->lock = 0;
4763c: 42a8 0004 clrl %a0@(4)
the_spinlock->users = 0;
47640: 42a8 0008 clrl %a0@(8)
the_spinlock->holder = 0;
47644: 42a8 000c clrl %a0@(12)
}
47648: 4e75 rts
... 0004764c <_CORE_spinlock_Release>: CORE_spinlock_Control *the_spinlock ) { ISR_Level level; _ISR_Disable( level );
4764c: 203c 0000 0700 movel #1792,%d0
*/ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) {
47652: 4e56 0000 linkw %fp,#0 47656: 206e 0008 moveal %fp@(8),%a0
ISR_Level level; _ISR_Disable( level );
4765a: 40c1 movew %sr,%d1 4765c: 8081 orl %d1,%d0 4765e: 46c0 movew %d0,%sr
/* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
47660: 2028 0004 movel %a0@(4),%d0 47664: 660a bnes 47670 <_CORE_spinlock_Release+0x24>
_ISR_Enable( level );
47666: 46c1 movew %d1,%sr 47668: 103c 0006 moveb #6,%d0
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; }
4766c: 4e5e unlk %fp 4766e: 4e75 rts
} /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) {
47670: 2028 000c movel %a0@(12),%d0 47674: 2279 0006 014e moveal 6014e <_Thread_Executing>,%a1 4767a: b0a9 0008 cmpl %a1@(8),%d0 4767e: 6708 beqs 47688 <_CORE_spinlock_Release+0x3c>
_ISR_Enable( level );
47680: 46c1 movew %d1,%sr 47682: 7002 moveq #2,%d0
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; }
47684: 4e5e unlk %fp 47686: 4e75 rts
} /* * Let it be unlocked. */ the_spinlock->users -= 1;
47688: 2028 0008 movel %a0@(8),%d0 4768c: 5380 subql #1,%d0 4768e: 2140 0008 movel %d0,%a0@(8)
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
47692: 42a8 0004 clrl %a0@(4)
the_spinlock->holder = 0;
47696: 42a8 000c clrl %a0@(12)
_ISR_Enable( level );
4769a: 46c1 movew %d1,%sr 4769c: 4280 clrl %d0
return CORE_SPINLOCK_SUCCESSFUL; }
4769e: 4e5e unlk %fp 476a0: 4e75 rts
... 000476a4 <_CORE_spinlock_Wait>: ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level );
476a4: 203c 0000 0700 movel #1792,%d0
CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) {
476aa: 4e56 fff0 linkw %fp,#-16 476ae: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 476b2: 246e 0008 moveal %fp@(8),%a2 476b6: 142e 000f moveb %fp@(15),%d2
ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level );
476ba: 40c1 movew %sr,%d1 476bc: 8081 orl %d1,%d0 476be: 46c0 movew %d0,%sr
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
476c0: 202a 0004 movel %a2@(4),%d0 476c4: 7601 moveq #1,%d3 476c6: b680 cmpl %d0,%d3 476c8: 6762 beqs 4772c <_CORE_spinlock_Wait+0x88>
(the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1;
476ca: 202a 0008 movel %a2@(8),%d0 476ce: 5280 addql #1,%d0 476d0: 2540 0008 movel %d0,%a2@(8)
for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
476d4: 202a 0004 movel %a2@(4),%d0 476d8: 6730 beqs 4770a <_CORE_spinlock_Wait+0x66>
} /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) {
476da: 4a02 tstb %d2 476dc: 676c beqs 4774a <_CORE_spinlock_Wait+0xa6> 476de: 47f9 0004 88e4 lea 488e4 <_Thread_Enable_dispatch>,%a3
/* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level );
476e4: 243c 0000 0700 movel #1792,%d2
* * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level );
476ea: 46c1 movew %d1,%sr
/* An ISR could occur here */ _Thread_Enable_dispatch();
476ec: 4e93 jsr %a3@ 476ee: 2039 0006 0094 movel 60094 <_Thread_Dispatch_disable_level>,%d0 476f4: 5280 addql #1,%d0 476f6: 23c0 0006 0094 movel %d0,60094 <_Thread_Dispatch_disable_level>
/* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level );
476fc: 2002 movel %d2,%d0 476fe: 40c1 movew %sr,%d1 47700: 8081 orl %d1,%d0 47702: 46c0 movew %d0,%sr
_ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
47704: 202a 0004 movel %a2@(4),%d0 47708: 66e0 bnes 476ea <_CORE_spinlock_Wait+0x46>
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
4770a: 7001 moveq #1,%d0
the_spinlock->holder = _Thread_Executing->Object.id;
4770c: 2079 0006 014e moveal 6014e <_Thread_Executing>,%a0
return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED;
47712: 2540 0004 movel %d0,%a2@(4)
the_spinlock->holder = _Thread_Executing->Object.id;
47716: 2028 0008 movel %a0@(8),%d0 4771a: 2540 000c movel %d0,%a2@(12)
_ISR_Enable( level );
4771e: 46c1 movew %d1,%sr 47720: 4280 clrl %d0
_Thread_Disable_dispatch(); _ISR_Disable( level ); } }
47722: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47728: 4e5e unlk %fp 4772a: 4e75 rts
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) {
4772c: 202a 000c movel %a2@(12),%d0 47730: 2079 0006 014e moveal 6014e <_Thread_Executing>,%a0 47736: b0a8 0008 cmpl %a0@(8),%d0 4773a: 668e bnes 476ca <_CORE_spinlock_Wait+0x26>
_ISR_Enable( level );
4773c: 46c1 movew %d1,%sr 4773e: 7001 moveq #1,%d0
_Thread_Disable_dispatch(); _ISR_Disable( level ); } }
47740: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47746: 4e5e unlk %fp 47748: 4e75 rts
/* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1;
4774a: 202a 0008 movel %a2@(8),%d0 4774e: 5380 subql #1,%d0 47750: 2540 0008 movel %d0,%a2@(8)
_ISR_Enable( level );
47754: 46c1 movew %d1,%sr 47756: 7005 moveq #5,%d0
_Thread_Disable_dispatch(); _ISR_Disable( level ); } }
47758: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4775e: 4e5e unlk %fp 47760: 4e75 rts
... 00046798 <_Chain_Append>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level );
46798: 203c 0000 0700 movel #1792,%d0
void _Chain_Append( Chain_Control *the_chain, Chain_Node *node ) {
4679e: 4e56 0000 linkw %fp,#0 467a2: 206e 000c moveal %fp@(12),%a0 467a6: 2f0a movel %a2,%sp@- 467a8: 226e 0008 moveal %fp@(8),%a1
ISR_Level level; _ISR_Disable( level );
467ac: 40c1 movew %sr,%d1 467ae: 8081 orl %d1,%d0 467b0: 46c0 movew %d0,%sr
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
467b2: 2009 movel %a1,%d0 467b4: 5880 addql #4,%d0 467b6: 2080 movel %d0,%a0@
old_last_node = the_chain->last;
467b8: 2469 0008 moveal %a1@(8),%a2
the_chain->last = the_node;
467bc: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
467c0: 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;
467c4: 2488 movel %a0,%a2@
_Chain_Append_unprotected( the_chain, node ); _ISR_Enable( level );
467c6: 46c1 movew %d1,%sr
}
467c8: 245f moveal %sp@+,%a2 467ca: 4e5e unlk %fp 467cc: 4e75 rts
... 0004b92c <_Chain_Extract>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level );
4b92c: 203c 0000 0700 movel #1792,%d0
*/ void _Chain_Extract( Chain_Node *node ) {
4b932: 4e56 0000 linkw %fp,#0 4b936: 206e 0008 moveal %fp@(8),%a0
ISR_Level level; _ISR_Disable( level );
4b93a: 40c1 movew %sr,%d1 4b93c: 8081 orl %d1,%d0 4b93e: 46c0 movew %d0,%sr
{ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous;
4b940: 2268 0004 moveal %a0@(4),%a1
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
4b944: 2050 moveal %a0@,%a0
previous = the_node->previous; next->previous = previous; previous->next = next;
4b946: 2288 movel %a0,%a1@
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
4b948: 2149 0004 movel %a1,%a0@(4)
_Chain_Extract_unprotected( node ); _ISR_Enable( level );
4b94c: 46c1 movew %d1,%sr
}
4b94e: 4e5e unlk %fp 4b950: 4e75 rts
... 0004b954 <_Chain_Get>: { ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level );
4b954: 203c 0000 0700 movel #1792,%d0
*/ Chain_Node *_Chain_Get( Chain_Control *the_chain ) {
4b95a: 4e56 0000 linkw %fp,#0 4b95e: 226e 0008 moveal %fp@(8),%a1 4b962: 2f0a movel %a2,%sp@-
ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level );
4b964: 40c1 movew %sr,%d1 4b966: 8081 orl %d1,%d0 4b968: 46c0 movew %d0,%sr
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
4b96a: 2049 moveal %a1,%a0 4b96c: 2018 movel %a0@+,%d0
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4b96e: b1c0 cmpal %d0,%a0 4b970: 6712 beqs 4b984 <_Chain_Get+0x30>
{ Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
4b972: 2440 moveal %d0,%a2 4b974: 2052 moveal %a2@,%a0
the_chain->first = new_first;
4b976: 2288 movel %a0,%a1@
new_first->previous = _Chain_Head(the_chain);
4b978: 2149 0004 movel %a1,%a0@(4)
if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level );
4b97c: 46c1 movew %d1,%sr
return return_node; }
4b97e: 245f moveal %sp@+,%a2 4b980: 4e5e unlk %fp 4b982: 4e75 rts
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4b984: 4280 clrl %d0
return_node = NULL; _ISR_Disable( level ); if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level );
4b986: 46c1 movew %d1,%sr
return return_node; }
4b988: 245f moveal %sp@+,%a2 4b98a: 4e5e unlk %fp 4b98c: 4e75 rts
... 0004b4fc <_Event_Manager_initialization>: * * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) {
4b4fc: 4e56 0000 linkw %fp,#0
*/ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif }
4b500: 4e5e unlk %fp
* This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
4b502: 42b9 0005 f752 clrl 5f752 <_Event_Sync_state>
*/ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif }
4b508: 4e75 rts
... 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 efbe moveal 5efbe <_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 010a moveal %a2@(266),%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>
_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 f752 movel %d2,5f752 <_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 8710 jsr 48710 <_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 f752 movel 5f752 <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
45758: 42b9 0005 f752 clrl 5f752 <_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 7834 jmp 47834 <_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 efdc pea 5efdc <_Watchdog_Ticks_chain> 457d0: 4eb9 0004 8f4c jsr 48f4c <_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 8710 jsr 48710 <_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 f752 movel 5f752 <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
457fa: 42b9 0005 f752 clrl 5f752 <_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 45810: 4e75 rts
... 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 010a moveal %a2@(266),%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 ef9e moveal 5ef9e <_ISR_Nest_level>,%a1 458a2: 4a89 tstl %a1 458a4: 670a beqs 458b0 <_Event_Surrender+0x40> 458a6: b5f9 0005 efbe cmpal 5efbe <_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>
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 79e8 jsr 479e8 <_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 9094 jsr 49094 <_Watchdog_Remove> 45932: 2f3c 1003 fff8 movel #268697592,%sp@- 45938: 2f0a movel %a2,%sp@- 4593a: 4eb9 0004 79e8 jsr 479e8 <_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 f752 moveal 5f752 <_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>
_Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
4595a: 2279 0005 f752 moveal 5f752 <_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>
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 f752 movel %d0,5f752 <_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 45998: 4e75 rts
... 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 7de4 jsr 47de4 <_Thread_Get>
switch ( location ) {
459b2: 508f addql #8,%sp 459b4: 4aae fffc tstl %fp@(-4) 459b8: 6642 bnes 459fc <_Event_Timeout+0x60>
* * 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 efbe cmpl 5efbe <_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 79e8 jsr 479e8 <_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 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 459f4: 5380 subql #1,%d0 459f6: 23c0 0005 ef04 movel %d0,5ef04 <_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 f752 movel 5f752 <_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 <== NOT EXECUTED 45a16: 2040 moveal %d0,%a0 <== NOT EXECUTED
#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 <== NOT EXECUTED
} the_thread->Wait.return_code = RTEMS_TIMEOUT;
45a1a: 2143 0034 movel %d3,%a0@(52) <== NOT EXECUTED
#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 f752 movel %d1,5f752 <_Event_Sync_state> <== NOT EXECUTED
} the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level );
45a24: 46c2 movew %d2,%sr <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
45a26: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 45a2c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45a2e: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
45a34: 508f addql #8,%sp <== NOT EXECUTED 45a36: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 45a3c: 5380 subql #1,%d0 <== NOT EXECUTED 45a3e: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level><== NOT EXECUTED 45a44: 60b6 bras 459fc <_Event_Timeout+0x60> <== NOT EXECUTED
... 0004bc54 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
4bc54: 4e56 ffcc linkw %fp,#-52 4bc58: 226e 000c moveal %fp@(12),%a1 4bc5c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4bc60: 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;
4bc64: 2c09 movel %a1,%d6 4bc66: 5886 addql #4,%d6
uintptr_t const page_size = heap->page_size;
4bc68: 202a 0010 movel %a2@(16),%d0
Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
4bc6c: 222e 0010 movel %fp@(16),%d1 4bc70: 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;
4bc74: 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;
4bc78: 2d40 fffc movel %d0,%fp@(-4)
uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) {
4bc7c: bc89 cmpl %a1,%d6 4bc7e: 6500 0146 bcsw 4bdc6 <_Heap_Allocate_aligned_with_boundary+0x172>
/* Integer overflow occured */ return NULL; } if ( boundary != 0 ) {
4bc82: 4a84 tstl %d4 4bc84: 6600 013c bnew 4bdc2 <_Heap_Allocate_aligned_with_boundary+0x16e>
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
4bc88: b1ca cmpal %a2,%a0 4bc8a: 6700 0152 beqw 4bdde <_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;
4bc8e: 242e fffc movel %fp@(-4),%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
4bc92: 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;
4bc94: 5e82 addql #7,%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
4bc96: 9a89 subl %a1,%d5
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
4bc98: 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;
4bc9a: 2d42 fff8 movel %d2,%fp@(-8)
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
4bc9e: 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 ) {
4bca2: 2028 0004 movel %a0@(4),%d0
while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count;
4bca6: 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 ) {
4bca8: b086 cmpl %d6,%d0 4bcaa: 630e blss 4bcba <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alignment == 0 ) {
4bcac: 4a81 tstl %d1 4bcae: 6628 bnes 4bcd8 <_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;
4bcb0: 2408 movel %a0,%d2 4bcb2: 5082 addql #8,%d2
boundary ); } } if ( alloc_begin != 0 ) {
4bcb4: 4a82 tstl %d2 4bcb6: 6600 00ee bnew 4bda6 <_Heap_Allocate_aligned_with_boundary+0x152>
break; } block = block->next;
4bcba: 2068 0008 moveal %a0@(8),%a0
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
4bcbe: b1ca cmpal %a2,%a0 4bcc0: 66e0 bnes 4bca2 <_Heap_Allocate_aligned_with_boundary+0x4e> 4bcc2: 4280 clrl %d0
uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats;
4bcc4: b6aa 0044 cmpl %a2@(68),%d3 4bcc8: 6304 blss 4bcce <_Heap_Allocate_aligned_with_boundary+0x7a>
); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count;
4bcca: 2543 0044 movel %d3,%a2@(68)
} return (void *) alloc_begin; }
4bcce: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4bcd4: 4e5e unlk %fp 4bcd6: 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;
4bcd8: 7efe moveq #-2,%d7 4bcda: 4be8 0008 lea %a0@(8),%a5 4bcde: 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;
4bce0: 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;
4bce4: 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;
4bce6: 2a2e fff8 movel %fp@(-8),%d5 4bcea: 9a8c subl %a4,%d5
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
4bcec: 242e fff4 movel %fp@(-12),%d2 4bcf0: d480 addl %d0,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment);
4bcf2: 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;
4bcf4: d085 addl %d5,%d0 4bcf6: 4c41 7005 remul %d1,%d5,%d7 4bcfa: 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 ) {
4bcfc: b480 cmpl %d0,%d2 4bcfe: 630a blss 4bd0a <_Heap_Allocate_aligned_with_boundary+0xb6> 4bd00: 2a00 movel %d0,%d5 4bd02: 4c41 5002 remul %d1,%d2,%d5 4bd06: 9082 subl %d2,%d0 4bd08: 2400 movel %d0,%d2
} alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) {
4bd0a: 4a84 tstl %d4 4bd0c: 676c beqs 4bd7a <_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;
4bd0e: 2002 movel %d2,%d0 4bd10: d089 addl %a1,%d0 4bd12: 2e00 movel %d0,%d7 4bd14: 4c44 7005 remul %d4,%d5,%d7 4bd18: 2e00 movel %d0,%d7 4bd1a: 9e85 subl %d5,%d7 4bd1c: 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 ) {
4bd1e: be82 cmpl %d2,%d7 4bd20: 6358 blss 4bd7a <_Heap_Allocate_aligned_with_boundary+0x126> 4bd22: be80 cmpl %d0,%d7 4bd24: 6454 bccs 4bd7a <_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;
4bd26: 2e0d movel %a5,%d7 4bd28: 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 ) {
4bd2a: ba87 cmpl %d7,%d5 4bd2c: 658c bcss 4bcba <_Heap_Allocate_aligned_with_boundary+0x66>
return 0; } alloc_begin = boundary_line - alloc_size;
4bd2e: 9a89 subl %a1,%d5 4bd30: 2005 movel %d5,%d0 4bd32: 2647 moveal %d7,%a3 4bd34: 4c41 0002 remul %d1,%d2,%d0 4bd38: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size;
4bd3a: 2005 movel %d5,%d0 4bd3c: d089 addl %a1,%d0 4bd3e: 2405 movel %d5,%d2 4bd40: 2e00 movel %d0,%d7 4bd42: 4c44 7005 remul %d4,%d5,%d7 4bd46: 2e00 movel %d0,%d7 4bd48: 9e85 subl %d5,%d7 4bd4a: 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 ) {
4bd4c: be82 cmpl %d2,%d7 4bd4e: 632a blss 4bd7a <_Heap_Allocate_aligned_with_boundary+0x126> 4bd50: be80 cmpl %d0,%d7 4bd52: 6426 bccs 4bd7a <_Heap_Allocate_aligned_with_boundary+0x126>
if ( boundary_line < boundary_floor ) {
4bd54: ba8b cmpl %a3,%d5 4bd56: 6500 ff62 bcsw 4bcba <_Heap_Allocate_aligned_with_boundary+0x66>
return 0; } alloc_begin = boundary_line - alloc_size;
4bd5a: 9a89 subl %a1,%d5 4bd5c: 2005 movel %d5,%d0 4bd5e: 4c41 0002 remul %d1,%d2,%d0 4bd62: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size;
4bd64: 2005 movel %d5,%d0 4bd66: d089 addl %a1,%d0 4bd68: 2405 movel %d5,%d2 4bd6a: 2e00 movel %d0,%d7 4bd6c: 4c44 7005 remul %d4,%d5,%d7 4bd70: 2e00 movel %d0,%d7 4bd72: 9e85 subl %d5,%d7 4bd74: 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 ) {
4bd76: be82 cmpl %d2,%d7 4bd78: 62d6 bhis 4bd50 <_Heap_Allocate_aligned_with_boundary+0xfc>
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 ) {
4bd7a: b48d cmpl %a5,%d2 4bd7c: 6500 ff3c bcsw 4bcba <_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;
4bd80: 70f8 moveq #-8,%d0 4bd82: 9088 subl %a0,%d0 4bd84: 2a40 moveal %d0,%a5 4bd86: 2e02 movel %d2,%d7 4bd88: dbc2 addal %d2,%a5 4bd8a: 202e fffc movel %fp@(-4),%d0 4bd8e: 4c40 7005 remul %d0,%d5,%d7 4bd92: 9bc5 subal %d5,%a5
if ( free_size >= min_block_size || free_size == 0 ) {
4bd94: bbcc cmpal %a4,%a5 4bd96: 6400 ff1c bccw 4bcb4 <_Heap_Allocate_aligned_with_boundary+0x60> 4bd9a: 4a8d tstl %a5 4bd9c: 6600 ff1c bnew 4bcba <_Heap_Allocate_aligned_with_boundary+0x66>
boundary ); } } if ( alloc_begin != 0 ) {
4bda0: 4a82 tstl %d2 4bda2: 6700 ff16 beqw 4bcba <_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 );
4bda6: 2f09 movel %a1,%sp@-
block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count;
4bda8: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4bdac: 2f02 movel %d2,%sp@- 4bdae: 2f08 movel %a0,%sp@- 4bdb0: 2f0a movel %a2,%sp@- 4bdb2: 4eb9 0004 6e94 jsr 46e94 <_Heap_Block_allocate> 4bdb8: 4fef 0010 lea %sp@(16),%sp 4bdbc: 2002 movel %d2,%d0 4bdbe: 6000 ff04 braw 4bcc4 <_Heap_Allocate_aligned_with_boundary+0x70>
/* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) {
4bdc2: b889 cmpl %a1,%d4 4bdc4: 640c bccs 4bdd2 <_Heap_Allocate_aligned_with_boundary+0x17e>
); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count;
4bdc6: 4280 clrl %d0
} return (void *) alloc_begin; }
4bdc8: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4bdce: 4e5e unlk %fp 4bdd0: 4e75 rts
if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) {
4bdd2: 4a81 tstl %d1 4bdd4: 6600 feb2 bnew 4bc88 <_Heap_Allocate_aligned_with_boundary+0x34> 4bdd8: 2200 movel %d0,%d1 4bdda: 6000 feac braw 4bc88 <_Heap_Allocate_aligned_with_boundary+0x34>
alignment = page_size; } } while ( block != free_list_tail ) {
4bdde: 4283 clrl %d3 4bde0: 4280 clrl %d0 4bde2: 6000 fee0 braw 4bcc4 <_Heap_Allocate_aligned_with_boundary+0x70>
... 00046e94 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) {
46e94: 70fe moveq #-2,%d0
Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) {
46e96: 4e56 ffe0 linkw %fp,#-32 46e9a: 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;
46e9e: 2041 moveal %d1,%a0 46ea0: 5188 subql #8,%a0 46ea2: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46ea6: 246e 000c moveal %fp@(12),%a2
Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) {
46eaa: 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;
46eac: 2848 moveal %a0,%a4 46eae: 240a movel %a2,%d2 46eb0: 99ca subal %a2,%a4
Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) {
46eb2: c0aa 0004 andl %a2@(4),%d0
Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) {
46eb6: 266e 0008 moveal %fp@(8),%a3
Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) {
46eba: c6b2 0804 andl %a2@(00000004,%d0:l),%d3
Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) {
46ebe: 2a2e 0014 movel %fp@(20),%d5
Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) {
46ec2: 4a03 tstb %d3 46ec4: 6600 00aa bnew 46f70 <_Heap_Block_allocate+0xdc>
free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks;
46ec8: 53ab 0038 subql #1,%a3@(56)
++stats->used_blocks; stats->free_size -= _Heap_Block_size( block );
46ecc: 76fe moveq #-2,%d3
_Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks;
46ece: 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;
46ed2: 202a 0008 movel %a2@(8),%d0
Heap_Block *prev = block->prev; prev->next = next; next->prev = prev;
46ed6: 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;
46ed8: 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 );
46edc: 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;
46ee0: 2340 0008 movel %d0,%a1@(8)
} else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) {
46ee4: 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 );
46ee8: 97ab 0030 subl %d3,%a3@(48)
next->prev = prev;
46eec: 2b49 000c movel %a1,%a5@(12)
} else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) {
46ef0: b08c cmpl %a4,%d0 46ef2: 6200 0088 bhiw 46f7c <_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;
46ef6: 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 )
46efa: 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 ) ) {
46efe: 7201 moveq #1,%d1 46f00: 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;
46f02: 2008 movel %a0,%d0 46f04: 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;
46f06: d1ab 0030 addl %d0,%a3@(48)
if ( _Heap_Is_prev_used( block ) ) {
46f0a: c2aa 0004 andl %a2@(4),%d1 46f0e: 6700 0082 beqw 46f92 <_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;
46f12: 78fe moveq #-2,%d4
_Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks;
46f14: 52ab 0038 addql #1,%a3@(56) 46f18: 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;
46f1a: 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;
46f1e: 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;
46f20: 7801 moveq #1,%d4 46f22: 8880 orl %d0,%d4
new_block->next = next;
46f24: 254c 0008 movel %a4,%a2@(8)
new_block->prev_size = block_size; new_block->size_and_flag = new_block_size;
46f28: d483 addl %d3,%d2 46f2a: 9488 subl %a0,%d2
new_block->prev = block_before;
46f2c: 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;
46f30: 2544 0004 movel %d4,%a2@(4)
block_before->next = new_block;
46f34: 234a 0008 movel %a2,%a1@(8)
next->prev = new_block;
46f38: 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 );
46f3c: 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;
46f3e: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
46f40: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
46f44: 2f05 movel %d5,%sp@- 46f46: 2f01 movel %d1,%sp@- 46f48: 2f08 movel %a0,%sp@- 46f4a: 2f0b movel %a3,%sp@- 46f4c: 4eb9 0004 6da0 jsr 46da0 <_Heap_Block_split> 46f52: 4fef 0010 lea %sp@(16),%sp
alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) {
46f56: 202b 0030 movel %a3@(48),%d0
Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats;
46f5a: b0ab 0034 cmpl %a3@(52),%d0 46f5e: 6404 bccs 46f64 <_Heap_Block_allocate+0xd0>
); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size;
46f60: 2740 0034 movel %d0,%a3@(52)
} return block; }
46f64: 200a movel %a2,%d0 46f66: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46f6c: 4e5e unlk %fp 46f6e: 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 ) {
46f70: 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 );
46f74: 224b moveal %a3,%a1
} if ( alloc_area_offset < heap->page_size ) {
46f76: b08c cmpl %a4,%d0 46f78: 6300 ff7c blsw 46ef6 <_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 );
46f7c: 4874 5800 pea %a4@(00000000,%d5:l) 46f80: 2f09 movel %a1,%sp@- 46f82: 2f0a movel %a2,%sp@- 46f84: 2f0b movel %a3,%sp@- 46f86: 4eb9 0004 6da0 jsr 46da0 <_Heap_Block_split> 46f8c: 4fef 0010 lea %sp@(16),%sp 46f90: 60c4 bras 46f56 <_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);
46f92: 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;
46f94: 78fe moveq #-2,%d4 46f96: 2209 movel %a1,%d1 46f98: c8aa 0004 andl %a2@(4),%d4 46f9c: 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;
46f9e: 78fe moveq #-2,%d4 46fa0: 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;
46fa2: 7801 moveq #1,%d4 46fa4: 8880 orl %d0,%d4
new_block->prev_size = block_size; new_block->size_and_flag = new_block_size;
46fa6: d483 addl %d3,%d2 46fa8: 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;
46faa: 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 );
46fae: 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;
46fb0: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
46fb2: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
46fb6: 2f05 movel %d5,%sp@- 46fb8: 2f01 movel %d1,%sp@- 46fba: 2f08 movel %a0,%sp@- 46fbc: 2f0b movel %a3,%sp@- 46fbe: 4eb9 0004 6da0 jsr 46da0 <_Heap_Block_split> 46fc4: 4fef 0010 lea %sp@(16),%sp 46fc8: 608c bras 46f56 <_Heap_Block_allocate+0xc2>
... 00050d5c <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) {
50d5c: 4e56 fff4 linkw %fp,#-12 50d60: 206e 0008 moveal %fp@(8),%a0 50d64: 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;
50d68: 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;
50d6c: 2268 0024 moveal %a0@(36),%a1
Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) {
50d70: 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;
50d74: b0a8 0018 cmpl %a0@(24),%d0 50d78: 6410 bccs 50d8a <_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 ) {
50d7a: b280 cmpl %d0,%d1 50d7c: 671c beqs 50d9a <_Heap_Extend+0x3e> 50d7e: 7002 moveq #2,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; }
50d80: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50d86: 4e5e unlk %fp 50d88: 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 ) {
50d8a: b280 cmpl %d0,%d1 50d8c: 63ec blss 50d7a <_Heap_Extend+0x1e> 50d8e: 7001 moveq #1,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; }
50d90: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50d96: 4e5e unlk %fp 50d98: 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;
50d9a: 2200 movel %d0,%d1 50d9c: d2ae 0010 addl %fp@(16),%d1
* block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end
50da0: 70f8 moveq #-8,%d0 50da2: 9089 subl %a1,%d0 50da4: d081 addl %d1,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment);
50da6: 2600 movel %d0,%d3 50da8: 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;
50dae: 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;
50db2: 246e 0014 moveal %fp@(20),%a2 50db6: 9082 subl %d2,%d0 50db8: 2480 movel %d0,%a2@
if( extend_size >= heap->min_block_size ) {
50dba: b0a8 0014 cmpl %a0@(20),%d0 50dbe: 640c bccs 50dcc <_Heap_Extend+0x70>
/* 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 ));
50dc0: 4280 clrl %d0 <== NOT EXECUTED
} return HEAP_EXTEND_SUCCESSFUL; }
50dc2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50dc8: 4e5e unlk %fp 50dca: 4e75 rts
uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag;
50dcc: 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);
50dce: 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;
50dd2: 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 =
50dd6: 2228 0020 movel %a0@(32),%d1 50dda: 928a subl %a2,%d1 50ddc: 8480 orl %d0,%d2
((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block;
50dde: 214a 0024 movel %a2,%a0@(36) 50de2: 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 =
50de6: 7401 moveq #1,%d2 50de8: 8481 orl %d1,%d2 50dea: 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 ));
50dee: 4869 0008 pea %a1@(8)
| HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size;
50df2: d1a8 002c addl %d0,%a0@(44)
++stats->used_blocks;
50df6: 52a8 0040 addql #1,%a0@(64)
--stats->frees; /* Do not count subsequent call as actual free() */
50dfa: 53a8 0050 subql #1,%a0@(80)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
50dfe: 2f08 movel %a0,%sp@- 50e00: 4eb9 0004 b5ec jsr 4b5ec <_Heap_Free> 50e06: 508f addql #8,%sp 50e08: 4280 clrl %d0 50e0a: 60b6 bras 50dc2 <_Heap_Extend+0x66>
0004bde8 <_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 ) {
4bde8: 4e56 ffe4 linkw %fp,#-28 4bdec: 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 )
4bdf0: 2040 moveal %d0,%a0 4bdf2: 5188 subql #8,%a0 4bdf4: 226e 0008 moveal %fp@(8),%a1 4bdf8: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4bdfe: 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;
4be02: 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 )
4be06: 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
4be08: b088 cmpl %a0,%d0 4be0a: 6200 00a0 bhiw 4beac <_Heap_Free+0xc4>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4be0e: 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
4be12: b288 cmpl %a0,%d1 4be14: 6500 0096 bcsw 4beac <_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;
4be18: 2628 0004 movel %a0@(4),%d3 4be1c: 74fe moveq #-2,%d2 4be1e: 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);
4be20: 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
4be24: b5c0 cmpal %d0,%a2 4be26: 6500 0084 bcsw 4beac <_Heap_Free+0xc4> 4be2a: b5c1 cmpal %d1,%a2 4be2c: 627e bhis 4beac <_Heap_Free+0xc4>
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;
4be2e: 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 ) ) {
4be32: 7a01 moveq #1,%d5 4be34: ca84 andl %d4,%d5 4be36: 4a05 tstb %d5 4be38: 6772 beqs 4beac <_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;
4be3a: 7afe moveq #-2,%d5 4be3c: c885 andl %d5,%d4
_HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block
4be3e: b5c1 cmpal %d1,%a2 4be40: 6700 00fa beqw 4bf3c <_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 )
4be44: 7a01 moveq #1,%d5 4be46: 7c01 moveq #1,%d6 4be48: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4be4c: 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 ) ) {
4be4e: 7c01 moveq #1,%d6 4be50: c686 andl %d6,%d3 4be52: 4a03 tstb %d3 4be54: 6660 bnes 4beb6 <_Heap_Free+0xce>
uintptr_t const prev_size = block->prev_size;
4be56: 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);
4be58: 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
4be5a: b1c0 cmpal %d0,%a0 4be5c: 654e bcss 4beac <_Heap_Free+0xc4> 4be5e: b1c1 cmpal %d1,%a0 4be60: 624a bhis 4beac <_Heap_Free+0xc4>
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) ) {
4be62: 7001 moveq #1,%d0 4be64: c0a8 0004 andl %a0@(4),%d0 4be68: 4a00 tstb %d0 4be6a: 6740 beqs 4beac <_Heap_Free+0xc4>
_HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */
4be6c: 4a05 tstb %d5 4be6e: 6700 00d2 beqw 4bf42 <_Heap_Free+0x15a>
} RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev;
4be72: 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;
4be76: 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;
4be7a: d882 addl %d2,%d4 4be7c: d684 addl %d4,%d3
_Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4be7e: 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;
4be80: 246a 0008 moveal %a2@(8),%a2 4be84: 8083 orl %d3,%d0
next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size;
4be86: 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;
4be8a: 2140 0004 movel %d0,%a0@(4)
Heap_Block *prev = block->prev; prev->next = next; next->prev = prev;
4be8e: 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;
4be92: 274a 0008 movel %a2,%a3@(8)
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4be96: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
4be9a: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4be9e: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4bea2: 7001 moveq #1,%d0
return( true ); }
4bea4: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4bea8: 4e5e unlk %fp 4beaa: 4e75 rts 4beac: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3
/* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true );
4beb0: 4200 clrb %d0
}
4beb2: 4e5e unlk %fp 4beb4: 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 */
4beb6: 4a05 tstb %d5 4beb8: 6736 beqs 4bef0 <_Heap_Free+0x108>
Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev;
4beba: 266a 000c moveal %a2@(12),%a3
uintptr_t const size = block_size + next_block_size;
4bebe: d882 addl %d2,%d4
_Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4bec0: 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;
4bec2: 246a 0008 moveal %a2@(8),%a2 4bec6: 8084 orl %d4,%d0
next_block = _Heap_Block_at( block, size ); next_block->prev_size = size;
4bec8: 2184 4800 movel %d4,%a0@(00000000,%d4:l)
Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev;
4becc: 214b 000c movel %a3,%a0@(12)
) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next;
4bed0: 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;
4bed4: 2140 0004 movel %d0,%a0@(4)
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4bed8: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
4bedc: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4bee0: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4bee4: 7001 moveq #1,%d0
new_block->prev = prev; next->prev = new_block;
4bee6: 2548 000c movel %a0,%a2@(12)
prev->next = new_block;
4beea: 2748 0008 movel %a0,%a3@(8) 4beee: 60b4 bras 4bea4 <_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;
4bef0: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4bef2: 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;
4bef4: 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;
4bef6: 2669 0008 moveal %a1@(8),%a3 4befa: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4befe: cdaa 0004 andl %d6,%a2@(4)
next_block->prev_size = block_size;
4bf02: 2482 movel %d2,%a2@
/* Statistics */ ++stats->free_blocks;
4bf04: 2029 0038 movel %a1@(56),%d0 4bf08: 5280 addql #1,%d0
new_block->next = next;
4bf0a: 214b 0008 movel %a3,%a0@(8)
new_block->prev = block_before;
4bf0e: 2149 000c movel %a1,%a0@(12)
block_before->next = new_block;
4bf12: 2348 0008 movel %a0,%a1@(8)
next->prev = new_block;
4bf16: 2748 000c movel %a0,%a3@(12) 4bf1a: 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;
4bf1e: b0a9 003c cmpl %a1@(60),%d0 4bf22: 6300 ff72 blsw 4be96 <_Heap_Free+0xae>
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4bf26: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
4bf2a: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4bf2e: 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;
4bf32: 2340 003c movel %d0,%a1@(60)
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4bf36: 7001 moveq #1,%d0 4bf38: 6000 ff6a braw 4bea4 <_Heap_Free+0xbc>
_HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block
4bf3c: 4205 clrb %d5 4bf3e: 6000 ff0e braw 4be4e <_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;
4bf42: d682 addl %d2,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4bf44: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4bf46: 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;
4bf48: 8a83 orl %d3,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size;
4bf4a: 2483 movel %d3,%a2@
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4bf4c: 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;
4bf4e: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4bf52: cdaa 0004 andl %d6,%a2@(4)
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4bf56: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
4bf5a: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4bf5e: 52a9 0050 addql #1,%a1@(80) 4bf62: 6000 ff40 braw 4bea4 <_Heap_Free+0xbc>
... 0007bf40 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) {
7bf40: 4e56 fff4 linkw %fp,#-12 7bf44: 206e 0008 moveal %fp@(8),%a0 7bf48: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7bf4c: 246e 000c moveal %fp@(12),%a2
Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block;
7bf50: 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;
7bf54: 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;
7bf58: 4292 clrl %a2@
the_info->Free.total = 0;
7bf5a: 42aa 0008 clrl %a2@(8)
the_info->Free.largest = 0;
7bf5e: 42aa 0004 clrl %a2@(4)
the_info->Used.number = 0;
7bf62: 42aa 000c clrl %a2@(12)
the_info->Used.total = 0;
7bf66: 42aa 0014 clrl %a2@(20)
the_info->Used.largest = 0;
7bf6a: 42aa 0010 clrl %a2@(16)
while ( the_block != end ) {
7bf6e: b489 cmpl %a1,%d2 7bf70: 6746 beqs 7bfb8 <_Heap_Get_information+0x78>
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;
7bf72: 260a movel %a2,%d3 7bf74: 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 ) {
7bf7a: 2229 0004 movel %a1@(4),%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;
7bf7e: 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) )
7bf80: 204a moveal %a2,%a0 7bf82: 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);
7bf84: 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;
7bf86: 2229 0004 movel %a1@(4),%d1 7bf8a: 0801 0000 btst #0,%d1 7bf8e: 6702 beqs 7bf92 <_Heap_Get_information+0x52> 7bf90: 2043 moveal %d3,%a0
info = &the_info->Used; else info = &the_info->Free; info->number++;
7bf92: 5290 addql #1,%a0@
info->total += the_size;
7bf94: d1a8 0008 addl %d0,%a0@(8)
if ( info->largest < the_size )
7bf98: b0a8 0004 cmpl %a0@(4),%d0 7bf9c: 6304 blss 7bfa2 <_Heap_Get_information+0x62>
info->largest = the_size;
7bf9e: 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 ) {
7bfa2: b3c2 cmpal %d2,%a1 7bfa4: 66d8 bnes 7bf7e <_Heap_Get_information+0x3e> 7bfa6: 202a 0014 movel %a2@(20),%d0 7bfaa: 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;
7bfac: 2540 0014 movel %d0,%a2@(20)
}
7bfb0: 4cd7 040c moveml %sp@,%d2-%d3/%a2 7bfb4: 4e5e unlk %fp 7bfb6: 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 ) {
7bfb8: 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;
7bfba: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED
}
7bfbe: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 7bfc2: 4e5e unlk %fp <== NOT EXECUTED 7bfc4: 4e75 rts <== NOT EXECUTED
... 0005b9e0 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) {
5b9e0: 4e56 ffe0 linkw %fp,#-32 5b9e4: 226e 0014 moveal %fp@(20),%a1 5b9e8: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 5b9ec: 242e 000c movel %fp@(12),%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
5b9f0: 2202 movel %d2,%d1 5b9f2: 2042 moveal %d2,%a0 5b9f4: 5188 subql #8,%a0 5b9f6: 246e 0008 moveal %fp@(8),%a2 5b9fa: 4c6a 1000 0010 remul %a2@(16),%d0,%d1
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0;
5ba00: 4291 clrl %a1@
void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) {
5ba02: 266e 0018 moveal %fp@(24),%a3 5ba06: 91c0 subal %d0,%a0 5ba08: 202e 0010 movel %fp@(16),%d0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; *new_size = 0;
5ba0c: 4293 clrl %a3@
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block
5ba0e: b1ea 0020 cmpal %a2@(32),%a0 5ba12: 653c bcss 5ba50 <_Heap_Resize_block+0x70> 5ba14: b1ea 0024 cmpal %a2@(36),%a0 5ba18: 6236 bhis 5ba50 <_Heap_Resize_block+0x70>
- 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;
5ba1a: 76fe moveq #-2,%d3 5ba1c: 78fe moveq #-2,%d4
RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block );
5ba1e: 7a01 moveq #1,%d5 5ba20: 7c01 moveq #1,%d6
uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
5ba22: 7204 moveq #4,%d1 5ba24: 9282 subl %d2,%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;
5ba26: c6a8 0004 andl %a0@(4),%d3
{ Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size;
5ba2a: 49f0 3800 lea %a0@(00000000,%d3:l),%a4
uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
5ba2e: d28c addl %a4,%d1 5ba30: c8ac 0004 andl %a4@(4),%d4
RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block );
5ba34: cab4 4804 andl %a4@(00000004,%d4:l),%d5
bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size;
5ba38: 2281 movel %d1,%a1@ 5ba3a: bd85 eorl %d6,%d5 5ba3c: 1c05 moveb %d5,%d6
if ( next_block_is_free ) {
5ba3e: 661c bnes 5ba5c <_Heap_Resize_block+0x7c>
block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) {
5ba40: b280 cmpl %d0,%d1 5ba42: 6420 bccs 5ba64 <_Heap_Resize_block+0x84> 5ba44: 7001 moveq #1,%d0
new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } }
5ba46: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5ba4c: 4e5e unlk %fp 5ba4e: 4e75 rts
block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes;
5ba50: 7002 moveq #2,%d0
new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } }
5ba52: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5ba58: 4e5e unlk %fp 5ba5a: 4e75 rts
_HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size;
5ba5c: d684 addl %d4,%d3
alloc_size += next_block_size;
5ba5e: d284 addl %d4,%d1
} if ( new_alloc_size > alloc_size ) {
5ba60: b280 cmpl %d0,%d1 5ba62: 65e0 bcss 5ba44 <_Heap_Resize_block+0x64>
return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) {
5ba64: 4a06 tstb %d6 5ba66: 672a beqs 5ba92 <_Heap_Resize_block+0xb2>
uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag;
5ba68: 7201 moveq #1,%d1 5ba6a: c2a8 0004 andl %a0@(4),%d1
} RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev;
5ba6e: 226c 000c moveal %a4@(12),%a1
uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag;
5ba72: 8283 orl %d3,%d1
return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next;
5ba74: 286c 0008 moveal %a4@(8),%a4
uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag;
5ba78: 2141 0004 movel %d1,%a0@(4)
_Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
5ba7c: 7201 moveq #1,%d1 5ba7e: 83b0 3804 orl %d1,%a0@(00000004,%d3:l)
{ Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; next->prev = prev;
5ba82: 2949 000c movel %a1,%a4@(12)
/* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size;
5ba86: 99aa 0030 subl %d4,%a2@(48)
next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks;
5ba8a: 53aa 0038 subql #1,%a2@(56)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next;
5ba8e: 234c 0008 movel %a4,%a1@(8)
stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
5ba92: 2f00 movel %d0,%sp@- 5ba94: 2f02 movel %d2,%sp@- 5ba96: 2f08 movel %a0,%sp@- 5ba98: 2f0a movel %a2,%sp@- 5ba9a: 4eb9 0004 6e94 jsr 46e94 <_Heap_Block_allocate>
block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes;
5baa0: 4fef 0010 lea %sp@(16),%sp
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
5baa4: 72fe moveq #-2,%d1
/* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
5baa6: 2040 moveal %d0,%a0
block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
5baa8: 2240 moveal %d0,%a1 5baaa: 93c2 subal %d2,%a1
/* Statistics */ ++stats->resizes;
5baac: 4280 clrl %d0
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
5baae: c2a8 0004 andl %a0@(4),%d1 5bab2: 43f1 1804 lea %a1@(00000004,%d1:l),%a1 5bab6: 2689 movel %a1,%a3@
/* Statistics */ ++stats->resizes;
5bab8: 52aa 0054 addql #1,%a2@(84)
new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } }
5babc: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5bac2: 4e5e unlk %fp 5bac4: 4e75 rts
... 00047e60 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) {
47e60: 4e56 0000 linkw %fp,#0 47e64: 202e 0008 movel %fp@(8),%d0
va_list ap; if ( error ) {
47e68: 4a2e 000f tstb %fp@(15) 47e6c: 6624 bnes 47e92 <_Heap_Walk_print+0x32>
printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source );
47e6e: 2f00 movel %d0,%sp@- 47e70: 4879 0005 db10 pea 5db10 <_Status_Object_name_errors_to_status+0x420> 47e76: 4eb9 0004 3ad0 jsr 43ad0 <printk> 47e7c: 508f addql #8,%sp
} va_start( ap, fmt ); vprintk( fmt, ap );
47e7e: 486e 0014 pea %fp@(20) 47e82: 2f2e 0010 movel %fp@(16),%sp@- 47e86: 4eb9 0004 595c jsr 4595c <vprintk> 47e8c: 508f addql #8,%sp
va_end( ap ); }
47e8e: 4e5e unlk %fp 47e90: 4e75 rts
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source );
47e92: 2f00 movel %d0,%sp@- 47e94: 4879 0005 db05 pea 5db05 <_Status_Object_name_errors_to_status+0x415> 47e9a: 4eb9 0004 3ad0 jsr 43ad0 <printk> 47ea0: 508f addql #8,%sp
} else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap );
47ea2: 486e 0014 pea %fp@(20) 47ea6: 2f2e 0010 movel %fp@(16),%sp@- 47eaa: 4eb9 0004 595c jsr 4595c <vprintk> 47eb0: 508f addql #8,%sp
va_end( ap ); }
47eb2: 4e5e unlk %fp 47eb4: 4e75 rts
... 000464a6 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) {
464a6: 4e56 fff0 linkw %fp,#-16 464aa: 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;
464ae: 2639 0005 d786 movel 5d786 <Configuration+0x32>,%d3
drivers_in_table = Configuration.number_of_device_drivers;
464b4: 2439 0005 d782 movel 5d782 <Configuration+0x2e>,%d2
number_of_drivers = Configuration.maximum_drivers;
464ba: 2839 0005 d77e movel 5d77e <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 )
464c0: b882 cmpl %d2,%d4 464c2: 6216 bhis 464da <_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;
464c4: 23c3 0005 f794 movel %d3,5f794 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
464ca: 23c2 0005 f790 movel %d2,5f790 <_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; }
464d0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 464d6: 4e5e unlk %fp 464d8: 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 *)
464da: 2004 movel %d4,%d0 464dc: 2a04 movel %d4,%d5 464de: e788 lsll #3,%d0 464e0: eb8d lsll #5,%d5 464e2: 9a80 subl %d0,%d5 464e4: 2f05 movel %d5,%sp@- 464e6: 4eb9 0004 91b0 jsr 491b0 <_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(
464ec: 2f05 movel %d5,%sp@- 464ee: 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;
464f0: 23c4 0005 f790 movel %d4,5f790 <_IO_Number_of_drivers>
memset(
464f6: 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 *)
464f8: 23c0 0005 f794 movel %d0,5f794 <_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(
464fe: 4eb9 0004 f41c jsr 4f41c <memset>
_IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ )
46504: 4fef 0010 lea %sp@(16),%sp 46508: 4a82 tstl %d2 4650a: 67c4 beqs 464d0 <_IO_Manager_initialization+0x2a> 4650c: 2839 0005 f794 movel 5f794 <_IO_Driver_address_table>,%d4 46512: 4280 clrl %d0 46514: 4281 clrl %d1
_IO_Driver_address_table[index] = driver_table[index];
46516: 2243 moveal %d3,%a1 46518: 2044 moveal %d4,%a0 4651a: d3c0 addal %d0,%a1 4651c: 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++ )
4651e: 5281 addql #1,%d1 46520: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46526: 20d9 movel %a1@+,%a0@+ 46528: 20d9 movel %a1@+,%a0@+ 4652a: 20d9 movel %a1@+,%a0@+ 4652c: 20d9 movel %a1@+,%a0@+ 4652e: 20d9 movel %a1@+,%a0@+ 46530: 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++ )
46532: b282 cmpl %d2,%d1 46534: 649a bccs 464d0 <_IO_Manager_initialization+0x2a>
_IO_Driver_address_table[index] = driver_table[index];
46536: 2243 moveal %d3,%a1 46538: 2044 moveal %d4,%a0 4653a: d3c0 addal %d0,%a1 4653c: 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++ )
4653e: 5281 addql #1,%d1 46540: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46546: 20d9 movel %a1@+,%a0@+ 46548: 20d9 movel %a1@+,%a0@+ 4654a: 20d9 movel %a1@+,%a0@+ 4654c: 20d9 movel %a1@+,%a0@+ 4654e: 20d9 movel %a1@+,%a0@+ 46550: 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++ )
46552: b282 cmpl %d2,%d1 46554: 65c0 bcss 46516 <_IO_Manager_initialization+0x70> 46556: 6000 ff78 braw 464d0 <_IO_Manager_initialization+0x2a>
... 00046fcc <_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 );
46fcc: 4280 clrl %d0
void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) {
46fce: 4e56 0000 linkw %fp,#0 46fd2: 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 );
46fd6: 1001 moveb %d1,%d0 46fd8: 2040 moveal %d0,%a0
void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) {
46fda: 2f03 movel %d3,%sp@- 46fdc: 202e 0008 movel %fp@(8),%d0 46fe0: 2f02 movel %d2,%sp@- 46fe2: 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 );
46fe6: 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;
46fe8: 13c1 0005 efae moveb %d1,5efae <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error );
46fee: 2f08 movel %a0,%sp@-
bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source;
46ff0: 23c0 0005 efaa movel %d0,5efaa <_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 );
46ff6: 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;
46ff8: 23c2 0005 efb0 movel %d2,5efb0 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
46ffe: 4eb9 0004 8de2 jsr 48de2 <_User_extensions_Fatal>
_System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error );
47004: 307c 0700 moveaw #1792,%a0 47008: 2608 movel %a0,%d3 4700a: 40c0 movew %sr,%d0 4700c: 8083 orl %d3,%d0 4700e: 46c0 movew %d0,%sr
47010: 2002 movel %d2,%d0 <== NOT EXECUTED 47012: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47018: 4ac8 halt <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state;
4701a: 7005 moveq #5,%d0 4701c: 4fef 000c lea %sp@(12),%sp 47020: 23c0 0005 f08c movel %d0,5f08c <_System_state_Current> 47026: 60fe bras 47026 <_Internal_error_Occurred+0x5a>
0004ecac <_Message_queue_Translate_core_message_queue_return_code>: }; rtems_status_code _Message_queue_Translate_core_message_queue_return_code ( uint32_t status ) {
4ecac: 41f9 0006 7e94 lea 67e94 <_Message_queue_Translate_core_return_code_>,%a0 4ecb2: 4e56 0000 linkw %fp,#0
if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ) return RTEMS_INTERNAL_ERROR; #endif return _Message_queue_Translate_core_return_code_[status]; }
4ecb6: 202e 0008 movel %fp@(8),%d0 4ecba: 4e5e unlk %fp 4ecbc: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4ecc0: 4e75 rts
... 00047090 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) {
47090: 4e56 fff0 linkw %fp,#-16 47094: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47098: 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 )
4709c: 4aaa 0014 tstl %a2@(20) 470a0: 660c bnes 470ae <_Objects_Allocate+0x1e>
470a2: 4280 clrl %d0 <== NOT EXECUTED
information->inactive--; } } return the_object; }
470a4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470aa: 4e5e unlk %fp 470ac: 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 );
470ae: 240a movel %a2,%d2 470b0: 0682 0000 001c addil #28,%d2 470b6: 47f9 0004 b954 lea 4b954 <_Chain_Get>,%a3 470bc: 2f02 movel %d2,%sp@- 470be: 4e93 jsr %a3@
if ( information->auto_extend ) {
470c0: 588f addql #4,%sp 470c2: 4a2a 0010 tstb %a2@(16) 470c6: 67dc beqs 470a4 <_Objects_Allocate+0x14>
/* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) {
470c8: 4a80 tstl %d0 470ca: 6738 beqs 47104 <_Objects_Allocate+0x74>
} if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) -
470cc: 2040 moveal %d0,%a0 470ce: 4281 clrl %d1 470d0: 4283 clrl %d3
_Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--;
470d2: 4282 clrl %d2
} if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) -
470d4: 362a 0008 movew %a2@(8),%d3 470d8: 3228 000a movew %a0@(10),%d1
_Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--;
470dc: 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 ]--;
470e0: 342a 0012 movew %a2@(18),%d2
} if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) -
470e4: 9283 subl %d3,%d1
_Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--;
470e6: 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 ]--;
470e8: 4c42 1001 remul %d2,%d1,%d1
information->inactive--;
470ec: 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 ]--;
470f0: 206a 002a moveal %a2@(42),%a0 470f4: e589 lsll #2,%d1
information->inactive--; } } return the_object; }
470f6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470fc: 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 ]--;
470fe: d1c1 addal %d1,%a0 47100: 5390 subql #1,%a0@
information->inactive--; } } return the_object; }
47102: 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 );
47104: 2f0a movel %a2,%sp@- 47106: 4eb9 0004 714c jsr 4714c <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
4710c: 2f02 movel %d2,%sp@- 4710e: 4e93 jsr %a3@
} if ( the_object ) {
47110: 508f addql #8,%sp 47112: 4a80 tstl %d0 47114: 66b6 bnes 470cc <_Objects_Allocate+0x3c>
information->inactive--; } } return the_object; }
47116: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4711c: 4e5e unlk %fp 4711e: 4e75 rts
00047120 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
47120: 4280 clrl %d0
void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) {
47122: 4e56 0000 linkw %fp,#0 47126: 226e 000c moveal %fp@(12),%a1 4712a: 206e 0008 moveal %fp@(8),%a0 4712e: 2f0a movel %a2,%sp@- 47130: 2468 0018 moveal %a0@(24),%a2 47134: 3029 000a movew %a1@(10),%d0 47138: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object );
4713c: 2d49 000c movel %a1,%fp@(12)
}
47140: 245f moveal %sp@+,%a2 47142: 4e5e unlk %fp
Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object );
47144: 4ef9 0004 76a8 jmp 476a8 <_Objects_Namespace_remove>
... 0004714c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) {
4714c: 4e56 ffcc linkw %fp,#-52 47150: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47154: 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 );
47158: 4285 clrl %d5
index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL )
4715a: 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 );
4715e: 3a2a 0008 movew %a2@(8),%d5
index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL )
47162: 4a88 tstl %a0 47164: 6700 022c beqw 47392 <_Objects_Extend_information+0x246>
block_count = 0; else { block_count = information->maximum / information->allocation_size;
47168: 322a 000e movew %a2@(14),%d1 4716c: 302a 0012 movew %a2@(18),%d0 47170: 3801 movew %d1,%d4 47172: 0284 0000 ffff andil #65535,%d4 47178: 88c0 divuw %d0,%d4 4717a: 0284 0000 ffff andil #65535,%d4
for ( ; block < block_count; block++ ) {
47180: 6700 0224 beqw 473a6 <_Objects_Extend_information+0x25a>
if ( information->object_blocks[ block ] == NULL )
47184: 4a90 tstl %a0@ 47186: 6700 021e beqw 473a6 <_Objects_Extend_information+0x25a> 4718a: 5888 addql #4,%a0 4718c: 2605 movel %d5,%d3 4718e: 4282 clrl %d2 47190: 0280 0000 ffff andil #65535,%d0
break; else index_base += information->allocation_size;
47196: 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++ ) {
47198: 5282 addql #1,%d2 4719a: b484 cmpl %d4,%d2 4719c: 6404 bccs 471a2 <_Objects_Extend_information+0x56>
if ( information->object_blocks[ block ] == NULL )
4719e: 4a98 tstl %a0@+ 471a0: 66f4 bnes 47196 <_Objects_Extend_information+0x4a>
else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size;
471a2: 0281 0000 ffff andil #65535,%d1 471a8: 2641 moveal %d1,%a3 471aa: 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 ) {
471ac: b7fc 0000 ffff cmpal #65535,%a3 471b2: 6200 0186 bhiw 4733a <_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;
471b6: 41ea 0014 lea %a2@(20),%a0 471ba: 4c10 0800 mulsl %a0@,%d0
if ( information->auto_extend ) {
471be: 4a2a 0010 tstb %a2@(16) 471c2: 6700 0180 beqw 47344 <_Objects_Extend_information+0x1f8>
new_object_block = _Workspace_Allocate( block_size );
471c6: 2f00 movel %d0,%sp@- 471c8: 4eb9 0004 91e4 jsr 491e4 <_Workspace_Allocate>
if ( !new_object_block )
471ce: 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 );
471d0: 2c00 movel %d0,%d6
if ( !new_object_block )
471d2: 6700 0166 beqw 4733a <_Objects_Extend_information+0x1ee>
} /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) {
471d6: 4280 clrl %d0 471d8: 302a 000e movew %a2@(14),%d0 471dc: b083 cmpl %d3,%d0 471de: 6200 00c4 bhiw 472a4 <_Objects_Extend_information+0x158>
*/ /* * Up the block count and maximum */ block_count++;
471e2: 2a44 moveal %d4,%a5 471e4: 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 );
471e6: 200b movel %a3,%d0 471e8: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 471ec: d088 addl %a0,%d0 471ee: d085 addl %d5,%d0 471f0: e588 lsll #2,%d0 471f2: 2f00 movel %d0,%sp@- 471f4: 4eb9 0004 91e4 jsr 491e4 <_Workspace_Allocate>
if ( !object_blocks ) {
471fa: 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 );
471fc: 2840 moveal %d0,%a4
if ( !object_blocks ) {
471fe: 4a80 tstl %d0 47200: 6700 01b2 beqw 473b4 <_Objects_Extend_information+0x268>
} /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47204: 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 ) {
47206: 4280 clrl %d0
} /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47208: 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 ) {
4720a: 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);
4720e: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47212: de8d addl %a5,%d7 47214: b085 cmpl %d5,%d0 47216: 6200 013c bhiw 47354 <_Objects_Extend_information+0x208>
} else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) {
4721a: 4a85 tstl %d5 4721c: 670c beqs 4722a <_Objects_Extend_information+0xde>
information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table,
4721e: 2047 moveal %d7,%a0 47220: 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;
47222: 4298 clrl %a0@+
} else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) {
47224: 5280 addql #1,%d0 47226: b085 cmpl %d5,%d0 47228: 65f8 bcss 47222 <_Objects_Extend_information+0xd6> 4722a: 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 );
4722c: 4281 clrl %d1 4722e: 322a 0012 movew %a2@(18),%d1
/* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0;
47232: 42b5 4800 clrl %a5@(00000000,%d4:l)
for ( index=index_base ; index < ( information->allocation_size + index_base );
47236: d283 addl %d3,%d1
} /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL;
47238: 42b4 4800 clrl %a4@(00000000,%d4:l)
inactive_per_block[block_count] = 0; for ( index=index_base ;
4723c: b283 cmpl %d3,%d1 4723e: 6310 blss 47250 <_Objects_Extend_information+0x104> 47240: 2247 moveal %d7,%a1 47242: 2003 movel %d3,%d0 47244: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL;
47248: 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++ ) {
4724a: 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 ;
4724c: b280 cmpl %d0,%d1 4724e: 62f8 bhis 47248 <_Objects_Extend_information+0xfc>
index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level );
47250: 203c 0000 0700 movel #1792,%d0 47256: 40c4 movew %sr,%d4 47258: 8084 orl %d4,%d0 4725a: 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(
4725c: 2012 movel %a2@,%d0 4725e: 7218 moveq #24,%d1 47260: 4285 clrl %d5 47262: e3a8 lsll %d1,%d0 47264: 3a0b movew %a3,%d5 47266: 4281 clrl %d1 47268: 2245 moveal %d5,%a1 4726a: 7a1b moveq #27,%d5 4726c: 322a 0004 movew %a2@(4),%d1 47270: 08c0 0010 bset #16,%d0
local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks;
47274: 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(
47278: 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;
4727a: 354b 000e movew %a3,%a2@(14)
_ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks;
4727e: 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(
47282: 8081 orl %d1,%d0 47284: 2209 movel %a1,%d1 47286: 8280 orl %d0,%d1
_ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block;
47288: 254d 002a movel %a5,%a2@(42)
information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
4728c: 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;
47290: 2547 0018 movel %d7,%a2@(24)
information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level );
47294: 46c4 movew %d4,%sr
if ( old_tables )
47296: 4a88 tstl %a0 47298: 670a beqs 472a4 <_Objects_Extend_information+0x158>
_Workspace_Free( old_tables );
4729a: 2f08 movel %a0,%sp@- 4729c: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> 472a2: 588f addql #4,%sp
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
472a4: 206a 002e moveal %a2@(46),%a0
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
472a8: 4280 clrl %d0 472aa: 280e movel %fp,%d4 472ac: 0684 ffff fff4 addil #-12,%d4 472b2: 47f9 0004 b954 lea 4b954 <_Chain_Get>,%a3
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
472b8: 2a0a movel %a2,%d5 472ba: 0685 0000 001c addil #28,%d5 472c0: 49f9 0004 6798 lea 46798 <_Chain_Append>,%a4
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
472c6: e58a lsll #2,%d2
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
472c8: 302a 0012 movew %a2@(18),%d0
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
472cc: 2186 2800 movel %d6,%a0@(00000000,%d2:l)
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
472d0: 2f2a 0014 movel %a2@(20),%sp@- 472d4: 2f00 movel %d0,%sp@- 472d6: 2f06 movel %d6,%sp@- 472d8: 2f04 movel %d4,%sp@- 472da: 4eb9 0004 b990 jsr 4b990 <_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 ) {
472e0: 4fef 0010 lea %sp@(16),%sp 472e4: 2f04 movel %d4,%sp@- 472e6: 4e93 jsr %a3@ 472e8: 588f addql #4,%sp 472ea: 4a80 tstl %d0 472ec: 6732 beqs 47320 <_Objects_Extend_information+0x1d4>
the_object->id = _Objects_Build_id(
472ee: 2212 movel %a2@,%d1 472f0: 7c18 moveq #24,%d6 472f2: 7e1b moveq #27,%d7 472f4: 2040 moveal %d0,%a0 472f6: eda9 lsll %d6,%d1 472f8: 4286 clrl %d6 472fa: 3c2a 0004 movew %a2@(4),%d6 472fe: 08c1 0010 bset #16,%d1 47302: efae lsll %d7,%d6 47304: 8286 orl %d6,%d1 47306: 8283 orl %d3,%d1
index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++;
47308: 5283 addql #1,%d3
*/ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id(
4730a: 2141 0008 movel %d1,%a0@(8)
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
4730e: 2f00 movel %d0,%sp@- 47310: 2f05 movel %d5,%sp@- 47312: 4e94 jsr %a4@
index++;
47314: 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 ) {
47316: 2f04 movel %d4,%sp@- 47318: 4e93 jsr %a3@ 4731a: 588f addql #4,%sp 4731c: 4a80 tstl %d0 4731e: 66ce bnes 472ee <_Objects_Extend_information+0x1a2>
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
47320: 4280 clrl %d0
information->inactive =
47322: 322a 0028 movew %a2@(40),%d1 47326: 326a 0012 moveaw %a2@(18),%a1
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
4732a: 206a 002a moveal %a2@(42),%a0
information->inactive =
4732e: d289 addl %a1,%d1
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
47330: 3009 movew %a1,%d0
information->inactive =
47332: 3541 0028 movew %d1,%a2@(40)
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
47336: 2180 2800 movel %d0,%a0@(00000000,%d2:l)
information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); }
4733a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47340: 4e5e unlk %fp 47342: 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 );
47344: 2f00 movel %d0,%sp@- 47346: 4eb9 0004 91b0 jsr 491b0 <_Workspace_Allocate_or_fatal_error> 4734c: 588f addql #4,%sp 4734e: 2c00 movel %d0,%d6 47350: 6000 fe84 braw 471d6 <_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,
47354: e58c lsll #2,%d4 47356: 2f04 movel %d4,%sp@- 47358: 2f2a 002e movel %a2@(46),%sp@- 4735c: 2f0c movel %a4,%sp@- 4735e: 4eb9 0004 f3ac jsr 4f3ac <memcpy>
information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block,
47364: 2f04 movel %d4,%sp@- 47366: 2f2a 002a movel %a2@(42),%sp@- 4736a: 2f0d movel %a5,%sp@- 4736c: 4eb9 0004 f3ac jsr 4f3ac <memcpy>
information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table,
47372: 4280 clrl %d0 47374: 302a 000e movew %a2@(14),%d0 47378: da80 addl %d0,%d5 4737a: e58d lsll #2,%d5 4737c: 2f05 movel %d5,%sp@- 4737e: 2f2a 0018 movel %a2@(24),%sp@- 47382: 2f07 movel %d7,%sp@- 47384: 4eb9 0004 f3ac jsr 4f3ac <memcpy> 4738a: 4fef 0024 lea %sp@(36),%sp 4738e: 6000 fe9c braw 4722c <_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 )
47392: 4280 clrl %d0 47394: 2605 movel %d5,%d3 47396: 4282 clrl %d2 47398: 4284 clrl %d4 4739a: 322a 000e movew %a2@(14),%d1 4739e: 302a 0012 movew %a2@(18),%d0 473a2: 6000 fdfe braw 471a2 <_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 )
473a6: 2605 movel %d5,%d3 <== NOT EXECUTED 473a8: 4282 clrl %d2 <== NOT EXECUTED 473aa: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 473b0: 6000 fdf0 braw 471a2 <_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 );
473b4: 2f06 movel %d6,%sp@- 473b6: 4eb9 0004 9200 jsr 49200 <_Workspace_Free>
return;
473bc: 588f addql #4,%sp
} information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); }
473be: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 473c4: 4e5e unlk %fp 473c6: 4e75 rts
00047478 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) {
47478: 4e56 0000 linkw %fp,#0 4747c: 2f02 movel %d2,%sp@- 4747e: 242e 000c movel %fp@(12),%d2
Objects_Information *info; int the_class_api_maximum; if ( !the_class )
47482: 660a bnes 4748e <_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 )
47484: 4280 clrl %d0
return NULL; #endif return info; }
47486: 242e fffc movel %fp@(-4),%d2 4748a: 4e5e unlk %fp 4748c: 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 );
4748e: 2f2e 0008 movel %fp@(8),%sp@- 47492: 4eb9 0004 bf68 jsr 4bf68 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
47498: 588f addql #4,%sp 4749a: 4a80 tstl %d0 4749c: 67e6 beqs 47484 <_Objects_Get_information+0xc>
return NULL; if ( the_class > (uint32_t) the_class_api_maximum )
4749e: b082 cmpl %d2,%d0 474a0: 65e2 bcss 47484 <_Objects_Get_information+0xc>
return NULL; if ( !_Objects_Information_table[ the_api ] )
474a2: 202e 0008 movel %fp@(8),%d0 474a6: 41f9 0005 eebc lea 5eebc <_Objects_Information_table>,%a0 474ac: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 474b0: 4a88 tstl %a0 474b2: 67d0 beqs 47484 <_Objects_Get_information+0xc>
return NULL; info = _Objects_Information_table[ the_api ][ the_class ];
474b4: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !info )
474b8: 67cc beqs 47486 <_Objects_Get_information+0xe>
* 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 )
474ba: 2040 moveal %d0,%a0 474bc: 4a68 000e tstw %a0@(14) 474c0: 67c2 beqs 47484 <_Objects_Get_information+0xc>
return NULL; #endif return info; }
474c2: 242e fffc movel %fp@(-4),%d2 474c6: 4e5e unlk %fp 474c8: 4e75 rts
... 000574b0 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) {
574b0: 4e56 fff0 linkw %fp,#-16 574b4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 574b8: 246e 0008 moveal %fp@(8),%a2 574bc: 266e 0010 moveal %fp@(16),%a3
Objects_Control *object; Objects_Id next_id; if ( !information )
574c0: 4a8a tstl %a2 574c2: 660c bnes 574d0 <_Objects_Get_next+0x20>
*next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0;
574c4: 4280 clrl %d0
}
574c6: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 574cc: 4e5e unlk %fp 574ce: 4e75 rts
Objects_Id next_id; if ( !information ) return NULL; if ( !location_p )
574d0: 4a8b tstl %a3 574d2: 67f0 beqs 574c4 <_Objects_Get_next+0x14>
return NULL; if ( !next_id_p )
574d4: 4aae 0014 tstl %fp@(20) 574d8: 67ea beqs 574c4 <_Objects_Get_next+0x14>
return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
574da: 302e 000e movew %fp@(14),%d0 574de: 673a beqs 5751a <_Objects_Get_next+0x6a> 574e0: 242e 000c movel %fp@(12),%d2
*location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p);
574e4: 49f9 0004 c9ec lea 4c9ec <_Objects_Get>,%a4
else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum)
574ea: 4281 clrl %d1 574ec: 4280 clrl %d0 574ee: 322a 000e movew %a2@(14),%d1 574f2: 3002 movew %d2,%d0 574f4: b081 cmpl %d1,%d0 574f6: 622e bhis 57526 <_Objects_Get_next+0x76>
*location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p);
574f8: 2f0b movel %a3,%sp@- 574fa: 2f02 movel %d2,%sp@-
next_id++;
574fc: 5282 addql #1,%d2
*location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p);
574fe: 2f0a movel %a2,%sp@- 57500: 4e94 jsr %a4@
next_id++; } while (*location_p != OBJECTS_LOCAL);
57502: 4fef 000c lea %sp@(12),%sp 57506: 4a93 tstl %a3@ 57508: 66e0 bnes 574ea <_Objects_Get_next+0x3a>
*next_id_p = next_id;
5750a: 206e 0014 moveal %fp@(20),%a0 5750e: 2082 movel %d2,%a0@
return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; }
57510: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 57516: 4e5e unlk %fp 57518: 4e75 rts
if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id;
5751a: 242a 0006 movel %a2@(6),%d2
*location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p);
5751e: 49f9 0004 c9ec lea 4c9ec <_Objects_Get>,%a4 57524: 60c4 bras 574ea <_Objects_Get_next+0x3a>
do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR;
57526: 7401 moveq #1,%d2
*next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL;
57528: 72ff moveq #-1,%d1 5752a: 4280 clrl %d0 5752c: 206e 0014 moveal %fp@(20),%a0
do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR;
57530: 2682 movel %d2,%a3@
return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; }
57532: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
*next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL;
57538: 2081 movel %d1,%a0@
return 0; }
5753a: 4e5e unlk %fp 5753c: 4e75 rts
... 0005b964 <_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;
5b964: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
5b966: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) {
5b968: 4e56 0000 linkw %fp,#0 5b96c: 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;
5b970: 90a8 0006 subl %a0@(6),%d0 5b974: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
5b978: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) {
5b97c: 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 ) {
5b980: b280 cmpl %d0,%d1 5b982: 6510 bcss 5b994 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
5b984: 2068 0018 moveal %a0@(24),%a0 5b988: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5b98c: 6706 beqs 5b994 <_Objects_Get_no_protection+0x30>
*location = OBJECTS_LOCAL;
5b98e: 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; }
5b990: 4e5e unlk %fp 5b992: 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;
5b994: 7001 moveq #1,%d0
return NULL; }
5b996: 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;
5b998: 2280 movel %d0,%a1@ 5b99a: 4280 clrl %d0
return NULL; }
5b99c: 4e75 rts
... 00053dd4 <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) {
53dd4: 4e56 ffe0 linkw %fp,#-32 53dd8: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 53ddc: 286e 0008 moveal %fp@(8),%a4 53de0: 282e 000c movel %fp@(12),%d4 53de4: 2a2e 0010 movel %fp@(16),%d5
uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id )
53de8: 6764 beqs 53e4e <_Objects_Name_to_id_string+0x7a>
return OBJECTS_INVALID_ADDRESS; if ( !name )
53dea: 4a84 tstl %d4 53dec: 6744 beqs 53e32 <_Objects_Name_to_id_string+0x5e>
return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) {
53dee: 362c 000e movew %a4@(14),%d3 53df2: 673e beqs 53e32 <_Objects_Name_to_id_string+0x5e>
name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) {
53df4: 246c 0018 moveal %a4@(24),%a2 53df8: 7401 moveq #1,%d2 53dfa: 588a addql #4,%a2
continue; if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) {
53dfc: 4bf9 0005 80a0 lea 580a0 <strncmp>,%a5
return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) {
53e02: 0283 0000 ffff andil #65535,%d3
the_object = information->local_table[ index ];
53e08: 2652 moveal %a2@,%a3
return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) {
53e0a: 5282 addql #1,%d2 53e0c: 588a addql #4,%a2
the_object = information->local_table[ index ]; if ( !the_object )
53e0e: 4a8b tstl %a3 53e10: 671c beqs 53e2e <_Objects_Name_to_id_string+0x5a>
continue; if ( !the_object->name.name_p )
53e12: 202b 000c movel %a3@(12),%d0 53e16: 6716 beqs 53e2e <_Objects_Name_to_id_string+0x5a>
continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) {
53e18: 4281 clrl %d1 53e1a: 322c 0034 movew %a4@(52),%d1 53e1e: 2f01 movel %d1,%sp@- 53e20: 2f00 movel %d0,%sp@- 53e22: 2f04 movel %d4,%sp@- 53e24: 4e95 jsr %a5@ 53e26: 4fef 000c lea %sp@(12),%sp 53e2a: 4a80 tstl %d0 53e2c: 6710 beqs 53e3e <_Objects_Name_to_id_string+0x6a>
return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) {
53e2e: b682 cmpl %d2,%d3 53e30: 64d6 bccs 53e08 <_Objects_Name_to_id_string+0x34> 53e32: 7001 moveq #1,%d0
} } } return OBJECTS_INVALID_NAME; }
53e34: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 53e3a: 4e5e unlk %fp 53e3c: 4e75 rts
if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id;
53e3e: 2045 moveal %d5,%a0 53e40: 20ab 0008 movel %a3@(8),%a0@
} } } return OBJECTS_INVALID_NAME; }
53e44: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 53e4a: 4e5e unlk %fp 53e4c: 4e75 rts
uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id )
53e4e: 7002 moveq #2,%d0
} } } return OBJECTS_INVALID_NAME; }
53e50: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 53e56: 4e5e unlk %fp 53e58: 4e75 rts
... 00047ad8 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length );
47ad8: 4280 clrl %d0
bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) {
47ada: 4e56 fff0 linkw %fp,#-16 47ade: 48d7 3c00 moveml %a2-%a5,%sp@ 47ae2: 286e 0008 moveal %fp@(8),%a4 47ae6: 246e 0010 moveal %fp@(16),%a2
size_t length; const char *s; s = name; length = strnlen( name, information->name_length );
47aea: 302c 0034 movew %a4@(52),%d0 47aee: 2f00 movel %d0,%sp@-
bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) {
47af0: 2a6e 000c moveal %fp@(12),%a5
size_t length; const char *s; s = name; length = strnlen( name, information->name_length );
47af4: 2f0a movel %a2,%sp@- 47af6: 4eb9 0005 0838 jsr 50838 <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) {
47afc: 508f addql #8,%sp
{ size_t length; const char *s; s = name; length = strnlen( name, information->name_length );
47afe: 2640 moveal %d0,%a3
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) {
47b00: 4a2c 0032 tstb %a4@(50) 47b04: 6662 bnes 47b68 <_Objects_Set_name+0x90>
d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name(
47b06: 7018 moveq #24,%d0 47b08: 1212 moveb %a2@,%d1 47b0a: 49c1 extbl %d1 47b0c: e1a9 lsll %d0,%d1 47b0e: 103c 0001 moveb #1,%d0 47b12: b08b cmpl %a3,%d0 47b14: 643c bccs 47b52 <_Objects_Set_name+0x7a> 47b16: 102a 0001 moveb %a2@(1),%d0 47b1a: 49c0 extbl %d0 47b1c: 4840 swap %d0 47b1e: 4240 clrw %d0 47b20: 8081 orl %d1,%d0 47b22: 7202 moveq #2,%d1 47b24: b28b cmpl %a3,%d1 47b26: 6730 beqs 47b58 <_Objects_Set_name+0x80> 47b28: 122a 0002 moveb %a2@(2),%d1 47b2c: 49c1 extbl %d1 47b2e: e189 lsll #8,%d1 47b30: 8081 orl %d1,%d0 47b32: 7203 moveq #3,%d1 47b34: b28b cmpl %a3,%d1 47b36: 6700 0088 beqw 47bc0 <_Objects_Set_name+0xe8> 47b3a: 122a 0003 moveb %a2@(3),%d1 47b3e: 49c1 extbl %d1 47b40: 8081 orl %d1,%d0 47b42: 2b40 000c movel %d0,%a5@(12) 47b46: 7001 moveq #1,%d0
); } return true; }
47b48: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 47b4e: 4e5e unlk %fp 47b50: 4e75 rts
d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name(
47b52: 2001 movel %d1,%d0 47b54: 08c0 0015 bset #21,%d0 47b58: 7220 moveq #32,%d1 47b5a: 08c0 000d bset #13,%d0 47b5e: 8081 orl %d1,%d0 47b60: 2b40 000c movel %d0,%a5@(12) 47b64: 7001 moveq #1,%d0 47b66: 60e0 bras 47b48 <_Objects_Set_name+0x70>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 );
47b68: 486b 0001 pea %a3@(1) 47b6c: 4eb9 0004 965c jsr 4965c <_Workspace_Allocate>
if ( !d )
47b72: 588f addql #4,%sp
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 );
47b74: 2840 moveal %d0,%a4
if ( !d )
47b76: 4a80 tstl %d0 47b78: 673a beqs 47bb4 <_Objects_Set_name+0xdc>
return false; if ( the_object->name.name_p ) {
47b7a: 202d 000c movel %a5@(12),%d0 47b7e: 670e beqs 47b8e <_Objects_Set_name+0xb6>
_Workspace_Free( (void *)the_object->name.name_p );
47b80: 2f00 movel %d0,%sp@- 47b82: 4eb9 0004 9678 jsr 49678 <_Workspace_Free>
the_object->name.name_p = NULL;
47b88: 588f addql #4,%sp 47b8a: 42ad 000c clrl %a5@(12)
} strncpy( d, name, length );
47b8e: 2f0b movel %a3,%sp@- 47b90: 2f0a movel %a2,%sp@- 47b92: 2f0c movel %a4,%sp@- 47b94: 4eb9 0005 07b0 jsr 507b0 <strncpy>
d[length] = '\0'; the_object->name.name_p = d;
47b9a: 4fef 000c lea %sp@(12),%sp
_Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; } strncpy( d, name, length ); d[length] = '\0';
47b9e: 4200 clrb %d0 47ba0: 1980 b800 moveb %d0,%a4@(00000000,%a3:l)
the_object->name.name_p = d;
47ba4: 7001 moveq #1,%d0 47ba6: 2b4c 000c movel %a4,%a5@(12)
); } return true; }
47baa: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 47bb0: 4e5e unlk %fp 47bb2: 4e75 rts
47bb4: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 <== NOT EXECUTED
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d )
47bba: 4200 clrb %d0 <== NOT EXECUTED
); } return true; }
47bbc: 4e5e unlk %fp <== NOT EXECUTED 47bbe: 4e75 rts <== NOT EXECUTED
d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name(
47bc0: 123c 0020 moveb #32,%d1 47bc4: 8081 orl %d1,%d0 47bc6: 2b40 000c movel %d0,%a5@(12) 47bca: 7001 moveq #1,%d0 47bcc: 6000 ff7a braw 47b48 <_Objects_Set_name+0x70>
00047758 <_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) /
47758: 4281 clrl %d1
*/ void _Objects_Shrink_information( Objects_Information *information ) {
4775a: 4e56 ffec linkw %fp,#-20 4775e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 47762: 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 );
47766: 4283 clrl %d3
block_count = (information->maximum - index_base) /
47768: 4284 clrl %d4
/* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id );
4776a: 362a 0008 movew %a2@(8),%d3
block_count = (information->maximum - index_base) /
4776e: 382a 000e movew %a2@(14),%d4 47772: 322a 0012 movew %a2@(18),%d1 47776: 9883 subl %d3,%d4 47778: 4c41 4004 remul %d1,%d4,%d4
information->allocation_size; for ( block = 0; block < block_count; block++ ) {
4777c: 672c beqs 477aa <_Objects_Shrink_information+0x52>
if ( information->inactive_per_block[ block ] ==
4777e: 226a 002a moveal %a2@(42),%a1 47782: b291 cmpl %a1@,%d1 47784: 672e beqs 477b4 <_Objects_Shrink_information+0x5c>
information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return;
47786: 7404 moveq #4,%d2 47788: 4280 clrl %d0
} index_base += information->allocation_size;
4778a: 2042 moveal %d2,%a0 4778c: d681 addl %d1,%d3 4778e: 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++ ) {
47790: 5280 addql #1,%d0 47792: b084 cmpl %d4,%d0 47794: 6414 bccs 477aa <_Objects_Shrink_information+0x52>
if ( information->inactive_per_block[ block ] ==
47796: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 4779a: 671a beqs 477b6 <_Objects_Shrink_information+0x5e> 4779c: 2408 movel %a0,%d2
information->inactive -= information->allocation_size; return; } index_base += information->allocation_size;
4779e: 2042 moveal %d2,%a0 477a0: d681 addl %d1,%d3 477a2: 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++ ) {
477a4: 5280 addql #1,%d0 477a6: b084 cmpl %d4,%d0 477a8: 65ec bcss 47796 <_Objects_Shrink_information+0x3e>
return; } index_base += information->allocation_size; } }
477aa: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 477b0: 4e5e unlk %fp 477b2: 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 ] ==
477b4: 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;
477b6: 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 );
477ba: 47f9 0004 b92c lea 4b92c <_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 );
477c0: 4280 clrl %d0 477c2: 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;
477c6: 2810 movel %a0@,%d4
if ((index >= index_base) &&
477c8: b680 cmpl %d0,%d3 477ca: 620c bhis 477d8 <_Objects_Shrink_information+0x80>
(index < (index_base + information->allocation_size))) {
477cc: 4281 clrl %d1 477ce: 322a 0012 movew %a2@(18),%d1 477d2: d283 addl %d3,%d1 477d4: b280 cmpl %d0,%d1 477d6: 623e bhis 47816 <_Objects_Shrink_information+0xbe>
_Chain_Extract( &extract_me->Node ); } } while ( the_object );
477d8: 2044 moveal %d4,%a0 477da: 4a84 tstl %d4 477dc: 66e2 bnes 477c0 <_Objects_Shrink_information+0x68>
/* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] );
477de: 206a 002e moveal %a2@(46),%a0 477e2: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 477e6: 4eb9 0004 9200 jsr 49200 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
477ec: 206a 002e moveal %a2@(46),%a0
information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return;
477f0: 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;
477f2: 302a 0028 movew %a2@(40),%d0 477f6: 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;
477fa: 226a 002a moveal %a2@(42),%a1
information->inactive -= information->allocation_size;
477fe: 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;
47800: 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;
47804: 42b0 2800 clrl %a0@(00000000,%d2:l)
information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size;
47808: 3540 0028 movew %d0,%a2@(40)
return; } index_base += information->allocation_size; } }
4780c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47812: 4e5e unlk %fp 47814: 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 );
47816: 2f08 movel %a0,%sp@- 47818: 4e93 jsr %a3@ 4781a: 588f addql #4,%sp
} } while ( the_object );
4781c: 2044 moveal %d4,%a0 4781e: 4a84 tstl %d4 47820: 669e bnes 477c0 <_Objects_Shrink_information+0x68> 47822: 60ba bras 477de <_Objects_Shrink_information+0x86>
0004ae18 <_POSIX_Barrier_Manager_initialization>: /** * @brief _POSIX_Barrier_Manager_initialization */ void _POSIX_Barrier_Manager_initialization(void) {
4ae18: 4e56 0000 linkw %fp,#0
_Objects_Initialize_information(
4ae1c: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 4ae20: 4878 0001 pea 1 <ADD> 4ae24: 4878 005c pea 5c <DBL_MANT_DIG+0x27> 4ae28: 2f39 0005 dd66 movel 5dd66 <Configuration_POSIX_API+0x24>,%sp@- 4ae2e: 4878 000a pea a <LASTO> 4ae32: 4878 0003 pea 3 <DIVIDE> 4ae36: 4879 0005 f246 pea 5f246 <_POSIX_Barrier_Information> 4ae3c: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4ae42: 4fef 001c lea %sp@(28),%sp
, false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
4ae46: 4e5e unlk %fp 4ae48: 4e75 rts
... 0004c2b4 <_POSIX_Barrier_Translate_core_barrier_return_code>: int _POSIX_Barrier_Translate_core_barrier_return_code( CORE_barrier_Status the_barrier_status ) {
4c2b4: 41f9 0005 e1e2 lea 5e1e2 <_POSIX_Barrier_Return_codes>,%a0 4c2ba: 4e56 0000 linkw %fp,#0
#if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return EINVAL; #endif return _POSIX_Barrier_Return_codes[the_barrier_status]; }
4c2be: 202e 0008 movel %fp@(8),%d0 4c2c2: 4e5e unlk %fp 4c2c4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4c2c8: 4e75 rts
... 000469b4 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) {
469b4: 4e56 0000 linkw %fp,#0 469b8: 2f0b movel %a3,%sp@- 469ba: 266e 000c moveal %fp@(12),%a3 469be: 2f0a movel %a2,%sp@- 469c0: 246e 0008 moveal %fp@(8),%a2
int status; if ( !cond ) {
469c4: 4a8a tstl %a2 469c6: 6750 beqs 46a18 <_POSIX_Condition_variables_Get+0x64>
*location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) {
469c8: 2012 movel %a2@,%d0 469ca: 72ff moveq #-1,%d1 469cc: b280 cmpl %d0,%d1 469ce: 6720 beqs 469f0 <_POSIX_Condition_variables_Get+0x3c>
} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get(
469d0: 2f0b movel %a3,%sp@- 469d2: 2f00 movel %d0,%sp@- 469d4: 4879 0006 1d32 pea 61d32 <_POSIX_Condition_variables_Information> 469da: 4eb9 0004 97f8 jsr 497f8 <_Objects_Get> 469e0: 4fef 000c lea %sp@(12),%sp
&_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); }
469e4: 246e fff8 moveal %fp@(-8),%a2 469e8: 266e fffc moveal %fp@(-4),%a3 469ec: 4e5e unlk %fp 469ee: 4e75 rts
if ( *cond == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 );
469f0: 42a7 clrl %sp@- 469f2: 2f0a movel %a2,%sp@- 469f4: 4eb9 0004 6a2c jsr 46a2c <pthread_cond_init>
if ( status ) {
469fa: 508f addql #8,%sp 469fc: 4a80 tstl %d0 469fe: 6618 bnes 46a18 <_POSIX_Condition_variables_Get+0x64> 46a00: 2012 movel %a2@,%d0
} /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get(
46a02: 2f0b movel %a3,%sp@- 46a04: 2f00 movel %d0,%sp@- 46a06: 4879 0006 1d32 pea 61d32 <_POSIX_Condition_variables_Information> 46a0c: 4eb9 0004 97f8 jsr 497f8 <_Objects_Get> 46a12: 4fef 000c lea %sp@(12),%sp 46a16: 60cc bras 469e4 <_POSIX_Condition_variables_Get+0x30>
* Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); if ( status ) { *location = OBJECTS_ERROR;
46a18: 7001 moveq #1,%d0 46a1a: 2680 movel %d0,%a3@
return (POSIX_Condition_variables_Control *)_Objects_Get( &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); }
46a1c: 246e fff8 moveal %fp@(-8),%a2
* Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); if ( status ) { *location = OBJECTS_ERROR;
46a20: 4280 clrl %d0
return (POSIX_Condition_variables_Control *)_Objects_Get( &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); }
46a22: 266e fffc moveal %fp@(-4),%a3 46a26: 4e5e unlk %fp 46a28: 4e75 rts
... 0004acf0 <_POSIX_Condition_variables_Manager_initialization>: * * Output parameters: NONE */ void _POSIX_Condition_variables_Manager_initialization(void) {
4acf0: 4e56 0000 linkw %fp,#0
_Objects_Initialize_information(
4acf4: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 4acf8: 4878 0001 pea 1 <ADD> 4acfc: 4878 0058 pea 58 <DBL_MANT_DIG+0x23> 4ad00: 2f39 0005 dd4a movel 5dd4a <Configuration_POSIX_API+0x8>,%sp@- 4ad06: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 4ad0a: 4878 0003 pea 3 <DIVIDE> 4ad0e: 4879 0005 f2d2 pea 5f2d2 <_POSIX_Condition_variables_Information> 4ad14: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4ad1a: 4fef 001c lea %sp@(28),%sp
, false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
4ad1e: 4e5e unlk %fp 4ad20: 4e75 rts
... 00046bc8 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) {
46bc8: 4e56 ffe8 linkw %fp,#-24 46bcc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
46bd0: 240e movel %fp,%d2 46bd2: 5982 subql #4,%d2 46bd4: 2f02 movel %d2,%sp@-
pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) {
46bd6: 246e 000c moveal %fp@(12),%a2
register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
46bda: 2f0a movel %a2,%sp@-
pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) {
46bdc: 266e 0008 moveal %fp@(8),%a3 46be0: 162e 0017 moveb %fp@(23),%d3
register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
46be4: 4eb9 0004 6dbe jsr 46dbe <_POSIX_Mutex_Get> 46bea: 508f addql #8,%sp 46bec: 4a80 tstl %d0 46bee: 6764 beqs 46c54 <_POSIX_Condition_variables_Wait_support+0x8c>
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
46bf0: 2039 0006 1964 movel 61964 <_Thread_Dispatch_disable_level>,%d0 46bf6: 5380 subql #1,%d0
return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location );
46bf8: 2f02 movel %d2,%sp@- 46bfa: 23c0 0006 1964 movel %d0,61964 <_Thread_Dispatch_disable_level> 46c00: 2f0b movel %a3,%sp@- 46c02: 4eb9 0004 69b4 jsr 469b4 <_POSIX_Condition_variables_Get>
switch ( location ) {
46c08: 508f addql #8,%sp
return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location );
46c0a: 2840 moveal %d0,%a4
switch ( location ) {
46c0c: 4aae fffc tstl %fp@(-4) 46c10: 6642 bnes 46c54 <_POSIX_Condition_variables_Wait_support+0x8c>
case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
46c12: 202c 0014 movel %a4@(20),%d0 46c16: 6718 beqs 46c30 <_POSIX_Condition_variables_Wait_support+0x68> 46c18: b092 cmpl %a2@,%d0 46c1a: 6714 beqs 46c30 <_POSIX_Condition_variables_Wait_support+0x68>
_Thread_Enable_dispatch();
46c1c: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> 46c22: 7416 moveq #22,%d2
case OBJECTS_ERROR: break; } return EINVAL; }
46c24: 2002 movel %d2,%d0 46c26: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 46c2c: 4e5e unlk %fp 46c2e: 4e75 rts
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex );
46c30: 2f0a movel %a2,%sp@- 46c32: 4eb9 0004 700c jsr 4700c <pthread_mutex_unlock>
_Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) {
46c38: 588f addql #4,%sp 46c3a: 4a03 tstb %d3 46c3c: 6724 beqs 46c62 <_POSIX_Condition_variables_Wait_support+0x9a>
status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch();
46c3e: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch> 46c44: 7474 moveq #116,%d2
/* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex );
46c46: 2f0a movel %a2,%sp@- 46c48: 4eb9 0004 6f70 jsr 46f70 <pthread_mutex_lock>
if ( mutex_status )
46c4e: 588f addql #4,%sp 46c50: 4a80 tstl %d0 46c52: 67d0 beqs 46c24 <_POSIX_Condition_variables_Wait_support+0x5c> 46c54: 7416 moveq #22,%d2
case OBJECTS_ERROR: break; } return EINVAL; }
46c56: 2002 movel %d2,%d0 46c58: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 46c5e: 4e5e unlk %fp 46c60: 4e75 rts
return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex;
46c62: 2952 0014 movel %a2@,%a4@(20)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue;
46c66: 200c movel %a4,%d0 46c68: 0680 0000 0018 addil #24,%d0
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;
46c6e: 7201 moveq #1,%d1
if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0;
46c70: 2079 0006 1a1e moveal 61a1e <_Thread_Executing>,%a0 46c76: 42a8 0034 clrl %a0@(52)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond;
46c7a: 2153 0020 movel %a3@,%a0@(32)
if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue;
46c7e: 2140 0044 movel %d0,%a0@(68) 46c82: 2941 0048 movel %d1,%a4@(72)
_Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
46c86: 4879 0004 a910 pea 4a910 <_Thread_queue_Timeout> 46c8c: 2f2e 0010 movel %fp@(16),%sp@- 46c90: 2f00 movel %d0,%sp@- 46c92: 4eb9 0004 a554 jsr 4a554 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
46c98: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch>
/* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code;
46c9e: 2079 0006 1a1e moveal 61a1e <_Thread_Executing>,%a0
if ( status && status != ETIMEDOUT )
46ca4: 4fef 000c lea %sp@(12),%sp
/* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code;
46ca8: 2428 0034 movel %a0@(52),%d2
if ( status && status != ETIMEDOUT )
46cac: 6798 beqs 46c46 <_POSIX_Condition_variables_Wait_support+0x7e> 46cae: 7074 moveq #116,%d0 46cb0: b082 cmpl %d2,%d0 46cb2: 6792 beqs 46c46 <_POSIX_Condition_variables_Wait_support+0x7e>
case OBJECTS_ERROR: break; } return EINVAL; }
46cb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46cb6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 46cbc: 4e5e unlk %fp <== NOT EXECUTED
46cbe: 4e75 rts
0004ad24 <_POSIX_Key_Manager_initialization>: * * Output parameters: NONE */ void _POSIX_Key_Manager_initialization(void) {
4ad24: 4e56 0000 linkw %fp,#0
_Objects_Initialize_information(
4ad28: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 4ad2c: 4878 0001 pea 1 <ADD> 4ad30: 4878 0028 pea 28 <OPER2+0x14> 4ad34: 2f39 0005 dd4e movel 5dd4e <Configuration_POSIX_API+0xc>,%sp@- 4ad3a: 4878 0002 pea 2 <DOUBLE_FLOAT> 4ad3e: 4878 0003 pea 3 <DIVIDE> 4ad42: 4879 0005 f298 pea 5f298 <_POSIX_Keys_Information> 4ad48: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4ad4e: 4fef 001c lea %sp@(28),%sp
, false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
4ad52: 4e5e unlk %fp 4ad54: 4e75 rts
... 0004b708 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) {
4b708: 4e56 0000 linkw %fp,#0 4b70c: 2f0a movel %a2,%sp@- 4b70e: 246e 0008 moveal %fp@(8),%a2
if ( !the_mq->linked && !the_mq->open_count ) {
4b712: 4a2a 0015 tstb %a2@(21) 4b716: 6606 bnes 4b71e <_POSIX_Message_queue_Delete+0x16> 4b718: 4aaa 0016 tstl %a2@(22) 4b71c: 6708 beqs 4b726 <_POSIX_Message_queue_Delete+0x1e>
); _POSIX_Message_queue_Free( the_mq ); } }
4b71e: 246e fffc moveal %fp@(-4),%a2 4b722: 4e5e unlk %fp 4b724: 4e75 rts
); _Workspace_Free( (void *)the_object->name.name_p ); } #endif _Objects_Close( &_POSIX_Message_queue_Information, the_object );
4b726: 2f0a movel %a2,%sp@- 4b728: 4879 0006 8dae pea 68dae <_POSIX_Message_queue_Information> 4b72e: 4eb9 0004 eacc jsr 4eacc <_Objects_Close>
_CORE_message_queue_Close(
4b734: 4878 0005 pea 5 <COMPARE> 4b738: 42a7 clrl %sp@- 4b73a: 486a 001a pea %a2@(26) 4b73e: 4eb9 0004 dd90 jsr 4dd90 <_CORE_message_queue_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
4b744: 2f0a movel %a2,%sp@- 4b746: 4879 0006 8dae pea 68dae <_POSIX_Message_queue_Information> 4b74c: 4eb9 0004 ed74 jsr 4ed74 <_Objects_Free>
); _POSIX_Message_queue_Free( the_mq ); } }
4b752: 246e fffc moveal %fp@(-4),%a2 4b756: 4fef 001c lea %sp@(28),%sp 4b75a: 4e5e unlk %fp 4b75c: 4e75 rts
... 00052a6c <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) {
52a6c: 4e56 fffc linkw %fp,#-4 52a70: 2f0a movel %a2,%sp@- 52a72: 246e 0008 moveal %fp@(8),%a2
Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name )
52a76: 4a8a tstl %a2 52a78: 6704 beqs 52a7e <_POSIX_Message_queue_Name_to_id+0x12>
return EINVAL; if ( !name[0] )
52a7a: 4a12 tstb %a2@ 52a7c: 660a bnes 52a88 <_POSIX_Message_queue_Name_to_id+0x1c>
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; }
52a7e: 246e fff8 moveal %fp@(-8),%a2
name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
52a82: 7016 moveq #22,%d0
return 0; return ENOENT; }
52a84: 4e5e unlk %fp 52a86: 4e75 rts
return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
52a88: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 52a8c: 2f0a movel %a2,%sp@- 52a8e: 4eb9 0005 81f0 jsr 581f0 <strnlen> 52a94: 508f addql #8,%sp 52a96: 0c80 0000 00fe cmpil #254,%d0 52a9c: 630a blss 52aa8 <_POSIX_Message_queue_Name_to_id+0x3c>
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; }
52a9e: 246e fff8 moveal %fp@(-8),%a2
return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
52aa2: 705b moveq #91,%d0
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; }
52aa4: 4e5e unlk %fp 52aa6: 4e75 rts
return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string(
52aa8: 486e fffc pea %fp@(-4) 52aac: 2f0a movel %a2,%sp@- 52aae: 4879 0006 8dae pea 68dae <_POSIX_Message_queue_Information> 52ab4: 4eb9 0005 3dd4 jsr 53dd4 <_Objects_Name_to_id_string>
&_POSIX_Message_queue_Information, name, &the_id ); *id = the_id;
52aba: 206e 000c moveal %fp@(12),%a0
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
52abe: 4fef 000c lea %sp@(12),%sp
status = _Objects_Name_to_id_string( &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id;
52ac2: 20ae fffc movel %fp@(-4),%a0@
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
52ac6: 4a80 tstl %d0 52ac8: 670a beqs 52ad4 <_POSIX_Message_queue_Name_to_id+0x68>
return 0; return ENOENT; }
52aca: 246e fff8 moveal %fp@(-8),%a2
name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
52ace: 7002 moveq #2,%d0
return 0; return ENOENT; }
52ad0: 4e5e unlk %fp 52ad2: 4e75 rts 52ad4: 246e fff8 moveal %fp@(-8),%a2
name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
52ad8: 4280 clrl %d0
return 0; return ENOENT; }
52ada: 4e5e unlk %fp 52adc: 4e75 rts
... 0004b8a4 <_POSIX_Message_queue_Notify_handler>: */ void _POSIX_Message_queue_Notify_handler( void *user_data ) {
4b8a4: 4e56 0000 linkw %fp,#0 4b8a8: 2f0a movel %a2,%sp@- 4b8aa: 246e 0008 moveal %fp@(8),%a2 4b8ae: 2f02 movel %d2,%sp@-
POSIX_Message_queue_Control *the_mq; the_mq = user_data; kill( getpid(), the_mq->notification.sigev_signo );
4b8b0: 242a 0092 movel %a2@(146),%d2 4b8b4: 4eb9 0005 2328 jsr 52328 <getpid> 4b8ba: 2f02 movel %d2,%sp@- 4b8bc: 2f00 movel %d0,%sp@- 4b8be: 4eb9 0005 28d4 jsr 528d4 <kill>
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); }
4b8c4: 242e fff8 movel %fp@(-8),%d2
the_message_queue->notify_argument = the_argument;
4b8c8: 508f addql #8,%sp 4b8ca: 42aa 007e clrl %a2@(126)
CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler;
4b8ce: 42aa 007a clrl %a2@(122) 4b8d2: 246e fffc moveal %fp@(-4),%a2 4b8d6: 4e5e unlk %fp 4b8d8: 4e75 rts
... 0004bac4 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) {
4bac4: 4e56 ffe8 linkw %fp,#-24 4bac8: 48d7 041c moveml %d2-%d4/%a2,%sp@
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get(
4bacc: 486e fffc pea %fp@(-4) 4bad0: 242e 0008 movel %fp@(8),%d2 4bad4: 2f02 movel %d2,%sp@- 4bad6: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4badc: 246e 0014 moveal %fp@(20),%a2 4bae0: 262e 0018 movel %fp@(24),%d3 4bae4: 4eb9 0004 eed8 jsr 4eed8 <_Objects_Get>
Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) {
4baea: 4fef 000c lea %sp@(12),%sp 4baee: 2040 moveal %d0,%a0 4baf0: 4aae fffc tstl %fp@(-4) 4baf4: 671a beqs 4bb10 <_POSIX_Message_queue_Receive_support+0x4c>
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF );
4baf6: 4eb9 0005 6684 jsr 56684 <__errno> 4bafc: 72ff moveq #-1,%d1 4bafe: 2040 moveal %d0,%a0 4bb00: 7009 moveq #9,%d0
}
4bb02: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF );
4bb08: 2080 movel %d0,%a0@
}
4bb0a: 2001 movel %d1,%d0 4bb0c: 4e5e unlk %fp 4bb0e: 4e75 rts
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
4bb10: 2028 0014 movel %a0@(20),%d0 4bb14: 7203 moveq #3,%d1 4bb16: 7801 moveq #1,%d4 4bb18: c280 andl %d0,%d1 4bb1a: b881 cmpl %d1,%d4 4bb1c: 6700 00f2 beqw 4bc10 <_POSIX_Message_queue_Receive_support+0x14c>
_Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue;
4bb20: 2068 0010 moveal %a0@(16),%a0
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
4bb24: 222e 0010 movel %fp@(16),%d1 4bb28: b2a8 0066 cmpl %a0@(102),%d1 4bb2c: 6500 0098 bcsw 4bbc6 <_POSIX_Message_queue_Receive_support+0x102>
length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait )
4bb30: 4a03 tstb %d3 4bb32: 6756 beqs 4bb8a <_POSIX_Message_queue_Receive_support+0xc6> 4bb34: 720e moveq #14,%d1 4bb36: e2a8 lsrl %d1,%d0 4bb38: 7801 moveq #1,%d4 4bb3a: b980 eorl %d4,%d0
do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize(
4bb3c: 2f2e 001c movel %fp@(28),%sp@-
length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait )
4bb40: c084 andl %d4,%d0
do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize(
4bb42: 2f00 movel %d0,%sp@- 4bb44: 486e fff8 pea %fp@(-8)
/* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1;
4bb48: 70ff moveq #-1,%d0
do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize(
4bb4a: 2f2e 000c movel %fp@(12),%sp@- 4bb4e: 2f02 movel %d2,%sp@- 4bb50: 4868 001a pea %a0@(26)
/* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1;
4bb54: 2d40 fff8 movel %d0,%fp@(-8)
do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize(
4bb58: 4eb9 0004 de40 jsr 4de40 <_CORE_message_queue_Seize>
&length_out, do_wait, timeout ); _Thread_Enable_dispatch();
4bb5e: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch>
*msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
4bb64: 2079 0006 8b9a moveal 68b9a <_Thread_Executing>,%a0
do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio =
4bb6a: 24a8 0024 movel %a0@(36),%a2@ 4bb6e: 6d4e blts 4bbbe <_POSIX_Message_queue_Receive_support+0xfa>
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code )
4bb70: 4fef 0018 lea %sp@(24),%sp 4bb74: 4aa8 0034 tstl %a0@(52) 4bb78: 666c bnes 4bbe6 <_POSIX_Message_queue_Receive_support+0x122>
return length_out;
4bb7a: 222e fff8 movel %fp@(-8),%d1
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4bb7e: 2001 movel %d1,%d0 4bb80: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bb86: 4e5e unlk %fp 4bb88: 4e75 rts
do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize(
4bb8a: 2f2e 001c movel %fp@(28),%sp@- <== NOT EXECUTED
length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait )
4bb8e: 4280 clrl %d0 <== NOT EXECUTED
do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize(
4bb90: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bb92: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
/* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1;
4bb96: 70ff moveq #-1,%d0 <== NOT EXECUTED
do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize(
4bb98: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4bb9c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4bb9e: 4868 001a pea %a0@(26) <== NOT EXECUTED
/* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1;
4bba2: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize(
4bba6: 4eb9 0004 de40 jsr 4de40 <_CORE_message_queue_Seize> <== NOT EXECUTED
&length_out, do_wait, timeout ); _Thread_Enable_dispatch();
4bbac: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch> <== NOT EXECUTED
*msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
4bbb2: 2079 0006 8b9a moveal 68b9a <_Thread_Executing>,%a0 <== NOT EXECUTED
do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio =
4bbb8: 24a8 0024 movel %a0@(36),%a2@ <== NOT EXECUTED 4bbbc: 6cb2 bges 4bb70 <_POSIX_Message_queue_Receive_support+0xac><== NOT EXECUTED
4bbbe: 2212 movel %a2@,%d1 4bbc0: 4481 negl %d1 4bbc2: 2481 movel %d1,%a2@ 4bbc4: 60aa bras 4bb70 <_POSIX_Message_queue_Receive_support+0xac>
} the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch();
4bbc6: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
4bbcc: 747a moveq #122,%d2 4bbce: 4eb9 0005 6684 jsr 56684 <__errno> 4bbd4: 72ff moveq #-1,%d1 4bbd6: 2040 moveal %d0,%a0
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4bbd8: 2001 movel %d1,%d0
the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE );
4bbda: 2082 movel %d2,%a0@
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4bbdc: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bbe2: 4e5e unlk %fp 4bbe4: 4e75 rts
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one(
4bbe6: 4eb9 0005 6684 jsr 56684 <__errno> 4bbec: 2079 0006 8b9a moveal 68b9a <_Thread_Executing>,%a0 4bbf2: 2440 moveal %d0,%a2 4bbf4: 2f28 0034 movel %a0@(52),%sp@- 4bbf8: 4eb9 0004 bec4 jsr 4bec4 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4bbfe: 588f addql #4,%sp 4bc00: 72ff moveq #-1,%d1 4bc02: 2480 movel %d0,%a2@
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4bc04: 2001 movel %d1,%d0 4bc06: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bc0c: 4e5e unlk %fp 4bc0e: 4e75 rts
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch();
4bc10: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
4bc16: 7609 moveq #9,%d3 4bc18: 4eb9 0005 6684 jsr 56684 <__errno> 4bc1e: 72ff moveq #-1,%d1 4bc20: 2040 moveal %d0,%a0
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4bc22: 2001 movel %d1,%d0
switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF );
4bc24: 2083 movel %d3,%a0@
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4bc26: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4bc2c: 4e5e unlk %fp 4bc2e: 4e75 rts
0004bec4 <_POSIX_Message_queue_Translate_core_message_queue_return_code>: int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) {
4bec4: 41f9 0006 5bdc lea 65bdc <_POSIX_Message_queue_Return_codes>,%a0 4beca: 4e56 0000 linkw %fp,#0
#if defined(RTEMS_DEBUG) if ( the_message_queue_status > CORE_MESSAGE_QUEUE_STATUS_LAST ) return EINVAL; #endif return _POSIX_Message_queue_Return_codes[the_message_queue_status]; }
4bece: 202e 0008 movel %fp@(8),%d0 4bed2: 4e5e unlk %fp 4bed4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4bed8: 4e75 rts
... 00048004 <_POSIX_Mutex_Translate_core_mutex_return_code>: int _POSIX_Mutex_Translate_core_mutex_return_code( CORE_mutex_Status the_mutex_status ) {
48004: 41f9 0006 17a8 lea 617a8 <_POSIX_Mutex_Return_codes>,%a0 4800a: 4e56 0000 linkw %fp,#0
#if defined(RTEMS_DEBUG) if ( the_mutex_status > CORE_MUTEX_STATUS_LAST ) return EINVAL; #endif return _POSIX_Mutex_Return_codes[the_mutex_status]; }
4800e: 202e 0008 movel %fp@(8),%d0 48012: 4e5e unlk %fp 48014: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 48018: 4e75 rts
... 0004c5d8 <_POSIX_Priority_Is_valid>: #include <rtems/posix/priority.h> bool _POSIX_Priority_Is_valid( int priority ) {
4c5d8: 4e56 0000 linkw %fp,#0 4c5dc: 202e 0008 movel %fp@(8),%d0
return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) &&
4c5e0: 6f12 bles 4c5f4 <_POSIX_Priority_Is_valid+0x1c>
#endif #include <rtems/system.h> #include <rtems/posix/priority.h> bool _POSIX_Priority_Is_valid(
4c5e2: 4281 clrl %d1 4c5e4: 1239 0005 eb86 moveb 5eb86 <rtems_maximum_priority>,%d1
) { return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) && (priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY)); }
4c5ea: 4e5e unlk %fp
#endif #include <rtems/system.h> #include <rtems/posix/priority.h> bool _POSIX_Priority_Is_valid(
4c5ec: b280 cmpl %d0,%d1 4c5ee: 5ec0 sgt %d0 4c5f0: 4480 negl %d0
) { return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) && (priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY)); }
4c5f2: 4e75 rts 4c5f4: 4e5e unlk %fp
bool _POSIX_Priority_Is_valid( int priority ) { return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) &&
4c5f6: 4200 clrb %d0
(priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY)); }
4c5f8: 4e75 rts
... 0004ae4c <_POSIX_RWLock_Manager_initialization>: /** * @brief _POSIX_RWLock_Manager_initialization */ void _POSIX_RWLock_Manager_initialization(void) {
4ae4c: 4e56 0000 linkw %fp,#0
_Objects_Initialize_information(
4ae50: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 4ae54: 4878 0001 pea 1 <ADD> 4ae58: 4878 005c pea 5c <DBL_MANT_DIG+0x27> 4ae5c: 2f39 0005 dd6a movel 5dd6a <Configuration_POSIX_API+0x28>,%sp@- 4ae62: 4878 000b pea b <LASTO+0x1> 4ae66: 4878 0003 pea 3 <DIVIDE> 4ae6a: 4879 0005 f0b0 pea 5f0b0 <_POSIX_RWLock_Information> 4ae70: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4ae76: 4fef 001c lea %sp@(28),%sp
, false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
4ae7a: 4e5e unlk %fp 4ae7c: 4e75 rts
... 00046d34 <_POSIX_RWLock_Translate_core_RWLock_return_code>: int _POSIX_RWLock_Translate_core_RWLock_return_code( CORE_RWLock_Status the_rwlock_status ) {
46d34: 41f9 0005 f35a lea 5f35a <_POSIX_RWLock_Return_codes>,%a0 46d3a: 4e56 0000 linkw %fp,#0
#if defined(RTEMS_DEBUG) if ( the_rwlock_status > CORE_RWLOCK_STATUS_LAST ) return EINVAL; #endif return _POSIX_RWLock_Return_codes[the_rwlock_status]; }
46d3e: 202e 0008 movel %fp@(8),%d0 46d42: 4e5e unlk %fp 46d44: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 46d48: 4e75 rts
... 0004ef28 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) {
4ef28: 4e56 0000 linkw %fp,#0 4ef2c: 2f0a movel %a2,%sp@- 4ef2e: 2f02 movel %d2,%sp@- 4ef30: 242e 0008 movel %fp@(8),%d2
POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0)
4ef34: 4aae 000c tstl %fp@(12) 4ef38: 6600 0112 bnew 4f04c <_POSIX_Semaphore_Create_support+0x124>
rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) {
4ef3c: 4a82 tstl %d2 4ef3e: 6718 beqs 4ef58 <_POSIX_Semaphore_Create_support+0x30>
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
4ef40: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 4ef44: 2f02 movel %d2,%sp@- 4ef46: 4eb9 0005 40cc jsr 540cc <strnlen> 4ef4c: 508f addql #8,%sp 4ef4e: 0c80 0000 00fe cmpil #254,%d0 4ef54: 6200 00dc bhiw 4f032 <_POSIX_Semaphore_Create_support+0x10a> 4ef58: 2039 0006 3fa0 movel 63fa0 <_Thread_Dispatch_disable_level>,%d0 4ef5e: 5280 addql #1,%d0 4ef60: 23c0 0006 3fa0 movel %d0,63fa0 <_Thread_Dispatch_disable_level>
* _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *)
4ef66: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 4ef6c: 4eb9 0004 a6e8 jsr 4a6e8 <_Objects_Allocate>
_Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) {
4ef72: 588f addql #4,%sp 4ef74: 2440 moveal %d0,%a2 4ef76: 4a80 tstl %d0 4ef78: 6700 00ec beqw 4f066 <_POSIX_Semaphore_Create_support+0x13e>
_Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared;
4ef7c: 42aa 0010 clrl %a2@(16)
if ( name ) {
4ef80: 4a82 tstl %d2 4ef82: 675c beqs 4efe0 <_POSIX_Semaphore_Create_support+0xb8>
the_semaphore->named = true; the_semaphore->open_count = 1;
4ef84: 7001 moveq #1,%d0 4ef86: 2540 0016 movel %d0,%a2@(22)
} the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = true;
4ef8a: 1540 0014 moveb %d0,%a2@(20)
the_semaphore->open_count = 1; the_semaphore->linked = true;
4ef8e: 1540 0015 moveb %d0,%a2@(21)
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF;
4ef92: 70ff moveq #-1,%d0
* blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
4ef94: 42aa 005e clrl %a2@(94)
/* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF;
4ef98: 2540 005a movel %d0,%a2@(90)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
4ef9c: 2f2e 0010 movel %fp@(16),%sp@- 4efa0: 486a 005a pea %a2@(90) 4efa4: 486a 001a pea %a2@(26) 4efa8: 4eb9 0004 a17c jsr 4a17c <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
4efae: 2079 0006 4212 moveal 64212 <_POSIX_Semaphore_Information+0x18>,%a0 4efb4: 4280 clrl %d0 4efb6: 302a 000a movew %a2@(10),%d0 4efba: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4)
the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name;
4efbe: 2542 000c movel %d2,%a2@(12)
&_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore;
4efc2: 206e 0014 moveal %fp@(20),%a0 4efc6: 208a movel %a2,%a0@
_Thread_Enable_dispatch();
4efc8: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch>
return 0;
4efce: 4fef 000c lea %sp@(12),%sp
name_p ); *the_sem = the_semaphore; _Thread_Enable_dispatch();
4efd2: 4280 clrl %d0
return 0; }
4efd4: 242e fff8 movel %fp@(-8),%d2 4efd8: 246e fffc moveal %fp@(-4),%a2 4efdc: 4e5e unlk %fp 4efde: 4e75 rts
the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; the_semaphore->open_count = 0;
4efe0: 42aa 0016 clrl %a2@(22)
if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false;
4efe4: 4200 clrb %d0
* blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
4efe6: 42aa 005e clrl %a2@(94)
if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false;
4efea: 1540 0014 moveb %d0,%a2@(20)
the_semaphore->open_count = 0; the_semaphore->linked = false;
4efee: 1540 0015 moveb %d0,%a2@(21)
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF;
4eff2: 70ff moveq #-1,%d0 4eff4: 2540 005a movel %d0,%a2@(90)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
4eff8: 2f2e 0010 movel %fp@(16),%sp@- 4effc: 486a 005a pea %a2@(90) 4f000: 486a 001a pea %a2@(26) 4f004: 4eb9 0004 a17c jsr 4a17c <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
4f00a: 2079 0006 4212 moveal 64212 <_POSIX_Semaphore_Information+0x18>,%a0 4f010: 4280 clrl %d0 4f012: 302a 000a movew %a2@(10),%d0 4f016: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4)
the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name;
4f01a: 2542 000c movel %d2,%a2@(12)
&_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore;
4f01e: 206e 0014 moveal %fp@(20),%a0 4f022: 208a movel %a2,%a0@
_Thread_Enable_dispatch();
4f024: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch>
return 0;
4f02a: 4fef 000c lea %sp@(12),%sp
name_p ); *the_sem = the_semaphore; _Thread_Enable_dispatch();
4f02e: 4280 clrl %d0 4f030: 60a2 bras 4efd4 <_POSIX_Semaphore_Create_support+0xac>
if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
4f032: 4eb9 0005 2bbc jsr 52bbc <__errno> 4f038: 745b moveq #91,%d2 4f03a: 2040 moveal %d0,%a0 4f03c: 70ff moveq #-1,%d0 4f03e: 2082 movel %d2,%a0@
*the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; }
4f040: 242e fff8 movel %fp@(-8),%d2 4f044: 246e fffc moveal %fp@(-4),%a2 4f048: 4e5e unlk %fp 4f04a: 4e75 rts
CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS );
4f04c: 4eb9 0005 2bbc jsr 52bbc <__errno>
*the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; }
4f052: 242e fff8 movel %fp@(-8),%d2
CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS );
4f056: 2040 moveal %d0,%a0 4f058: 7258 moveq #88,%d1 4f05a: 70ff moveq #-1,%d0
*the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; }
4f05c: 246e fffc moveal %fp@(-4),%a2 4f060: 4e5e unlk %fp
CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS );
4f062: 2081 movel %d1,%a0@
*the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; }
4f064: 4e75 rts
_Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch();
4f066: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
4f06c: 4eb9 0005 2bbc jsr 52bbc <__errno>
*the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; }
4f072: 242e fff8 movel %fp@(-8),%d2
the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC );
4f076: 2040 moveal %d0,%a0 4f078: 721c moveq #28,%d1 4f07a: 70ff moveq #-1,%d0
*the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; }
4f07c: 246e fffc moveal %fp@(-4),%a2 4f080: 4e5e unlk %fp
the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC );
4f082: 2081 movel %d1,%a0@
*the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; }
4f084: 4e75 rts
... 0004f088 <_POSIX_Semaphore_Delete>: */ void _POSIX_Semaphore_Delete( POSIX_Semaphore_Control *the_semaphore ) {
4f088: 4e56 0000 linkw %fp,#0 4f08c: 2f0a movel %a2,%sp@- 4f08e: 246e 0008 moveal %fp@(8),%a2
if ( !the_semaphore->linked && !the_semaphore->open_count ) {
4f092: 4a2a 0015 tstb %a2@(21) 4f096: 6606 bnes 4f09e <_POSIX_Semaphore_Delete+0x16> 4f098: 4aaa 0016 tstl %a2@(22) 4f09c: 6708 beqs 4f0a6 <_POSIX_Semaphore_Delete+0x1e>
-1 ); _POSIX_Semaphore_Free( the_semaphore ); } }
4f09e: 246e fffc moveal %fp@(-4),%a2 4f0a2: 4e5e unlk %fp 4f0a4: 4e75 rts
void _POSIX_Semaphore_Delete( POSIX_Semaphore_Control *the_semaphore ) { if ( !the_semaphore->linked && !the_semaphore->open_count ) { _Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object );
4f0a6: 2f0a movel %a2,%sp@- 4f0a8: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 4f0ae: 4eb9 0004 a778 jsr 4a778 <_Objects_Close>
_CORE_semaphore_Flush(
4f0b4: 4878 ffff pea ffffffff <LESS> 4f0b8: 42a7 clrl %sp@- 4f0ba: 486a 001a pea %a2@(26) 4f0be: 4eb9 0004 a170 jsr 4a170 <_CORE_semaphore_Flush>
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
4f0c4: 2f0a movel %a2,%sp@- 4f0c6: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 4f0cc: 4eb9 0004 aa20 jsr 4aa20 <_Objects_Free>
-1 ); _POSIX_Semaphore_Free( the_semaphore ); } }
4f0d2: 246e fffc moveal %fp@(-4),%a2 4f0d6: 4fef 001c lea %sp@(28),%sp 4f0da: 4e5e unlk %fp 4f0dc: 4e75 rts
... 0004b440 <_POSIX_Semaphore_Manager_initialization>: * * Output parameters: NONE */ void _POSIX_Semaphore_Manager_initialization(void) {
4b440: 4e56 0000 linkw %fp,#0
_Objects_Initialize_information(
4b444: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 4b448: 4878 0001 pea 1 <ADD> 4b44c: 4878 0066 pea 66 <DBL_MANT_DIG+0x31> 4b450: 2f39 0005 dd62 movel 5dd62 <Configuration_POSIX_API+0x20>,%sp@- 4b456: 4878 0007 pea 7 <TRUNCDFSF> 4b45a: 4878 0003 pea 3 <DIVIDE> 4b45e: 4879 0005 f15e pea 5f15e <_POSIX_Semaphore_Information> 4b464: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4b46a: 4fef 001c lea %sp@(28),%sp
, false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
4b46e: 4e5e unlk %fp 4b470: 4e75 rts
... 000518c8 <_POSIX_Semaphore_Translate_core_semaphore_return_code>: int _POSIX_Semaphore_Translate_core_semaphore_return_code( CORE_semaphore_Status the_semaphore_status ) {
518c8: 41f9 0006 1b32 lea 61b32 <_POSIX_Semaphore_Return_codes>,%a0 518ce: 4e56 0000 linkw %fp,#0
#if defined(RTEMS_DEBUG) if ( the_semaphore_status > CORE_SEMAPHORE_STATUS_LAST ) return EINVAL; #endif return _POSIX_Semaphore_Return_codes[the_semaphore_status]; }
518d2: 202e 0008 movel %fp@(8),%d0 518d6: 4e5e unlk %fp 518d8: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 518dc: 4e75 rts
... 0004f158 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) {
4f158: 4e56 fffc linkw %fp,#-4 4f15c: 2f0a movel %a2,%sp@- 4f15e: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *)
4f160: 486e fffc pea %fp@(-4) 4f164: 206e 0008 moveal %fp@(8),%a0 4f168: 2f10 movel %a0@,%sp@- 4f16a: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 4f170: 142e 000f moveb %fp@(15),%d2 4f174: 4eb9 0004 ab84 jsr 4ab84 <_Objects_Get>
POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) {
4f17a: 4fef 000c lea %sp@(12),%sp 4f17e: 4aae fffc tstl %fp@(-4) 4f182: 671c beqs 4f1a0 <_POSIX_Semaphore_Wait_support+0x48>
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL );
4f184: 4eb9 0005 2bbc jsr 52bbc <__errno>
}
4f18a: 242e fff4 movel %fp@(-12),%d2
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL );
4f18e: 2040 moveal %d0,%a0 4f190: 7016 moveq #22,%d0 4f192: 72ff moveq #-1,%d1
}
4f194: 246e fff8 moveal %fp@(-8),%a2 4f198: 4e5e unlk %fp
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL );
4f19a: 2080 movel %d0,%a0@
}
4f19c: 2001 movel %d1,%d0 4f19e: 4e75 rts
the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize(
4f1a0: 2f2e 0010 movel %fp@(16),%sp@- 4f1a4: 2040 moveal %d0,%a0 4f1a6: 0282 0000 00ff andil #255,%d2 4f1ac: 2f02 movel %d2,%sp@- 4f1ae: 2f28 0008 movel %a0@(8),%sp@- 4f1b2: 4868 001a pea %a0@(26) 4f1b6: 4eb9 0004 f8b8 jsr 4f8b8 <_CORE_semaphore_Seize>
&the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch();
4f1bc: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch>
if ( !_Thread_Executing->Wait.return_code )
4f1c2: 2079 0006 405a moveal 6405a <_Thread_Executing>,%a0 4f1c8: 4fef 0010 lea %sp@(16),%sp 4f1cc: 4aa8 0034 tstl %a0@(52) 4f1d0: 6610 bnes 4f1e2 <_POSIX_Semaphore_Wait_support+0x8a>
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
4f1d2: 242e fff4 movel %fp@(-12),%d2
blocking, timeout ); _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code )
4f1d6: 4281 clrl %d1
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
4f1d8: 2001 movel %d1,%d0 4f1da: 246e fff8 moveal %fp@(-8),%a2 4f1de: 4e5e unlk %fp 4f1e0: 4e75 rts
_Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one(
4f1e2: 4eb9 0005 2bbc jsr 52bbc <__errno> 4f1e8: 2079 0006 405a moveal 6405a <_Thread_Executing>,%a0 4f1ee: 2440 moveal %d0,%a2 4f1f0: 2f28 0034 movel %a0@(52),%sp@- 4f1f4: 4eb9 0005 18c8 jsr 518c8 <_POSIX_Semaphore_Translate_core_semaphore_return_code>
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
4f1fa: 242e fff4 movel %fp@(-12),%d2
_Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one(
4f1fe: 588f addql #4,%sp 4f200: 72ff moveq #-1,%d1 4f202: 2480 movel %d0,%a2@
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
4f204: 246e fff8 moveal %fp@(-8),%a2 4f208: 2001 movel %d1,%d0 4f20a: 4e5e unlk %fp 4f20c: 4e75 rts
... 0004b058 <_POSIX_Spinlock_Manager_initialization>: /** * @brief _POSIX_Spinlock_Manager_initialization */ void _POSIX_Spinlock_Manager_initialization(void) {
4b058: 4e56 0000 linkw %fp,#0
_Objects_Initialize_information(
4b05c: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 4b060: 4878 0001 pea 1 <ADD> 4b064: 4878 0020 pea 20 <OPER2+0xc> 4b068: 2f39 0005 dd6e movel 5dd6e <Configuration_POSIX_API+0x2c>,%sp@- 4b06e: 4878 000b pea b <LASTO+0x1> 4b072: 4878 0003 pea 3 <DIVIDE> 4b076: 4879 0005 f124 pea 5f124 <_POSIX_Spinlock_Information> 4b07c: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4b082: 4fef 001c lea %sp@(28),%sp
, false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
4b086: 4e5e unlk %fp 4b088: 4e75 rts
... 00045fd0 <_POSIX_Spinlock_Translate_core_spinlock_return_code>: int _POSIX_Spinlock_Translate_core_spinlock_return_code( CORE_spinlock_Status the_spinlock_status ) {
45fd0: 41f9 0005 d796 lea 5d796 <_POSIX_Spinlock_Return_codes>,%a0 45fd6: 4e56 0000 linkw %fp,#0
#if defined(RTEMS_DEBUG) if ( the_spinlock_status > CORE_SPINLOCK_STATUS_LAST ) return EINVAL; #endif return _POSIX_Spinlock_Return_codes[the_spinlock_status]; }
45fda: 202e 0008 movel %fp@(8),%d0 45fde: 4e5e unlk %fp 45fe0: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 45fe4: 4e75 rts
... 0004c5fc <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) {
4c5fc: 4e56 ffe8 linkw %fp,#-24 4c600: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4c604: 246e 000c moveal %fp@(12),%a2
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4c608: 47f9 0004 c5d8 lea 4c5d8 <_POSIX_Priority_Is_valid>,%a3 4c60e: 2f12 movel %a2@,%sp@-
int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) {
4c610: 242e 0008 movel %fp@(8),%d2 4c614: 286e 0010 moveal %fp@(16),%a4 4c618: 2a6e 0014 moveal %fp@(20),%a5
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4c61c: 4e93 jsr %a3@ 4c61e: 588f addql #4,%sp 4c620: 4a00 tstb %d0 4c622: 671e beqs 4c642 <_POSIX_Thread_Translate_sched_param+0x46>
return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4c624: 4294 clrl %a4@
*budget_callout = NULL;
4c626: 4295 clrl %a5@
if ( policy == SCHED_OTHER ) {
4c628: 4a82 tstl %d2 4c62a: 6722 beqs 4c64e <_POSIX_Thread_Translate_sched_param+0x52>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) {
4c62c: 7001 moveq #1,%d0 4c62e: b082 cmpl %d2,%d0 4c630: 6700 0084 beqw 4c6b6 <_POSIX_Thread_Translate_sched_param+0xba>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) {
4c634: 7002 moveq #2,%d0 4c636: b082 cmpl %d2,%d0 4c638: 6700 008a beqw 4c6c4 <_POSIX_Thread_Translate_sched_param+0xc8>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) {
4c63c: 7004 moveq #4,%d0 4c63e: b082 cmpl %d2,%d0 4c640: 671c beqs 4c65e <_POSIX_Thread_Translate_sched_param+0x62>
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0;
4c642: 7016 moveq #22,%d0
} return EINVAL; }
4c644: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c64a: 4e5e unlk %fp 4c64c: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4c64e: 7201 moveq #1,%d1 4c650: 4280 clrl %d0 4c652: 2881 movel %d1,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; }
4c654: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c65a: 4e5e unlk %fp 4c65c: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) &&
4c65e: 4aaa 0008 tstl %a2@(8) 4c662: 6606 bnes 4c66a <_POSIX_Thread_Translate_sched_param+0x6e>
(param->sched_ss_repl_period.tv_nsec == 0) )
4c664: 4aaa 000c tstl %a2@(12) 4c668: 67d8 beqs 4c642 <_POSIX_Thread_Translate_sched_param+0x46>
return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) &&
4c66a: 4aaa 0010 tstl %a2@(16) 4c66e: 6606 bnes 4c676 <_POSIX_Thread_Translate_sched_param+0x7a>
(param->sched_ss_init_budget.tv_nsec == 0) )
4c670: 4aaa 0014 tstl %a2@(20) 4c674: 67cc beqs 4c642 <_POSIX_Thread_Translate_sched_param+0x46>
return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4c676: 486a 0008 pea %a2@(8) 4c67a: 243c 0004 a054 movel #303188,%d2 4c680: 2042 moveal %d2,%a0 4c682: 4e90 jsr %a0@ 4c684: 486a 0010 pea %a2@(16) 4c688: 2600 movel %d0,%d3 4c68a: 2042 moveal %d2,%a0 4c68c: 4e90 jsr %a0@ 4c68e: 508f addql #8,%sp 4c690: b083 cmpl %d3,%d0 4c692: 62ae bhis 4c642 <_POSIX_Thread_Translate_sched_param+0x46>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
4c694: 2f2a 0004 movel %a2@(4),%sp@- 4c698: 4e93 jsr %a3@ 4c69a: 588f addql #4,%sp 4c69c: 4a00 tstb %d0 4c69e: 67a2 beqs 4c642 <_POSIX_Thread_Translate_sched_param+0x46>
return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
4c6a0: 7003 moveq #3,%d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
4c6a2: 2abc 0004 6678 movel #288376,%a5@
return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
4c6a8: 2880 movel %d0,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
4c6aa: 4280 clrl %d0
return 0; } return EINVAL; }
4c6ac: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c6b2: 4e5e unlk %fp 4c6b4: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4c6b6: 4294 clrl %a4@ 4c6b8: 4200 clrb %d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; }
4c6ba: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c6c0: 4e5e unlk %fp 4c6c2: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
4c6c4: 2880 movel %d0,%a4@ 4c6c6: 4200 clrb %d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; }
4c6c8: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c6ce: 4e5e unlk %fp 4c6d0: 4e75 rts
... 0004b31c <_POSIX_Threads_Sporadic_budget_callout>: RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
4b31c: 4280 clrl %d0
/* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
4b31e: 72ff moveq #-1,%d1
* _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) {
4b320: 4e56 0000 linkw %fp,#0 4b324: 206e 0008 moveal %fp@(8),%a0 4b328: 1039 0005 d752 moveb 5d752 <rtems_maximum_priority>,%d0
POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4b32e: 2268 010e moveal %a0@(270),%a1 4b332: 90a9 0088 subl %a1@(136),%d0
/* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
4b336: 2141 0076 movel %d1,%a0@(118)
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority;
4b33a: 2140 0018 movel %d0,%a0@(24)
*/ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) {
4b33e: 4aa8 001c tstl %a0@(28) 4b342: 6606 bnes 4b34a <_POSIX_Threads_Sporadic_budget_callout+0x2e>
/* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) {
4b344: b0a8 0014 cmpl %a0@(20),%d0 4b348: 6204 bhis 4b34e <_POSIX_Threads_Sporadic_budget_callout+0x32>
#if 0 printk( "lower priority\n" ); #endif } } }
4b34a: 4e5e unlk %fp <== NOT EXECUTED 4b34c: 4e75 rts <== NOT EXECUTED
* Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true );
4b34e: 4878 0001 pea 1 <ADD> 4b352: 2f00 movel %d0,%sp@- 4b354: 2f08 movel %a0,%sp@- 4b356: 4eb9 0004 789c jsr 4789c <_Thread_Change_priority> 4b35c: 4fef 000c lea %sp@(12),%sp
#if 0 printk( "lower priority\n" ); #endif } } }
4b360: 4e5e unlk %fp 4b362: 4e75 rts
0004d550 <_POSIX_Threads_cancel_run>: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
4d550: 7001 moveq #1,%d0
#include <rtems/posix/threadsup.h> void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) {
4d552: 4e56 ffec linkw %fp,#-20 4d556: 206e 0008 moveal %fp@(8),%a0 4d55a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
4d55e: 2668 010e moveal %a0@(270),%a3
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4d562: 45eb 00e4 lea %a3@(228),%a2
handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
4d566: 2740 00d4 movel %d0,%a3@(212)
POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers;
4d56a: b5eb 00e0 cmpal %a3@(224),%a2 4d56e: 673c beqs 4d5ac <_POSIX_Threads_cancel_run+0x5c> 4d570: 49f9 0004 9200 lea 49200 <_Workspace_Free>,%a4
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level );
4d576: 243c 0000 0700 movel #1792,%d2 4d57c: 2002 movel %d2,%d0 4d57e: 40c1 movew %sr,%d1 4d580: 8081 orl %d1,%d0 4d582: 46c0 movew %d0,%sr
handler = (POSIX_Cancel_Handler_control *)
4d584: 2a6a 0004 moveal %a2@(4),%a5
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
4d588: 2055 moveal %a5@,%a0
previous = the_node->previous;
4d58a: 226d 0004 moveal %a5@(4),%a1
next->previous = previous; previous->next = next;
4d58e: 2288 movel %a0,%a1@
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
4d590: 2149 0004 movel %a1,%a0@(4)
_Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level );
4d594: 46c1 movew %d1,%sr
(*handler->routine)( handler->arg );
4d596: 2f2d 000c movel %a5@(12),%sp@- 4d59a: 206d 0008 moveal %a5@(8),%a0 4d59e: 4e90 jsr %a0@
_Workspace_Free( handler );
4d5a0: 2f0d movel %a5,%sp@- 4d5a2: 4e94 jsr %a4@
POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers;
4d5a4: 508f addql #8,%sp 4d5a6: b5eb 00e0 cmpal %a3@(224),%a2 4d5aa: 66d0 bnes 4d57c <_POSIX_Threads_cancel_run+0x2c>
(*handler->routine)( handler->arg ); _Workspace_Free( handler ); } }
4d5ac: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d5b2: 4e5e unlk %fp 4d5b4: 4e75 rts
... 0004b40c <_POSIX_Timer_Manager_initialization>: * Initialize the internal structure in which the data of all * the timers are stored */ void _POSIX_Timer_Manager_initialization(void) {
4b40c: 4e56 0000 linkw %fp,#0
_Objects_Initialize_information(
4b410: 4878 00ff pea ff <DBL_MANT_DIG+0xca> 4b414: 4878 0001 pea 1 <ADD> 4b418: 4878 0072 pea 72 <DBL_MANT_DIG+0x3d> 4b41c: 2f39 0005 dd52 movel 5dd52 <Configuration_POSIX_API+0x10>,%sp@- 4b422: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> 4b426: 4878 0003 pea 3 <DIVIDE> 4b42a: 4879 0005 f198 pea 5f198 <_POSIX_Timer_Information> 4b430: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information> 4b436: 4fef 001c lea %sp@(28),%sp
, false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
4b43a: 4e5e unlk %fp 4b43c: 4e75 rts
... 00045cc0 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) {
45cc0: 4e56 0000 linkw %fp,#0 45cc4: 2f0a movel %a2,%sp@- 45cc6: 246e 000c moveal %fp@(12),%a2
bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1;
45cca: 52aa 0066 addql #1,%a2@(102)
/* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
45cce: 4aaa 0052 tstl %a2@(82) 45cd2: 6606 bnes 45cda <_POSIX_Timer_TSR+0x1a>
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
45cd4: 4aaa 0056 tstl %a2@(86) 45cd8: 672a beqs 45d04 <_POSIX_Timer_TSR+0x44>
activated = _POSIX_Timer_Insert_helper(
45cda: 2f0a movel %a2,%sp@- 45cdc: 4879 0004 5cc0 pea 45cc0 <_POSIX_Timer_TSR> 45ce2: 2f2a 0008 movel %a2@(8),%sp@- 45ce6: 2f2a 0062 movel %a2@(98),%sp@- 45cea: 486a 0010 pea %a2@(16) 45cee: 4eb9 0004 bedc jsr 4bedc <_POSIX_Timer_Insert_helper>
ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated )
45cf4: 4fef 0014 lea %sp@(20),%sp 45cf8: 4a00 tstb %d0 45cfa: 662a bnes 45d26 <_POSIX_Timer_TSR+0x66>
/* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; }
45cfc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 45d00: 4e5e unlk %fp <== NOT EXECUTED 45d02: 4e75 rts <== NOT EXECUTED
/* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
45d04: 7004 moveq #4,%d0 <== NOT EXECUTED 45d06: 1540 003c moveb %d0,%a2@(60) <== NOT EXECUTED
/* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
45d0a: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 45d0e: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 45d12: 4eb9 0004 b9f0 jsr 4b9f0 <pthread_kill> <== NOT EXECUTED
} /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0;
45d18: 508f addql #8,%sp <== NOT EXECUTED 45d1a: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED
}
45d1e: 246e fffc moveal %fp@(-4),%a2 45d22: 4e5e unlk %fp 45d24: 4e75 rts
); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time );
45d26: 486a 006a pea %a2@(106) 45d2a: 4eb9 0004 7470 jsr 47470 <_TOD_Get>
/* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
45d30: 588f addql #4,%sp
/* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
45d32: 7003 moveq #3,%d0 45d34: 1540 003c moveb %d0,%a2@(60)
/* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
45d38: 2f2a 0042 movel %a2@(66),%sp@- 45d3c: 2f2a 0038 movel %a2@(56),%sp@- 45d40: 4eb9 0004 b9f0 jsr 4b9f0 <pthread_kill>
} /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0;
45d46: 508f addql #8,%sp 45d48: 42aa 0066 clrl %a2@(102) 45d4c: 60d0 bras 45d1e <_POSIX_Timer_TSR+0x5e>
... 0004d65c <_POSIX_signals_Check_signal>: ) { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4d65c: 4280 clrl %d0
bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) {
4d65e: 4e56 ffdc linkw %fp,#-36 4d662: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4d666: 4878 0001 pea 1 <ADD> 4d66a: 102e 0013 moveb %fp@(19),%d0 4d66e: 260e movel %fp,%d3 4d670: 0683 ffff fff4 addil #-12,%d3
bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) {
4d676: 242e 000c movel %fp@(12),%d2
siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4d67a: 2f00 movel %d0,%sp@-
bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) {
4d67c: 246e 0008 moveal %fp@(8),%a2
siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4d680: 2f03 movel %d3,%sp@- 4d682: 2f02 movel %d2,%sp@- 4d684: 2f0a movel %a2,%sp@- 4d686: 4eb9 0004 d708 jsr 4d708 <_POSIX_signals_Clear_signals> 4d68c: 4fef 0014 lea %sp@(20),%sp 4d690: 4a00 tstb %d0 4d692: 6766 beqs 4d6fa <_POSIX_signals_Check_signal+0x9e>
#endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
4d694: 2202 movel %d2,%d1 4d696: 2002 movel %d2,%d0 4d698: 43f9 0005 f3b2 lea 5f3b2 <_POSIX_signals_Vectors>,%a1 4d69e: e589 lsll #2,%d1 4d6a0: e988 lsll #4,%d0 4d6a2: 9081 subl %d1,%d0 4d6a4: 2040 moveal %d0,%a0 4d6a6: d1fc 0005 f3ba addal #390074,%a0 4d6ac: 7201 moveq #1,%d1 4d6ae: 2050 moveal %a0@,%a0 4d6b0: b288 cmpl %a0,%d1 4d6b2: 6746 beqs 4d6fa <_POSIX_signals_Check_signal+0x9e>
/* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4d6b4: 2842 moveal %d2,%a4 4d6b6: 47f4 2a01 lea %a4@(00000001,%d2:l:2),%a3
return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked;
4d6ba: 282a 00cc movel %a2@(204),%d4
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4d6be: 2231 bc00 movel %a1@(00000000,%a3:l:4),%d1 4d6c2: 8284 orl %d4,%d1 4d6c4: 2541 00cc movel %d1,%a2@(204)
/* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
4d6c8: 7202 moveq #2,%d1 4d6ca: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1 4d6ce: 6716 beqs 4d6e6 <_POSIX_signals_Check_signal+0x8a>
&siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
4d6d0: 2f02 movel %d2,%sp@- 4d6d2: 4e90 jsr %a0@ 4d6d4: 588f addql #4,%sp
} /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked;
4d6d6: 7001 moveq #1,%d0 4d6d8: 2544 00cc movel %d4,%a2@(204)
return true; }
4d6dc: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 4d6e2: 4e5e unlk %fp 4d6e4: 4e75 rts
/* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
4d6e6: 42a7 clrl %sp@- 4d6e8: 2f03 movel %d3,%sp@- 4d6ea: 2f02 movel %d2,%sp@- 4d6ec: 4e90 jsr %a0@
signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break;
4d6ee: 4fef 000c lea %sp@(12),%sp
} /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked;
4d6f2: 2544 00cc movel %d4,%a2@(204) 4d6f6: 7001 moveq #1,%d0 4d6f8: 60e2 bras 4d6dc <_POSIX_signals_Check_signal+0x80>
return true; }
4d6fa: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4
/* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true;
4d700: 4200 clrb %d0
}
4d702: 4e5e unlk %fp 4d704: 4e75 rts
... 0004e874 <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level );
4e874: 203c 0000 0700 movel #1792,%d0
*/ void _POSIX_signals_Clear_process_signals( int signo ) {
4e87a: 4e56 0000 linkw %fp,#0 4e87e: 222e 0008 movel %fp@(8),%d1 4e882: 2f03 movel %d3,%sp@- 4e884: 2f02 movel %d2,%sp@-
clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level );
4e886: 40c2 movew %sr,%d2 4e888: 8082 orl %d2,%d0 4e88a: 46c0 movew %d0,%sr
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
4e88c: 2601 movel %d1,%d3 4e88e: 2001 movel %d1,%d0 4e890: 41f9 0005 f3b2 lea 5f3b2 <_POSIX_signals_Vectors>,%a0 4e896: e58b lsll #2,%d3 4e898: e988 lsll #4,%d0 4e89a: 9083 subl %d3,%d0 4e89c: 7602 moveq #2,%d3 4e89e: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4e8a2: 6726 beqs 4e8ca <_POSIX_signals_Clear_process_signals+0x56>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask;
4e8a4: 5381 subql #1,%d1 4e8a6: 7001 moveq #1,%d0 4e8a8: e3a8 lsll %d1,%d0 4e8aa: 4680 notl %d0 4e8ac: c0b9 0005 f5a6 andl 5f5a6 <_POSIX_signals_Pending>,%d0 4e8b2: 23c0 0005 f5a6 movel %d0,5f5a6 <_POSIX_signals_Pending>
if ( !_POSIX_signals_Pending )
4e8b8: 6606 bnes 4e8c0 <_POSIX_signals_Clear_process_signals+0x4c>
_Thread_Do_post_task_switch_extension--;
4e8ba: 53b9 0005 efa6 subql #1,5efa6 <_Thread_Do_post_task_switch_extension>
} _ISR_Enable( level );
4e8c0: 46c2 movew %d2,%sr
}
4e8c2: 241f movel %sp@+,%d2 4e8c4: 261f movel %sp@+,%d3 4e8c6: 4e5e unlk %fp 4e8c8: 4e75 rts
ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
4e8ca: 0680 0005 f5aa addil #390570,%d0
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4e8d0: 2040 moveal %d0,%a0 4e8d2: 5888 addql #4,%a0 4e8d4: 2240 moveal %d0,%a1 4e8d6: b1d1 cmpal %a1@,%a0 4e8d8: 67ca beqs 4e8a4 <_POSIX_signals_Clear_process_signals+0x30>
if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level );
4e8da: 46c2 movew %d2,%sr <== NOT EXECUTED
}
4e8dc: 241f movel %sp@+,%d2 <== NOT EXECUTED 4e8de: 261f movel %sp@+,%d3 <== NOT EXECUTED 4e8e0: 4e5e unlk %fp <== NOT EXECUTED
4e8e2: 4e75 rts
0004d708 <_POSIX_signals_Clear_signals>: static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1);
4d708: 7001 moveq #1,%d0
int signo, siginfo_t *info, bool is_global, bool check_blocked ) {
4d70a: 4e56 ffe8 linkw %fp,#-24 4d70e: 206e 0008 moveal %fp@(8),%a0 4d712: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4d716: 242e 000c movel %fp@(12),%d2 4d71a: 2202 movel %d2,%d1 4d71c: 5381 subql #1,%d1 4d71e: 1a2e 0017 moveb %fp@(23),%d5 4d722: e3a8 lsll %d1,%d0
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked )
4d724: 4a2e 001b tstb %fp@(27) 4d728: 664e bnes 4d778 <_POSIX_signals_Clear_signals+0x70> 4d72a: 78ff moveq #-1,%d4
signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level );
4d72c: 223c 0000 0700 movel #1792,%d1 4d732: 40c3 movew %sr,%d3 4d734: 8283 orl %d3,%d1 4d736: 46c1 movew %d1,%sr
if ( is_global ) {
4d738: 4a05 tstb %d5 4d73a: 6752 beqs 4d78e <_POSIX_signals_Clear_signals+0x86>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
4d73c: c0b9 0005 f5a6 andl 5f5a6 <_POSIX_signals_Pending>,%d0 4d742: c084 andl %d4,%d0 4d744: 676a beqs 4d7b0 <_POSIX_signals_Clear_signals+0xa8>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
4d746: 2202 movel %d2,%d1 4d748: 2002 movel %d2,%d0 4d74a: 47f9 0004 e874 lea 4e874 <_POSIX_signals_Clear_process_signals>,%a3 4d750: 41f9 0005 f3b2 lea 5f3b2 <_POSIX_signals_Vectors>,%a0 4d756: e589 lsll #2,%d1 4d758: e988 lsll #4,%d0 4d75a: 9081 subl %d1,%d0 4d75c: 7202 moveq #2,%d1 4d75e: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1 4d762: 675a beqs 4d7be <_POSIX_signals_Clear_signals+0xb6>
&psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo );
4d764: 2f02 movel %d2,%sp@- 4d766: 4e93 jsr %a3@ 4d768: 588f addql #4,%sp 4d76a: 7001 moveq #1,%d0
if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level );
4d76c: 46c3 movew %d3,%sr
return do_callout; }
4d76e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d774: 4e5e unlk %fp 4d776: 4e75 rts
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked;
4d778: 2828 00cc movel %a0@(204),%d4
signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level );
4d77c: 223c 0000 0700 movel #1792,%d1
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked;
4d782: 4684 notl %d4
signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level );
4d784: 40c3 movew %sr,%d3 4d786: 8283 orl %d3,%d1 4d788: 46c1 movew %d1,%sr
if ( is_global ) {
4d78a: 4a05 tstb %d5 4d78c: 66ae bnes 4d73c <_POSIX_signals_Clear_signals+0x34>
} _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) {
4d78e: 2428 00d0 movel %a0@(208),%d2 4d792: 2200 movel %d0,%d1 4d794: c282 andl %d2,%d1 4d796: c284 andl %d4,%d1 4d798: 6716 beqs 4d7b0 <_POSIX_signals_Clear_signals+0xa8>
api->signals_pending &= ~mask;
4d79a: 4680 notl %d0 4d79c: c082 andl %d2,%d0 4d79e: 2140 00d0 movel %d0,%a0@(208) 4d7a2: 7001 moveq #1,%d0
do_callout = true; } } _ISR_Enable( level );
4d7a4: 46c3 movew %d3,%sr
return do_callout; }
4d7a6: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d7ac: 4e5e unlk %fp 4d7ae: 4e75 rts
_POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask;
4d7b0: 4200 clrb %d0
do_callout = true; } } _ISR_Enable( level );
4d7b2: 46c3 movew %d3,%sr
return do_callout; }
4d7b4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d7ba: 4e5e unlk %fp 4d7bc: 4e75 rts
_ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *)
4d7be: 0680 0005 f5aa addil #390570,%d0
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
4d7c4: 2040 moveal %d0,%a0 4d7c6: 2458 moveal %a0@+,%a2
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4d7c8: b1ca cmpal %a2,%a0 4d7ca: 6744 beqs 4d810 <_POSIX_signals_Clear_signals+0x108>
{ Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
4d7cc: 2052 moveal %a2@,%a0
the_chain->first = new_first;
4d7ce: 2240 moveal %d0,%a1 4d7d0: 2288 movel %a0,%a1@
new_first->previous = _Chain_Head(the_chain);
4d7d2: 2140 0004 movel %d0,%a0@(4)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo );
4d7d6: 2f02 movel %d2,%sp@- 4d7d8: 4e93 jsr %a3@
* It may be impossible to get here with an empty chain * BUT until that is proven we need to be defensive and * protect against it. */ if ( psiginfo ) { *info = psiginfo->Info;
4d7da: 206e 0010 moveal %fp@(16),%a0
the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; the_node->previous = old_last_node;
4d7de: 588f addql #4,%sp 4d7e0: 20ea 0008 movel %a2@(8),%a0@+ 4d7e4: 20ea 000c movel %a2@(12),%a0@+ 4d7e8: 20aa 0010 movel %a2@(16),%a0@
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
4d7ec: 24bc 0005 f536 movel #390454,%a2@
old_last_node = the_chain->last;
4d7f2: 2279 0005 f53a moveal 5f53a <_POSIX_signals_Inactive_siginfo+0x8>,%a1
the_chain->last = the_node;
4d7f8: 23ca 0005 f53a movel %a2,5f53a <_POSIX_signals_Inactive_siginfo+0x8>
old_last_node->next = the_node; the_node->previous = old_last_node;
4d7fe: 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;
4d802: 228a movel %a2,%a1@
&psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo );
4d804: 2f02 movel %d2,%sp@- 4d806: 4e93 jsr %a3@ 4d808: 588f addql #4,%sp 4d80a: 7001 moveq #1,%d0 4d80c: 6000 ff5e braw 4d76c <_POSIX_signals_Clear_signals+0x64>
if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo );
4d810: 2f02 movel %d2,%sp@- 4d812: 4e93 jsr %a3@ 4d814: 588f addql #4,%sp
&psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo );
4d816: 2f02 movel %d2,%sp@- 4d818: 4e93 jsr %a3@ 4d81a: 588f addql #4,%sp 4d81c: 7001 moveq #1,%d0 4d81e: 6000 ff4c braw 4d76c <_POSIX_signals_Clear_signals+0x64>
... 0004e8e4 <_POSIX_signals_Set_process_signals>: sigset_t mask ) { ISR_Level level; _ISR_Disable( level );
4e8e4: 203c 0000 0700 movel #1792,%d0
*/ void _POSIX_signals_Set_process_signals( sigset_t mask ) {
4e8ea: 4e56 0000 linkw %fp,#0
ISR_Level level; _ISR_Disable( level );
4e8ee: 40c1 movew %sr,%d1 4e8f0: 8081 orl %d1,%d0 4e8f2: 46c0 movew %d0,%sr
if ( !_POSIX_signals_Pending )
4e8f4: 2039 0005 f5a6 movel 5f5a6 <_POSIX_signals_Pending>,%d0 4e8fa: 6606 bnes 4e902 <_POSIX_signals_Set_process_signals+0x1e>
_Thread_Do_post_task_switch_extension++;
4e8fc: 52b9 0005 efa6 addql #1,5efa6 <_Thread_Do_post_task_switch_extension>
_POSIX_signals_Pending |= mask;
4e902: 80ae 0008 orl %fp@(8),%d0 4e906: 23c0 0005 f5a6 movel %d0,5f5a6 <_POSIX_signals_Pending>
_ISR_Enable( level );
4e90c: 46c1 movew %d1,%sr
}
4e90e: 4e5e unlk %fp 4e910: 4e75 rts
... 00045b88 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) {
45b88: 4e56 0000 linkw %fp,#0
/* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM );
45b8c: 4eb9 0004 2a2c jsr 42a2c <getpid> 45b92: 4878 000e pea e <OPER1+0x2> 45b96: 2f00 movel %d0,%sp@- 45b98: 4eb9 0004 5884 jsr 45884 <kill>
RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog );
45b9e: 4879 0006 10da pea 610da <_POSIX_signals_Ualarm_timer> 45ba4: 4eb9 0004 96ec jsr 496ec <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
45baa: 4fef 000c lea %sp@(12),%sp 45bae: 203c 0006 10da movel #397530,%d0 45bb4: 2d40 000c movel %d0,%fp@(12) 45bb8: 203c 0006 098c movel #395660,%d0 45bbe: 2d40 0008 movel %d0,%fp@(8)
/* * If the reset interval is non-zero, reschedule ourselves. */ _Watchdog_Reset( &_POSIX_signals_Ualarm_timer ); }
45bc2: 4e5e unlk %fp 45bc4: 4ef9 0004 95a4 jmp 495a4 <_Watchdog_Insert>
... 0004e914 <_POSIX_signals_Unblock_thread>:
4e914: 7001 moveq #1,%d0
bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) {
4e916: 4e56 fff4 linkw %fp,#-12 4e91a: 222e 000c movel %fp@(12),%d1 4e91e: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4e922: 246e 0008 moveal %fp@(8),%a2 4e926: 2601 movel %d1,%d3 4e928: 5383 subql #1,%d3
/* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
4e92a: 242a 0010 movel %a2@(16),%d2 4e92e: 0282 1000 8000 andil #268468224,%d2
bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) {
4e934: 226e 0010 moveal %fp@(16),%a1
POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4e938: 206a 010e moveal %a2@(270),%a0 4e93c: e7a8 lsll %d3,%d0
/* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
4e93e: 0c82 1000 8000 cmpil #268468224,%d2 4e944: 6772 beqs 4e9b8 <_POSIX_signals_Unblock_thread+0xa4>
} /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) {
4e946: 2228 00cc movel %a0@(204),%d1 4e94a: 4681 notl %d1 4e94c: c081 andl %d1,%d0 4e94e: 675c beqs 4e9ac <_POSIX_signals_Unblock_thread+0x98>
* + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
4e950: 202a 0010 movel %a2@(16),%d0
* it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true;
4e954: 7201 moveq #1,%d1 4e956: 1541 0074 moveb %d1,%a2@(116)
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
4e95a: 0800 001c btst #28,%d0 4e95e: 6736 beqs 4e996 <_POSIX_signals_Unblock_thread+0x82>
the_thread->Wait.return_code = EINTR;
4e960: 7004 moveq #4,%d0 4e962: 2540 0034 movel %d0,%a2@(52)
#if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){
4e966: 103c 0008 moveb #8,%d0 4e96a: c0aa 0010 andl %a2@(16),%d0 4e96e: 673c beqs 4e9ac <_POSIX_signals_Unblock_thread+0x98>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4e970: 7202 moveq #2,%d1 4e972: b2aa 0050 cmpl %a2@(80),%d1 4e976: 6700 00a4 beqw 4ea1c <_POSIX_signals_Unblock_thread+0x108>
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
4e97a: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 4e980: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e982: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> <== NOT EXECUTED 4e988: 508f addql #8,%sp <== NOT EXECUTED 4e98a: 4200 clrb %d0 <== NOT EXECUTED
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; }
4e98c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4e992: 4e5e unlk %fp 4e994: 4e75 rts
if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) {
4e996: 4a80 tstl %d0 4e998: 6612 bnes 4e9ac <_POSIX_signals_Unblock_thread+0x98>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
4e99a: 2039 0005 ef9e movel 5ef9e <_ISR_Nest_level>,%d0 4e9a0: 670a beqs 4e9ac <_POSIX_signals_Unblock_thread+0x98> 4e9a2: b5f9 0005 efbe cmpal 5efbe <_Thread_Executing>,%a2 4e9a8: 6700 0094 beqw 4ea3e <_POSIX_signals_Unblock_thread+0x12a>
_ISR_Signals_to_thread_executing = true; } } return false; }
4e9ac: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
(void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true;
4e9b2: 4200 clrb %d0
} } return false; }
4e9b4: 4e5e unlk %fp 4e9b6: 4e75 rts
* Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
4e9b8: 2400 movel %d0,%d2 4e9ba: c4aa 0030 andl %a2@(48),%d2 4e9be: 672a beqs 4e9ea <_POSIX_signals_Unblock_thread+0xd6>
the_thread->Wait.return_code = EINTR;
4e9c0: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
4e9c2: 206a 0028 moveal %a2@(40),%a0
*/ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR;
4e9c6: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) {
4e9ca: 4a89 tstl %a1 4e9cc: 6734 beqs 4ea02 <_POSIX_signals_Unblock_thread+0xee>
the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info;
4e9ce: 20d9 movel %a1@+,%a0@+ 4e9d0: 20d9 movel %a1@+,%a0@+ 4e9d2: 2091 movel %a1@,%a0@
} _Thread_queue_Extract_with_proxy( the_thread );
4e9d4: 2f0a movel %a2,%sp@- 4e9d6: 4eb9 0004 851c jsr 4851c <_Thread_queue_Extract_with_proxy>
return true;
4e9dc: 588f addql #4,%sp
the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread );
4e9de: 7001 moveq #1,%d0
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; }
4e9e0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4e9e6: 4e5e unlk %fp 4e9e8: 4e75 rts
* Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
4e9ea: 2428 00cc movel %a0@(204),%d2 4e9ee: 4682 notl %d2 4e9f0: c082 andl %d2,%d0 4e9f2: 67b8 beqs 4e9ac <_POSIX_signals_Unblock_thread+0x98>
the_thread->Wait.return_code = EINTR;
4e9f4: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
4e9f6: 206a 0028 moveal %a2@(40),%a0
*/ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR;
4e9fa: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) {
4e9fe: 4a89 tstl %a1 4ea00: 66cc bnes 4e9ce <_POSIX_signals_Unblock_thread+0xba>
the_info->si_signo = signo;
4ea02: 2081 movel %d1,%a0@
the_info->si_code = SI_USER;
4ea04: 7201 moveq #1,%d1
the_info->si_value.sival_int = 0;
4ea06: 42a8 0008 clrl %a0@(8)
the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER;
4ea0a: 2141 0004 movel %d1,%a0@(4)
the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread );
4ea0e: 2f0a movel %a2,%sp@- 4ea10: 4eb9 0004 851c jsr 4851c <_Thread_queue_Extract_with_proxy>
return true;
4ea16: 588f addql #4,%sp
the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread );
4ea18: 7001 moveq #1,%d0 4ea1a: 60c4 bras 4e9e0 <_POSIX_signals_Unblock_thread+0xcc>
_Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer );
4ea1c: 486a 0048 pea %a2@(72) 4ea20: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4ea26: 588f addql #4,%sp 4ea28: 2f3c 1003 fff8 movel #268697592,%sp@- 4ea2e: 2f0a movel %a2,%sp@- 4ea30: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state> 4ea36: 508f addql #8,%sp 4ea38: 4200 clrb %d0 4ea3a: 6000 ff50 braw 4e98c <_POSIX_signals_Unblock_thread+0x78>
_Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true;
4ea3e: 7001 moveq #1,%d0
} } return false; }
4ea40: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ea46: 4e5e unlk %fp
(void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true;
4ea48: 13c0 0005 f04c moveb %d0,5f04c <_ISR_Signals_to_thread_executing> 4ea4e: 4200 clrb %d0
} } return false; }
4ea50: 4e75 rts
... 0004bf8c <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) {
4bf8c: 4e56 fffc linkw %fp,#-4
void *p; _RTEMS_Lock_allocator();
4bf90: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 4bf96: 4eb9 0004 6704 jsr 46704 <_API_Mutex_Lock>
p = _Heap_Allocate_aligned_with_boundary(
4bf9c: 2f2e 0014 movel %fp@(20),%sp@- 4bfa0: 2f2e 0010 movel %fp@(16),%sp@- 4bfa4: 2f2e 000c movel %fp@(12),%sp@- 4bfa8: 2f2e 0008 movel %fp@(8),%sp@- 4bfac: 4eb9 0004 bc54 jsr 4bc54 <_Heap_Allocate_aligned_with_boundary>
heap, size, alignment, boundary ); _RTEMS_Unlock_allocator();
4bfb2: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 4bfb8: 2d40 fffc movel %d0,%fp@(-4) 4bfbc: 4eb9 0004 6764 jsr 46764 <_API_Mutex_Unlock>
return p; }
4bfc2: 202e fffc movel %fp@(-4),%d0 4bfc6: 4e5e unlk %fp 4bfc8: 4e75 rts
... 0004bfcc <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) {
4bfcc: 4e56 fffc linkw %fp,#-4
bool status; _RTEMS_Lock_allocator();
4bfd0: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 4bfd6: 4eb9 0004 6704 jsr 46704 <_API_Mutex_Lock>
status = _Heap_Free( the_heap, start_address );
4bfdc: 2f2e 000c movel %fp@(12),%sp@- 4bfe0: 2f2e 0008 movel %fp@(8),%sp@- 4bfe4: 4eb9 0004 bde8 jsr 4bde8 <_Heap_Free>
_RTEMS_Unlock_allocator();
4bfea: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 4bff0: 2d40 fffc movel %d0,%fp@(-4) 4bff4: 4eb9 0004 6764 jsr 46764 <_API_Mutex_Unlock>
return status; }
4bffa: 202e fffc movel %fp@(-4),%d0 4bffe: 4e5e unlk %fp 4c000: 4e75 rts
... 0005b958 <_Protected_heap_Get_block_size>: bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) {
5b958: 4e56 fffc linkw %fp,#-4
bool status; _RTEMS_Lock_allocator();
5b95c: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 5b962: 4eb9 0004 6704 jsr 46704 <_API_Mutex_Lock>
status = _Heap_Size_of_alloc_area( the_heap, starting_address, size );
5b968: 2f2e 0010 movel %fp@(16),%sp@- 5b96c: 2f2e 000c movel %fp@(12),%sp@- 5b970: 2f2e 0008 movel %fp@(8),%sp@- 5b974: 4eb9 0005 bac8 jsr 5bac8 <_Heap_Size_of_alloc_area>
_RTEMS_Unlock_allocator();
5b97a: 2f39 0005 efb6 movel 5efb6 <_RTEMS_Allocator_Mutex>,%sp@- 5b980: 2d40 fffc movel %d0,%fp@(-4) 5b984: 4eb9 0004 6764 jsr 46764 <_API_Mutex_Unlock>
return status; }
5b98a: 202e fffc movel %fp@(-4),%d0 5b98e: 4e5e unlk %fp 5b990: 4e75 rts
... 0004cafc <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) {
4cafc: 4e56 fff0 linkw %fp,#-16
* then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) {
4cb00: 2039 0006 50b0 movel 650b0 <_Thread_Dispatch_disable_level>,%d0
bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) {
4cb06: 48d7 001c moveml %d2-%d4,%sp@ 4cb0a: 242e 0008 movel %fp@(8),%d2 4cb0e: 282e 000c movel %fp@(12),%d4 4cb12: 162e 0013 moveb %fp@(19),%d3
* then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) {
4cb16: 4a80 tstl %d0 4cb18: 6720 beqs 4cb3a <_Protected_heap_Walk+0x3e>
_RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump );
4cb1a: 2d44 000c movel %d4,%fp@(12) 4cb1e: 0283 0000 00ff andil #255,%d3 4cb24: 2d42 0008 movel %d2,%fp@(8) 4cb28: 2d43 0010 movel %d3,%fp@(16)
} return status; }
4cb2c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4cb32: 4e5e unlk %fp
if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump );
4cb34: 4ef9 0004 bbc8 jmp 4bbc8 <_Heap_Walk>
* a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator();
4cb3a: 2f39 0006 5162 movel 65162 <_RTEMS_Allocator_Mutex>,%sp@-
status = _Heap_Walk( the_heap, source, do_dump );
4cb40: 0283 0000 00ff andil #255,%d3
* a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator();
4cb46: 4eb9 0004 ad8c jsr 4ad8c <_API_Mutex_Lock>
status = _Heap_Walk( the_heap, source, do_dump );
4cb4c: 2f03 movel %d3,%sp@- 4cb4e: 2f04 movel %d4,%sp@- 4cb50: 2f02 movel %d2,%sp@- 4cb52: 4eb9 0004 bbc8 jsr 4bbc8 <_Heap_Walk>
_RTEMS_Unlock_allocator();
4cb58: 2f39 0006 5162 movel 65162 <_RTEMS_Allocator_Mutex>,%sp@- 4cb5e: 2d40 fffc movel %d0,%fp@(-4) 4cb62: 4eb9 0004 adec jsr 4adec <_API_Mutex_Unlock>
} else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; }
4cb68: 202e fffc movel %fp@(-4),%d0
* NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator();
4cb6c: 4fef 0014 lea %sp@(20),%sp
} else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; }
4cb70: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4cb76: 4e5e unlk %fp 4cb78: 4e75 rts
... 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 d74a moveal 5d74a <Configuration_RTEMS_API+0x2a>,%a2
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
4615e: 2639 0005 d746 movel 5d746 <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> 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>
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 6fcc jsr 46fcc <_Internal_error_Occurred>
... 0006abd0 <_TOD_Get_uptime_as_timespec>: */ void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) {
6abd0: 4e56 fff8 linkw %fp,#-8
Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts );
6abd4: 486e fff8 pea %fp@(-8) 6abd8: 4eb9 0006 ab34 jsr 6ab34 <_TOD_Get_uptime>
_Timestamp_To_timespec( &uptime_ts, uptime );
6abde: 206e 0008 moveal %fp@(8),%a0 6abe2: 588f addql #4,%sp 6abe4: 202e fff8 movel %fp@(-8),%d0 6abe8: 222e fffc movel %fp@(-4),%d1
}
6abec: 4e5e unlk %fp
{ Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); _Timestamp_To_timespec( &uptime_ts, uptime );
6abee: 2080 movel %d0,%a0@ 6abf0: 2141 0004 movel %d1,%a0@(4)
}
6abf4: 4e75 rts
... 00046bbc <_TOD_Handler_initialization>: * * Output parameters: NONE */ void _TOD_Handler_initialization(void) {
46bbc: 4e56 0000 linkw %fp,#0
/* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false;
46bc0: 4200 clrb %d0
_TOD_Activate(); }
46bc2: 4e5e unlk %fp
/* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false;
46bc4: 13c0 0005 ef18 moveb %d0,5ef18 <_TOD_Is_set>
*/ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 );
46bca: 203c 21da e500 movel #567993600,%d0 46bd0: 42b9 0005 ef9a clrl 5ef9a <_TOD_Now+0x4> 46bd6: 23c0 0005 ef96 movel %d0,5ef96 <_TOD_Now>
/* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime );
46bdc: 42b9 0005 ef82 clrl 5ef82 <_TOD_Uptime> 46be2: 42b9 0005 ef86 clrl 5ef86 <_TOD_Uptime+0x4>
/* TOD has not been set */ _TOD_Is_set = false; _TOD_Activate(); }
46be8: 4e75 rts
... 000485c8 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) {
485c8: 4e56 0000 linkw %fp,#0 485cc: 2039 0006 9514 movel 69514 <_Thread_Dispatch_disable_level>,%d0 485d2: 5280 addql #1,%d0 485d4: 2f0a movel %a2,%sp@- 485d6: 246e 0008 moveal %fp@(8),%a2 485da: 23c0 0006 9514 movel %d0,69514 <_Thread_Dispatch_disable_level>
long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch();
485e0: 2039 0006 95a6 movel 695a6 <_TOD_Now>,%d0
if ( time->tv_sec < seconds )
485e6: 2212 movel %a2@,%d1 485e8: b280 cmpl %d0,%d1 485ea: 6d38 blts 48624 <_TOD_Set+0x5c>
Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
485ec: 9280 subl %d0,%d1 485ee: 2f01 movel %d1,%sp@- 485f0: 42a7 clrl %sp@- 485f2: 4879 0006 95e0 pea 695e0 <_Watchdog_Seconds_chain> 485f8: 4eb9 0004 acac jsr 4acac <_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 );
485fe: 23d2 0006 95a6 movel %a2@,695a6 <_TOD_Now> 48604: 588a addql #4,%a2 48606: 4fef 000c lea %sp@(12),%sp 4860a: 23d2 0006 95aa movel %a2@,695aa <_TOD_Now+0x4>
_TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); }
48610: 246e fffc moveal %fp@(-4),%a2 48614: 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;
48616: 7001 moveq #1,%d0 48618: 13c0 0006 9528 moveb %d0,69528 <_TOD_Is_set>
_TOD_Activate(); _Thread_Enable_dispatch();
4861e: 4ef9 0004 9910 jmp 49910 <_Thread_Enable_dispatch> 48624: 9081 subl %d1,%d0 48626: 2f00 movel %d0,%sp@- 48628: 4878 0001 pea 1 <ADD> 4862c: 4879 0006 95e0 pea 695e0 <_Watchdog_Seconds_chain> 48632: 4eb9 0004 acac jsr 4acac <_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 );
48638: 23d2 0006 95a6 movel %a2@,695a6 <_TOD_Now> 4863e: 588a addql #4,%a2 48640: 4fef 000c lea %sp@(12),%sp 48644: 23d2 0006 95aa movel %a2@,695aa <_TOD_Now+0x4>
_TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); }
4864a: 246e fffc moveal %fp@(-4),%a2 4864e: 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;
48650: 7001 moveq #1,%d0 48652: 13c0 0006 9528 moveb %d0,69528 <_TOD_Is_set>
_TOD_Activate(); _Thread_Enable_dispatch();
48658: 4ef9 0004 9910 jmp 49910 <_Thread_Enable_dispatch>
... 000479e8 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level );
479e8: 327c 0700 moveaw #1792,%a1 479ec: 2009 movel %a1,%d0
void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) {
479ee: 4e56 ffec linkw %fp,#-20 479f2: 206e 0008 moveal %fp@(8),%a0 479f6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 479fa: 242e 000c movel %fp@(12),%d2
ISR_Level level; States_Control current_state; _ISR_Disable( level );
479fe: 40c3 movew %sr,%d3 47a00: 8083 orl %d3,%d0 47a02: 46c0 movew %d0,%sr
current_state = the_thread->current_state;
47a04: 2228 0010 movel %a0@(16),%d1
if ( current_state & state ) {
47a08: 2002 movel %d2,%d0 47a0a: c081 andl %d1,%d0 47a0c: 6776 beqs 47a84 <_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);
47a0e: 2002 movel %d2,%d0 47a10: 4680 notl %d0 47a12: c081 andl %d1,%d0
current_state =
47a14: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) {
47a18: 666a bnes 47a84 <_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;
47a1a: 2868 008e moveal %a0@(142),%a4 47a1e: 3028 0094 movew %a0@(148),%d0 47a22: 3214 movew %a4@,%d1
_Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
47a24: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
47a28: 240a movel %a2,%d2 47a2a: 5882 addql #4,%d2 47a2c: 8081 orl %d1,%d0 47a2e: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
47a30: 266a 0008 moveal %a2@(8),%a3 47a34: 3880 movew %d0,%a4@
the_chain->last = the_node;
47a36: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
47a3a: 3239 0005 efb4 movew 5efb4 <_Priority_Major_bit_map>,%d1 47a40: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
47a44: 214b 0004 movel %a3,%a0@(4) 47a48: 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;
47a4a: 2688 movel %a0,%a3@ 47a4c: 33c0 0005 efb4 movew %d0,5efb4 <_Priority_Major_bit_map>
_ISR_Flash( level );
47a52: 2009 movel %a1,%d0 47a54: 46c3 movew %d3,%sr 47a56: 8083 orl %d3,%d0 47a58: 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 ) {
47a5a: 2028 0014 movel %a0@(20),%d0 47a5e: 2279 0005 ef92 moveal 5ef92 <_Thread_Heir>,%a1 47a64: b0a9 0014 cmpl %a1@(20),%d0 47a68: 641a bccs 47a84 <_Thread_Clear_state+0x9c>
_Thread_Heir = the_thread;
47a6a: 23c8 0005 ef92 movel %a0,5ef92 <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
47a70: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0 47a76: 4a28 0075 tstb %a0@(117) 47a7a: 6712 beqs 47a8e <_Thread_Clear_state+0xa6>
the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
47a7c: 7001 moveq #1,%d0 47a7e: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary>
} } } _ISR_Enable( level );
47a84: 46c3 movew %d3,%sr
}
47a86: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a8a: 4e5e unlk %fp 47a8c: 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 ||
47a8e: 4a80 tstl %d0 47a90: 66f2 bnes 47a84 <_Thread_Clear_state+0x9c>
the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
47a92: 7001 moveq #1,%d0 <== NOT EXECUTED 47a94: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> <== NOT EXECUTED 47a9a: 60e8 bras 47a84 <_Thread_Clear_state+0x9c> <== NOT EXECUTED
00047a9c <_Thread_Close>:
47a9c: 4280 clrl %d0
void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) {
47a9e: 4e56 0000 linkw %fp,#0 47aa2: 2f0b movel %a3,%sp@- 47aa4: 266e 0008 moveal %fp@(8),%a3 47aa8: 2f0a movel %a2,%sp@- 47aaa: 246e 000c moveal %fp@(12),%a2 47aae: 206b 0018 moveal %a3@(24),%a0 47ab2: 302a 000a movew %a2@(10),%d0 47ab6: 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;
47aba: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 47ac0: 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 );
47ac2: 2f0a movel %a2,%sp@- 47ac4: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level> 47aca: 4eb9 0004 8e80 jsr 48e80 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
47ad0: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 47ad6: 5280 addql #1,%d0 47ad8: 23c0 0005 ef04 movel %d0,5ef04 <_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 );
47ade: 2f0a movel %a2,%sp@- 47ae0: 2f0b movel %a3,%sp@- 47ae2: 4eb9 0004 7120 jsr 47120 <_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 );
47ae8: 4878 0001 pea 1 <ADD> 47aec: 2f0a movel %a2,%sp@- 47aee: 4eb9 0004 8710 jsr 48710 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
47af4: 2f0a movel %a2,%sp@- 47af6: 4eb9 0004 851c jsr 4851c <_Thread_queue_Extract_with_proxy> 47afc: 4fef 0018 lea %sp@(24),%sp 47b00: 4a00 tstb %d0 47b02: 6608 bnes 47b0c <_Thread_Close+0x70>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
47b04: 7002 moveq #2,%d0 47b06: b0aa 0050 cmpl %a2@(80),%d0 47b0a: 6756 beqs 47b62 <_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 ) )
47b0c: b5f9 0005 ef8a cmpal 5ef8a <_Thread_Allocated_fp>,%a2 47b12: 6746 beqs 47b5a <_Thread_Close+0xbe>
_Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context )
47b14: 202a 00c6 movel %a2@(198),%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;
47b18: 42aa 0102 clrl %a2@(258)
if ( the_thread->Start.fp_context )
47b1c: 4a80 tstl %d0 47b1e: 670a beqs 47b2a <_Thread_Close+0x8e>
(void) _Workspace_Free( the_thread->Start.fp_context );
47b20: 2f00 movel %d0,%sp@- 47b22: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> 47b28: 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 );
47b2a: 2f0a movel %a2,%sp@- 47b2c: 4eb9 0004 890c jsr 4890c <_Thread_Stack_Free>
the_thread->Start.stack = NULL; if ( the_thread->extensions )
47b32: 202a 0116 movel %a2@(278),%d0 47b36: 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;
47b38: 42aa 00ca clrl %a2@(202)
if ( the_thread->extensions )
47b3c: 4a80 tstl %d0 47b3e: 670a beqs 47b4a <_Thread_Close+0xae>
(void) _Workspace_Free( the_thread->extensions );
47b40: 2f00 movel %d0,%sp@- 47b42: 4eb9 0004 9200 jsr 49200 <_Workspace_Free> 47b48: 588f addql #4,%sp
the_thread->extensions = NULL;
47b4a: 42aa 0116 clrl %a2@(278)
}
47b4e: 246e fff8 moveal %fp@(-8),%a2 47b52: 266e fffc moveal %fp@(-4),%a3 47b56: 4e5e unlk %fp 47b58: 4e75 rts
*/ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL;
47b5a: 42b9 0005 ef8a clrl 5ef8a <_Thread_Allocated_fp> 47b60: 60b2 bras 47b14 <_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 );
47b62: 486a 0048 pea %a2@(72) 47b66: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 47b6c: 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 ) )
47b6e: b5f9 0005 ef8a cmpal 5ef8a <_Thread_Allocated_fp>,%a2 47b74: 669e bnes 47b14 <_Thread_Close+0x78>
47b76: 60e2 bras 47b5a <_Thread_Close+0xbe> <== NOT EXECUTED
00047b78 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) {
47b78: 4e56 0000 linkw %fp,#0 47b7c: 2f02 movel %d2,%sp@-
* This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information );
47b7e: 4879 0005 f052 pea 5f052 <_Thread_Internal_information> 47b84: 4eb9 0004 7090 jsr 47090 <_Objects_Allocate>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
47b8a: 2239 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d1 47b90: 5281 addql #1,%d1
/* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate();
47b92: 23c0 0005 f094 movel %d0,5f094 <_Thread_Idle> 47b98: 23c1 0005 ef04 movel %d1,5ef04 <_Thread_Dispatch_disable_level>
* that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize(
47b9e: 4282 clrl %d2 47ba0: 1439 0005 d752 moveb 5d752 <rtems_maximum_priority>,%d2 47ba6: 2f3c 4944 4c45 movel #1229212741,%sp@- 47bac: 2239 0005 d76c movel 5d76c <Configuration+0x18>,%d1 47bb2: 42a7 clrl %sp@- 47bb4: 2039 0005 d74e movel 5d74e <rtems_minimum_stack_size>,%d0 47bba: 42a7 clrl %sp@- 47bbc: 42a7 clrl %sp@- 47bbe: 4878 0001 pea 1 <ADD> 47bc2: 2f02 movel %d2,%sp@- 47bc4: 42a7 clrl %sp@- 47bc6: b280 cmpl %d0,%d1 47bc8: 6302 blss 47bcc <_Thread_Create_idle+0x54> 47bca: 2001 movel %d1,%d0 47bcc: 2f00 movel %d0,%sp@- 47bce: 42a7 clrl %sp@- 47bd0: 2f39 0005 f094 movel 5f094 <_Thread_Idle>,%sp@- 47bd6: 4879 0005 f052 pea 5f052 <_Thread_Internal_information> 47bdc: 4eb9 0004 7e80 jsr 47e80 <_Thread_Initialize>
* MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start(
47be2: 4fef 002c lea %sp@(44),%sp 47be6: 4297 clrl %sp@
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
47be8: 2239 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d1 47bee: 5381 subql #1,%d1 47bf0: 42a7 clrl %sp@- 47bf2: 2f39 0005 d768 movel 5d768 <Configuration+0x14>,%sp@-
/* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle;
47bf8: 2039 0005 f094 movel 5f094 <_Thread_Idle>,%d0
_Thread_Start(
47bfe: 42a7 clrl %sp@- 47c00: 23c1 0005 ef04 movel %d1,5ef04 <_Thread_Dispatch_disable_level> 47c06: 2f00 movel %d0,%sp@-
/* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir =
47c08: 23c0 0005 efbe movel %d0,5efbe <_Thread_Executing> 47c0e: 23c0 0005 ef92 movel %d0,5ef92 <_Thread_Heir>
_Thread_Executing = _Thread_Idle; _Thread_Start(
47c14: 4eb9 0004 8990 jsr 48990 <_Thread_Start>
Configuration.idle_task, NULL, 0 ); }
47c1a: 242e fffc movel %fp@(-4),%d2
* MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start(
47c1e: 4fef 0014 lea %sp@(20),%sp
Configuration.idle_task, NULL, 0 ); }
47c22: 4e5e unlk %fp 47c24: 4e75 rts
... 00047dbc <_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 ) {
47dbc: 4e56 0000 linkw %fp,#0
if ( --_Thread_Dispatch_disable_level )
47dc0: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 47dc6: 5380 subql #1,%d0 47dc8: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level> 47dce: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 47dd4: 6704 beqs 47dda <_Thread_Enable_dispatch+0x1e>
return; _Thread_Dispatch(); }
47dd6: 4e5e unlk %fp 47dd8: 4e75 rts 47dda: 4e5e unlk %fp
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch();
47ddc: 4ef9 0004 7c64 jmp 47c64 <_Thread_Dispatch>
... 0004df98 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) {
4df98: 4e56 0000 linkw %fp,#0 4df9c: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing;
4df9e: 2479 0005 efbe moveal 5efbe <_Thread_Executing>,%a2
* * Output parameters: NONE */ void _Thread_Handler( void ) {
4dfa4: 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;
4dfa6: 222a 00b4 movel %a2@(180),%d1
_ISR_Set_level(level);
4dfaa: 40c0 movew %sr,%d0 4dfac: e189 lsll #8,%d1 4dfae: 0280 0000 f8ff andil #63743,%d0 4dfb4: 8081 orl %d1,%d0 4dfb6: 46c0 movew %d0,%sr
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1;
4dfb8: 7001 moveq #1,%d0
level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors;
4dfba: 1439 0005 e6b4 moveb 5e6b4 <doneConstructors.3605>,%d2
doneConstructors = 1;
4dfc0: 13c0 0005 e6b4 moveb %d0,5e6b4 <doneConstructors.3605>
#endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) &&
4dfc6: 4aaa 0102 tstl %a2@(258) 4dfca: 6720 beqs 4dfec <_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 );
4dfcc: 2079 0005 ef8a moveal 5ef8a <_Thread_Allocated_fp>,%a0 4dfd2: b1ca cmpal %a2,%a0 4dfd4: 6716 beqs 4dfec <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL )
4dfd6: 4a88 tstl %a0 4dfd8: 670c beqs 4dfe6 <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4dfda: 4868 0102 pea %a0@(258) 4dfde: 4eb9 0004 93b6 jsr 493b6 <_CPU_Context_save_fp> 4dfe4: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4dfe6: 23ca 0005 ef8a movel %a2,5ef8a <_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 );
4dfec: 2f0a movel %a2,%sp@- 4dfee: 4eb9 0004 8d64 jsr 48d64 <_User_extensions_Thread_begin>
/* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch();
4dff4: 4eb9 0004 7dbc jsr 47dbc <_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) */ {
4dffa: 588f addql #4,%sp 4dffc: 4a02 tstb %d2 4dffe: 6724 beqs 4e024 <_Thread_Handler+0x8c>
INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4e000: 202a 009e movel %a2@(158),%d0 4e004: 672a beqs 4e030 <_Thread_Handler+0x98>
(*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) {
4e006: 7201 moveq #1,%d1 4e008: b280 cmpl %d0,%d1 4e00a: 674c beqs 4e058 <_Thread_Handler+0xc0>
* 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 );
4e00c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e00e: 4eb9 0004 8da2 jsr 48da2 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
4e014: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED 4e018: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4e01c: 42a7 clrl %sp@- <== NOT EXECUTED 4e01e: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> <== NOT EXECUTED
* _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME ();
4e024: 4eb9 0005 bbc4 jsr 5bbc4 <_init>
} #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4e02a: 202a 009e movel %a2@(158),%d0 4e02e: 66d6 bnes 4e006 <_Thread_Handler+0x6e>
executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)(
4e030: 2f2a 00a6 movel %a2@(166),%sp@- 4e034: 206a 009a moveal %a2@(154),%a0 4e038: 4e90 jsr %a0@
INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument =
4e03a: 588f addql #4,%sp 4e03c: 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 );
4e040: 2f0a movel %a2,%sp@- 4e042: 4eb9 0004 8da2 jsr 48da2 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4e048: 4878 0006 pea 6 <EXTENDSFDF> 4e04c: 4878 0001 pea 1 <ADD> 4e050: 42a7 clrl %sp@- 4e052: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred>
); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)(
4e058: 2f2a 00a2 movel %a2@(162),%sp@- 4e05c: 206a 009a moveal %a2@(154),%a0 4e060: 4e90 jsr %a0@
executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument =
4e062: 588f addql #4,%sp 4e064: 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 );
4e068: 2f0a movel %a2,%sp@- 4e06a: 4eb9 0004 8da2 jsr 48da2 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4e070: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED 4e074: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4e078: 42a7 clrl %sp@- <== NOT EXECUTED 4e07a: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred> <== NOT EXECUTED
000480c8 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) {
480c8: 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)
480cc: 4ab9 0005 d778 tstl 5d778 <Configuration+0x24> 480d2: 57c0 seq %d0 480d4: 4ab9 0005 d774 tstl 5d774 <Configuration+0x20> 480da: 57c1 seq %d1 480dc: 4480 negl %d0 480de: 4481 negl %d1 480e0: b380 eorl %d1,%d0
uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice;
480e2: 2239 0005 d764 movel 5d764 <Configuration+0x10>,%d1
maximum_extensions = Configuration.maximum_extensions;
480e8: 2079 0005 d75c moveal 5d75c <Configuration+0x8>,%a0
* * Output parameters: NONE */ void _Thread_Handler_initialization(void) {
480ee: 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)
480f0: 4a00 tstb %d0 480f2: 6600 00a2 bnew 48196 <_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(
480f6: 4280 clrl %d0 480f8: 1039 0005 d752 moveb 5d752 <rtems_maximum_priority>,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
480fe: 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(
48100: 5280 addql #1,%d0
_Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice;
48102: 23c1 0005 eeb4 movel %d1,5eeb4 <_Thread_Ticks_per_timeslice>
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48108: 2200 movel %d0,%d1 4810a: e588 lsll #2,%d0 4810c: e989 lsll #4,%d1
_Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions;
4810e: 23c8 0005 efa2 movel %a0,5efa2 <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48114: 9280 subl %d0,%d1
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false;
48116: 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(
48118: 2f01 movel %d1,%sp@-
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false;
4811a: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary>
_Thread_Executing = NULL;
48120: 42b9 0005 efbe clrl 5efbe <_Thread_Executing>
_Thread_Heir = NULL;
48126: 42b9 0005 ef92 clrl 5ef92 <_Thread_Heir>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL;
4812c: 42b9 0005 ef8a clrl 5ef8a <_Thread_Allocated_fp>
#endif _Thread_Do_post_task_switch_extension = 0;
48132: 42b9 0005 efa6 clrl 5efa6 <_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(
48138: 4eb9 0004 91b0 jsr 491b0 <_Workspace_Allocate_or_fatal_error>
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
4813e: 588f addql #4,%sp 48140: 1439 0005 d752 moveb 5d752 <rtems_maximum_priority>,%d2 48146: 2040 moveal %d0,%a0 48148: 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(
4814a: 23c0 0005 eeb0 movel %d0,5eeb0 <_Thread_Ready_chain>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
48150: 2008 movel %a0,%d0 48152: 5880 addql #4,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48154: 5281 addql #1,%d1 48156: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
48158: 42a8 0004 clrl %a0@(4)
the_chain->last = _Chain_Head(the_chain);
4815c: 2148 0008 movel %a0,%a0@(8) 48160: 41e8 000c lea %a0@(12),%a0 48164: b481 cmpl %d1,%d2 48166: 64e8 bccs 48150 <_Thread_Handler_initialization+0x88>
/* * Initialize this class of objects. */ _Objects_Initialize_information(
48168: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 4816c: 42a7 clrl %sp@- 4816e: 4878 011e pea 11e <DBL_MANT_DIG+0xe9> 48172: 4878 0001 pea 1 <ADD> 48176: 4878 0001 pea 1 <ADD> 4817a: 4878 0001 pea 1 <ADD> 4817e: 4879 0005 f052 pea 5f052 <_Thread_Internal_information> 48184: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information>
false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
4818a: 242e fffc movel %fp@(-4),%d2
/* * Initialize this class of objects. */ _Objects_Initialize_information(
4818e: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
48192: 4e5e unlk %fp 48194: 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(
48196: 4878 000f pea f <FPTRAP> 4819a: 4878 0001 pea 1 <ADD> 4819e: 42a7 clrl %sp@- 481a0: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred>
... 0004c2f0 <_Thread_Ready>: */ void _Thread_Ready( Thread_Control *the_thread ) {
4c2f0: 4e56 ffec linkw %fp,#-20 4c2f4: 206e 0008 moveal %fp@(8),%a0 4c2f8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
ISR_Level level; Thread_Control *heir; _ISR_Disable( level );
4c2fc: 243c 0000 0700 movel #1792,%d2 4c302: 2002 movel %d2,%d0 4c304: 40c1 movew %sr,%d1 4c306: 8081 orl %d1,%d0 4c308: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor;
4c30a: 2668 008e moveal %a0@(142),%a3 4c30e: 3028 0094 movew %a0@(148),%d0 4c312: 3613 movew %a3@,%d3
the_thread->current_state = STATES_READY; _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
4c314: 2268 008a moveal %a0@(138),%a1
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
4c318: 2809 movel %a1,%d4 4c31a: 5884 addql #4,%d4 4c31c: 8083 orl %d3,%d0 4c31e: 2084 movel %d4,%a0@
old_last_node = the_chain->last;
4c320: 2469 0008 moveal %a1@(8),%a2 4c324: 3680 movew %d0,%a3@
the_chain->last = the_node;
4c326: 2348 0008 movel %a0,%a1@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
4c32a: 3639 0005 efb4 movew 5efb4 <_Priority_Major_bit_map>,%d3 4c330: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
4c334: 214a 0004 movel %a2,%a0@(4) 4c338: 8083 orl %d3,%d0
Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node;
4c33a: 2488 movel %a0,%a2@ 4c33c: 33c0 0005 efb4 movew %d0,5efb4 <_Priority_Major_bit_map>
ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); the_thread->current_state = STATES_READY;
4c342: 42a8 0010 clrl %a0@(16)
_Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); _ISR_Flash( level );
4c346: 2002 movel %d2,%d0 4c348: 46c1 movew %d1,%sr 4c34a: 8081 orl %d1,%d0 4c34c: 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 );
4c34e: 3039 0005 efb4 movew 5efb4 <_Priority_Major_bit_map>,%d0 4c354: 4840 swap %d0 4c356: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
4c358: 4282 clrl %d2 4c35a: 41f9 0005 f024 lea 5f024 <_Priority_Bit_map>,%a0 4c360: 3400 movew %d0,%d2 4c362: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 4c366: 4840 swap %d0 4c368: 04c0 ff1 %d0
* ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *)
4c36a: 4283 clrl %d3 4c36c: e98a lsll #4,%d2 4c36e: 3600 movew %d0,%d3 4c370: 2279 0005 eeb0 moveal 5eeb0 <_Thread_Ready_chain>,%a1 4c376: 2002 movel %d2,%d0 4c378: d083 addl %d3,%d0 4c37a: 2400 movel %d0,%d2 4c37c: e58a lsll #2,%d2 4c37e: e988 lsll #4,%d0
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing );
4c380: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0
* ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *)
4c386: 93c2 subal %d2,%a1 4c388: 2031 0800 movel %a1@(00000000,%d0:l),%d0 4c38c: 23c0 0005 ef92 movel %d0,5ef92 <_Thread_Heir>
_Thread_Calculate_heir(); heir = _Thread_Heir; if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible )
4c392: b1c0 cmpal %d0,%a0 4c394: 670e beqs 4c3a4 <_Thread_Ready+0xb4> 4c396: 4a28 0075 tstb %a0@(117) 4c39a: 6708 beqs 4c3a4 <_Thread_Ready+0xb4>
_Context_Switch_necessary = true;
4c39c: 7001 moveq #1,%d0 4c39e: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary>
_ISR_Enable( level );
4c3a4: 46c1 movew %d1,%sr
}
4c3a6: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4c3aa: 4e5e unlk %fp 4c3ac: 4e75 rts
... 0004d094 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
4d094: 4e56 0000 linkw %fp,#0 4d098: 2f0a movel %a2,%sp@- 4d09a: 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;
4d09e: 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;
4d0a4: 256a 00ac 007a movel %a2@(172),%a2@(122)
the_thread->budget_callout = the_thread->Start.budget_callout;
4d0aa: 256a 00b0 007e movel %a2@(176),%a2@(126)
the_thread->Start.pointer_argument = pointer_argument;
4d0b0: 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;
4d0b6: 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;
4d0bc: 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 ) ) {
4d0c0: 2f0a movel %a2,%sp@- 4d0c2: 4eb9 0004 9130 jsr 49130 <_Thread_queue_Extract_with_proxy> 4d0c8: 588f addql #4,%sp 4d0ca: 4a00 tstb %d0 4d0cc: 6608 bnes 4d0d6 <_Thread_Reset+0x42>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4d0ce: 7002 moveq #2,%d0 4d0d0: b0aa 0050 cmpl %a2@(80),%d0 4d0d4: 672a beqs 4d100 <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
4d0d6: 202a 00b8 movel %a2@(184),%d0 4d0da: b0aa 0014 cmpl %a2@(20),%d0 4d0de: 6718 beqs 4d0f8 <_Thread_Reset+0x64>
the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4d0e0: 2d4a 0008 movel %a2,%fp@(8) 4d0e4: 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;
4d0e8: 2540 0018 movel %d0,%a2@(24)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } }
4d0ec: 246e fffc moveal %fp@(-4),%a2 4d0f0: 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 );
4d0f2: 4ef9 0004 9340 jmp 49340 <_Thread_Set_priority>
} }
4d0f8: 246e fffc moveal %fp@(-4),%a2 4d0fc: 4e5e unlk %fp 4d0fe: 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 );
4d100: 486a 0048 pea %a2@(72) 4d104: 4eb9 0004 9d78 jsr 49d78 <_Watchdog_Remove> 4d10a: 588f addql #4,%sp 4d10c: 60c8 bras 4d0d6 <_Thread_Reset+0x42>
... 000492b4 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) {
492b4: 7001 moveq #1,%d0
bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
492b6: 4e56 0000 linkw %fp,#0 492ba: 2f0a movel %a2,%sp@- 492bc: 246e 0008 moveal %fp@(8),%a2
if ( !_States_Is_dormant( the_thread->current_state ) ) {
492c0: c0aa 0010 andl %a2@(16),%d0 492c4: 4a00 tstb %d0 492c6: 670a beqs 492d2 <_Thread_Restart+0x1e>
return true; } return false; }
492c8: 246e fffc moveal %fp@(-4),%a2 492cc: 4e5e unlk %fp
Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) {
492ce: 4200 clrb %d0
return true; } return false; }
492d0: 4e75 rts
Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread );
492d2: 2f0a movel %a2,%sp@- 492d4: 4eb9 0004 94c4 jsr 494c4 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
492da: 2f2e 0010 movel %fp@(16),%sp@- 492de: 2f2e 000c movel %fp@(12),%sp@- 492e2: 2f0a movel %a2,%sp@- 492e4: 4eb9 0004 d094 jsr 4d094 <_Thread_Reset>
_Thread_Load_environment( the_thread );
492ea: 2f0a movel %a2,%sp@- 492ec: 4eb9 0004 cce8 jsr 4cce8 <_Thread_Load_environment>
_Thread_Ready( the_thread );
492f2: 2f0a movel %a2,%sp@- 492f4: 4eb9 0004 cfd4 jsr 4cfd4 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
492fa: 2f0a movel %a2,%sp@- 492fc: 4eb9 0004 9b68 jsr 49b68 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
49302: 4fef 001c lea %sp@(28),%sp 49306: b5f9 0005 ff56 cmpal 5ff56 <_Thread_Executing>,%a2 4930c: 670a beqs 49318 <_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 );
4930e: 7001 moveq #1,%d0
return true; } return false; }
49310: 246e fffc moveal %fp@(-4),%a2 49314: 4e5e unlk %fp 49316: 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 )
49318: 4aaa 0102 tstl %a2@(258) 4931c: 6712 beqs 49330 <_Thread_Restart+0x7c>
_Context_Restore_fp( &_Thread_Executing->fp_context );
4931e: 486a 0102 pea %a2@(258) 49322: 4eb9 0004 a0d2 jsr 4a0d2 <_CPU_Context_restore_fp> 49328: 2479 0005 ff56 moveal 5ff56 <_Thread_Executing>,%a2 4932e: 588f addql #4,%sp
#endif _CPU_Context_Restart_self( &_Thread_Executing->Registers );
49330: 486a 00ce pea %a2@(206) 49334: 4eb9 0004 9f7a jsr 49f7a <_CPU_Context_Restart_self>
4933a: 588f addql #4,%sp <== NOT EXECUTED 4933c: 7001 moveq #1,%d0 <== NOT EXECUTED 4933e: 60d0 bras 49310 <_Thread_Restart+0x5c> <== NOT EXECUTED
0004c7c0 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level );
4c7c0: 327c 0700 moveaw #1792,%a1 4c7c4: 2009 movel %a1,%d0
void _Thread_Resume( Thread_Control *the_thread, bool force ) {
4c7c6: 4e56 ffec linkw %fp,#-20 4c7ca: 206e 0008 moveal %fp@(8),%a0 4c7ce: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
ISR_Level level; States_Control current_state; _ISR_Disable( level );
4c7d2: 40c1 movew %sr,%d1 4c7d4: 8081 orl %d1,%d0 4c7d6: 46c0 movew %d0,%sr
_ISR_Enable( level ); return; } #endif current_state = the_thread->current_state;
4c7d8: 2028 0010 movel %a0@(16),%d0
if ( current_state & STATES_SUSPENDED ) {
4c7dc: 0800 0001 btst #1,%d0 4c7e0: 6774 beqs 4c856 <_Thread_Resume+0x96> 4c7e2: 74fd moveq #-3,%d2 4c7e4: c082 andl %d2,%d0
current_state =
4c7e6: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) {
4c7ea: 666a bnes 4c856 <_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;
4c7ec: 2868 008e moveal %a0@(142),%a4 4c7f0: 3028 0094 movew %a0@(148),%d0 4c7f4: 3414 movew %a4@,%d2
_Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
4c7f6: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
4c7fa: 260a movel %a2,%d3 4c7fc: 5883 addql #4,%d3 4c7fe: 8082 orl %d2,%d0 4c800: 2083 movel %d3,%a0@
old_last_node = the_chain->last;
4c802: 266a 0008 moveal %a2@(8),%a3 4c806: 3880 movew %d0,%a4@
the_chain->last = the_node;
4c808: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
4c80c: 3439 0006 4c2c movew 64c2c <_Priority_Major_bit_map>,%d2 4c812: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
4c816: 214b 0004 movel %a3,%a0@(4) 4c81a: 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;
4c81c: 2688 movel %a0,%a3@ 4c81e: 33c0 0006 4c2c movew %d0,64c2c <_Priority_Major_bit_map>
_ISR_Flash( level );
4c824: 2009 movel %a1,%d0 4c826: 46c1 movew %d1,%sr 4c828: 8081 orl %d1,%d0 4c82a: 46c0 movew %d0,%sr
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4c82c: 2028 0014 movel %a0@(20),%d0 4c830: 2279 0006 4c0a moveal 64c0a <_Thread_Heir>,%a1 4c836: b0a9 0014 cmpl %a1@(20),%d0 4c83a: 641a bccs 4c856 <_Thread_Resume+0x96>
_Thread_Heir = the_thread;
4c83c: 23c8 0006 4c0a movel %a0,64c0a <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
4c842: 2079 0006 4c36 moveal 64c36 <_Thread_Executing>,%a0 4c848: 4a28 0075 tstb %a0@(117) 4c84c: 6712 beqs 4c860 <_Thread_Resume+0xa0>
the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
4c84e: 7001 moveq #1,%d0 4c850: 13c0 0006 4c46 moveb %d0,64c46 <_Context_Switch_necessary>
} } } _ISR_Enable( level );
4c856: 46c1 movew %d1,%sr
}
4c858: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c85c: 4e5e unlk %fp 4c85e: 4e75 rts
_ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible ||
4c860: 4a80 tstl %d0 4c862: 66f2 bnes 4c856 <_Thread_Resume+0x96>
the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
4c864: 7001 moveq #1,%d0 <== NOT EXECUTED 4c866: 13c0 0006 4c46 moveb %d0,64c46 <_Context_Switch_necessary> <== NOT EXECUTED 4c86c: 60e8 bras 4c856 <_Thread_Resume+0x96> <== NOT EXECUTED
... 00048940 <_Thread_Start_multitasking>:
48940: 7003 moveq #3,%d0
* ready chain * select heir */ void _Thread_Start_multitasking( void ) {
48942: 4e56 0000 linkw %fp,#0
_System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; _Thread_Executing = _Thread_Heir;
48946: 2079 0005 ef92 moveal 5ef92 <_Thread_Heir>,%a0 4894c: 23c0 0005 f08c movel %d0,5f08c <_System_state_Current>
* the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false;
48952: 4200 clrb %d0
_Thread_Executing = _Thread_Heir;
48954: 23c8 0005 efbe movel %a0,5efbe <_Thread_Executing>
* the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false;
4895a: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ if ( _Thread_Heir->fp_context != NULL )
48960: 4aa8 0102 tstl %a0@(258) 48964: 6712 beqs 48978 <_Thread_Start_multitasking+0x38>
_Context_Restore_fp( &_Thread_Heir->fp_context );
48966: 4868 0102 pea %a0@(258) 4896a: 4eb9 0004 93ee jsr 493ee <_CPU_Context_restore_fp> 48970: 2079 0005 ef92 moveal 5ef92 <_Thread_Heir>,%a0 48976: 588f addql #4,%sp
#endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers );
48978: 4868 00ce pea %a0@(206) 4897c: 4879 0005 eed0 pea 5eed0 <_Thread_BSP_context> 48982: 4eb9 0004 9280 jsr 49280 <_CPU_Context_switch> 48988: 508f addql #8,%sp
}
4898a: 4e5e unlk %fp 4898c: 4e75 rts
... 00048b78 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) {
48b78: 4e56 fff4 linkw %fp,#-12
ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing;
48b7c: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0
* ready chain * select heir */ void _Thread_Yield_processor( void ) {
48b82: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level );
48b86: 243c 0000 0700 movel #1792,%d2 48b8c: 2002 movel %d2,%d0
ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready;
48b8e: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
48b92: 40c1 movew %sr,%d1 48b94: 8081 orl %d1,%d0 48b96: 46c0 movew %d0,%sr
if ( !_Chain_Has_only_one_node( ready ) ) {
48b98: 2029 0008 movel %a1@(8),%d0 48b9c: b091 cmpl %a1@,%d0 48b9e: 6750 beqs 48bf0 <_Thread_Yield_processor+0x78>
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
48ba0: 2450 moveal %a0@,%a2
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
48ba2: 2009 movel %a1,%d0 48ba4: 5880 addql #4,%d0
{ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous;
48ba6: 2668 0004 moveal %a0@(4),%a3
next->previous = previous; previous->next = next;
48baa: 268a movel %a2,%a3@
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
48bac: 254b 0004 movel %a3,%a2@(4)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
48bb0: 2080 movel %d0,%a0@
old_last_node = the_chain->last;
48bb2: 2469 0008 moveal %a1@(8),%a2
the_chain->last = the_node;
48bb6: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
48bba: 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;
48bbe: 2488 movel %a0,%a2@
_Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level );
48bc0: 46c1 movew %d1,%sr 48bc2: 8481 orl %d1,%d2 48bc4: 46c2 movew %d2,%sr
if ( _Thread_Is_heir( executing ) )
48bc6: b1f9 0005 ef92 cmpal 5ef92 <_Thread_Heir>,%a0 48bcc: 6712 beqs 48be0 <_Thread_Yield_processor+0x68>
_Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true;
48bce: 7001 moveq #1,%d0 <== NOT EXECUTED 48bd0: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> <== NOT EXECUTED
_ISR_Enable( level );
48bd6: 46c1 movew %d1,%sr
}
48bd8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48bdc: 4e5e unlk %fp 48bde: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first;
48be0: 23d1 0005 ef92 movel %a1@,5ef92 <_Thread_Heir>
_Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true;
48be6: 7001 moveq #1,%d0 48be8: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> 48bee: 60e6 bras 48bd6 <_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 ) )
48bf0: b1f9 0005 ef92 cmpal 5ef92 <_Thread_Heir>,%a0 48bf6: 67de beqs 48bd6 <_Thread_Yield_processor+0x5e>
_Context_Switch_necessary = true;
48bf8: 7001 moveq #1,%d0 <== NOT EXECUTED 48bfa: 13c0 0005 efce moveb %d0,5efce <_Context_Switch_necessary> <== NOT EXECUTED 48c00: 60d4 bras 48bd6 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED
... 00047834 <_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 ) ) {
47834: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) {
47836: 4e56 0000 linkw %fp,#0 4783a: 202e 0010 movel %fp@(16),%d0 4783e: 2f0a movel %a2,%sp@- 47840: 246e 000c moveal %fp@(12),%a2
#endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL;
47844: 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 ) ) {
47848: b2aa 0050 cmpl %a2@(80),%d1 4784c: 671c beqs 4786a <_Thread_blocking_operation_Cancel+0x36>
_Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level );
4784e: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
47850: 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 }
47854: 246e fffc moveal %fp@(-4),%a2 47858: 203c 1003 fff8 movel #268697592,%d0 4785e: 2d40 000c movel %d0,%fp@(12) 47862: 4e5e unlk %fp 47864: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT;
4786a: 123c 0003 moveb #3,%d1 4786e: 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 );
47872: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
47874: 486a 0048 pea %a2@(72) 47878: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4787e: 588f addql #4,%sp 47880: 203c 1003 fff8 movel #268697592,%d0 47886: 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 }
4788a: 246e fffc moveal %fp@(-4),%a2 4788e: 2d40 000c movel %d0,%fp@(12) 47892: 4e5e unlk %fp 47894: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state>
... 000481a8 <_Thread_queue_Dequeue>: Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
481a8: 41f9 0004 8210 lea 48210 <_Thread_queue_Dequeue_priority>,%a0 481ae: 7001 moveq #1,%d0
*/ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) {
481b0: 4e56 fff4 linkw %fp,#-12 481b4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 481b8: 246e 0008 moveal %fp@(8),%a2
Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
481bc: b0aa 0034 cmpl %a2@(52),%d0 481c0: 6706 beqs 481c8 <_Thread_queue_Dequeue+0x20> 481c2: 41f9 0004 c088 lea 4c088 <_Thread_queue_Dequeue_fifo>,%a0
dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue );
481c8: 2f0a movel %a2,%sp@- 481ca: 4e90 jsr %a0@
_ISR_Disable( level );
481cc: 223c 0000 0700 movel #1792,%d1 481d2: 40c2 movew %sr,%d2 481d4: 8282 orl %d2,%d1 481d6: 46c1 movew %d1,%sr
if ( !the_thread ) {
481d8: 588f addql #4,%sp 481da: 4a80 tstl %d0 481dc: 670c beqs 481ea <_Thread_queue_Dequeue+0x42>
(sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level );
481de: 46c2 movew %d2,%sr
return the_thread; }
481e0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 481e6: 4e5e unlk %fp 481e8: 4e75 rts
dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state;
481ea: 222a 0030 movel %a2@(48),%d1 481ee: 7601 moveq #1,%d3 481f0: 5381 subql #1,%d1 481f2: b681 cmpl %d1,%d3 481f4: 65e8 bcss 481de <_Thread_queue_Dequeue+0x36>
if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
481f6: 7203 moveq #3,%d1
the_thread = _Thread_Executing;
481f8: 2039 0005 efbe movel 5efbe <_Thread_Executing>,%d0
_ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
481fe: 2541 0030 movel %d1,%a2@(48)
the_thread = _Thread_Executing; } } _ISR_Enable( level );
48202: 46c2 movew %d2,%sr
return the_thread; }
48204: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4820a: 4e5e unlk %fp 4820c: 4e75 rts
... 0004c088 <_Thread_queue_Dequeue_fifo>: ) { ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level );
4c088: 203c 0000 0700 movel #1792,%d0
*/ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) {
4c08e: 4e56 0000 linkw %fp,#0 4c092: 226e 0008 moveal %fp@(8),%a1 4c096: 2f0b movel %a3,%sp@- 4c098: 2f0a movel %a2,%sp@-
ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level );
4c09a: 40c1 movew %sr,%d1 4c09c: 8081 orl %d1,%d0 4c09e: 46c0 movew %d0,%sr
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
4c0a0: 2049 moveal %a1,%a0 4c0a2: 2458 moveal %a0@+,%a2
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4c0a4: b1ca cmpal %a2,%a0 4c0a6: 6768 beqs 4c110 <_Thread_queue_Dequeue_fifo+0x88>
{ Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
4c0a8: 2052 moveal %a2@,%a0
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *)
4c0aa: 264a moveal %a2,%a3
_Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4c0ac: 7002 moveq #2,%d0
the_chain->first = new_first;
4c0ae: 2288 movel %a0,%a1@
new_first->previous = _Chain_Head(the_chain);
4c0b0: 2149 0004 movel %a1,%a0@(4)
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL;
4c0b4: 42aa 0044 clrl %a2@(68)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4c0b8: b0aa 0050 cmpl %a2@(80),%d0 4c0bc: 6720 beqs 4c0de <_Thread_queue_Dequeue_fifo+0x56>
_ISR_Enable( level );
4c0be: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
4c0c0: 2f3c 1003 fff8 movel #268697592,%sp@- 4c0c6: 2f0a movel %a2,%sp@- 4c0c8: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state>
return the_thread; } _ISR_Enable( level ); return NULL; }
4c0ce: 246e fff8 moveal %fp@(-8),%a2 4c0d2: 200b movel %a3,%d0 4c0d4: 508f addql #8,%sp 4c0d6: 266e fffc moveal %fp@(-4),%a3 4c0da: 4e5e unlk %fp 4c0dc: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT;
4c0de: 7003 moveq #3,%d0 4c0e0: 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 );
4c0e4: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4c0e6: 486a 0048 pea %a2@(72) 4c0ea: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4c0f0: 2f3c 1003 fff8 movel #268697592,%sp@- 4c0f6: 2f0a movel %a2,%sp@- 4c0f8: 4eb9 0004 79e8 jsr 479e8 <_Thread_Clear_state>
return the_thread; } _ISR_Enable( level ); return NULL; }
4c0fe: 246e fff8 moveal %fp@(-8),%a2 4c102: 200b movel %a3,%d0 4c104: 4fef 000c lea %sp@(12),%sp 4c108: 266e fffc moveal %fp@(-4),%a3 4c10c: 4e5e unlk %fp 4c10e: 4e75 rts
#endif return the_thread; } _ISR_Enable( level );
4c110: 46c1 movew %d1,%sr 4c112: 97cb subal %a3,%a3
return NULL; }
4c114: 200b movel %a3,%d0 4c116: 246e fff8 moveal %fp@(-8),%a2 4c11a: 266e fffc moveal %fp@(-4),%a3 4c11e: 4e5e unlk %fp 4c120: 4e75 rts
... 0004c124 <_Thread_queue_Enqueue_fifo>: ) { Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level );
4c124: 203c 0000 0700 movel #1792,%d0
Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) {
4c12a: 4e56 0000 linkw %fp,#0 4c12e: 206e 0008 moveal %fp@(8),%a0 4c132: 2f0a movel %a2,%sp@- 4c134: 226e 000c moveal %fp@(12),%a1 4c138: 2f02 movel %d2,%sp@-
Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level );
4c13a: 40c1 movew %sr,%d1 4c13c: 8081 orl %d1,%d0 4c13e: 46c0 movew %d0,%sr
sync_state = the_thread_queue->sync_state;
4c140: 2028 0030 movel %a0@(48),%d0
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) {
4c144: 7401 moveq #1,%d2
ISR_Level level; _ISR_Disable( level ); sync_state = the_thread_queue->sync_state; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
4c146: 42a8 0030 clrl %a0@(48)
if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) {
4c14a: b480 cmpl %d0,%d2 4c14c: 670e beqs 4c15c <_Thread_queue_Enqueue_fifo+0x38>
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; }
4c14e: 241f movel %sp@+,%d2
* 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;
4c150: 206e 0010 moveal %fp@(16),%a0
return sync_state; }
4c154: 245f moveal %sp@+,%a2 4c156: 4e5e unlk %fp
* 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;
4c158: 2081 movel %d1,%a0@
return sync_state; }
4c15a: 4e75 rts
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
4c15c: 2408 movel %a0,%d2 4c15e: 5882 addql #4,%d2 4c160: 2282 movel %d2,%a1@
old_last_node = the_chain->last;
4c162: 2468 0008 moveal %a0@(8),%a2
the_chain->last = the_node;
4c166: 2149 0008 movel %a1,%a0@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
4c16a: 234a 0004 movel %a2,%a1@(4)
if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue;
4c16e: 2348 0044 movel %a0,%a1@(68)
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;
4c172: 2489 movel %a1,%a2@
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level );
4c174: 46c1 movew %d1,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; }
4c176: 241f movel %sp@+,%d2 4c178: 245f moveal %sp@+,%a2 4c17a: 4e5e unlk %fp 4c17c: 4e75 rts
... 000483a4 <_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 ) {
483a4: 4e56 ffe4 linkw %fp,#-28 483a8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 483ac: 266e 000c moveal %fp@(12),%a3
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
483b0: 41eb 003c lea %a3@(60),%a0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level );
483b4: 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;
483ba: 222b 0014 movel %a3@(20),%d1
header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
483be: 2401 movel %d1,%d2 483c0: ec8a lsrl #6,%d2 483c2: 2002 movel %d2,%d0 483c4: e58a lsll #2,%d2 483c6: 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 ) {
483c8: 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 ];
483cc: 9082 subl %d2,%d0 483ce: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 483d2: 2748 0038 movel %a0,%a3@(56)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
483d6: 41eb 0038 lea %a3@(56),%a0
block_state = the_thread_queue->state;
483da: 242c 0038 movel %a4@(56),%d2 483de: 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;
483e2: 42ab 003c clrl %a3@(60)
if ( _Thread_queue_Is_reverse_search( priority ) )
483e6: 0801 0005 btst #5,%d1 483ea: 6656 bnes 48442 <_Thread_queue_Enqueue_priority+0x9e>
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
483ec: 2a0a movel %a2,%d5
goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level );
483ee: 2803 movel %d3,%d4 483f0: 5885 addql #4,%d5 483f2: 2004 movel %d4,%d0 483f4: 40c3 movew %sr,%d3 483f6: 8083 orl %d3,%d0 483f8: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->first;
483fa: 2052 moveal %a2@,%a0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
483fc: ba88 cmpl %a0,%d5 483fe: 6700 010a beqw 4850a <_Thread_queue_Enqueue_priority+0x166>
search_priority = search_thread->current_priority;
48402: 2268 0014 moveal %a0@(20),%a1
if ( priority <= search_priority )
48406: b3c1 cmpal %d1,%a1 48408: 6418 bccs 48422 <_Thread_queue_Enqueue_priority+0x7e>
break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level );
4840a: 2004 movel %d4,%d0 4840c: 46c3 movew %d3,%sr 4840e: 8083 orl %d3,%d0 48410: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48412: 2002 movel %d2,%d0 48414: c0a8 0010 andl %a0@(16),%d0 48418: 6700 0092 beqw 484ac <_Thread_queue_Enqueue_priority+0x108>
_ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next;
4841c: 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 ) ) {
4841e: ba88 cmpl %a0,%d5 48420: 66e0 bnes 48402 <_Thread_queue_Enqueue_priority+0x5e> 48422: 2403 movel %d3,%d2
} search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state !=
48424: 7001 moveq #1,%d0 48426: b0ac 0030 cmpl %a4@(48),%d0 4842a: 6700 0094 beqw 484c0 <_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;
4842e: 206e 0010 moveal %fp@(16),%a0
return the_thread_queue->sync_state;
48432: 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;
48436: 2082 movel %d2,%a0@
return the_thread_queue->sync_state; }
48438: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 4843c: 4e5e unlk %fp 4843e: 4e75 rts
if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level );
48440: 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;
48442: 4284 clrl %d4 48444: 1839 0005 d752 moveb 5d752 <rtems_maximum_priority>,%d4
_ISR_Disable( level );
4844a: 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;
4844c: 2244 moveal %d4,%a1 4844e: 5289 addql #1,%a1
_ISR_Disable( level );
48450: 40c4 movew %sr,%d4 48452: 8084 orl %d4,%d0 48454: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->last;
48456: 206a 0008 moveal %a2@(8),%a0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
4845a: b5c8 cmpal %a0,%a2 4845c: 6720 beqs 4847e <_Thread_queue_Enqueue_priority+0xda>
search_priority = search_thread->current_priority;
4845e: 2268 0014 moveal %a0@(20),%a1
if ( priority >= search_priority )
48462: b3c1 cmpal %d1,%a1 48464: 6318 blss 4847e <_Thread_queue_Enqueue_priority+0xda>
break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level );
48466: 2003 movel %d3,%d0 48468: 46c4 movew %d4,%sr 4846a: 8084 orl %d4,%d0 4846c: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
4846e: 2002 movel %d2,%d0 48470: c0a8 0010 andl %a0@(16),%d0 48474: 67ca beqs 48440 <_Thread_queue_Enqueue_priority+0x9c>
_ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *)
48476: 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 ) ) {
4847a: b5c8 cmpal %a0,%a2 4847c: 66e0 bnes 4845e <_Thread_queue_Enqueue_priority+0xba> 4847e: 2404 movel %d4,%d2
} search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state !=
48480: 7001 moveq #1,%d0 48482: b0ac 0030 cmpl %a4@(48),%d0 48486: 66a6 bnes 4842e <_Thread_queue_Enqueue_priority+0x8a>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
48488: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
4848c: b3c1 cmpal %d1,%a1 4848e: 6756 beqs 484e6 <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next;
48490: 2250 moveal %a0@,%a1
the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node;
48492: 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;
48496: 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;
48498: 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;
4849c: 208b movel %a3,%a0@
next_node->previous = the_node;
4849e: 234b 0004 movel %a3,%a1@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
484a2: 46c4 movew %d4,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
484a4: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 484a8: 4e5e unlk %fp 484aa: 4e75 rts
if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level );
484ac: 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 );
484ae: 2004 movel %d4,%d0 <== NOT EXECUTED 484b0: 40c3 movew %sr,%d3 <== NOT EXECUTED 484b2: 8083 orl %d3,%d0 <== NOT EXECUTED 484b4: 46c0 movew %d0,%sr <== NOT EXECUTED
search_thread = (Thread_Control *) header->first;
484b6: 2052 moveal %a2@,%a0 <== NOT EXECUTED
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
484b8: ba88 cmpl %a0,%d5 <== NOT EXECUTED 484ba: 6600 ff46 bnew 48402 <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 484be: 604a bras 4850a <_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;
484c0: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
484c4: b3c1 cmpal %d1,%a1 484c6: 671e beqs 484e6 <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous;
484c8: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
484cc: 2688 movel %a0,%a3@
the_node->previous = previous_node;
484ce: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
484d2: 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;
484d6: 228b movel %a3,%a1@
search_node->previous = the_node;
484d8: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
484dc: 46c3 movew %d3,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
484de: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 484e2: 4e5e unlk %fp 484e4: 4e75 rts 484e6: 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;
484ea: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
484ee: 2688 movel %a0,%a3@
the_node->previous = previous_node;
484f0: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
484f4: 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;
484f8: 228b movel %a3,%a1@
search_node->previous = the_node;
484fa: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
484fe: 46c2 movew %d2,%sr 48500: 7001 moveq #1,%d0
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
48502: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48506: 4e5e unlk %fp 48508: 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 ) ) {
4850a: 2403 movel %d3,%d2 4850c: 327c ffff moveaw #-1,%a1
} search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state !=
48510: 7001 moveq #1,%d0 48512: b0ac 0030 cmpl %a4@(48),%d0 48516: 6600 ff16 bnew 4842e <_Thread_queue_Enqueue_priority+0x8a> 4851a: 60a4 bras 484c0 <_Thread_queue_Enqueue_priority+0x11c>
00048308 <_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 ) {
48308: 4e56 fff0 linkw %fp,#-16 4830c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48310: 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 );
48314: 2f2b 0038 movel %a3@(56),%sp@-
Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing;
48318: 2479 0005 efbe moveal 5efbe <_Thread_Executing>,%a2
void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) {
4831e: 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 );
48322: 2f0a movel %a2,%sp@- 48324: 4eb9 0004 8710 jsr 48710 <_Thread_Set_state>
/* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) {
4832a: 508f addql #8,%sp 4832c: 4a82 tstl %d2 4832e: 6644 bnes 48374 <_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 )
48330: 41f9 0004 83a4 lea 483a4 <_Thread_queue_Enqueue_priority>,%a0 48336: 7001 moveq #1,%d0 48338: b0ab 0034 cmpl %a3@(52),%d0 4833c: 6706 beqs 48344 <_Thread_queue_Enqueue_with_handler+0x3c> 4833e: 41f9 0004 c124 lea 4c124 <_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 );
48344: 486e fffc pea %fp@(-4) 48348: 2f0a movel %a2,%sp@- 4834a: 2f0b movel %a3,%sp@- 4834c: 4e90 jsr %a0@
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
4834e: 4fef 000c lea %sp@(12),%sp 48352: 7201 moveq #1,%d1 48354: b280 cmpl %d0,%d1 48356: 6712 beqs 4836a <_Thread_queue_Enqueue_with_handler+0x62>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
48358: 2f2e fffc movel %fp@(-4),%sp@- 4835c: 2f0a movel %a2,%sp@- 4835e: 2f00 movel %d0,%sp@- 48360: 4eb9 0004 7834 jsr 47834 <_Thread_blocking_operation_Cancel> 48366: 4fef 000c lea %sp@(12),%sp
}
4836a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48370: 4e5e unlk %fp 48372: 4e75 rts
/* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize(
48374: 202a 0008 movel %a2@(8),%d0
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
48378: 256e 0010 0064 movel %fp@(16),%a2@(100)
the_watchdog->id = id;
4837e: 2540 0068 movel %d0,%a2@(104)
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
48382: 2542 0054 movel %d2,%a2@(84)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
48386: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
4838a: 42aa 006c clrl %a2@(108)
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4838e: 486a 0048 pea %a2@(72) 48392: 4879 0005 efdc pea 5efdc <_Watchdog_Ticks_chain> 48398: 4eb9 0004 8f4c jsr 48f4c <_Watchdog_Insert> 4839e: 508f addql #8,%sp 483a0: 608e bras 48330 <_Thread_queue_Enqueue_with_handler+0x28>
... 0004e080 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level );
4e080: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) {
4e086: 4e56 0000 linkw %fp,#0 4e08a: 2f0a movel %a2,%sp@- 4e08c: 246e 000c moveal %fp@(12),%a2
ISR_Level level; _ISR_Disable( level );
4e090: 40c1 movew %sr,%d1 4e092: 8081 orl %d1,%d0 4e094: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4e096: 202a 0010 movel %a2@(16),%d0 4e09a: 0280 0003 bee0 andil #245472,%d0 4e0a0: 6734 beqs 4e0d6 <_Thread_queue_Extract_fifo+0x56>
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
4e0a2: 2052 moveal %a2@,%a0
_Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4e0a4: 7002 moveq #2,%d0
previous = the_node->previous;
4e0a6: 226a 0004 moveal %a2@(4),%a1
return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL;
4e0aa: 42aa 0044 clrl %a2@(68)
next->previous = previous; previous->next = next;
4e0ae: 2288 movel %a0,%a1@
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
4e0b0: 2149 0004 movel %a1,%a0@(4)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4e0b4: b0aa 0050 cmpl %a2@(80),%d0 4e0b8: 6726 beqs 4e0e0 <_Thread_queue_Extract_fifo+0x60>
_ISR_Enable( level );
4e0ba: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
4e0bc: 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 }
4e0c0: 246e fffc moveal %fp@(-4),%a2 4e0c4: 203c 1003 fff8 movel #268697592,%d0 4e0ca: 2d40 000c movel %d0,%fp@(12) 4e0ce: 4e5e unlk %fp 4e0d0: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state>
ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level );
4e0d6: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif }
4e0d8: 246e fffc moveal %fp@(-4),%a2 4e0dc: 4e5e unlk %fp 4e0de: 4e75 rts 4e0e0: 7003 moveq #3,%d0 4e0e2: 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 );
4e0e6: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4e0e8: 486a 0048 pea %a2@(72) 4e0ec: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4e0f2: 588f addql #4,%sp 4e0f4: 203c 1003 fff8 movel #268697592,%d0 4e0fa: 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 }
4e0fe: 246e fffc moveal %fp@(-4),%a2 4e102: 2d40 000c movel %d0,%fp@(12) 4e106: 4e5e unlk %fp 4e108: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state>
... 0004c1b8 <_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 );
4c1b8: 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 ) {
4c1be: 4e56 ffec linkw %fp,#-20 4c1c2: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4c1c6: 246e 000c moveal %fp@(12),%a2 4c1ca: 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 );
4c1ce: 40c1 movew %sr,%d1 4c1d0: 8081 orl %d1,%d0 4c1d2: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4c1d4: 202a 0010 movel %a2@(16),%d0 4c1d8: 0280 0003 bee0 andil #245472,%d0 4c1de: 677e beqs 4c25e <_Thread_queue_Extract_priority_helper+0xa6>
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4c1e0: 200a movel %a2,%d0 4c1e2: 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;
4c1e8: 2652 moveal %a2@,%a3
previous_node = the_node->previous;
4c1ea: 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));
4c1ee: 206a 0038 moveal %a2@(56),%a0
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4c1f2: b088 cmpl %a0,%d0 4c1f4: 6774 beqs 4c26a <_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;
4c1f6: 286a 0040 moveal %a2@(64),%a4
new_second_node = new_first_node->next;
4c1fa: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node; next_node->previous = new_first_node;
4c1fc: 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;
4c200: 2288 movel %a0,%a1@
next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node;
4c202: 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;
4c206: 208b movel %a3,%a0@
new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4c208: 202a 0040 movel %a2@(64),%d0 4c20c: b0aa 0038 cmpl %a2@(56),%d0 4c210: 6716 beqs 4c228 <_Thread_queue_Extract_priority_helper+0x70>
/* > two threads on 2-n */ new_second_node->previous =
4c212: 43e8 0038 lea %a0@(56),%a1 4c216: 2b49 0004 movel %a1,%a5@(4)
_Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node;
4c21a: 214d 0038 movel %a5,%a0@(56)
new_first_thread->Wait.Block2n.last = last_node;
4c21e: 214c 0040 movel %a4,%a0@(64)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
4c222: 41e8 003c lea %a0@(60),%a0 4c226: 2888 movel %a0,%a4@
/* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) {
4c228: 4a02 tstb %d2 4c22a: 6626 bnes 4c252 <_Thread_queue_Extract_priority_helper+0x9a>
_ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4c22c: 7002 moveq #2,%d0 4c22e: b0aa 0050 cmpl %a2@(80),%d0 4c232: 6742 beqs 4c276 <_Thread_queue_Extract_priority_helper+0xbe>
_ISR_Enable( level );
4c234: 46c1 movew %d1,%sr 4c236: 2d4a 0008 movel %a2,%fp@(8) 4c23a: 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 }
4c240: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c246: 2d49 000c movel %a1,%fp@(12) 4c24a: 4e5e unlk %fp 4c24c: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state>
/* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level );
4c252: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif }
4c254: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c25a: 4e5e unlk %fp 4c25c: 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 );
4c25e: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif }
4c260: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c266: 4e5e unlk %fp 4c268: 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;
4c26a: 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;
4c26e: 228b movel %a3,%a1@
/* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) {
4c270: 4a02 tstb %d2 4c272: 67b8 beqs 4c22c <_Thread_queue_Extract_priority_helper+0x74> 4c274: 60dc bras 4c252 <_Thread_queue_Extract_priority_helper+0x9a> 4c276: 7003 moveq #3,%d0 4c278: 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 );
4c27c: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4c27e: 486a 0048 pea %a2@(72) 4c282: 4eb9 0004 9094 jsr 49094 <_Watchdog_Remove> 4c288: 588f addql #4,%sp 4c28a: 227c 1003 fff8 moveal #268697592,%a1 4c290: 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 }
4c294: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c29a: 2d49 000c movel %a1,%fp@(12) 4c29e: 4e5e unlk %fp 4c2a0: 4ef9 0004 79e8 jmp 479e8 <_Thread_Clear_state>
... 0004a7b8 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) {
4a7b8: 4280 clrl %d0 4a7ba: 4e56 0000 linkw %fp,#0 4a7be: 226e 0008 moveal %fp@(8),%a1 4a7c2: 2049 moveal %a1,%a0 4a7c4: 2208 movel %a0,%d1 4a7c6: 5881 addql #4,%d1 4a7c8: b290 cmpl %a0@,%d1 4a7ca: 6612 bnes 4a7de <_Thread_queue_First_priority+0x26>
uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) {
4a7cc: 5280 addql #1,%d0 4a7ce: 41e8 000c lea %a0@(12),%a0
Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ;
4a7d2: 7204 moveq #4,%d1 4a7d4: b280 cmpl %d0,%d1 4a7d6: 66ec bnes 4a7c4 <_Thread_queue_First_priority+0xc> 4a7d8: 4280 clrl %d0
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) the_thread_queue->Queues.Priority[ index ].first; } return NULL; }
4a7da: 4e5e unlk %fp 4a7dc: 4e75 rts
for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *)
4a7de: 2200 movel %d0,%d1
the_thread_queue->Queues.Priority[ index ].first; } return NULL; }
4a7e0: 4e5e unlk %fp
for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *)
4a7e2: e588 lsll #2,%d0 4a7e4: e989 lsll #4,%d1 4a7e6: 9280 subl %d0,%d1 4a7e8: 2031 1800 movel %a1@(00000000,%d1:l),%d0
the_thread_queue->Queues.Priority[ index ].first; } return NULL; }
4a7ec: 4e75 rts
... 00048548 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) {
48548: 4e56 fff4 linkw %fp,#-12 4854c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48550: 242e 0008 movel %fp@(8),%d2 48554: 45f9 0004 81a8 lea 481a8 <_Thread_queue_Dequeue>,%a2
Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
4855a: 2f02 movel %d2,%sp@-
#else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) {
4855c: 262e 0010 movel %fp@(16),%d3
Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
48560: 4e92 jsr %a2@ 48562: 588f addql #4,%sp 48564: 4a80 tstl %d0 48566: 6710 beqs 48578 <_Thread_queue_Flush+0x30>
#if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status;
48568: 2040 moveal %d0,%a0 4856a: 2143 0034 movel %d3,%a0@(52)
uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
4856e: 2f02 movel %d2,%sp@- 48570: 4e92 jsr %a2@ 48572: 588f addql #4,%sp 48574: 4a80 tstl %d0 48576: 66f0 bnes 48568 <_Thread_queue_Flush+0x20>
( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } }
48578: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4857e: 4e5e unlk %fp 48580: 4e75 rts
... 00048584 <_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 ) {
48584: 7201 moveq #1,%d1
Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) {
48586: 4e56 0000 linkw %fp,#0 4858a: 206e 0008 moveal %fp@(8),%a0
the_thread_queue->state = state;
4858e: 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 ) {
48594: 202e 000c movel %fp@(12),%d0
the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status;
48598: 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;
4859e: 2140 0034 movel %d0,%a0@(52)
the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
485a2: 42a8 0030 clrl %a0@(48)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
485a6: b280 cmpl %d0,%d1 485a8: 6712 beqs 485bc <_Thread_queue_Initialize+0x38>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
485aa: 2008 movel %a0,%d0 485ac: 5880 addql #4,%d0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
485ae: 2148 0008 movel %a0,%a0@(8)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
485b2: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
485b4: 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 ); } }
485b8: 4e5e unlk %fp 485ba: 4e75 rts
* timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize(
485bc: 2008 movel %a0,%d0 485be: 0680 0000 0030 addil #48,%d0
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
485c4: 2208 movel %a0,%d1 485c6: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
485c8: 42a8 0004 clrl %a0@(4)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
485cc: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
485ce: 2148 0008 movel %a0,%a0@(8) 485d2: 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 ;
485d6: b088 cmpl %a0,%d0 485d8: 67de beqs 485b8 <_Thread_queue_Initialize+0x34>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
485da: 2208 movel %a0,%d1 485dc: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
485de: 42a8 0004 clrl %a0@(4)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
485e2: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
485e4: 2148 0008 movel %a0,%a0@(8) 485e8: 41e8 000c lea %a0@(12),%a0 485ec: b088 cmpl %a0,%d0 485ee: 66d4 bnes 485c4 <_Thread_queue_Initialize+0x40> 485f0: 60c6 bras 485b8 <_Thread_queue_Initialize+0x34>
... 000485f4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) {
485f4: 4e56 fff0 linkw %fp,#-16 485f8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 485fc: 246e 0008 moveal %fp@(8),%a2 48600: 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 )
48604: 4a8a tstl %a2 48606: 6708 beqs 48610 <_Thread_queue_Requeue+0x1c>
/* * 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 ) {
48608: 7001 moveq #1,%d0 4860a: b0aa 0034 cmpl %a2@(52),%d0 4860e: 670a beqs 4861a <_Thread_queue_Requeue+0x26>
_Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } }
48610: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 48616: 4e5e unlk %fp <== NOT EXECUTED 48618: 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 );
4861a: 303c 0700 movew #1792,%d0 4861e: 40c2 movew %sr,%d2 48620: 8082 orl %d2,%d0 48622: 46c0 movew %d0,%sr
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
48624: 202b 0010 movel %a3@(16),%d0 48628: 0280 0003 bee0 andil #245472,%d0 4862e: 660c bnes 4863c <_Thread_queue_Requeue+0x48>
_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 );
48630: 46c2 movew %d2,%sr <== NOT EXECUTED
} }
48632: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48638: 4e5e unlk %fp 4863a: 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 );
4863c: 4878 0001 pea 1 <ADD> 48640: 7001 moveq #1,%d0 48642: 2f0b movel %a3,%sp@- 48644: 2540 0030 movel %d0,%a2@(48) 48648: 2f0a movel %a2,%sp@- 4864a: 4eb9 0004 c1b8 jsr 4c1b8 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
48650: 486e fffc pea %fp@(-4) 48654: 2f0b movel %a3,%sp@- 48656: 2f0a movel %a2,%sp@- 48658: 4eb9 0004 83a4 jsr 483a4 <_Thread_queue_Enqueue_priority> 4865e: 4fef 0018 lea %sp@(24),%sp
} _ISR_Enable( level );
48662: 46c2 movew %d2,%sr 48664: 60cc bras 48632 <_Thread_queue_Requeue+0x3e>
... 00048668 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) {
48668: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location );
4866c: 486e fffc pea %fp@(-4) 48670: 2f2e 0008 movel %fp@(8),%sp@- 48674: 4eb9 0004 7de4 jsr 47de4 <_Thread_Get>
switch ( location ) {
4867a: 508f addql #8,%sp 4867c: 4aae fffc tstl %fp@(-4) 48680: 6618 bnes 4869a <_Thread_queue_Timeout+0x32>
#if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread );
48682: 2f00 movel %d0,%sp@- 48684: 4eb9 0004 c2a8 jsr 4c2a8 <_Thread_queue_Process_timeout>
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
4868a: 588f addql #4,%sp 4868c: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 48692: 5380 subql #1,%d0 48694: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch(); break; } }
4869a: 4e5e unlk %fp 4869c: 4e75 rts
... 0004b5cc <_Timer_Manager_initialization>: * * Output parameters: NONE */ void _Timer_Manager_initialization(void) {
4b5cc: 4e56 0000 linkw %fp,#0
_Objects_Initialize_information(
4b5d0: 4878 0004 pea 4 <CONTEXT_ARG> 4b5d4: 42a7 clrl %sp@- 4b5d6: 4878 003c pea 3c <DBL_MANT_DIG+0x7> 4b5da: 2f39 0005 d726 movel 5d726 <Configuration_RTEMS_API+0x6>,%sp@- 4b5e0: 4878 0002 pea 2 <DOUBLE_FLOAT> 4b5e4: 4878 0002 pea 2 <DOUBLE_FLOAT> 4b5e8: 4879 0005 f8f4 pea 5f8f4 <_Timer_Information> 4b5ee: 4eb9 0004 7598 jsr 47598 <_Objects_Initialize_information>
/* * Initialize the pointer to the default timer server control block to NULL * indicating that task-based timer support is not initialized. */ _Timer_server = NULL;
4b5f4: 4fef 001c lea %sp@(28),%sp
}
4b5f8: 4e5e unlk %fp
/* * Initialize the pointer to the default timer server control block to NULL * indicating that task-based timer support is not initialized. */ _Timer_server = NULL;
4b5fa: 42b9 0005 f92e clrl 5f92e <_Timer_server>
}
4b600: 4e75 rts
... 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 d6f8 lea 5d6f8 <_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 9f08 lea 59f08 <_Chain_Get>,%a3 59484: 49f9 0005 d788 lea 5d788 <_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 e89c movel 7e89c <_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 e7ea movel 7e7ea <_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>
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 e89c movel 7e89c <_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 e7ea movel 7e7ea <_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 d6f8 jsr 5d6f8 <_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 d664 jsr 5d664 <_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>
{ 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 e758 movel 7e758 <_Thread_Dispatch_disable_level>,%d0 59640: 5280 addql #1,%d0 59642: 23c0 0007 e758 movel %d0,7e758 <_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 cd7c jsr 5cd7c <_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 c2bc jsr 5c2bc <_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 d8d0 jsr 5d8d0 <_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 d8d0 jsr 5d8d0 <_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>
* 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 9ed0 jmp 59ed0 <_Chain_Append> <== NOT EXECUTED
596b8: 2039 0007 e758 movel 7e758 <_Thread_Dispatch_disable_level>,%d0 596be: 5280 addql #1,%d0 596c0: 23c0 0007 e758 movel %d0,7e758 <_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 c2bc jmp 5c2bc <_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 e7ea movel 7e7ea <_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 d788 jsr 5d788 <_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 c2bc jmp 5c2bc <_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 e89c movel 7e89c <_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 d788 jsr 5d788 <_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 c2bc jmp 5c2bc <_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>
0004a880 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) {
4a880: 4e56 ffdc linkw %fp,#-36 4a884: 206e 0008 moveal %fp@(8),%a0 4a888: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
* For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
4a88c: 2f3c 3b9a ca00 movel #1000000000,%sp@- 4a892: 45f9 0005 c7e0 lea 5c7e0 <__muldi3>,%a2 4a898: 42a7 clrl %sp@-
/* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec;
4a89a: 2828 0004 movel %a0@(4),%d4
const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) {
4a89e: 266e 000c moveal %fp@(12),%a3
* For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
4a8a2: 2f13 movel %a3@,%sp@- 4a8a4: 5bc0 smi %d0 4a8a6: 49c0 extbl %d0 4a8a8: 2f00 movel %d0,%sp@-
/* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
4a8aa: 2a10 movel %a0@,%d5
left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
4a8ac: 4e92 jsr %a2@
const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) {
4a8ae: 2a6e 0010 moveal %fp@(16),%a5
* For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
4a8b2: 2040 moveal %d0,%a0 4a8b4: 2241 moveal %d1,%a1 4a8b6: 4fef 0010 lea %sp@(16),%sp
right += rhs->tv_nsec;
4a8ba: 262b 0004 movel %a3@(4),%d3 4a8be: 5bc2 smi %d2 4a8c0: 49c2 extbl %d2
const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) {
4a8c2: 286e 0014 moveal %fp@(20),%a4
* in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec;
4a8c6: 2208 movel %a0,%d1 4a8c8: d689 addl %a1,%d3 4a8ca: d581 addxl %d1,%d2
if ( right == 0 ) {
4a8cc: 6700 008a beqw 4a958 <_Timespec_Divide+0xd8>
/* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
4a8d0: 2f3c 3b9a ca00 movel #1000000000,%sp@-
* Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right;
4a8d6: 2c3c 0005 c848 movel #378952,%d6
/* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
4a8dc: 42a7 clrl %sp@- 4a8de: 2f05 movel %d5,%sp@- 4a8e0: 5bc1 smi %d1 4a8e2: 49c1 extbl %d1 4a8e4: 2f01 movel %d1,%sp@-
* Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right;
4a8e6: 2a04 movel %d4,%d5 4a8e8: 5bc4 smi %d4 4a8ea: 49c4 extbl %d4
/* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
4a8ec: 4e92 jsr %a2@ 4a8ee: 4fef 0010 lea %sp@(16),%sp 4a8f2: 2241 moveal %d1,%a1 4a8f4: 2040 moveal %d0,%a0
* Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right;
4a8f6: 2f3c 0001 86a0 movel #100000,%sp@- 4a8fc: 2008 movel %a0,%d0 4a8fe: 2209 movel %a1,%d1 4a900: 42a7 clrl %sp@- 4a902: d285 addl %d5,%d1 4a904: d184 addxl %d4,%d0 4a906: 2f01 movel %d1,%sp@- 4a908: 2f00 movel %d0,%sp@- 4a90a: 4e92 jsr %a2@ 4a90c: 4fef 000c lea %sp@(12),%sp 4a910: 2046 moveal %d6,%a0 4a912: 2e83 movel %d3,%sp@ 4a914: 2f02 movel %d2,%sp@- 4a916: 2f01 movel %d1,%sp@- 4a918: 2f00 movel %d0,%sp@- 4a91a: 4e90 jsr %a0@ 4a91c: 4fef 0010 lea %sp@(16),%sp
*ival_percentage = answer / 1000;
4a920: 2046 moveal %d6,%a0
* Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right;
4a922: 2440 moveal %d0,%a2
*ival_percentage = answer / 1000;
4a924: 4878 03e8 pea 3e8 <DBL_MANT_DIG+0x3b3>
* Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right;
4a928: 2641 moveal %d1,%a3
*ival_percentage = answer / 1000;
4a92a: 42a7 clrl %sp@- 4a92c: 2f01 movel %d1,%sp@- 4a92e: 2f0a movel %a2,%sp@- 4a930: 4e90 jsr %a0@ 4a932: 4fef 0010 lea %sp@(16),%sp
*fval_percentage = answer % 1000;
4a936: 4878 03e8 pea 3e8 <DBL_MANT_DIG+0x3b3> 4a93a: 42a7 clrl %sp@-
* TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000;
4a93c: 2a81 movel %d1,%a5@
*fval_percentage = answer % 1000;
4a93e: 2f0b movel %a3,%sp@- 4a940: 2f0a movel %a2,%sp@- 4a942: 4eb9 0005 cbe4 jsr 5cbe4 <__umoddi3> 4a948: 4fef 0010 lea %sp@(16),%sp 4a94c: 2881 movel %d1,%a4@
}
4a94e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4a954: 4e5e unlk %fp 4a956: 4e75 rts
left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0;
4a958: 4295 clrl %a5@
*fval_percentage = 0;
4a95a: 4294 clrl %a4@
answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; }
4a95c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4a962: 4e5e unlk %fp 4a964: 4e75 rts
... 0007c140 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) {
7c140: 4e56 0000 linkw %fp,#0 7c144: 226e 0008 moveal %fp@(8),%a1 7c148: 206e 000c moveal %fp@(12),%a0
if ( lhs->tv_sec > rhs->tv_sec )
7c14c: 2211 movel %a1@,%d1 7c14e: 2010 movel %a0@,%d0 7c150: b081 cmpl %d1,%d0 7c152: 6d18 blts 7c16c <_Timespec_Greater_than+0x2c>
return true; if ( lhs->tv_sec < rhs->tv_sec )
7c154: 6e10 bgts 7c166 <_Timespec_Greater_than+0x26>
#include <rtems/system.h> #include <rtems/score/timespec.h> #include <rtems/score/tod.h> bool _Timespec_Greater_than(
7c156: 2068 0004 moveal %a0@(4),%a0 7c15a: b1e9 0004 cmpal %a1@(4),%a0 7c15e: 5dc0 slt %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; }
7c160: 4e5e unlk %fp
#include <rtems/system.h> #include <rtems/score/timespec.h> #include <rtems/score/tod.h> bool _Timespec_Greater_than(
7c162: 4480 negl %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; }
7c164: 4e75 rts 7c166: 4e5e unlk %fp
) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec )
7c168: 4200 clrb %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; }
7c16a: 4e75 rts 7c16c: 4e5e unlk %fp
bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec )
7c16e: 7001 moveq #1,%d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; }
7c170: 4e75 rts
... 00066ba0 <_Timespec_Is_valid>: #include <rtems/score/tod.h> bool _Timespec_Is_valid( const struct timespec *time ) {
66ba0: 4e56 0000 linkw %fp,#0 66ba4: 206e 0008 moveal %fp@(8),%a0
if ( !time )
66ba8: 4a88 tstl %a0 66baa: 6718 beqs 66bc4 <_Timespec_Is_valid+0x24>
return false; if ( time->tv_sec < 0 )
66bac: 4a90 tstl %a0@ 66bae: 6d14 blts 66bc4 <_Timespec_Is_valid+0x24>
return false; if ( time->tv_nsec < 0 )
66bb0: 2028 0004 movel %a0@(4),%d0 66bb4: 6d0e blts 66bc4 <_Timespec_Is_valid+0x24>
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; }
66bb6: 4e5e unlk %fp
#include <rtems/system.h> #include <rtems/score/timespec.h> #include <rtems/score/tod.h> bool _Timespec_Is_valid(
66bb8: 0c80 3b9a c9ff cmpil #999999999,%d0 66bbe: 53c0 sls %d0 66bc0: 4480 negl %d0
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; }
66bc2: 4e75 rts 66bc4: 4e5e unlk %fp
#include <rtems/system.h> #include <rtems/score/timespec.h> #include <rtems/score/tod.h> bool _Timespec_Is_valid(
66bc6: 4200 clrb %d0
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; }
66bc8: 4e75 rts
... 0007c174 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) {
7c174: 4e56 0000 linkw %fp,#0 7c178: 226e 0008 moveal %fp@(8),%a1 7c17c: 206e 000c moveal %fp@(12),%a0
if ( lhs->tv_sec < rhs->tv_sec )
7c180: 2211 movel %a1@,%d1 7c182: 2010 movel %a0@,%d0 7c184: b081 cmpl %d1,%d0 7c186: 6e18 bgts 7c1a0 <_Timespec_Less_than+0x2c>
return true; if ( lhs->tv_sec > rhs->tv_sec )
7c188: 6d10 blts 7c19a <_Timespec_Less_than+0x26>
#include <rtems/system.h> #include <rtems/score/timespec.h> #include <rtems/score/tod.h> bool _Timespec_Less_than(
7c18a: 2068 0004 moveal %a0@(4),%a0 7c18e: b1e9 0004 cmpal %a1@(4),%a0 7c192: 5ec0 sgt %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; }
7c194: 4e5e unlk %fp
#include <rtems/system.h> #include <rtems/score/timespec.h> #include <rtems/score/tod.h> bool _Timespec_Less_than(
7c196: 4480 negl %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; }
7c198: 4e75 rts 7c19a: 4e5e unlk %fp
) { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec )
7c19c: 4200 clrb %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; }
7c19e: 4e75 rts 7c1a0: 4e5e unlk %fp
bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec )
7c1a2: 7001 moveq #1,%d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; }
7c1a4: 4e75 rts
... 0004c494 <_User_extensions_Add_set>: #include <rtems/score/userext.h> void _User_extensions_Add_set( User_extensions_Control *the_extension ) {
4c494: 4e56 0000 linkw %fp,#0 4c498: 2f0b movel %a3,%sp@-
_Chain_Append( &_User_extensions_List, &the_extension->Node );
4c49a: 47f9 0004 6798 lea 46798 <_Chain_Append>,%a3
#include <rtems/score/userext.h> void _User_extensions_Add_set( User_extensions_Control *the_extension ) {
4c4a0: 2f0a movel %a2,%sp@- 4c4a2: 246e 0008 moveal %fp@(8),%a2
_Chain_Append( &_User_extensions_List, &the_extension->Node );
4c4a6: 2f0a movel %a2,%sp@- 4c4a8: 4879 0005 f098 pea 5f098 <_User_extensions_List> 4c4ae: 4e93 jsr %a3@
/* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) {
4c4b0: 202a 0024 movel %a2@(36),%d0 4c4b4: 508f addql #8,%sp 4c4b6: 6712 beqs 4c4ca <_User_extensions_Add_set+0x36>
the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; _Chain_Append(
4c4b8: 486a 0008 pea %a2@(8) 4c4bc: 4879 0005 ef08 pea 5ef08 <_User_extensions_Switches_list>
/* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { the_extension->Switch.thread_switch =
4c4c2: 2540 0010 movel %d0,%a2@(16)
the_extension->Callouts.thread_switch; _Chain_Append(
4c4c6: 4e93 jsr %a3@ 4c4c8: 508f addql #8,%sp
&_User_extensions_Switches_list, &the_extension->Switch.Node ); } }
4c4ca: 246e fff8 moveal %fp@(-8),%a2 4c4ce: 266e fffc moveal %fp@(-4),%a3 4c4d2: 4e5e unlk %fp 4c4d4: 4e75 rts
... 00048ca0 <_User_extensions_Handler_initialization>: #include <rtems/score/userext.h> #include <rtems/score/wkspace.h> #include <string.h> void _User_extensions_Handler_initialization(void) {
48ca0: 4e56 ffec linkw %fp,#-20
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
48ca4: 203c 0005 f09c movel #389276,%d0 48caa: 23c0 0005 f098 movel %d0,5f098 <_User_extensions_List>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
48cb0: 203c 0005 f098 movel #389272,%d0 48cb6: 23c0 0005 f0a0 movel %d0,5f0a0 <_User_extensions_List+0x8>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
48cbc: 203c 0005 ef0c movel #388876,%d0 48cc2: 23c0 0005 ef08 movel %d0,5ef08 <_User_extensions_Switches_list>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
48cc8: 203c 0005 ef08 movel #388872,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL;
48cce: 42b9 0005 f09c clrl 5f09c <_User_extensions_List+0x4> 48cd4: 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;
48cd8: 2439 0005 d78a movel 5d78a <Configuration+0x36>,%d2
initial_extensions = Configuration.User_extension_table;
48cde: 2639 0005 d78e movel 5d78e <Configuration+0x3a>,%d3 48ce4: 42b9 0005 ef0c clrl 5ef0c <_User_extensions_Switches_list+0x4>
the_chain->last = _Chain_Head(the_chain);
48cea: 23c0 0005 ef10 movel %d0,5ef10 <_User_extensions_Switches_list+0x8>
_Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) {
48cf0: 4a83 tstl %d3 48cf2: 6764 beqs 48d58 <_User_extensions_Handler_initialization+0xb8>
extension = (User_extensions_Control *)
48cf4: 7834 moveq #52,%d4 48cf6: 4c02 4800 mulsl %d2,%d4 48cfa: 2f04 movel %d4,%sp@- 48cfc: 4eb9 0004 91b0 jsr 491b0 <_Workspace_Allocate_or_fatal_error> 48d02: 2440 moveal %d0,%a2
_Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset (
48d04: 2f04 movel %d4,%sp@- 48d06: 42a7 clrl %sp@- 48d08: 2f00 movel %d0,%sp@- 48d0a: 4eb9 0004 f41c jsr 4f41c <memset>
extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) {
48d10: 4fef 0010 lea %sp@(16),%sp 48d14: 4a82 tstl %d2 48d16: 6740 beqs 48d58 <_User_extensions_Handler_initialization+0xb8> 48d18: 4284 clrl %d4 48d1a: 47f9 0004 c494 lea 4c494 <_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;
48d20: 2043 moveal %d3,%a0 48d22: 5284 addql #1,%d4 48d24: 0683 0000 0020 addil #32,%d3 48d2a: 2558 0014 movel %a0@+,%a2@(20) 48d2e: 2558 0018 movel %a0@+,%a2@(24) 48d32: 2558 001c movel %a0@+,%a2@(28) 48d36: 2558 0020 movel %a0@+,%a2@(32) 48d3a: 2558 0024 movel %a0@+,%a2@(36) 48d3e: 2558 0028 movel %a0@+,%a2@(40) 48d42: 2558 002c movel %a0@+,%a2@(44) 48d46: 2550 0030 movel %a0@,%a2@(48)
_User_extensions_Add_set( extension );
48d4a: 2f0a movel %a2,%sp@-
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++;
48d4c: 45ea 0034 lea %a2@(52),%a2 48d50: 4e93 jsr %a3@
extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) {
48d52: 588f addql #4,%sp 48d54: b882 cmpl %d2,%d4 48d56: 65c8 bcss 48d20 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } }
48d58: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48d5e: 4e5e unlk %fp 48d60: 4e75 rts
... 00048e34 <_User_extensions_Thread_create>: #include <rtems/score/userext.h> bool _User_extensions_Thread_create ( Thread_Control *the_thread ) {
48e34: 4e56 0000 linkw %fp,#0 48e38: 2f0a movel %a2,%sp@-
Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ;
48e3a: 2479 0005 f098 moveal 5f098 <_User_extensions_List>,%a2
#include <rtems/score/userext.h> bool _User_extensions_Thread_create ( Thread_Control *the_thread ) {
48e40: 2f02 movel %d2,%sp@- 48e42: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ;
48e46: b5fc 0005 f09c cmpal #389276,%a2 48e4c: 6722 beqs 48e70 <_User_extensions_Thread_create+0x3c>
!_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 ) {
48e4e: 206a 0014 moveal %a2@(20),%a0 48e52: 4a88 tstl %a0 48e54: 6710 beqs 48e66 <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
48e56: 2f02 movel %d2,%sp@- 48e58: 2f39 0005 efbe movel 5efbe <_Thread_Executing>,%sp@- 48e5e: 4e90 jsr %a0@
_Thread_Executing, the_thread ); if ( !status )
48e60: 508f addql #8,%sp 48e62: 4a00 tstb %d0 48e64: 670c beqs 48e72 <_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 ) {
48e66: 2452 moveal %a2@,%a2
{ Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ;
48e68: b5fc 0005 f09c cmpal #389276,%a2 48e6e: 66de bnes 48e4e <_User_extensions_Thread_create+0x1a> 48e70: 7001 moveq #1,%d0
return false; } } return true; }
48e72: 242e fff8 movel %fp@(-8),%d2 48e76: 246e fffc moveal %fp@(-4),%a2 48e7a: 4e5e unlk %fp 48e7c: 4e75 rts
... 00048e80 <_User_extensions_Thread_delete>: #include <rtems/score/userext.h> void _User_extensions_Thread_delete ( Thread_Control *the_thread ) {
48e80: 4e56 0000 linkw %fp,#0 48e84: 2f0a movel %a2,%sp@-
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
48e86: 2479 0005 f0a0 moveal 5f0a0 <_User_extensions_List+0x8>,%a2
#include <rtems/score/userext.h> void _User_extensions_Thread_delete ( Thread_Control *the_thread ) {
48e8c: 2f02 movel %d2,%sp@- 48e8e: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
48e92: b5fc 0005 f098 cmpal #389272,%a2 48e98: 6720 beqs 48eba <_User_extensions_Thread_delete+0x3a>
!_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 )
48e9a: 206a 0020 moveal %a2@(32),%a0 48e9e: 4a88 tstl %a0 48ea0: 670c beqs 48eae <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
48ea2: 2f02 movel %d2,%sp@- 48ea4: 2f39 0005 efbe movel 5efbe <_Thread_Executing>,%sp@- 48eaa: 4e90 jsr %a0@ 48eac: 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 ) {
48eae: 246a 0004 moveal %a2@(4),%a2
) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
48eb2: b5fc 0005 f098 cmpal #389272,%a2 48eb8: 66e0 bnes 48e9a <_User_extensions_Thread_delete+0x1a>
(*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } }
48eba: 242e fff8 movel %fp@(-8),%d2 48ebe: 246e fffc moveal %fp@(-4),%a2 48ec2: 4e5e unlk %fp 48ec4: 4e75 rts
... 00048f0c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) {
48f0c: 4e56 fff4 linkw %fp,#-12 48f10: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48f14: 262e 0008 movel %fp@(8),%d3 48f18: 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 ;
48f1c: 2479 0005 ef08 moveal 5ef08 <_User_extensions_Switches_list>,%a2 48f22: b5fc 0005 ef0c cmpal #388876,%a2 48f28: 6716 beqs 48f40 <_User_extensions_Thread_switch+0x34>
!_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 );
48f2a: 2f02 movel %d2,%sp@- 48f2c: 2f03 movel %d3,%sp@- 48f2e: 206a 0008 moveal %a2@(8),%a0 48f32: 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 ) {
48f34: 2452 moveal %a2@,%a2
) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ;
48f36: 508f addql #8,%sp 48f38: b5fc 0005 ef0c cmpal #388876,%a2 48f3e: 66ea bnes 48f2a <_User_extensions_Thread_switch+0x1e>
the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } }
48f40: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48f46: 4e5e unlk %fp 48f48: 4e75 rts
... 0005d6f8 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) {
5d6f8: 4e56 ffe4 linkw %fp,#-28 5d6fc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5d700: 2a6e 0008 moveal %fp@(8),%a5 5d704: 282e 000c movel %fp@(12),%d4 5d708: 266e 0010 moveal %fp@(16),%a3
Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) {
5d70c: 675e beqs 5d76c <_Watchdog_Adjust_to_chain+0x74>
return; } _ISR_Disable( level );
5d70e: 263c 0000 0700 movel #1792,%d3 5d714: 2003 movel %d3,%d0 5d716: 40c1 movew %sr,%d1 5d718: 8081 orl %d1,%d0 5d71a: 46c0 movew %d0,%sr 5d71c: 284d moveal %a5,%a4
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
5d71e: 240b movel %a3,%d2 5d720: 5882 addql #4,%d2 5d722: 205c moveal %a4@+,%a0
while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) {
5d724: b1cc cmpal %a4,%a0 5d726: 6742 beqs 5d76a <_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 ) {
5d728: 2028 0010 movel %a0@(16),%d0 5d72c: b880 cmpl %d0,%d4 5d72e: 654c bcss 5d77c <_Watchdog_Adjust_to_chain+0x84>
/* * 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;
5d730: 9880 subl %d0,%d4
first->delta_interval = 0;
5d732: 42a8 0010 clrl %a0@(16)
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
5d736: 2250 moveal %a0@,%a1
previous = the_node->previous;
5d738: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
5d73c: 2489 movel %a1,%a2@
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
5d73e: 234a 0004 movel %a2,%a1@(4)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
5d742: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
5d744: 226b 0008 moveal %a3@(8),%a1
the_chain->last = the_node;
5d748: 2748 0008 movel %a0,%a3@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
5d74c: 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;
5d750: 2288 movel %a0,%a1@
while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level );
5d752: 2003 movel %d3,%d0 5d754: 46c1 movew %d1,%sr 5d756: 8081 orl %d1,%d0 5d758: 46c0 movew %d0,%sr
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
5d75a: 2055 moveal %a5@,%a0
if ( _Chain_Is_empty( header ) )
5d75c: b1cc cmpal %a4,%a0 5d75e: 6714 beqs 5d774 <_Watchdog_Adjust_to_chain+0x7c>
break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 )
5d760: 4aa8 0010 tstl %a0@(16) 5d764: 67d0 beqs 5d736 <_Watchdog_Adjust_to_chain+0x3e>
} _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) {
5d766: 4a84 tstl %d4 5d768: 66ba bnes 5d724 <_Watchdog_Adjust_to_chain+0x2c>
if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level );
5d76a: 46c1 movew %d1,%sr
}
5d76c: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5d770: 4e5e unlk %fp 5d772: 4e75 rts
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
5d774: 204c moveal %a4,%a0
} _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) {
5d776: 4a84 tstl %d4 5d778: 66aa bnes 5d724 <_Watchdog_Adjust_to_chain+0x2c> 5d77a: 60ee bras 5d76a <_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;
5d77c: 9084 subl %d4,%d0 5d77e: 2140 0010 movel %d0,%a0@(16)
if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level );
5d782: 46c1 movew %d1,%sr 5d784: 60e6 bras 5d76c <_Watchdog_Adjust_to_chain+0x74>
... 00049048 <_Watchdog_Handler_initialization>: */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
49048: 43f9 0005 efdc lea 5efdc <_Watchdog_Ticks_chain>,%a1 4904e: 41f9 0005 efd0 lea 5efd0 <_Watchdog_Seconds_chain>,%a0
* * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) {
49054: 4e56 0000 linkw %fp,#0
_Watchdog_Sync_level = 0; _Watchdog_Ticks_since_boot = 0; _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); }
49058: 4e5e unlk %fp
* Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { _Watchdog_Sync_count = 0;
4905a: 42b9 0005 f044 clrl 5f044 <_Watchdog_Sync_count>
_Watchdog_Sync_level = 0;
49060: 42b9 0005 efba clrl 5efba <_Watchdog_Sync_level>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49066: 23c9 0005 efe4 movel %a1,5efe4 <_Watchdog_Ticks_chain+0x8> 4906c: 23c8 0005 efd8 movel %a0,5efd8 <_Watchdog_Seconds_chain+0x8>
_Watchdog_Ticks_since_boot = 0;
49072: 42b9 0005 f048 clrl 5f048 <_Watchdog_Ticks_since_boot>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
49078: 22bc 0005 efe0 movel #389088,%a1@
the_chain->permanent_null = NULL;
4907e: 42b9 0005 efe0 clrl 5efe0 <_Watchdog_Ticks_chain+0x4>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
49084: 20bc 0005 efd4 movel #389076,%a0@
the_chain->permanent_null = NULL;
4908a: 42b9 0005 efd4 clrl 5efd4 <_Watchdog_Seconds_chain+0x4>
_Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); }
49090: 4e75 rts
... 00048f4c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) {
48f4c: 4e56 ffec linkw %fp,#-20 48f50: 226e 000c moveal %fp@(12),%a1 48f54: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48f58: 246e 0008 moveal %fp@(8),%a2
Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level );
48f5c: 2a3c 0000 0700 movel #1792,%d5 48f62: 2005 movel %d5,%d0
Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level;
48f64: 2839 0005 ef9e movel 5ef9e <_ISR_Nest_level>,%d4
_ISR_Disable( level );
48f6a: 40c3 movew %sr,%d3 48f6c: 8083 orl %d3,%d0 48f6e: 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 ) {
48f70: 4aa9 0008 tstl %a1@(8) 48f74: 6600 00c6 bnew 4903c <_Watchdog_Insert+0xf0>
_ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++;
48f78: 2039 0005 f044 movel 5f044 <_Watchdog_Sync_count>,%d0 48f7e: 5280 addql #1,%d0 48f80: 23c0 0005 f044 movel %d0,5f044 <_Watchdog_Sync_count>
if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED;
48f86: 7001 moveq #1,%d0 48f88: 2340 0008 movel %d0,%a1@(8)
_Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial;
48f8c: 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 ;
48f90: 2052 moveal %a2@,%a0
; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) )
48f92: 6764 beqs 48ff8 <_Watchdog_Insert+0xac> 48f94: 4a90 tstl %a0@ 48f96: 6760 beqs 48ff8 <_Watchdog_Insert+0xac>
break; if ( delta_interval < after->delta_interval ) {
48f98: 2228 0010 movel %a0@(16),%d1 48f9c: b280 cmpl %d0,%d1 48f9e: 6252 bhis 48ff2 <_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 );
48fa0: 2405 movel %d5,%d2 48fa2: 46c3 movew %d3,%sr 48fa4: 8483 orl %d3,%d2 48fa6: 46c2 movew %d2,%sr
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
48fa8: 7401 moveq #1,%d2 48faa: b4a9 0008 cmpl %a1@(8),%d2 48fae: 666e bnes 4901e <_Watchdog_Insert+0xd2>
goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
48fb0: 2439 0005 efba movel 5efba <_Watchdog_Sync_level>,%d2 48fb6: b484 cmpl %d4,%d2 48fb8: 6230 bhis 48fea <_Watchdog_Insert+0x9e>
if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval;
48fba: 9081 subl %d1,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next );
48fbc: 2050 moveal %a0@,%a0
*/ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) )
48fbe: 4a80 tstl %d0 48fc0: 6736 beqs 48ff8 <_Watchdog_Insert+0xac> 48fc2: 4a90 tstl %a0@ 48fc4: 6732 beqs 48ff8 <_Watchdog_Insert+0xac>
break; if ( delta_interval < after->delta_interval ) {
48fc6: 2228 0010 movel %a0@(16),%d1 48fca: b081 cmpl %d1,%d0 48fcc: 6524 bcss 48ff2 <_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 );
48fce: 2405 movel %d5,%d2 48fd0: 46c3 movew %d3,%sr 48fd2: 8483 orl %d3,%d2 48fd4: 46c2 movew %d2,%sr
if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval;
48fd6: 9081 subl %d1,%d0
* mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
48fd8: 7201 moveq #1,%d1 48fda: b2a9 0008 cmpl %a1@(8),%d1 48fde: 663e bnes 4901e <_Watchdog_Insert+0xd2>
goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
48fe0: 2239 0005 efba movel 5efba <_Watchdog_Sync_level>,%d1 48fe6: b284 cmpl %d4,%d1 48fe8: 63d2 blss 48fbc <_Watchdog_Insert+0x70>
_Watchdog_Sync_level = insert_isr_nest_level;
48fea: 23c4 0005 efba movel %d4,5efba <_Watchdog_Sync_level>
goto restart;
48ff0: 609a bras 48f8c <_Watchdog_Insert+0x40>
if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval;
48ff2: 9280 subl %d0,%d1 48ff4: 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 );
48ff8: 2068 0004 moveal %a0@(4),%a0
RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE;
48ffc: 7402 moveq #2,%d2
) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next;
48ffe: 2450 moveal %a0@,%a2
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
49000: 2239 0005 f048 movel 5f048 <_Watchdog_Ticks_since_boot>,%d1
after_node->next = the_node;
49006: 2089 movel %a1,%a0@
Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node;
49008: 2348 0004 movel %a0,%a1@(4) 4900c: 2341 0014 movel %d1,%a1@(20)
} } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval;
49010: 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;
49014: 2549 0004 movel %a1,%a2@(4) 49018: 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;
4901c: 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;
4901e: 23c4 0005 efba movel %d4,5efba <_Watchdog_Sync_level>
_Watchdog_Sync_count--;
49024: 2039 0005 f044 movel 5f044 <_Watchdog_Sync_count>,%d0 4902a: 5380 subql #1,%d0 4902c: 23c0 0005 f044 movel %d0,5f044 <_Watchdog_Sync_count>
_ISR_Enable( level );
49032: 46c3 movew %d3,%sr
}
49034: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49038: 4e5e unlk %fp 4903a: 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 );
4903c: 46c3 movew %d3,%sr
exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); }
4903e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49042: 4e5e unlk %fp 49044: 4e75 rts
... 00049094 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level );
49094: 203c 0000 0700 movel #1792,%d0
*/ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) {
4909a: 4e56 0000 linkw %fp,#0 4909e: 206e 0008 moveal %fp@(8),%a0 490a2: 2f0a movel %a2,%sp@- 490a4: 2f02 movel %d2,%sp@-
ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level );
490a6: 40c1 movew %sr,%d1 490a8: 8081 orl %d1,%d0 490aa: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
490ac: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
490b0: 7401 moveq #1,%d2 490b2: b480 cmpl %d0,%d2 490b4: 6764 beqs 4911a <_Watchdog_Remove+0x86> 490b6: 6314 blss 490cc <_Watchdog_Remove+0x38>
_Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
490b8: 2279 0005 f048 moveal 5f048 <_Watchdog_Ticks_since_boot>,%a1 490be: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
490c2: 46c1 movew %d1,%sr
return( previous_state ); }
490c4: 241f movel %sp@+,%d2 490c6: 245f moveal %sp@+,%a2 490c8: 4e5e unlk %fp 490ca: 4e75 rts
Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) {
490cc: 143c 0003 moveb #3,%d2 490d0: b480 cmpl %d0,%d2 490d2: 65e4 bcss 490b8 <_Watchdog_Remove+0x24>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next );
490d4: 2250 moveal %a0@,%a1
break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE;
490d6: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) )
490da: 4a91 tstl %a1@ 490dc: 6708 beqs 490e6 <_Watchdog_Remove+0x52>
next_watchdog->delta_interval += the_watchdog->delta_interval;
490de: 2428 0010 movel %a0@(16),%d2 490e2: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
490e6: 2479 0005 f044 moveal 5f044 <_Watchdog_Sync_count>,%a2 490ec: 4a8a tstl %a2 490ee: 670c beqs 490fc <_Watchdog_Remove+0x68>
_Watchdog_Sync_level = _ISR_Nest_level;
490f0: 2479 0005 ef9e moveal 5ef9e <_ISR_Nest_level>,%a2 490f6: 23ca 0005 efba movel %a2,5efba <_Watchdog_Sync_level>
{ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous;
490fc: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
49100: 2489 movel %a1,%a2@
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
49102: 234a 0004 movel %a2,%a1@(4)
_Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49106: 2279 0005 f048 moveal 5f048 <_Watchdog_Ticks_since_boot>,%a1 4910c: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49110: 46c1 movew %d1,%sr
return( previous_state ); }
49112: 241f movel %sp@+,%d2 49114: 245f moveal %sp@+,%a2 49116: 4e5e unlk %fp 49118: 4e75 rts
_Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
4911a: 2279 0005 f048 moveal 5f048 <_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;
49120: 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;
49124: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49128: 46c1 movew %d1,%sr
return( previous_state ); }
4912a: 241f movel %sp@+,%d2 4912c: 245f moveal %sp@+,%a2 4912e: 4e5e unlk %fp 49130: 4e75 rts
... 0004a6b8 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) {
4a6b8: 4e56 fff0 linkw %fp,#-16
printk(
4a6bc: 223c 0005 e5e7 movel #386535,%d1
void _Watchdog_Report( const char *name, Watchdog_Control *watch ) {
4a6c2: 206e 000c moveal %fp@(12),%a0 4a6c6: 48d7 003c moveml %d2-%d5,%sp@ 4a6ca: 202e 0008 movel %fp@(8),%d0
printk(
4a6ce: 2a28 0024 movel %a0@(36),%d5 4a6d2: 2828 0020 movel %a0@(32),%d4 4a6d6: 2628 001c movel %a0@(28),%d3 4a6da: 2428 000c movel %a0@(12),%d2 4a6de: 2268 0010 moveal %a0@(16),%a1 4a6e2: 4a80 tstl %d0 4a6e4: 672a beqs 4a710 <_Watchdog_Report+0x58> 4a6e6: 2f05 movel %d5,%sp@- 4a6e8: 2f04 movel %d4,%sp@- 4a6ea: 2f03 movel %d3,%sp@- 4a6ec: 2f08 movel %a0,%sp@- 4a6ee: 2f02 movel %d2,%sp@- 4a6f0: 2f09 movel %a1,%sp@- 4a6f2: 2f01 movel %d1,%sp@- 4a6f4: 2f00 movel %d0,%sp@- 4a6f6: 4879 0005 e768 pea 5e768 <_Status_Object_name_errors_to_status+0x4a> 4a6fc: 4eb9 0004 4084 jsr 44084 <printk> 4a702: 4fef 0024 lea %sp@(36),%sp
watch, watch->routine, watch->id, watch->user_data ); }
4a706: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4a70c: 4e5e unlk %fp 4a70e: 4e75 rts
void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk(
4a710: 2f05 movel %d5,%sp@- 4a712: 223c 0005 e5ec movel #386540,%d1 4a718: 2f04 movel %d4,%sp@- 4a71a: 2001 movel %d1,%d0 4a71c: 2f03 movel %d3,%sp@- 4a71e: 2f08 movel %a0,%sp@- 4a720: 2f02 movel %d2,%sp@- 4a722: 2f09 movel %a1,%sp@- 4a724: 2f01 movel %d1,%sp@- 4a726: 2f00 movel %d0,%sp@- 4a728: 4879 0005 e768 pea 5e768 <_Status_Object_name_errors_to_status+0x4a> 4a72e: 4eb9 0004 4084 jsr 44084 <printk> 4a734: 4fef 0024 lea %sp@(36),%sp
watch, watch->routine, watch->id, watch->user_data ); }
4a738: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4a73e: 4e5e unlk %fp 4a740: 4e75 rts
... 0004a63c <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level );
4a63c: 203c 0000 0700 movel #1792,%d0
void _Watchdog_Report_chain( const char *name, Chain_Control *header ) {
4a642: 4e56 ffe8 linkw %fp,#-24 4a646: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a64a: 242e 0008 movel %fp@(8),%d2 4a64e: 266e 000c moveal %fp@(12),%a3
ISR_Level level; Chain_Node *node; _ISR_Disable( level );
4a652: 40c3 movew %sr,%d3 4a654: 8083 orl %d3,%d0 4a656: 46c0 movew %d0,%sr
printk( "Watchdog Chain: %s %p\n", name, header );
4a658: 2f0b movel %a3,%sp@- 4a65a: 4bf9 0004 4084 lea 44084 <printk>,%a5 4a660: 2f02 movel %d2,%sp@- 4a662: 4879 0005 e732 pea 5e732 <_Status_Object_name_errors_to_status+0x14> 4a668: 4e95 jsr %a5@
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
4a66a: 245b moveal %a3@+,%a2
if ( !_Chain_Is_empty( header ) ) {
4a66c: 4fef 000c lea %sp@(12),%sp 4a670: b7ca cmpal %a2,%a3 4a672: 672c beqs 4a6a0 <_Watchdog_Report_chain+0x64> 4a674: 49f9 0004 a6b8 lea 4a6b8 <_Watchdog_Report>,%a4
node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch );
4a67a: 2f0a movel %a2,%sp@- 4a67c: 42a7 clrl %sp@- 4a67e: 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 )
4a680: 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 ;
4a682: 508f addql #8,%sp 4a684: b7ca cmpal %a2,%a3 4a686: 66f2 bnes 4a67a <_Watchdog_Report_chain+0x3e>
{ Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name );
4a688: 2f02 movel %d2,%sp@- 4a68a: 4879 0005 e749 pea 5e749 <_Status_Object_name_errors_to_status+0x2b> 4a690: 4e95 jsr %a5@ 4a692: 508f addql #8,%sp
} else { printk( "Chain is empty\n" ); } _ISR_Enable( level );
4a694: 46c3 movew %d3,%sr
}
4a696: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a69c: 4e5e unlk %fp 4a69e: 4e75 rts
_Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" );
4a6a0: 4879 0005 e758 pea 5e758 <_Status_Object_name_errors_to_status+0x3a> 4a6a6: 4e95 jsr %a5@ 4a6a8: 588f addql #4,%sp
} _ISR_Enable( level );
4a6aa: 46c3 movew %d3,%sr
}
4a6ac: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a6b2: 4e5e unlk %fp 4a6b4: 4e75 rts
... 00049218 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) {
49218: 4e56 0000 linkw %fp,#0 4921c: 2f03 movel %d3,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size;
4921e: 2639 0005 d758 movel 5d758 <Configuration+0x4>,%d3
/* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) {
49224: 2f02 movel %d2,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start;
49226: 2439 0005 d754 movel 5d754 <Configuration>,%d2
uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace )
4922c: 4a39 0005 d77c tstb 5d77c <Configuration+0x28> 49232: 6628 bnes 4925c <_Workspace_Handler_initialization+0x44>
memset( starting_address, 0, size ); memory_available = _Heap_Initialize(
49234: 4878 0004 pea 4 <CONTEXT_ARG> 49238: 2f03 movel %d3,%sp@- 4923a: 2f02 movel %d2,%sp@- 4923c: 4879 0005 ef26 pea 5ef26 <_Workspace_Area> 49242: 4eb9 0004 6c60 jsr 46c60 <_Heap_Initialize>
starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 )
49248: 4fef 0010 lea %sp@(16),%sp 4924c: 4a80 tstl %d0 4924e: 671e beqs 4926e <_Workspace_Handler_initialization+0x56>
_Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); }
49250: 242e fff8 movel %fp@(-8),%d2 49254: 262e fffc movel %fp@(-4),%d3 49258: 4e5e unlk %fp 4925a: 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 );
4925c: 2f03 movel %d3,%sp@- 4925e: 42a7 clrl %sp@- 49260: 2f02 movel %d2,%sp@- 49262: 4eb9 0004 f41c jsr 4f41c <memset> 49268: 4fef 000c lea %sp@(12),%sp 4926c: 60c6 bras 49234 <_Workspace_Handler_initialization+0x1c>
size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred(
4926e: 4878 0003 pea 3 <DIVIDE> 49272: 4878 0001 pea 1 <ADD> 49276: 42a7 clrl %sp@- 49278: 4eb9 0004 6fcc jsr 46fcc <_Internal_error_Occurred>
... 0005b34c <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) {
5b34c: 4e56 0000 linkw %fp,#0 5b350: 202e 000c movel %fp@(12),%d0
return calloc( elements, size );
5b354: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5b35a: 2d40 0008 movel %d0,%fp@(8)
}
5b35e: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size );
5b360: 4ef9 0004 a59c jmp 4a59c <calloc>
... 0005c79c <_execve>: int _execve( const char *path __attribute__((unused)), char *const argv[] __attribute__((unused)), char *const envp[] __attribute__((unused)) ) {
5c79c: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
5c7a0: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 5c7a6: 7258 moveq #88,%d1 5c7a8: 2040 moveal %d0,%a0
}
5c7aa: 70ff moveq #-1,%d0 5c7ac: 4e5e unlk %fp
const char *path __attribute__((unused)), char *const argv[] __attribute__((unused)), char *const envp[] __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
5c7ae: 2081 movel %d1,%a0@
}
5c7b0: 4e75 rts
... 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 bbd8 jsr 5bbd8 <_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 63fc jsr 463fc <rtems_shutdown_executive>
42e24: 588f addql #4,%sp <== NOT EXECUTED 42e26: 60fe bras 42e26 <_exit+0x1c> <== NOT EXECUTED
0007a944 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) {
7a944: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 7a948: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 7a94c: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return fcntl( fd, cmd, arg );
7a950: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 7a956: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 7a95a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
7a95e: 4e5e unlk %fp <== NOT EXECUTED
int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg );
7a960: 4ef9 0007 a720 jmp 7a720 <fcntl> <== NOT EXECUTED
... 0005b368 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) {
5b368: 4e56 0000 linkw %fp,#0
free( ptr );
5b36c: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5b372: 4e5e unlk %fp
void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr );
5b374: 4ef9 0004 a688 jmp 4a688 <free>
... 0004d546 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); }
4d546: 7001 moveq #1,%d0 <== NOT EXECUTED
#include <reent.h> pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) {
4d548: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return getpid(); }
4d54c: 4e5e unlk %fp <== NOT EXECUTED
4d54e: 4e75 rts
0004a88c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) {
4a88c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return gettimeofday( tp, tzp ); }
4a890: 4e5e unlk %fp <== NOT EXECUTED
int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp );
4a892: 4ef9 0004 a828 jmp 4a828 <gettimeofday> <== NOT EXECUTED
0004a898 <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) {
4a898: 4e56 0000 linkw %fp,#0 4a89c: 202e 000c movel %fp@(12),%d0
return gettimeofday( tp, tzp );
4a8a0: 2d6e 0010 000c movel %fp@(16),%fp@(12) 4a8a6: 2d40 0008 movel %d0,%fp@(8)
}
4a8aa: 4e5e unlk %fp
struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp );
4a8ac: 4ef9 0004 a828 jmp 4a828 <gettimeofday>
... 0005b458 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) {
5b458: 4e56 0000 linkw %fp,#0
return isatty( fd );
5b45c: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5b462: 4e5e unlk %fp
int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd );
5b464: 4ef9 0005 bb2c jmp 5bb2c <isatty>
... 00067e88 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) {
67e88: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 67e8c: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return link( existing, new );
67e90: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 67e96: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
67e9a: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new );
67e9c: 4ef9 0006 7c6c jmp 67c6c <link> <== NOT EXECUTED
... 0006812c <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) {
6812c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 68130: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return _STAT_NAME( path, buf );
68134: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 6813a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
6813e: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf );
68140: 4ef9 0006 8048 jmp 68048 <lstat> <== NOT EXECUTED
... 0005b610 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) {
5b610: 4e56 0000 linkw %fp,#0
return malloc( size );
5b614: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5b61a: 4e5e unlk %fp
void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size );
5b61c: 4ef9 0004 ac20 jmp 4ac20 <malloc>
... 0005b714 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) {
5b714: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5b718: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return realloc( ptr, size );
5b71c: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5b722: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
5b726: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size );
5b728: 4ef9 0005 b770 jmp 5b770 <realloc> <== NOT EXECUTED
... 00097e00 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) {
97e00: 4e56 ffa0 linkw %fp,#-96 <== NOT EXECUTED 97e04: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ <== NOT EXECUTED 97e08: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
/* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old );
97e0c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) {
97e0e: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED
/* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old );
97e12: 4eb9 0004 6538 jsr 46538 <rtems_filesystem_dirname> <== NOT EXECUTED
if ( old_parent_pathlen == 0 )
97e18: 588f addql #4,%sp <== NOT EXECUTED
/* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old );
97e1a: 2400 movel %d0,%d2 <== NOT EXECUTED
if ( old_parent_pathlen == 0 )
97e1c: 6600 0338 bnew 98156 <_rename_r+0x356> <== NOT EXECUTED
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
97e20: 762f moveq #47,%d3 <== NOT EXECUTED 97e22: 1212 moveb %a2@,%d1 <== NOT EXECUTED 97e24: 1001 moveb %d1,%d0 <== NOT EXECUTED 97e26: 49c0 extbl %d0 <== NOT EXECUTED 97e28: b680 cmpl %d0,%d3 <== NOT EXECUTED 97e2a: 670e beqs 97e3a <_rename_r+0x3a> <== NOT EXECUTED 97e2c: 163c 005c moveb #92,%d3 <== NOT EXECUTED 97e30: b680 cmpl %d0,%d3 <== NOT EXECUTED 97e32: 6706 beqs 97e3a <_rename_r+0x3a> <== NOT EXECUTED 97e34: 4a01 tstb %d1 <== NOT EXECUTED 97e36: 6600 01ac bnew 97fe4 <_rename_r+0x1e4> <== NOT EXECUTED 97e3a: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED 97e40: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 97e44: 220e movel %fp,%d1 <== NOT EXECUTED 97e46: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 97e4c: 2841 moveal %d1,%a4 <== NOT EXECUTED 97e4e: 200e movel %fp,%d0 <== NOT EXECUTED 97e50: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 97e56: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 97e5a: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 97e5e: 26a8 0018 movel %a0@(24),%a3@ <== NOT EXECUTED 97e62: 28a8 001c movel %a0@(28),%a4@ <== NOT EXECUTED 97e66: 2840 moveal %d0,%a4 <== NOT EXECUTED 97e68: 28a8 0020 movel %a0@(32),%a4@ <== NOT EXECUTED 97e6c: 2aa8 0024 movel %a0@(36),%a5@ <== NOT EXECUTED 97e70: 22a8 0028 movel %a0@(40),%a1@ <== NOT EXECUTED 97e74: 4204 clrb %d4 <== NOT EXECUTED
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc;
97e76: 2041 moveal %d1,%a0 <== NOT EXECUTED 97e78: 2840 moveal %d0,%a4 <== NOT EXECUTED
name = old + old_parent_pathlen;
97e7a: d48a addl %a2,%d2 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
97e7c: 45f9 0008 6f0c lea 86f0c <strlen>,%a2 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
97e82: 260e movel %fp,%d3 <== NOT EXECUTED 97e84: 0683 ffff ffe8 addil #-24,%d3 <== NOT EXECUTED
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc;
97e8a: 2d50 ffec movel %a0@,%fp@(-20) <== NOT EXECUTED 97e8e: 2d51 fff8 movel %a1@,%fp@(-8) <== NOT EXECUTED 97e92: 2d54 fff0 movel %a4@,%fp@(-16) <== NOT EXECUTED 97e96: 2d55 fff4 movel %a5@,%fp@(-12) <== NOT EXECUTED 97e9a: 2d53 ffe8 movel %a3@,%fp@(-24) <== NOT EXECUTED
name = old + old_parent_pathlen;
97e9e: 2d42 fffc movel %d2,%fp@(-4) <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
97ea2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 97ea4: 4e92 jsr %a2@ <== NOT EXECUTED 97ea6: 2e80 movel %d0,%sp@ <== NOT EXECUTED 97ea8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 97eaa: 4eb9 0004 64f0 jsr 464f0 <rtems_filesystem_prefix_separators><== NOT EXECUTED 97eb0: d480 addl %d0,%d2 <== NOT EXECUTED 97eb2: 2d42 fffc movel %d2,%fp@(-4) <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
97eb6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 97eb8: 4e92 jsr %a2@ <== NOT EXECUTED 97eba: 4297 clrl %sp@ <== NOT EXECUTED 97ebc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 97ebe: 42a7 clrl %sp@- <== NOT EXECUTED 97ec0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 97ec2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 97ec4: 4eb9 0004 65aa jsr 465aa <rtems_filesystem_evaluate_relative_path><== NOT EXECUTED
0, &old_loc, false ); if ( result != 0 ) {
97eca: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
97ece: 2400 movel %d0,%d2 <== NOT EXECUTED
0, &old_loc, false ); if ( result != 0 ) {
97ed0: 6600 01ac bnew 9807e <_rename_r+0x27e> <== NOT EXECUTED
/* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
97ed4: 2245 moveal %d5,%a1 <== NOT EXECUTED 97ed6: 742f moveq #47,%d2 <== NOT EXECUTED 97ed8: 1211 moveb %a1@,%d1 <== NOT EXECUTED 97eda: 1001 moveb %d1,%d0 <== NOT EXECUTED 97edc: 49c0 extbl %d0 <== NOT EXECUTED 97ede: b480 cmpl %d0,%d2 <== NOT EXECUTED 97ee0: 6700 00d6 beqw 97fb8 <_rename_r+0x1b8> <== NOT EXECUTED 97ee4: 143c 005c moveb #92,%d2 <== NOT EXECUTED 97ee8: b480 cmpl %d0,%d2 <== NOT EXECUTED 97eea: 6700 00cc beqw 97fb8 <_rename_r+0x1b8> <== NOT EXECUTED 97eee: 4a01 tstb %d1 <== NOT EXECUTED 97ef0: 6700 00c6 beqw 97fb8 <_rename_r+0x1b8> <== NOT EXECUTED 97ef4: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED 97efa: 45ee ffc0 lea %fp@(-64),%a2 <== NOT EXECUTED 97efe: 5888 addql #4,%a0 <== NOT EXECUTED 97f00: 4280 clrl %d0 <== NOT EXECUTED 97f02: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 97f04: 2d58 ffc4 movel %a0@+,%fp@(-60) <== NOT EXECUTED 97f08: 2d58 ffc8 movel %a0@+,%fp@(-56) <== NOT EXECUTED 97f0c: 2d58 ffcc movel %a0@+,%fp@(-52) <== NOT EXECUTED 97f10: 2d50 ffd0 movel %a0@,%fp@(-48) <== NOT EXECUTED
if ( !new_parent_loc.ops->evalformake_h ) {
97f14: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 97f18: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 97f1c: 4a88 tstl %a0 <== NOT EXECUTED 97f1e: 6700 01e8 beqw 98108 <_rename_r+0x308> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
97f22: 486e fffc pea %fp@(-4) <== NOT EXECUTED 97f26: 2245 moveal %d5,%a1 <== NOT EXECUTED 97f28: 2f0a movel %a2,%sp@- <== NOT EXECUTED 97f2a: 4871 0800 pea %a1@(00000000,%d0:l) <== NOT EXECUTED 97f2e: 4e90 jsr %a0@ <== NOT EXECUTED
if ( result != 0 ) {
97f30: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
97f34: 2400 movel %d0,%d2 <== NOT EXECUTED
if ( result != 0 ) {
97f36: 6600 017a bnew 980b2 <_rename_r+0x2b2> <== NOT EXECUTED
/* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
97f3a: 226e ffd0 moveal %fp@(-48),%a1 <== NOT EXECUTED 97f3e: b3ee ffe4 cmpal %fp@(-28),%a1 <== NOT EXECUTED 97f42: 6600 00d8 bnew 9801c <_rename_r+0x21c> <== NOT EXECUTED
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 ) {
97f46: 226e ffcc moveal %fp@(-52),%a1 <== NOT EXECUTED 97f4a: 2069 0040 moveal %a1@(64),%a0 <== NOT EXECUTED 97f4e: 4a88 tstl %a0 <== NOT EXECUTED 97f50: 6700 0240 beqw 98192 <_rename_r+0x392> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
97f54: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 97f58: 2f0a movel %a2,%sp@- <== NOT EXECUTED 97f5a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 97f5c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 97f5e: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
97f60: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
97f64: 2840 moveal %d0,%a4 <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
97f66: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 97f6a: 4a88 tstl %a0 <== NOT EXECUTED 97f6c: 670e beqs 97f7c <_rename_r+0x17c> <== NOT EXECUTED 97f6e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 97f72: 4a88 tstl %a0 <== NOT EXECUTED 97f74: 6706 beqs 97f7c <_rename_r+0x17c> <== NOT EXECUTED 97f76: 2f0a movel %a2,%sp@- <== NOT EXECUTED 97f78: 4e90 jsr %a0@ <== NOT EXECUTED 97f7a: 588f addql #4,%sp <== NOT EXECUTED
if ( free_old_parentloc )
97f7c: 4a04 tstb %d4 <== NOT EXECUTED 97f7e: 6716 beqs 97f96 <_rename_r+0x196> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
97f80: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 97f84: 4a88 tstl %a0 <== NOT EXECUTED 97f86: 670e beqs 97f96 <_rename_r+0x196> <== NOT EXECUTED 97f88: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 97f8c: 4a88 tstl %a0 <== NOT EXECUTED 97f8e: 6706 beqs 97f96 <_rename_r+0x196> <== NOT EXECUTED 97f90: 2f0b movel %a3,%sp@- <== NOT EXECUTED 97f92: 4e90 jsr %a0@ <== NOT EXECUTED 97f94: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
97f96: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 97f9a: 4a88 tstl %a0 <== NOT EXECUTED 97f9c: 670e beqs 97fac <_rename_r+0x1ac> <== NOT EXECUTED 97f9e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 97fa2: 4a88 tstl %a0 <== NOT EXECUTED 97fa4: 6706 beqs 97fac <_rename_r+0x1ac> <== NOT EXECUTED 97fa6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 97fa8: 4e90 jsr %a0@ <== NOT EXECUTED 97faa: 588f addql #4,%sp <== NOT EXECUTED
return result; }
97fac: 200c movel %a4,%d0 <== NOT EXECUTED 97fae: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 97fb4: 4e5e unlk %fp <== NOT EXECUTED 97fb6: 4e75 rts <== NOT EXECUTED
/* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
97fb8: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED 97fbe: 45ee ffc0 lea %fp@(-64),%a2 <== NOT EXECUTED 97fc2: 7001 moveq #1,%d0 <== NOT EXECUTED 97fc4: 24a8 0018 movel %a0@(24),%a2@ <== NOT EXECUTED 97fc8: 2d68 001c ffc4 movel %a0@(28),%fp@(-60) <== NOT EXECUTED 97fce: 2d68 0020 ffc8 movel %a0@(32),%fp@(-56) <== NOT EXECUTED 97fd4: 2d68 0024 ffcc movel %a0@(36),%fp@(-52) <== NOT EXECUTED 97fda: 2d68 0028 ffd0 movel %a0@(40),%fp@(-48) <== NOT EXECUTED 97fe0: 6000 ff32 braw 97f14 <_rename_r+0x114> <== NOT EXECUTED
*/ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
97fe4: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED 97fea: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 97fee: 5888 addql #4,%a0 <== NOT EXECUTED 97ff0: 220e movel %fp,%d1 <== NOT EXECUTED 97ff2: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 97ff8: 2841 moveal %d1,%a4 <== NOT EXECUTED 97ffa: 200e movel %fp,%d0 <== NOT EXECUTED 97ffc: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 98002: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 98006: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 9800a: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 9800c: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 9800e: 2840 moveal %d0,%a4 <== NOT EXECUTED 98010: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 98012: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 98014: 2290 movel %a0@,%a1@ <== NOT EXECUTED 98016: 4204 clrb %d4 <== NOT EXECUTED 98018: 6000 fe5c braw 97e76 <_rename_r+0x76> <== NOT EXECUTED
* Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc );
9801c: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 98020: 4a88 tstl %a0 <== NOT EXECUTED 98022: 670e beqs 98032 <_rename_r+0x232> <== NOT EXECUTED 98024: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98028: 4a88 tstl %a0 <== NOT EXECUTED 9802a: 6706 beqs 98032 <_rename_r+0x232> <== NOT EXECUTED 9802c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 9802e: 4e90 jsr %a0@ <== NOT EXECUTED 98030: 588f addql #4,%sp <== NOT EXECUTED
if ( free_old_parentloc )
98032: 4a04 tstb %d4 <== NOT EXECUTED 98034: 6716 beqs 9804c <_rename_r+0x24c> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
98036: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 9803a: 4a88 tstl %a0 <== NOT EXECUTED 9803c: 670e beqs 9804c <_rename_r+0x24c> <== NOT EXECUTED 9803e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98042: 4a88 tstl %a0 <== NOT EXECUTED 98044: 6706 beqs 9804c <_rename_r+0x24c> <== NOT EXECUTED 98046: 2f0b movel %a3,%sp@- <== NOT EXECUTED 98048: 4e90 jsr %a0@ <== NOT EXECUTED 9804a: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
9804c: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 98050: 4a88 tstl %a0 <== NOT EXECUTED 98052: 670e beqs 98062 <_rename_r+0x262> <== NOT EXECUTED 98054: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98058: 4a88 tstl %a0 <== NOT EXECUTED 9805a: 6706 beqs 98062 <_rename_r+0x262> <== NOT EXECUTED 9805c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 9805e: 4e90 jsr %a0@ <== NOT EXECUTED 98060: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
98062: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 98068: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 9806c: 2040 moveal %d0,%a0 <== NOT EXECUTED 9806e: 7012 moveq #18,%d0 <== NOT EXECUTED 98070: 2080 movel %d0,%a0@ <== NOT EXECUTED
if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; }
98072: 200c movel %a4,%d0 <== NOT EXECUTED 98074: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 9807a: 4e5e unlk %fp <== NOT EXECUTED 9807c: 4e75 rts <== NOT EXECUTED
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 )
9807e: 4a04 tstb %d4 <== NOT EXECUTED 98080: 6716 beqs 98098 <_rename_r+0x298> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
98082: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 98086: 4a88 tstl %a0 <== NOT EXECUTED 98088: 670e beqs 98098 <_rename_r+0x298> <== NOT EXECUTED 9808a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 9808e: 4a88 tstl %a0 <== NOT EXECUTED 98090: 6706 beqs 98098 <_rename_r+0x298> <== NOT EXECUTED 98092: 2f0b movel %a3,%sp@- <== NOT EXECUTED 98094: 4e90 jsr %a0@ <== NOT EXECUTED 98096: 588f addql #4,%sp <== NOT EXECUTED
if ( result != 0 ) { 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( result );
98098: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 9809e: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 980a2: 2040 moveal %d0,%a0 <== NOT EXECUTED 980a4: 2082 movel %d2,%a0@ <== NOT EXECUTED
if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; }
980a6: 200c movel %a4,%d0 <== NOT EXECUTED 980a8: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 980ae: 4e5e unlk %fp <== NOT EXECUTED 980b0: 4e75 rts <== NOT EXECUTED
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 );
980b2: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 980b6: 4a88 tstl %a0 <== NOT EXECUTED 980b8: 670e beqs 980c8 <_rename_r+0x2c8> <== NOT EXECUTED 980ba: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 980be: 4a88 tstl %a0 <== NOT EXECUTED 980c0: 6706 beqs 980c8 <_rename_r+0x2c8> <== NOT EXECUTED 980c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 980c4: 4e90 jsr %a0@ <== NOT EXECUTED 980c6: 588f addql #4,%sp <== NOT EXECUTED
if ( free_old_parentloc )
980c8: 4a04 tstb %d4 <== NOT EXECUTED 980ca: 6716 beqs 980e2 <_rename_r+0x2e2> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
980cc: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 980d0: 4a88 tstl %a0 <== NOT EXECUTED 980d2: 670e beqs 980e2 <_rename_r+0x2e2> <== NOT EXECUTED 980d4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 980d8: 4a88 tstl %a0 <== NOT EXECUTED 980da: 6706 beqs 980e2 <_rename_r+0x2e2> <== NOT EXECUTED 980dc: 2f0b movel %a3,%sp@- <== NOT EXECUTED 980de: 4e90 jsr %a0@ <== NOT EXECUTED 980e0: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
980e2: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 980e6: 4a88 tstl %a0 <== NOT EXECUTED 980e8: 67ae beqs 98098 <_rename_r+0x298> <== NOT EXECUTED 980ea: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 980ee: 4a88 tstl %a0 <== NOT EXECUTED 980f0: 67a6 beqs 98098 <_rename_r+0x298> <== NOT EXECUTED 980f2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( result );
980f4: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc );
980f8: 4e90 jsr %a0@ <== NOT EXECUTED 980fa: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( result );
980fc: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 98102: 2040 moveal %d0,%a0 <== NOT EXECUTED 98104: 2082 movel %d2,%a0@ <== NOT EXECUTED 98106: 609e bras 980a6 <_rename_r+0x2a6> <== NOT EXECUTED
*/ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc )
98108: 4a04 tstb %d4 <== NOT EXECUTED 9810a: 6716 beqs 98122 <_rename_r+0x322> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
9810c: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 98110: 4a88 tstl %a0 <== NOT EXECUTED 98112: 670e beqs 98122 <_rename_r+0x322> <== NOT EXECUTED 98114: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98118: 4a88 tstl %a0 <== NOT EXECUTED 9811a: 6706 beqs 98122 <_rename_r+0x322> <== NOT EXECUTED 9811c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 9811e: 4e90 jsr %a0@ <== NOT EXECUTED 98120: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
98122: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 98126: 4a88 tstl %a0 <== NOT EXECUTED 98128: 670e beqs 98138 <_rename_r+0x338> <== NOT EXECUTED 9812a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 9812e: 4a88 tstl %a0 <== NOT EXECUTED 98130: 6706 beqs 98138 <_rename_r+0x338> <== NOT EXECUTED 98132: 2f03 movel %d3,%sp@- <== NOT EXECUTED 98134: 4e90 jsr %a0@ <== NOT EXECUTED 98136: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
98138: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 9813e: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 98142: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; }
98144: 200c movel %a4,%d0 <== NOT EXECUTED 98146: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED
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 );
9814c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; }
98152: 4e5e unlk %fp <== NOT EXECUTED 98154: 4e75 rts <== NOT EXECUTED
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,
98156: 42a7 clrl %sp@- <== NOT EXECUTED 98158: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 9815c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 9815e: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 98162: 2f00 movel %d0,%sp@- <== NOT EXECUTED 98164: 2f0a movel %a2,%sp@- <== NOT EXECUTED 98166: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 )
9816c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 98170: 4a80 tstl %d0 <== NOT EXECUTED 98172: 667a bnes 981ee <_rename_r+0x3ee> <== NOT EXECUTED 98174: 220e movel %fp,%d1 <== NOT EXECUTED 98176: 200e movel %fp,%d0 <== NOT EXECUTED 98178: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 9817e: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 98184: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 98188: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 9818c: 7801 moveq #1,%d4 <== NOT EXECUTED 9818e: 6000 fce6 braw 97e76 <_rename_r+0x76> <== NOT EXECUTED
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 );
98192: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 98196: 4a88 tstl %a0 <== NOT EXECUTED 98198: 6706 beqs 981a0 <_rename_r+0x3a0> <== NOT EXECUTED 9819a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 9819c: 4e90 jsr %a0@ <== NOT EXECUTED 9819e: 588f addql #4,%sp <== NOT EXECUTED
if ( free_old_parentloc )
981a0: 4a04 tstb %d4 <== NOT EXECUTED 981a2: 6716 beqs 981ba <_rename_r+0x3ba> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
981a4: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 981a8: 4a88 tstl %a0 <== NOT EXECUTED 981aa: 670e beqs 981ba <_rename_r+0x3ba> <== NOT EXECUTED 981ac: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 981b0: 4a88 tstl %a0 <== NOT EXECUTED 981b2: 6706 beqs 981ba <_rename_r+0x3ba> <== NOT EXECUTED 981b4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 981b6: 4e90 jsr %a0@ <== NOT EXECUTED 981b8: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
981ba: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 981be: 4a88 tstl %a0 <== NOT EXECUTED 981c0: 670e beqs 981d0 <_rename_r+0x3d0> <== NOT EXECUTED 981c2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 981c6: 4a88 tstl %a0 <== NOT EXECUTED 981c8: 6706 beqs 981d0 <_rename_r+0x3d0> <== NOT EXECUTED 981ca: 2f03 movel %d3,%sp@- <== NOT EXECUTED 981cc: 4e90 jsr %a0@ <== NOT EXECUTED 981ce: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
981d0: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 981d6: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 981da: 2240 moveal %d0,%a1 <== NOT EXECUTED
if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; }
981dc: 200c movel %a4,%d0 <== NOT EXECUTED 981de: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED
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 );
981e4: 22bc 0000 0086 movel #134,%a1@ <== NOT EXECUTED
if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; }
981ea: 4e5e unlk %fp <== NOT EXECUTED 981ec: 4e75 rts <== NOT EXECUTED
else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 )
981ee: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED
if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; }
981f2: 200c movel %a4,%d0 <== NOT EXECUTED 981f4: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 981fa: 4e5e unlk %fp <== NOT EXECUTED 981fc: 4e75 rts <== NOT EXECUTED
... 00047cfe <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) {
47cfe: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 47d02: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return _STAT_NAME( path, buf );
47d06: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 47d0c: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
47d10: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf );
47d12: 4ef9 0004 7c18 jmp 47c18 <stat> <== NOT EXECUTED
0004e5c8 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) {
4e5c8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return unlink( path );
4e5cc: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED
}
4e5d2: 4e5e unlk %fp <== NOT EXECUTED
int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path );
4e5d4: 4ef9 0004 e360 jmp 4e360 <unlink> <== NOT EXECUTED
... 0005b730 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) {
5b730: 4e56 0000 linkw %fp,#0 5b734: 222e 0010 movel %fp@(16),%d1 5b738: 202e 000c movel %fp@(12),%d0
return write( fd, buf, nbytes );
5b73c: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5b742: 2d41 000c movel %d1,%fp@(12) 5b746: 2d40 0008 movel %d0,%fp@(8)
}
5b74a: 4e5e unlk %fp
int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes );
5b74c: 4ef9 0005 b88c jmp 5b88c <write>
... 00045b54 <aio_cancel>: int aio_cancel( int filedes __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) {
45b54: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45b58: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45b5e: 7258 moveq #88,%d1 45b60: 2040 moveal %d0,%a0
}
45b62: 70ff moveq #-1,%d0 45b64: 4e5e unlk %fp
int aio_cancel( int filedes __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45b66: 2081 movel %d1,%a0@
}
45b68: 4e75 rts
... 00045b6c <aio_error>: #include <rtems/seterr.h> int aio_error( const struct aiocb *aiocbp __attribute__((unused)) ) {
45b6c: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45b70: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45b76: 7258 moveq #88,%d1 45b78: 2040 moveal %d0,%a0
}
45b7a: 70ff moveq #-1,%d0 45b7c: 4e5e unlk %fp
int aio_error( const struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45b7e: 2081 movel %d1,%a0@
}
45b80: 4e75 rts
... 00045b84 <aio_fsync>: int aio_fsync( int op __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) {
45b84: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45b88: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45b8e: 7258 moveq #88,%d1 45b90: 2040 moveal %d0,%a0
}
45b92: 70ff moveq #-1,%d0 45b94: 4e5e unlk %fp
int aio_fsync( int op __attribute__((unused)), struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45b96: 2081 movel %d1,%a0@
}
45b98: 4e75 rts
... 00045b9c <aio_read>: #include <rtems/seterr.h> int aio_read( struct aiocb *aiocbp __attribute__((unused)) ) {
45b9c: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45ba0: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45ba6: 7258 moveq #88,%d1 45ba8: 2040 moveal %d0,%a0
}
45baa: 70ff moveq #-1,%d0 45bac: 4e5e unlk %fp
int aio_read( struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45bae: 2081 movel %d1,%a0@
}
45bb0: 4e75 rts
... 00045bb4 <aio_return>: #include <rtems/seterr.h> int aio_return( const struct aiocb *aiocbp __attribute__((unused)) ) {
45bb4: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45bb8: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45bbe: 7258 moveq #88,%d1 45bc0: 2040 moveal %d0,%a0
}
45bc2: 70ff moveq #-1,%d0 45bc4: 4e5e unlk %fp
int aio_return( const struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45bc6: 2081 movel %d1,%a0@
}
45bc8: 4e75 rts
... 00045bcc <aio_suspend>: int aio_suspend( const struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), const struct timespec *timeout __attribute__((unused)) ) {
45bcc: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45bd0: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45bd6: 7258 moveq #88,%d1 45bd8: 2040 moveal %d0,%a0
}
45bda: 70ff moveq #-1,%d0 45bdc: 4e5e unlk %fp
const struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), const struct timespec *timeout __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45bde: 2081 movel %d1,%a0@
}
45be0: 4e75 rts
... 00045be4 <aio_write>: #include <rtems/seterr.h> int aio_write( struct aiocb *aiocbp __attribute__((unused)) ) {
45be4: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45be8: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45bee: 7258 moveq #88,%d1 45bf0: 2040 moveal %d0,%a0
}
45bf2: 70ff moveq #-1,%d0 45bf4: 4e5e unlk %fp
int aio_write( struct aiocb *aiocbp __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45bf6: 2081 movel %d1,%a0@
}
45bf8: 4e75 rts
... 00066ca0 <chdir>: #include <rtems/seterr.h> int chdir( const char *pathname ) {
66ca0: 4e56 ffec linkw %fp,#-20 66ca4: 2f0a movel %a2,%sp@- 66ca6: 2f02 movel %d2,%sp@- 66ca8: 242e 0008 movel %fp@(8),%d2
rtems_filesystem_location_info_t loc; int result; if ( !pathname )
66cac: 6700 0098 beqw 66d46 <chdir+0xa6>
/* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
66cb0: 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(
66cb2: 45ee ffec lea %fp@(-20),%a2
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
66cb6: 4eb9 0008 6f0c jsr 86f0c <strlen>
rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path(
66cbc: 7201 moveq #1,%d1 66cbe: 2e81 movel %d1,%sp@ 66cc0: 2f0a movel %a2,%sp@- 66cc2: 4878 0001 pea 1 <ADD> 66cc6: 2f00 movel %d0,%sp@- 66cc8: 2f02 movel %d2,%sp@- 66cca: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 )
66cd0: 4fef 0014 lea %sp@(20),%sp 66cd4: 4a80 tstl %d0 66cd6: 6660 bnes 66d38 <chdir+0x98>
return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) {
66cd8: 226e fff8 moveal %fp@(-8),%a1 66cdc: 2069 0010 moveal %a1@(16),%a0 66ce0: 4a88 tstl %a0 66ce2: 6700 00ac beqw 66d90 <chdir+0xf0>
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
66ce6: 2f0a movel %a2,%sp@- 66ce8: 4e90 jsr %a0@ 66cea: 588f addql #4,%sp 66cec: 7201 moveq #1,%d1 66cee: b280 cmpl %d0,%d1 66cf0: 666e bnes 66d60 <chdir+0xc0>
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current );
66cf2: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 66cf8: 2268 0010 moveal %a0@(16),%a1 66cfc: 4a89 tstl %a1 66cfe: 6716 beqs 66d16 <chdir+0x76> 66d00: 2269 001c moveal %a1@(28),%a1 66d04: 4a89 tstl %a1 66d06: 670e beqs 66d16 <chdir+0x76> 66d08: 4868 0004 pea %a0@(4) 66d0c: 4e91 jsr %a1@ 66d0e: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 66d14: 588f addql #4,%sp
rtems_filesystem_current = loc;
66d16: 5888 addql #4,%a0 66d18: 4280 clrl %d0 66d1a: 20d2 movel %a2@,%a0@+ 66d1c: 20ee fff0 movel %fp@(-16),%a0@+ 66d20: 20ee fff4 movel %fp@(-12),%a0@+ 66d24: 20ee fff8 movel %fp@(-8),%a0@+
return 0; }
66d28: 242e ffe4 movel %fp@(-28),%d2
rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc;
66d2c: 20ae fffc movel %fp@(-4),%a0@
return 0; }
66d30: 246e ffe8 moveal %fp@(-24),%a2 66d34: 4e5e unlk %fp 66d36: 4e75 rts 66d38: 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 )
66d3c: 70ff moveq #-1,%d0
rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; }
66d3e: 246e ffe8 moveal %fp@(-24),%a2 66d42: 4e5e unlk %fp 66d44: 4e75 rts
{ rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT );
66d46: 4eb9 0008 0e64 jsr 80e64 <__errno> 66d4c: 740e moveq #14,%d2 66d4e: 2040 moveal %d0,%a0 66d50: 70ff moveq #-1,%d0 66d52: 2082 movel %d2,%a0@
rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; }
66d54: 242e ffe4 movel %fp@(-28),%d2 66d58: 246e ffe8 moveal %fp@(-24),%a2 66d5c: 4e5e unlk %fp 66d5e: 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 );
66d60: 206e fff8 moveal %fp@(-8),%a0 66d64: 4a88 tstl %a0 66d66: 670e beqs 66d76 <chdir+0xd6> 66d68: 2068 001c moveal %a0@(28),%a0 66d6c: 4a88 tstl %a0 66d6e: 6706 beqs 66d76 <chdir+0xd6> 66d70: 2f0a movel %a2,%sp@- 66d72: 4e90 jsr %a0@ 66d74: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
66d76: 4eb9 0008 0e64 jsr 80e64 <__errno>
rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; }
66d7c: 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 );
66d80: 2040 moveal %d0,%a0 66d82: 7214 moveq #20,%d1 66d84: 70ff moveq #-1,%d0
rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; }
66d86: 246e ffe8 moveal %fp@(-24),%a2 66d8a: 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 );
66d8c: 2081 movel %d1,%a0@
rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; }
66d8e: 4e75 rts
/* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc );
66d90: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 66d94: 4a88 tstl %a0 <== NOT EXECUTED 66d96: 6706 beqs 66d9e <chdir+0xfe> <== NOT EXECUTED 66d98: 2f0a movel %a2,%sp@- <== NOT EXECUTED 66d9a: 4e90 jsr %a0@ <== NOT EXECUTED 66d9c: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
66d9e: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED
rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; }
66da4: 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 );
66da8: 2040 moveal %d0,%a0 <== NOT EXECUTED 66daa: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; }
66dac: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 66db0: 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 );
66db2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; }
66db8: 4e75 rts <== NOT EXECUTED
... 00046120 <chmod>: int chmod( const char *path, mode_t mode ) {
46120: 4e56 ffec linkw %fp,#-20 46124: 2f03 movel %d3,%sp@- 46126: 262e 0008 movel %fp@(8),%d3 4612a: 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 );
4612c: 240e movel %fp,%d2 4612e: 0682 ffff ffec addil #-20,%d2 46134: 2f03 movel %d3,%sp@- 46136: 4eb9 0008 6f0c jsr 86f0c <strlen> 4613c: 7201 moveq #1,%d1 4613e: 2e81 movel %d1,%sp@ 46140: 2f02 movel %d2,%sp@- 46142: 42a7 clrl %sp@- 46144: 2f00 movel %d0,%sp@- 46146: 2f03 movel %d3,%sp@- 46148: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path>
if ( status != 0 )
4614e: 4fef 0014 lea %sp@(20),%sp 46152: 4a80 tstl %d0 46154: 6640 bnes 46196 <chmod+0x76>
return -1; if ( !loc.handlers ){
46156: 206e fff4 moveal %fp@(-12),%a0 4615a: 4a88 tstl %a0 4615c: 677c beqs 461da <chmod+0xba>
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){
4615e: 2068 001c moveal %a0@(28),%a0 46162: 4a88 tstl %a0 46164: 6740 beqs 461a6 <chmod+0x86>
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode );
46166: 2f2e 000c movel %fp@(12),%sp@- 4616a: 2f02 movel %d2,%sp@- 4616c: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
4616e: 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 );
46172: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
46174: 508f addql #8,%sp 46176: 4a88 tstl %a0 46178: 670e beqs 46188 <chmod+0x68> 4617a: 2068 001c moveal %a0@(28),%a0 4617e: 4a88 tstl %a0 46180: 6706 beqs 46188 <chmod+0x68> 46182: 2f02 movel %d2,%sp@- 46184: 4e90 jsr %a0@ 46186: 588f addql #4,%sp
return result; }
46188: 2003 movel %d3,%d0 4618a: 242e ffe4 movel %fp@(-28),%d2 4618e: 262e ffe8 movel %fp@(-24),%d3 46192: 4e5e unlk %fp 46194: 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 )
46196: 76ff moveq #-1,%d3
result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; }
46198: 2003 movel %d3,%d0 4619a: 242e ffe4 movel %fp@(-28),%d2 4619e: 262e ffe8 movel %fp@(-24),%d3 461a2: 4e5e unlk %fp 461a4: 4e75 rts
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc );
461a6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 461aa: 4a88 tstl %a0 <== NOT EXECUTED 461ac: 670e beqs 461bc <chmod+0x9c> <== NOT EXECUTED 461ae: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 461b2: 4a88 tstl %a0 <== NOT EXECUTED 461b4: 6706 beqs 461bc <chmod+0x9c> <== NOT EXECUTED 461b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 461b8: 4e90 jsr %a0@ <== NOT EXECUTED 461ba: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
461bc: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 461c2: 76ff moveq #-1,%d3 <== NOT EXECUTED 461c4: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; }
461c6: 2003 movel %d3,%d0 <== NOT EXECUTED 461c8: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 461cc: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 461d0: 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 );
461d2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; }
461d8: 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 );
461da: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 461de: 4a88 tstl %a0 <== NOT EXECUTED 461e0: 670e beqs 461f0 <chmod+0xd0> <== NOT EXECUTED 461e2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 461e6: 4a88 tstl %a0 <== NOT EXECUTED 461e8: 6706 beqs 461f0 <chmod+0xd0> <== NOT EXECUTED 461ea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 461ec: 4e90 jsr %a0@ <== NOT EXECUTED 461ee: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
461f0: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 461f6: 76ff moveq #-1,%d3 <== NOT EXECUTED 461f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 461fa: 7009 moveq #9,%d0 <== NOT EXECUTED 461fc: 2080 movel %d0,%a0@ <== NOT EXECUTED
result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; }
461fe: 2003 movel %d3,%d0 <== NOT EXECUTED 46200: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 46204: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 46208: 4e5e unlk %fp <== NOT EXECUTED
4620a: 4e75 rts
00066dbc <chown>: int chown( const char *path, uid_t owner, gid_t group ) {
66dbc: 4e56 ffdc linkw %fp,#-36 66dc0: 48d7 003c moveml %d2-%d5,%sp@ 66dc4: 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 ) )
66dc8: 240e movel %fp,%d2 66dca: 0682 ffff ffec addil #-20,%d2 66dd0: 2f03 movel %d3,%sp@-
int chown( const char *path, uid_t owner, gid_t group ) {
66dd2: 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 ) )
66dd6: 4eb9 0008 6f0c jsr 86f0c <strlen> 66ddc: 7201 moveq #1,%d1 66dde: 2e81 movel %d1,%sp@
int chown( const char *path, uid_t owner, gid_t group ) {
66de0: 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 ) )
66de4: 2f02 movel %d2,%sp@- 66de6: 42a7 clrl %sp@- 66de8: 2f00 movel %d0,%sp@- 66dea: 2f03 movel %d3,%sp@- 66dec: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path> 66df2: 4fef 0014 lea %sp@(20),%sp 66df6: 4a80 tstl %d0 66df8: 6640 bnes 66e3a <chown+0x7e>
return -1; if ( !loc.ops->chown_h ) {
66dfa: 226e fff8 moveal %fp@(-8),%a1 66dfe: 2069 0018 moveal %a1@(24),%a0 66e02: 4a88 tstl %a0 66e04: 6742 beqs 66e48 <chown+0x8c>
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group );
66e06: 3f05 movew %d5,%sp@- 66e08: 4267 clrw %sp@- 66e0a: 3f04 movew %d4,%sp@- 66e0c: 4267 clrw %sp@- 66e0e: 2f02 movel %d2,%sp@- 66e10: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
66e12: 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 );
66e16: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
66e18: 4fef 000c lea %sp@(12),%sp 66e1c: 4a88 tstl %a0 66e1e: 670e beqs 66e2e <chown+0x72> 66e20: 2068 001c moveal %a0@(28),%a0 66e24: 4a88 tstl %a0 66e26: 6706 beqs 66e2e <chown+0x72> 66e28: 2f02 movel %d2,%sp@- 66e2a: 4e90 jsr %a0@ 66e2c: 588f addql #4,%sp
return result; }
66e2e: 2003 movel %d3,%d0 66e30: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 66e36: 4e5e unlk %fp 66e38: 4e75 rts
) { rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
66e3a: 76ff moveq #-1,%d3
result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; }
66e3c: 2003 movel %d3,%d0 66e3e: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 66e44: 4e5e unlk %fp 66e46: 4e75 rts
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc );
66e48: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 66e4c: 4a88 tstl %a0 <== NOT EXECUTED 66e4e: 6706 beqs 66e56 <chown+0x9a> <== NOT EXECUTED 66e50: 2f02 movel %d2,%sp@- <== NOT EXECUTED 66e52: 4e90 jsr %a0@ <== NOT EXECUTED 66e54: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
66e56: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 66e5c: 76ff moveq #-1,%d3 <== NOT EXECUTED 66e5e: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; }
66e60: 2003 movel %d3,%d0 <== NOT EXECUTED 66e62: 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 );
66e68: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; }
66e6e: 4e5e unlk %fp <== NOT EXECUTED 66e70: 4e75 rts <== NOT EXECUTED
... 00066e74 <chroot>: #include <rtems/seterr.h> int chroot( const char *pathname ) {
66e74: 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) {
66e78: 203c 000a 69a8 movel #682408,%d0
#include <rtems/seterr.h> int chroot( const char *pathname ) {
66e7e: 2f0b movel %a3,%sp@- 66e80: 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) {
66e82: b0b9 000a 1fac cmpl a1fac <rtems_current_user_env>,%d0 66e88: 6700 0086 beqw 66f10 <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);
66e8c: 2f2e 0008 movel %fp@(8),%sp@- 66e90: 4eb9 0006 6ca0 jsr 66ca0 <chdir>
if (result) {
66e96: 588f addql #4,%sp 66e98: 4a80 tstl %d0 66e9a: 6600 00a6 bnew 66f42 <chroot+0xce>
rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
66e9e: 42a7 clrl %sp@- 66ea0: 45ee ffec lea %fp@(-20),%a2 66ea4: 2f0a movel %a2,%sp@- 66ea6: 42a7 clrl %sp@- 66ea8: 4878 0001 pea 1 <ADD> 66eac: 4879 0009 ac9b pea 9ac9b <rtems_bdpart_shell_usage+0xf1f> 66eb2: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path> 66eb8: 4fef 0014 lea %sp@(20),%sp 66ebc: 4a80 tstl %d0 66ebe: 6600 0082 bnew 66f42 <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);
66ec2: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 66ec8: 2268 0024 moveal %a0@(36),%a1 66ecc: 4a89 tstl %a1 66ece: 6716 beqs 66ee6 <chroot+0x72> 66ed0: 2269 001c moveal %a1@(28),%a1 66ed4: 4a89 tstl %a1 66ed6: 670e beqs 66ee6 <chroot+0x72> 66ed8: 4868 0018 pea %a0@(24) 66edc: 4e91 jsr %a1@ 66ede: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 66ee4: 588f addql #4,%sp
rtems_filesystem_root = loc;
66ee6: 2152 0018 movel %a2@,%a0@(24) 66eea: 4280 clrl %d0 66eec: 216e fff0 001c movel %fp@(-16),%a0@(28) 66ef2: 216e fff4 0020 movel %fp@(-12),%a0@(32) 66ef8: 216e fff8 0024 movel %fp@(-8),%a0@(36)
return 0; }
66efe: 246e ffe4 moveal %fp@(-28),%a2 66f02: 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;
66f06: 216e fffc 0028 movel %fp@(-4),%a0@(40)
return 0; }
66f0c: 4e5e unlk %fp 66f0e: 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*/
66f10: 4eb9 0006 83ac jsr 683ac <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
66f16: 203c 000a 69a8 movel #682408,%d0 66f1c: b0b9 000a 1fac cmpl a1fac <rtems_current_user_env>,%d0 66f22: 6600 ff68 bnew 66e8c <chroot+0x18>
rtems_set_errno_and_return_minus_one( ENOTSUP );
66f26: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED
} rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; }
66f2c: 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 );
66f30: 2040 moveal %d0,%a0 <== NOT EXECUTED 66f32: 70ff moveq #-1,%d0 <== NOT EXECUTED
} rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; }
66f34: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 66f38: 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 );
66f3a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
} rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; }
66f40: 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 );
66f42: 45f9 0008 0e64 lea 80e64 <__errno>,%a2 <== NOT EXECUTED 66f48: 4e92 jsr %a2@ <== NOT EXECUTED 66f4a: 2640 moveal %d0,%a3 <== NOT EXECUTED 66f4c: 4e92 jsr %a2@ <== NOT EXECUTED
} rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; }
66f4e: 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 );
66f52: 2040 moveal %d0,%a0 <== NOT EXECUTED 66f54: 70ff moveq #-1,%d0 <== NOT EXECUTED 66f56: 2690 movel %a0@,%a3@ <== NOT EXECUTED
} rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; }
66f58: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 66f5c: 4e5e unlk %fp <== NOT EXECUTED
66f5e: 4e75 rts
00045bfc <clock_getcpuclockid>: int clock_getcpuclockid( pid_t pid, clockid_t *clock_id ) {
45bfc: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45c00: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c06: 7258 moveq #88,%d1 45c08: 2040 moveal %d0,%a0
}
45c0a: 70ff moveq #-1,%d0 45c0c: 4e5e unlk %fp
int clock_getcpuclockid( pid_t pid, clockid_t *clock_id ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45c0e: 2081 movel %d1,%a0@
}
45c10: 4e75 rts
... 00045c14 <clock_getenable_attr>: int clock_getenable_attr( clockid_t clock_id, int *attr ) {
45c14: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45c18: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c1e: 7258 moveq #88,%d1 45c20: 2040 moveal %d0,%a0
}
45c22: 70ff moveq #-1,%d0 45c24: 4e5e unlk %fp
int clock_getenable_attr( clockid_t clock_id, int *attr ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45c26: 2081 movel %d1,%a0@
}
45c28: 4e75 rts
... 00045c38 <clock_gettime>: int clock_gettime( clockid_t clock_id, struct timespec *tp ) {
45c38: 4e56 0000 linkw %fp,#0 45c3c: 202e 0008 movel %fp@(8),%d0 45c40: 222e 000c movel %fp@(12),%d1 45c44: 2f02 movel %d2,%sp@-
if ( !tp )
45c46: 4a81 tstl %d1 45c48: 6718 beqs 45c62 <clock_gettime+0x2a>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) {
45c4a: 7401 moveq #1,%d2 45c4c: b480 cmpl %d0,%d2 45c4e: 6752 beqs 45ca2 <clock_gettime+0x6a>
_TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) {
45c50: 7404 moveq #4,%d2 45c52: b480 cmpl %d0,%d2 45c54: 6738 beqs 45c8e <clock_gettime+0x56>
return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
45c56: 7402 moveq #2,%d2 45c58: b480 cmpl %d0,%d2 45c5a: 6732 beqs 45c8e <clock_gettime+0x56>
return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME )
45c5c: 7203 moveq #3,%d1 45c5e: b280 cmpl %d0,%d1 45c60: 6716 beqs 45c78 <clock_gettime+0x40>
rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL );
45c62: 4eb9 0004 fbec jsr 4fbec <__errno>
return 0; }
45c68: 242e fffc movel %fp@(-4),%d2
#ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL );
45c6c: 2040 moveal %d0,%a0 45c6e: 7216 moveq #22,%d1 45c70: 70ff moveq #-1,%d0
return 0; }
45c72: 4e5e unlk %fp
#ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL );
45c74: 2081 movel %d1,%a0@
return 0; }
45c76: 4e75 rts
} #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS );
45c78: 4eb9 0004 fbec jsr 4fbec <__errno> 45c7e: 7458 moveq #88,%d2 45c80: 2040 moveal %d0,%a0 45c82: 70ff moveq #-1,%d0 45c84: 2082 movel %d2,%a0@
#endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; }
45c86: 242e fffc movel %fp@(-4),%d2 45c8a: 4e5e unlk %fp 45c8c: 4e75 rts
} #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp );
45c8e: 2f01 movel %d1,%sp@- 45c90: 4eb9 0004 7d80 jsr 47d80 <_TOD_Get_uptime_as_timespec>
#endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; }
45c96: 242e fffc movel %fp@(-4),%d2
#endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); return 0;
45c9a: 588f addql #4,%sp
} #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp );
45c9c: 4280 clrl %d0
#endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; }
45c9e: 4e5e unlk %fp 45ca0: 4e75 rts
{ if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp);
45ca2: 2f01 movel %d1,%sp@- 45ca4: 4eb9 0004 7ce4 jsr 47ce4 <_TOD_Get>
#endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; }
45caa: 242e fffc movel %fp@(-4),%d2
if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); return 0;
45cae: 588f addql #4,%sp
{ if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp);
45cb0: 4280 clrl %d0
#endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; }
45cb2: 4e5e unlk %fp 45cb4: 4e75 rts
... 00045c2c <clock_setenable_attr>: int clock_setenable_attr( clockid_t clock_id, int attr ) {
45c2c: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45c30: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c36: 7258 moveq #88,%d1 45c38: 2040 moveal %d0,%a0
}
45c3a: 70ff moveq #-1,%d0 45c3c: 4e5e unlk %fp
int clock_setenable_attr( clockid_t clock_id, int attr ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45c3e: 2081 movel %d1,%a0@
}
45c40: 4e75 rts
... 0004a5e8 <close>: #include <rtems/libio_.h> int close( int fd ) {
4a5e8: 4e56 0000 linkw %fp,#0 4a5ec: 202e 0008 movel %fp@(8),%d0 4a5f0: 2f0a movel %a2,%sp@- 4a5f2: 2f02 movel %d2,%sp@-
rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd);
4a5f4: b0b9 0005 d6a4 cmpl 5d6a4 <rtems_libio_number_iops>,%d0 4a5fa: 645e bccs 4a65a <close+0x72>
iop = rtems_libio_iop(fd);
4a5fc: 2479 0005 eda4 moveal 5eda4 <rtems_libio_iops>,%a2 4a602: ed88 lsll #6,%d0 4a604: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
4a606: 202a 0014 movel %a2@(20),%d0 4a60a: 0280 0000 0100 andil #256,%d0 4a610: 6748 beqs 4a65a <close+0x72>
rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h )
4a612: 206a 003c moveal %a2@(60),%a0 4a616: 2068 0004 moveal %a0@(4),%a0 4a61a: 4a88 tstl %a0 4a61c: 6738 beqs 4a656 <close+0x6e>
rc = (*iop->handlers->close_h)( iop );
4a61e: 2f0a movel %a2,%sp@- 4a620: 4e90 jsr %a0@ 4a622: 588f addql #4,%sp 4a624: 2400 movel %d0,%d2
rtems_filesystem_freenode( &iop->pathinfo );
4a626: 206a 0024 moveal %a2@(36),%a0 4a62a: 4a88 tstl %a0 4a62c: 6710 beqs 4a63e <close+0x56> 4a62e: 2068 001c moveal %a0@(28),%a0 4a632: 4a88 tstl %a0 4a634: 6708 beqs 4a63e <close+0x56> 4a636: 486a 0018 pea %a2@(24) 4a63a: 4e90 jsr %a0@ 4a63c: 588f addql #4,%sp
rtems_libio_free( iop );
4a63e: 2f0a movel %a2,%sp@- 4a640: 4eb9 0004 aa78 jsr 4aa78 <rtems_libio_free>
return rc; }
4a646: 246e fffc moveal %fp@(-4),%a2 4a64a: 2002 movel %d2,%d0
rc = (*iop->handlers->close_h)( iop ); rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc;
4a64c: 588f addql #4,%sp
}
4a64e: 242e fff8 movel %fp@(-8),%d2 4a652: 4e5e unlk %fp 4a654: 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 )
4a656: 4282 clrl %d2 <== NOT EXECUTED 4a658: 60cc bras 4a626 <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);
4a65a: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4a660: 74ff moveq #-1,%d2 4a662: 2040 moveal %d0,%a0 4a664: 7009 moveq #9,%d0 4a666: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; }
4a668: 2002 movel %d2,%d0 4a66a: 242e fff8 movel %fp@(-8),%d2 4a66e: 246e fffc moveal %fp@(-4),%a2 4a672: 4e5e unlk %fp 4a674: 4e75 rts
000497dc <devFS_close>: #include "devfs.h" int devFS_close( rtems_libio_t *iop ) {
497dc: 4e56 fff4 linkw %fp,#-12 497e0: 206e 0008 moveal %fp@(8),%a0
args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close(
497e4: 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;
497e8: 2268 0038 moveal %a0@(56),%a1
args.iop = iop; args.flags = 0;
497ec: 42ae fff8 clrl %fp@(-8)
args.mode = 0;
497f0: 42ae fffc clrl %fp@(-4)
status = rtems_io_close(
497f4: 2f29 000c movel %a1@(12),%sp@- 497f8: 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;
497fc: 2d48 fff4 movel %a0,%fp@(-12)
args.flags = 0; args.mode = 0; status = rtems_io_close(
49800: 4eb9 0004 ac6c jsr 4ac6c <rtems_io_close>
np->major, np->minor, (void *) &args ); if ( status ) {
49806: 4fef 000c lea %sp@(12),%sp 4980a: 4a80 tstl %d0 4980c: 6604 bnes 49812 <devFS_close+0x36>
return rtems_deviceio_errno(status); } return 0; }
4980e: 4e5e unlk %fp 49810: 4e75 rts
np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status);
49812: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49814: 4eb9 0004 98ec jsr 498ec <rtems_deviceio_errno> <== NOT EXECUTED 4981a: 588f addql #4,%sp <== NOT EXECUTED
} return 0; }
4981c: 4e5e unlk %fp <== NOT EXECUTED
4981e: 4e75 rts
00049832 <devFS_evaluate_path>: const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) {
49832: 4e56 ffdc linkw %fp,#-36 49836: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4983a: 286e 0014 moveal %fp@(20),%a4 4983e: 2c2e 0008 movel %fp@(8),%d6 49842: 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;
49846: 2814 movel %a4@,%d4
if (!device_name_table)
49848: 6700 008a beqw 498d4 <devFS_evaluate_path+0xa2>
rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) {
4984c: 2a39 0005 acd8 movel 5acd8 <rtems_device_table_size>,%d5 49852: 673c beqs 49890 <devFS_evaluate_path+0x5e>
} /* 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 );
49854: 4280 clrl %d0 49856: 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)
49858: 4bf9 0004 d344 lea 4d344 <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)
4985e: 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++) {
49860: 5282 addql #1,%d2
if (!device_name_table[i].device_name)
49862: e989 lsll #4,%d1 49864: 2041 moveal %d1,%a0 49866: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 4986a: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 4986e: 2453 moveal %a3@,%a2 49870: 4a8a tstl %a2 49872: 6716 beqs 4988a <devFS_evaluate_path+0x58>
continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
49874: 2f03 movel %d3,%sp@- 49876: 2f0a movel %a2,%sp@- 49878: 2f06 movel %d6,%sp@- 4987a: 4e95 jsr %a5@ 4987c: 4fef 000c lea %sp@(12),%sp 49880: 4a80 tstl %d0 49882: 6606 bnes 4988a <devFS_evaluate_path+0x58>
continue; if (device_name_table[i].device_name[pathnamelen] != '\0')
49884: 4a32 3800 tstb %a2@(00000000,%d3:l) 49888: 671e beqs 498a8 <devFS_evaluate_path+0x76>
/* 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++) {
4988a: 2002 movel %d2,%d0 4988c: b485 cmpl %d5,%d2 4988e: 65ce bcss 4985e <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 );
49890: 4eb9 0004 c03c jsr 4c03c <__errno> 49896: 7202 moveq #2,%d1 49898: 2040 moveal %d0,%a0 4989a: 70ff moveq #-1,%d0
}
4989c: 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 );
498a2: 2081 movel %d1,%a0@
}
498a4: 4e5e unlk %fp 498a6: 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;
498a8: 2079 0005 ae50 moveal 5ae50 <rtems_current_user_env>,%a0 498ae: 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;
498b4: 223c 0005 ae04 movel #372228,%d1
pathloc->ops = &devFS_ops;
498ba: 41f9 0005 adbc lea 5adbc <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;
498c0: 2941 0008 movel %d1,%a4@(8)
pathloc->ops = &devFS_ops;
498c4: 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];
498c8: 288b movel %a3,%a4@
return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); }
498ca: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 498d0: 4e5e unlk %fp 498d2: 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 );
498d4: 4eb9 0004 c03c jsr 4c03c <__errno> <== NOT EXECUTED 498da: 740e moveq #14,%d2 <== NOT EXECUTED 498dc: 2040 moveal %d0,%a0 <== NOT EXECUTED 498de: 70ff moveq #-1,%d0 <== NOT EXECUTED 498e0: 2082 movel %d2,%a0@ <== NOT EXECUTED
return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); }
498e2: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 498e8: 4e5e unlk %fp <== NOT EXECUTED
498ea: 4e75 rts
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 acd8 movel 5acd8 <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 9598 jsr 49598 <_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>
rtems_set_errno_and_return_minus_one( ENOMEM ); memset(
42050: 2039 0005 acd8 movel 5acd8 <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 c88c jsr 4c88c <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 ae04 movel #372228,%d0
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
42074: 41f9 0005 adbc lea 5adbc <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 c03c jsr 4c03c <__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; }
420ac: 4e75 rts <== NOT EXECUTED
... 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 6730 jsr 46730 <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>
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 98ec jsr 498ec <rtems_deviceio_errno> <== NOT EXECUTED 4226a: 588f addql #4,%sp <== NOT EXECUTED
return args.ioctl_return; }
4226c: 4e5e unlk %fp <== NOT EXECUTED
4226e: 4e75 rts
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> 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 acd8 movel 5acd8 <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 ce68 lea 4ce68 <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>
/* 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 d32c jsr 4d32c <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 c03c jsr 4c03c <__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 c03c jsr 4c03c <__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 c03c jsr 4c03c <__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 c03c jsr 4c03c <__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 42214: 4e75 rts <== NOT EXECUTED
... 00042218 <devFS_node_type>: /* * There is only one type of node: device */ return RTEMS_FILESYSTEM_DEVICE; }
42218: 7002 moveq #2,%d0
#include "devfs.h" int devFS_node_type( rtems_filesystem_location_info_t *pathloc ) {
4221a: 4e56 0000 linkw %fp,#0
/* * There is only one type of node: device */ return RTEMS_FILESYSTEM_DEVICE; }
4221e: 4e5e unlk %fp 42220: 4e75 rts
... 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 687c jsr 4687c <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>
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 98ec jsr 498ec <rtems_deviceio_errno> <== NOT EXECUTED 422b2: 588f addql #4,%sp <== NOT EXECUTED
return 0; }
422b4: 4e5e unlk %fp <== NOT EXECUTED
422b6: 4e75 rts
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 68d8 jsr 468d8 <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 98ec jsr 498ec <rtems_deviceio_errno> <== NOT EXECUTED 42318: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved; }
4231a: 4e5e unlk %fp <== NOT EXECUTED 4231c: 4e75 rts <== 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>
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
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 ); buf->st_mode = the_dev->mode;
4233a: 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 );
42340: 2368 0008 0016 movel %a0@(8),%a1@(22) 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 c03c jsr 4c03c <__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; }
4235c: 4e75 rts <== NOT EXECUTED
... 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 6934 jsr 46934 <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>
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 98ec jsr 498ec <rtems_deviceio_errno> <== NOT EXECUTED 423c0: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved; }
423c2: 4e5e unlk %fp <== NOT EXECUTED 423c4: 4e75 rts <== NOT EXECUTED
... 00045c44 <devctl>: int filedes __attribute__((unused)), void *dev_data_ptr __attribute__((unused)), size_t nbyte __attribute__((unused)), int *dev_info_ptr __attribute__((unused)) ) {
45c44: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45c48: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c4e: 7258 moveq #88,%d1 45c50: 2040 moveal %d0,%a0
}
45c52: 70ff moveq #-1,%d0 45c54: 4e5e unlk %fp
void *dev_data_ptr __attribute__((unused)), size_t nbyte __attribute__((unused)), int *dev_info_ptr __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45c56: 2081 movel %d1,%a0@
}
45c58: 4e75 rts
... 0004c60a <device_close>: */ int device_close( rtems_libio_t *iop ) {
4c60a: 4e56 fff4 linkw %fp,#-12 4c60e: 226e 0008 moveal %fp@(8),%a1
args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close(
4c612: 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;
4c616: 2069 0038 moveal %a1@(56),%a0
args.iop = iop;
4c61a: 2d49 fff4 movel %a1,%fp@(-12)
args.flags = 0;
4c61e: 42ae fff8 clrl %fp@(-8)
args.mode = 0;
4c622: 42ae fffc clrl %fp@(-4)
status = rtems_io_close(
4c626: 2f28 0050 movel %a0@(80),%sp@- 4c62a: 2f28 004c movel %a0@(76),%sp@- 4c62e: 4eb9 0004 dc78 jsr 4dc78 <rtems_io_close>
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) {
4c634: 4fef 000c lea %sp@(12),%sp 4c638: 4a80 tstl %d0 4c63a: 6604 bnes 4c640 <device_close+0x36>
return rtems_deviceio_errno(status); } return 0; }
4c63c: 4e5e unlk %fp 4c63e: 4e75 rts
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status);
4c640: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c642: 4eb9 0004 e2e0 jsr 4e2e0 <rtems_deviceio_errno> <== NOT EXECUTED 4c648: 588f addql #4,%sp <== NOT EXECUTED
} return 0; }
4c64a: 4e5e unlk %fp <== NOT EXECUTED
4c64c: 4e75 rts
0004c4f2 <device_ioctl>: int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) {
4c4f2: 4e56 fff0 linkw %fp,#-16 4c4f6: 226e 0008 moveal %fp@(8),%a1
args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control(
4c4fa: 486e fff0 pea %fp@(-16)
rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer;
4c4fe: 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;
4c504: 2d6e 000c fff4 movel %fp@(12),%fp@(-12)
args.buffer = buffer; the_jnode = iop->file_info;
4c50a: 2069 0038 moveal %a1@(56),%a0
{ rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop;
4c50e: 2d49 fff0 movel %a1,%fp@(-16)
args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control(
4c512: 2f28 0050 movel %a0@(80),%sp@- 4c516: 2f28 004c movel %a0@(76),%sp@- 4c51a: 4eb9 0004 dcd4 jsr 4dcd4 <rtems_io_control>
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
4c520: 4fef 000c lea %sp@(12),%sp 4c524: 4a80 tstl %d0 4c526: 6608 bnes 4c530 <device_ioctl+0x3e>
return rtems_deviceio_errno(status); return args.ioctl_return;
4c528: 202e fffc movel %fp@(-4),%d0
}
4c52c: 4e5e unlk %fp 4c52e: 4e75 rts
the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
4c530: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c532: 4eb9 0004 e2e0 jsr 4e2e0 <rtems_deviceio_errno> <== NOT EXECUTED 4c538: 588f addql #4,%sp <== NOT EXECUTED
return args.ioctl_return; }
4c53a: 4e5e unlk %fp <== NOT EXECUTED
4c53c: 4e75 rts
0004c64e <device_open>: rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
4c64e: 4e56 fff4 linkw %fp,#-12 4c652: 206e 0008 moveal %fp@(8),%a0
args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open(
4c656: 486e fff4 pea %fp@(-12)
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags;
4c65a: 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;
4c660: 2268 0038 moveal %a0@(56),%a1
args.iop = iop; args.flags = iop->flags; args.mode = mode;
4c664: 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;
4c66a: 2d48 fff4 movel %a0,%fp@(-12)
args.flags = iop->flags; args.mode = mode; status = rtems_io_open(
4c66e: 2f29 0050 movel %a1@(80),%sp@- 4c672: 2f29 004c movel %a1@(76),%sp@- 4c676: 4eb9 0004 dd30 jsr 4dd30 <rtems_io_open>
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
4c67c: 4fef 000c lea %sp@(12),%sp 4c680: 4a80 tstl %d0 4c682: 6604 bnes 4c688 <device_open+0x3a>
return rtems_deviceio_errno(status); return 0; }
4c684: 4e5e unlk %fp 4c686: 4e75 rts
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
4c688: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c68a: 4eb9 0004 e2e0 jsr 4e2e0 <rtems_deviceio_errno> <== NOT EXECUTED 4c690: 588f addql #4,%sp <== NOT EXECUTED
return 0; }
4c692: 4e5e unlk %fp <== NOT EXECUTED 4c694: 4e75 rts <== NOT EXECUTED
... 0004c5a4 <device_read>: ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) {
4c5a4: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4c5a8: 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(
4c5ac: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags;
4c5b0: 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;
4c5b6: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED
args.count = count;
4c5bc: 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;
4c5c2: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset;
4c5c6: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4c5ca: 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;
4c5ce: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED
args.offset = iop->offset;
4c5d2: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4c5d6: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
4c5da: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
status = rtems_io_read(
4c5de: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4c5e2: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4c5e6: 4eb9 0004 dd8c jsr 4dd8c <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
4c5ec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c5f0: 4a80 tstl %d0 <== NOT EXECUTED 4c5f2: 6608 bnes 4c5fc <device_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved;
4c5f4: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
4c5f8: 4e5e unlk %fp <== NOT EXECUTED 4c5fa: 4e75 rts <== NOT EXECUTED
the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
4c5fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c5fe: 4eb9 0004 e2e0 jsr 4e2e0 <rtems_deviceio_errno> <== NOT EXECUTED 4c604: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved; }
4c606: 4e5e unlk %fp <== NOT EXECUTED
4c608: 4e75 rts
0004c53e <device_write>: ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
4c53e: 4e56 ffe4 linkw %fp,#-28 4c542: 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(
4c546: 486e ffe4 pea %fp@(-28)
args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags;
4c54a: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer;
4c550: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
args.count = count;
4c556: 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;
4c55c: 2268 0038 moveal %a0@(56),%a1
args.iop = iop; args.offset = iop->offset;
4c560: 2028 000c movel %a0@(12),%d0 4c564: 2228 0010 movel %a0@(16),%d1
rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop;
4c568: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset;
4c56c: 2d40 ffe8 movel %d0,%fp@(-24) 4c570: 2d41 ffec movel %d1,%fp@(-20)
args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
4c574: 42ae fffc clrl %fp@(-4)
status = rtems_io_write(
4c578: 2f29 0050 movel %a1@(80),%sp@- 4c57c: 2f29 004c movel %a1@(76),%sp@- 4c580: 4eb9 0004 dde8 jsr 4dde8 <rtems_io_write>
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
4c586: 4fef 000c lea %sp@(12),%sp 4c58a: 4a80 tstl %d0 4c58c: 6608 bnes 4c596 <device_write+0x58>
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved;
4c58e: 202e fffc movel %fp@(-4),%d0
}
4c592: 4e5e unlk %fp 4c594: 4e75 rts
the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
4c596: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c598: 4eb9 0004 e2e0 jsr 4e2e0 <rtems_deviceio_errno> <== NOT EXECUTED 4c59e: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved; }
4c5a0: 4e5e unlk %fp <== NOT EXECUTED
4c5a2: 4e75 rts
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>
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 6458 jsr 46458 <rtems_fatal_error_occurred> <== NOT EXECUTED
000433e0 <dup>: #include <fcntl.h> int dup( int fildes ) {
433e0: 4e56 0000 linkw %fp,#0
return fcntl( fildes, F_DUPFD, 0 );
433e4: 42a7 clrl %sp@- 433e6: 42a7 clrl %sp@- 433e8: 2f2e 0008 movel %fp@(8),%sp@- 433ec: 4eb9 0004 38f4 jsr 438f4 <fcntl>
}
433f2: 4e5e unlk %fp 433f4: 4e75 rts
... 00043380 <dup2>: int dup2( int fildes, int fildes2 ) {
43380: 4e56 ffac linkw %fp,#-84 43384: 48d7 040c moveml %d2-%d3/%a2,%sp@
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
43388: 240e movel %fp,%d2 4338a: 0682 ffff ffba addil #-70,%d2 43390: 45f9 0004 3d5c lea 43d5c <fstat>,%a2 43396: 2f02 movel %d2,%sp@-
int dup2( int fildes, int fildes2 ) {
43398: 262e 0008 movel %fp@(8),%d3
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
4339c: 2f03 movel %d3,%sp@- 4339e: 4e92 jsr %a2@
if ( status == -1 )
433a0: 508f addql #8,%sp 433a2: 72ff moveq #-1,%d1 433a4: b280 cmpl %d0,%d1 433a6: 660c bnes 433b4 <dup2+0x34>
/* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 );
433a8: 70ff moveq #-1,%d0
}
433aa: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 433b0: 4e5e unlk %fp 433b2: 4e75 rts
/* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf );
433b4: 2f02 movel %d2,%sp@- 433b6: 2f2e 000c movel %fp@(12),%sp@- 433ba: 4e92 jsr %a2@
if ( status == -1 )
433bc: 508f addql #8,%sp 433be: 72ff moveq #-1,%d1 433c0: b280 cmpl %d0,%d1 433c2: 67e4 beqs 433a8 <dup2+0x28>
/* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 );
433c4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 433c8: 42a7 clrl %sp@- <== NOT EXECUTED 433ca: 2f03 movel %d3,%sp@- <== NOT EXECUTED 433cc: 4eb9 0004 38f4 jsr 438f4 <fcntl> <== NOT EXECUTED 433d2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
433d6: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 <== NOT EXECUTED 433dc: 4e5e unlk %fp <== NOT EXECUTED
433de: 4e75 rts
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 d87c moveal 5d87c <__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
43e6e: 4e75 rts
00067330 <endgrent>: fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) {
67330: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (group_fp != NULL)
67334: 2039 000a 60de movel a60de <group_fp>,%d0 <== NOT EXECUTED 6733a: 670a beqs 67346 <endgrent+0x16> <== NOT EXECUTED
fclose(group_fp);
6733c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6733e: 4eb9 0008 0fa2 jsr 80fa2 <fclose> <== NOT EXECUTED 67344: 588f addql #4,%sp <== NOT EXECUTED
}
67346: 4e5e unlk %fp <== NOT EXECUTED
67348: 4e75 rts
0006734a <endpwent>: fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) {
6734a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (passwd_fp != NULL)
6734e: 2039 000a 5ff6 movel a5ff6 <passwd_fp>,%d0 <== NOT EXECUTED 67354: 670a beqs 67360 <endpwent+0x16> <== NOT EXECUTED
fclose(passwd_fp);
67356: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67358: 4eb9 0008 0fa2 jsr 80fa2 <fclose> <== NOT EXECUTED 6735e: 588f addql #4,%sp <== NOT EXECUTED
}
67360: 4e5e unlk %fp <== NOT EXECUTED
67362: 4e75 rts
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 d87c moveal 5d87c <__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 c60b pea 5c60b <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 d87c moveal 5d87c <__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 c60b pea 5c60b <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 d87c moveal 5d87c <__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 c60d pea 5c60d <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 c60d pea 5c60d <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
0007a584 <fchdir>: #include <rtems/seterr.h> int fchdir( int fd ) {
7a584: 4e56 ffb4 linkw %fp,#-76 <== NOT EXECUTED 7a588: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 7a58c: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd );
7a590: b0b9 000a 1ca4 cmpl a1ca4 <rtems_libio_number_iops>,%d0 <== NOT EXECUTED 7a596: 6400 0116 bccw 7a6ae <fchdir+0x12a> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
7a59a: 2479 000a 694c moveal a694c <rtems_libio_iops>,%a2 <== NOT EXECUTED 7a5a0: ed88 lsll #6,%d0 <== NOT EXECUTED 7a5a2: d5c0 addal %d0,%a2 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
7a5a4: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 7a5a8: 0800 0008 btst #8,%d0 <== NOT EXECUTED 7a5ac: 6700 0100 beqw 7a6ae <fchdir+0x12a> <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
7a5b0: 0800 0001 btst #1,%d0 <== NOT EXECUTED 7a5b4: 6700 0138 beqw 7a6ee <fchdir+0x16a> <== NOT EXECUTED
/* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) {
7a5b8: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 7a5bc: 4a88 tstl %a0 <== NOT EXECUTED 7a5be: 6700 0146 beqw 7a706 <fchdir+0x182> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) {
7a5c2: 2068 0010 moveal %a0@(16),%a0 <== NOT EXECUTED 7a5c6: 4a88 tstl %a0 <== NOT EXECUTED 7a5c8: 6700 013c beqw 7a706 <fchdir+0x182> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
7a5cc: 47ea 0018 lea %a2@(24),%a3 <== NOT EXECUTED 7a5d0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 7a5d2: 4e90 jsr %a0@ <== NOT EXECUTED 7a5d4: 588f addql #4,%sp <== NOT EXECUTED 7a5d6: 7201 moveq #1,%d1 <== NOT EXECUTED 7a5d8: b280 cmpl %d0,%d1 <== NOT EXECUTED 7a5da: 6600 00ba bnew 7a696 <fchdir+0x112> <== NOT EXECUTED
* but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current;
7a5de: 2279 000a 1fac moveal a1fac <rtems_current_user_env>,%a1 <== NOT EXECUTED 7a5e4: 2c0e movel %fp,%d6 <== NOT EXECUTED 7a5e6: 41e9 0004 lea %a1@(4),%a0 <== NOT EXECUTED 7a5ea: 0686 ffff ffd8 addil #-40,%d6 <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
7a5f0: 2248 moveal %a0,%a1 <== NOT EXECUTED
* but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current;
7a5f2: 2a46 moveal %d6,%a5 <== NOT EXECUTED 7a5f4: 2a0e movel %fp,%d5 <== NOT EXECUTED 7a5f6: 0685 ffff ffdc addil #-36,%d5 <== NOT EXECUTED 7a5fc: 280e movel %fp,%d4 <== NOT EXECUTED 7a5fe: 0684 ffff ffe0 addil #-32,%d4 <== NOT EXECUTED 7a604: 260e movel %fp,%d3 <== NOT EXECUTED 7a606: 0683 ffff ffe4 addil #-28,%d3 <== NOT EXECUTED 7a60c: 240e movel %fp,%d2 <== NOT EXECUTED 7a60e: 0682 ffff ffe8 addil #-24,%d2 <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
7a614: 49ee ffec lea %fp@(-20),%a4 <== NOT EXECUTED
* but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current;
7a618: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 7a61a: 2a45 moveal %d5,%a5 <== NOT EXECUTED 7a61c: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 7a61e: 2a44 moveal %d4,%a5 <== NOT EXECUTED 7a620: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 7a622: 2a43 moveal %d3,%a5 <== NOT EXECUTED 7a624: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 7a626: 2a42 moveal %d2,%a5 <== NOT EXECUTED 7a628: 2a90 movel %a0@,%a5@ <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
7a62a: 22d3 movel %a3@,%a1@+ <== NOT EXECUTED 7a62c: 22ea 001c movel %a2@(28),%a1@+ <== NOT EXECUTED 7a630: 22ea 0020 movel %a2@(32),%a1@+ <== NOT EXECUTED 7a634: 22aa 0024 movel %a2@(36),%a1@ <== NOT EXECUTED 7a638: 20aa 0028 movel %a2@(40),%a0@ <== NOT EXECUTED
/* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
7a63c: 42a7 clrl %sp@- <== NOT EXECUTED 7a63e: 2f0c movel %a4,%sp@- <== NOT EXECUTED 7a640: 42a7 clrl %sp@- <== NOT EXECUTED 7a642: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 7a646: 4879 0009 ac9b pea 9ac9b <rtems_bdpart_shell_usage+0xf1f> <== NOT EXECUTED 7a64c: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path> <== NOT EXECUTED 7a652: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 7a656: 4a80 tstl %d0 <== NOT EXECUTED 7a658: 666c bnes 7a6c6 <fchdir+0x142> <== NOT EXECUTED
/* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved );
7a65a: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 7a65e: 4a88 tstl %a0 <== NOT EXECUTED 7a660: 670e beqs 7a670 <fchdir+0xec> <== NOT EXECUTED 7a662: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 7a666: 4a88 tstl %a0 <== NOT EXECUTED 7a668: 6706 beqs 7a670 <fchdir+0xec> <== NOT EXECUTED 7a66a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 7a66c: 4e90 jsr %a0@ <== NOT EXECUTED 7a66e: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_current = loc;
7a670: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED 7a676: 5888 addql #4,%a0 <== NOT EXECUTED 7a678: 4280 clrl %d0 <== NOT EXECUTED 7a67a: 20d4 movel %a4@,%a0@+ <== NOT EXECUTED 7a67c: 20ee fff0 movel %fp@(-16),%a0@+ <== NOT EXECUTED 7a680: 20ee fff4 movel %fp@(-12),%a0@+ <== NOT EXECUTED 7a684: 20ee fff8 movel %fp@(-8),%a0@+ <== NOT EXECUTED 7a688: 20ae fffc movel %fp@(-4),%a0@ <== NOT EXECUTED
return 0; }
7a68c: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 7a692: 4e5e unlk %fp <== NOT EXECUTED 7a694: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR );
7a696: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 7a69c: 7214 moveq #20,%d1 <== NOT EXECUTED 7a69e: 2040 moveal %d0,%a0 <== NOT EXECUTED 7a6a0: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; }
7a6a2: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR );
7a6a8: 2081 movel %d1,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; }
7a6aa: 4e5e unlk %fp <== NOT EXECUTED 7a6ac: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
7a6ae: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 7a6b4: 7609 moveq #9,%d3 <== NOT EXECUTED 7a6b6: 2040 moveal %d0,%a0 <== NOT EXECUTED 7a6b8: 70ff moveq #-1,%d0 <== NOT EXECUTED 7a6ba: 2083 movel %d3,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; }
7a6bc: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 7a6c2: 4e5e unlk %fp <== NOT EXECUTED 7a6c4: 4e75 rts <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved;
7a6c6: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED 7a6cc: 2246 moveal %d6,%a1 <== NOT EXECUTED 7a6ce: 5888 addql #4,%a0 <== NOT EXECUTED 7a6d0: 2a45 moveal %d5,%a5 <== NOT EXECUTED 7a6d2: 70ff moveq #-1,%d0 <== NOT EXECUTED 7a6d4: 20d1 movel %a1@,%a0@+ <== NOT EXECUTED 7a6d6: 2244 moveal %d4,%a1 <== NOT EXECUTED 7a6d8: 20d5 movel %a5@,%a0@+ <== NOT EXECUTED 7a6da: 2a43 moveal %d3,%a5 <== NOT EXECUTED 7a6dc: 20d1 movel %a1@,%a0@+ <== NOT EXECUTED 7a6de: 2242 moveal %d2,%a1 <== NOT EXECUTED 7a6e0: 20d5 movel %a5@,%a0@+ <== NOT EXECUTED 7a6e2: 2091 movel %a1@,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; }
7a6e4: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 7a6ea: 4e5e unlk %fp <== NOT EXECUTED 7a6ec: 4e75 rts <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
7a6ee: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 7a6f4: 7416 moveq #22,%d2 <== NOT EXECUTED 7a6f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 7a6f8: 70ff moveq #-1,%d0 <== NOT EXECUTED 7a6fa: 2082 movel %d2,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; }
7a6fc: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 7a702: 4e5e unlk %fp <== NOT EXECUTED 7a704: 4e75 rts <== NOT EXECUTED
if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP );
7a706: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 7a70c: 2040 moveal %d0,%a0 <== NOT EXECUTED 7a70e: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; }
7a710: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED
if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP );
7a716: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; }
7a71c: 4e5e unlk %fp <== NOT EXECUTED
7a71e: 4e75 rts
00066f60 <fchmod>: int fchmod( int fd, mode_t mode ) {
66f60: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 66f64: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 66f68: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
66f6c: b0b9 000a 1ca4 cmpl a1ca4 <rtems_libio_number_iops>,%d0 <== NOT EXECUTED 66f72: 643a bccs 66fae <fchmod+0x4e> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
66f74: 2079 000a 694c moveal a694c <rtems_libio_iops>,%a0 <== NOT EXECUTED 66f7a: ed88 lsll #6,%d0 <== NOT EXECUTED 66f7c: d1c0 addal %d0,%a0 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
66f7e: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED 66f82: 0800 0008 btst #8,%d0 <== NOT EXECUTED 66f86: 6726 beqs 66fae <fchmod+0x4e> <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
66f88: 44c0 movew %d0,%ccr <== NOT EXECUTED 66f8a: 6634 bnes 66fc0 <fchmod+0x60> <== NOT EXECUTED
if ( !iop->handlers->fchmod_h )
66f8c: 2268 003c moveal %a0@(60),%a1 <== NOT EXECUTED 66f90: 4aa9 001c tstl %a1@(28) <== NOT EXECUTED 66f94: 673c beqs 66fd2 <fchmod+0x72> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
66f96: 2268 0020 moveal %a0@(32),%a1 <== NOT EXECUTED 66f9a: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 66f9e: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 66fa2: 2269 001c moveal %a1@(28),%a1 <== NOT EXECUTED 66fa6: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED
}
66faa: 4e5e unlk %fp <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
66fac: 4ed1 jmp %a1@ <== NOT EXECUTED
{ rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
66fae: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 66fb4: 7209 moveq #9,%d1 <== NOT EXECUTED 66fb6: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); }
66fb8: 70ff moveq #-1,%d0 <== NOT EXECUTED 66fba: 4e5e unlk %fp <== NOT EXECUTED
{ rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
66fbc: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); }
66fbe: 4e75 rts <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
66fc0: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED
if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); }
66fc6: 4e5e unlk %fp <== NOT EXECUTED
/* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
66fc8: 2040 moveal %d0,%a0 <== NOT EXECUTED 66fca: 7016 moveq #22,%d0 <== NOT EXECUTED 66fcc: 2080 movel %d0,%a0@ <== NOT EXECUTED
if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); }
66fce: 70ff moveq #-1,%d0 <== NOT EXECUTED 66fd0: 4e75 rts <== NOT EXECUTED
*/ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
66fd2: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); }
66fd8: 4e5e unlk %fp <== NOT EXECUTED
*/ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
66fda: 2040 moveal %d0,%a0 <== NOT EXECUTED
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); }
66fdc: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
66fde: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); }
66fe4: 4e75 rts <== NOT EXECUTED
... 00066fe8 <fchown>: int fchown( int fd, uid_t owner, gid_t group ) {
66fe8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 66fec: 302e 000e movew %fp@(14),%d0 <== NOT EXECUTED 66ff0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 66ff2: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 66ff6: 322e 0012 movew %fp@(18),%d1 <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_check_fd( fd );
66ffa: b4b9 000a 1ca4 cmpl a1ca4 <rtems_libio_number_iops>,%d2 <== NOT EXECUTED 67000: 6448 bccs 6704a <fchown+0x62> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
67002: 2079 000a 694c moveal a694c <rtems_libio_iops>,%a0 <== NOT EXECUTED 67008: ed8a lsll #6,%d2 <== NOT EXECUTED 6700a: d1c2 addal %d2,%a0 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
6700c: 2428 0014 movel %a0@(20),%d2 <== NOT EXECUTED 67010: 0802 0008 btst #8,%d2 <== NOT EXECUTED 67014: 6734 beqs 6704a <fchown+0x62> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
67016: 44c2 movew %d2,%ccr <== NOT EXECUTED 67018: 6646 bnes 67060 <fchown+0x78> <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h )
6701a: 2268 0024 moveal %a0@(36),%a1 <== NOT EXECUTED 6701e: 2269 0018 moveal %a1@(24),%a1 <== NOT EXECUTED 67022: 4a89 tstl %a1 <== NOT EXECUTED 67024: 6750 beqs 67076 <fchown+0x8e> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
67026: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 6702a: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 67030: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
}
67036: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
6703a: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED 6703e: 2d41 0010 movel %d1,%fp@(16) <== NOT EXECUTED 67042: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
}
67046: 4e5e unlk %fp <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
67048: 4ed1 jmp %a1@ <== NOT EXECUTED
{ rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
6704a: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); }
67050: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
{ rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
67054: 2040 moveal %d0,%a0 <== NOT EXECUTED 67056: 7209 moveq #9,%d1 <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); }
67058: 70ff moveq #-1,%d0 <== NOT EXECUTED 6705a: 4e5e unlk %fp <== NOT EXECUTED
{ rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop);
6705c: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); }
6705e: 4e75 rts <== NOT EXECUTED
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
67060: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); }
67066: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
6706a: 2040 moveal %d0,%a0 <== NOT EXECUTED 6706c: 7016 moveq #22,%d0 <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); }
6706e: 4e5e unlk %fp <== NOT EXECUTED
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
67070: 2080 movel %d0,%a0@ <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); }
67072: 70ff moveq #-1,%d0 <== NOT EXECUTED 67074: 4e75 rts <== NOT EXECUTED
rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
67076: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); }
6707c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
67080: 2040 moveal %d0,%a0 <== NOT EXECUTED
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); }
67082: 70ff moveq #-1,%d0 <== NOT EXECUTED 67084: 4e5e unlk %fp <== NOT EXECUTED
rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
67086: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); }
6708c: 4e75 rts <== NOT EXECUTED
... 0007a720 <fcntl>: int fcntl( int fd, int cmd, ... ) {
7a720: 4e56 fff4 linkw %fp,#-12 7a724: 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, ...));
7a728: 41ee 0010 lea %fp@(16),%a0 7a72c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7a730: 242e 000c movel %fp@(12),%d2
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd );
7a734: 2239 000a 1ca4 movel a1ca4 <rtems_libio_number_iops>,%d1 7a73a: b280 cmpl %d0,%d1 7a73c: 6300 0192 blsw 7a8d0 <fcntl+0x1b0>
iop = rtems_libio_iop( fd );
7a740: 2279 000a 694c moveal a694c <rtems_libio_iops>,%a1 7a746: ed88 lsll #6,%d0 7a748: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
rtems_libio_check_is_open(iop);
7a74c: 202a 0014 movel %a2@(20),%d0 7a750: 0800 0008 btst #8,%d0 7a754: 6700 017a beqw 7a8d0 <fcntl+0x1b0>
/* * This switch should contain all the cases from POSIX. */ switch ( cmd ) {
7a758: 7609 moveq #9,%d3 7a75a: b682 cmpl %d2,%d3 7a75c: 641a bccs 7a778 <fcntl+0x58>
errno = ENOTSUP; ret = -1; break; default: errno = EINVAL;
7a75e: 4eb9 0008 0e64 jsr 80e64 <__errno> 7a764: 76ff moveq #-1,%d3 7a766: 2040 moveal %d0,%a0 7a768: 7016 moveq #22,%d0 7a76a: 2080 movel %d0,%a0@
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
7a76c: 2003 movel %d3,%d0 7a76e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 7a774: 4e5e unlk %fp 7a776: 4e75 rts
/* * This switch should contain all the cases from POSIX. */ switch ( cmd ) {
7a778: 363b 2a08 movew %pc@(7a782 <fcntl+0x62>,%d2:l:2),%d3 7a77c: 48c3 extl %d3 7a77e: 4efb 3802 jmp %pc@(7a782 <fcntl+0x62>,%d3:l)
7a782: 00b8 00ac 009c oril #11272348,%d0 <== NOT EXECUTED 7a788: 0082 0030 0014 oril #3145748,%d2 <== NOT EXECUTED 7a78e: 0014 024 <== NOT EXECUTED 7a790: 0014 024 <== NOT EXECUTED 7a792: 0014 024 <== NOT EXECUTED 7a794: 0014 024 <== NOT EXECUTED
errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP;
7a796: 4eb9 0008 0e64 jsr 80e64 <__errno> 7a79c: 76ff moveq #-1,%d3 7a79e: 2040 moveal %d0,%a0
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
7a7a0: 2003 movel %d3,%d0 7a7a2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP;
7a7a8: 20bc 0000 0086 movel #134,%a0@
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
7a7ae: 4e5e unlk %fp 7a7b0: 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 ) );
7a7b2: 2f10 movel %a0@,%sp@-
/* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask);
7a7b4: 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 ) );
7a7b6: 4eb9 0004 69da jsr 469da <rtems_libio_fcntl_flags>
/* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask);
7a7bc: 222a 0014 movel %a2@(20),%d1 7a7c0: 588f addql #4,%sp 7a7c2: 0280 0000 0201 andil #513,%d0 7a7c8: 0281 ffff fdfe andil #-514,%d1 7a7ce: 8081 orl %d1,%d0 7a7d0: 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) {
7a7d4: 206a 003c moveal %a2@(60),%a0 7a7d8: 2068 0030 moveal %a0@(48),%a0 7a7dc: 4a88 tstl %a0 7a7de: 678c beqs 7a76c <fcntl+0x4c>
int err = (*iop->handlers->fcntl_h)( cmd, iop );
7a7e0: 2f0a movel %a2,%sp@- 7a7e2: 2f02 movel %d2,%sp@- 7a7e4: 4e90 jsr %a0@
if (err) {
7a7e6: 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 );
7a7e8: 2400 movel %d0,%d2
if (err) {
7a7ea: 6780 beqs 7a76c <fcntl+0x4c>
errno = err;
7a7ec: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 7a7f2: 76ff moveq #-1,%d3 <== NOT EXECUTED 7a7f4: 2040 moveal %d0,%a0 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
7a7f6: 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;
7a7f8: 2082 movel %d2,%a0@ <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
7a7fa: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 7a800: 4e5e unlk %fp <== NOT EXECUTED 7a802: 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 );
7a804: 2f00 movel %d0,%sp@- 7a806: 4eb9 0004 698c jsr 4698c <rtems_libio_to_fcntl_flags> 7a80c: 588f addql #4,%sp 7a80e: 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) {
7a810: 6cc2 bges 7a7d4 <fcntl+0xb4>
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
7a812: 2003 movel %d3,%d0 <== NOT EXECUTED 7a814: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 7a81a: 4e5e unlk %fp <== NOT EXECUTED 7a81c: 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 ) )
7a81e: 4a90 tstl %a0@ 7a820: 6766 beqs 7a888 <fcntl+0x168>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
7a822: 4283 clrl %d3 7a824: 08c0 000b bset #11,%d0 7a828: 2540 0014 movel %d0,%a2@(20) 7a82c: 60a6 bras 7a7d4 <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);
7a82e: 2600 movel %d0,%d3 7a830: 720b moveq #11,%d1 7a832: e2ab lsrl %d1,%d3 7a834: 7001 moveq #1,%d0 7a836: c680 andl %d0,%d3 7a838: 609a bras 7a7d4 <fcntl+0xb4>
* This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int );
7a83a: 2010 movel %a0@,%d0
if ( fd2 )
7a83c: 6700 00ac beqw 7a8ea <fcntl+0x1ca>
diop = rtems_libio_iop( fd2 );
7a840: b081 cmpl %d1,%d0 <== NOT EXECUTED 7a842: 6452 bccs 7a896 <fcntl+0x176> <== NOT EXECUTED 7a844: ed88 lsll #6,%d0 <== NOT EXECUTED 7a846: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 <== NOT EXECUTED 7a84a: 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);
7a84c: 9689 subl %a1,%d3 <== NOT EXECUTED 7a84e: ec83 asrl #6,%d3 <== NOT EXECUTED
} diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
7a850: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 7a856: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 7a85c: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 7a862: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED
ret = -1; break; } } diop->handlers = iop->handlers;
7a868: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED
diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
7a86e: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED
break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info;
7a874: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED
diop->flags = iop->flags;
7a87a: 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) {
7a880: 4a83 tstl %d3 7a882: 6c00 ff50 bgew 7a7d4 <fcntl+0xb4>
7a886: 608a bras 7a812 <fcntl+0xf2> <== NOT EXECUTED
*/ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
7a888: 4283 clrl %d3 <== NOT EXECUTED 7a88a: 0880 000b bclr #11,%d0 <== NOT EXECUTED 7a88e: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED 7a892: 6000 ff40 braw 7a7d4 <fcntl+0xb4> <== NOT EXECUTED
switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 );
7a896: 91c8 subal %a0,%a0 <== NOT EXECUTED 7a898: 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);
7a89a: 9689 subl %a1,%d3 <== NOT EXECUTED 7a89c: ec83 asrl #6,%d3 <== NOT EXECUTED
} diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
7a89e: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 7a8a4: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 7a8aa: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 7a8b0: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED
ret = -1; break; } } diop->handlers = iop->handlers;
7a8b6: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED
diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
7a8bc: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED
break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info;
7a8c2: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED
diop->flags = iop->flags;
7a8c8: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED 7a8ce: 60b0 bras 7a880 <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);
7a8d0: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 7a8d6: 76ff moveq #-1,%d3 <== NOT EXECUTED 7a8d8: 7209 moveq #9,%d1 <== NOT EXECUTED 7a8da: 2040 moveal %d0,%a0 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
7a8dc: 2003 movel %d3,%d0 <== NOT EXECUTED 7a8de: 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);
7a8e4: 2081 movel %d1,%a0@ <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
7a8e6: 4e5e unlk %fp <== NOT EXECUTED 7a8e8: 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();
7a8ea: 4eb9 0004 6a1a jsr 46a1a <rtems_libio_allocate> 7a8f0: 2040 moveal %d0,%a0
if ( diop == 0 ) {
7a8f2: 4a80 tstl %d0 7a8f4: 6740 beqs 7a936 <fcntl+0x216> 7a8f6: 2279 000a 694c moveal a694c <rtems_libio_iops>,%a1 7a8fc: 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);
7a8fe: 9689 subl %a1,%d3 7a900: ec83 asrl #6,%d3
} diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
7a902: 216a 0018 0018 movel %a2@(24),%a0@(24) 7a908: 216a 001c 001c movel %a2@(28),%a0@(28) 7a90e: 216a 0020 0020 movel %a2@(32),%a0@(32) 7a914: 216a 0024 0024 movel %a2@(36),%a0@(36)
ret = -1; break; } } diop->handlers = iop->handlers;
7a91a: 216a 003c 003c movel %a2@(60),%a0@(60)
diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
7a920: 216a 0028 0028 movel %a2@(40),%a0@(40)
break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info;
7a926: 216a 0038 0038 movel %a2@(56),%a0@(56)
diop->flags = iop->flags;
7a92c: 216a 0014 0014 movel %a2@(20),%a0@(20) 7a932: 6000 ff4c braw 7a880 <fcntl+0x160>
if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); if ( diop == 0 ) {
7a936: 76ff moveq #-1,%d3 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
7a938: 2003 movel %d3,%d0 <== NOT EXECUTED 7a93a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 7a940: 4e5e unlk %fp <== NOT EXECUTED
7a942: 4e75 rts
0004cc7c <fifo_open>: */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
4cc7c: 4e56 ffdc linkw %fp,#-36 4cc80: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
4cc84: 42a7 clrl %sp@-
*/ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
4cc86: 286e 0008 moveal %fp@(8),%a4
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
4cc8a: 47f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%a3 4cc90: 42a7 clrl %sp@- 4cc92: 2f39 0005 e6b0 movel 5e6b0 <rtems_pipe_semaphore>,%sp@-
*/ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
4cc98: 262e 000c movel %fp@(12),%d3
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
4cc9c: 4e93 jsr %a3@ 4cc9e: 4fef 000c lea %sp@(12),%sp 4cca2: 4a80 tstl %d0 4cca4: 667e bnes 4cd24 <fifo_open+0xa8>
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep;
4cca6: 2414 movel %a4@,%d2 <== NOT EXECUTED
if (pipe == NULL) {
4cca8: 6700 008a beqw 4cd34 <fifo_open+0xb8> <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
4ccac: 42a7 clrl %sp@- <== NOT EXECUTED 4ccae: 2042 moveal %d2,%a0 <== NOT EXECUTED 4ccb0: 42a7 clrl %sp@- <== NOT EXECUTED 4ccb2: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4ccb6: 4e93 jsr %a3@ <== NOT EXECUTED 4ccb8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ccbc: 4a80 tstl %d0 <== NOT EXECUTED 4ccbe: 675a beqs 4cd1a <fifo_open+0x9e> <== NOT EXECUTED 4ccc0: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
err = -EINTR; if (*pipep == NULL) {
4ccc4: 4a94 tstl %a4@ <== NOT EXECUTED 4ccc6: 6700 023a beqw 4cf02 <fifo_open+0x286> <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
4ccca: 2f39 0005 e6b0 movel 5e6b0 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4ccd0: 4bf9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a5 <== NOT EXECUTED 4ccd6: 4e95 jsr %a5@ <== NOT EXECUTED
pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err)
4ccd8: 588f addql #4,%sp <== NOT EXECUTED 4ccda: 4a8a tstl %a2 <== NOT EXECUTED 4ccdc: 6630 bnes 4cd0e <fifo_open+0x92> <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) {
4ccde: 2043 moveal %d3,%a0 <== NOT EXECUTED 4cce0: 7006 moveq #6,%d0 <== NOT EXECUTED 4cce2: 7404 moveq #4,%d2 <== NOT EXECUTED 4cce4: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4cce8: c081 andl %d1,%d0 <== NOT EXECUTED
int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep;
4ccea: 2454 moveal %a4@,%a2 <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
4ccec: b480 cmpl %d0,%d2 <== NOT EXECUTED 4ccee: 6700 023e beqw 4cf2e <fifo_open+0x2b2> <== NOT EXECUTED 4ccf2: 7206 moveq #6,%d1 <== NOT EXECUTED 4ccf4: b280 cmpl %d0,%d1 <== NOT EXECUTED 4ccf6: 6700 0310 beqw 4d008 <fifo_open+0x38c> <== NOT EXECUTED 4ccfa: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 4ccfe: b480 cmpl %d0,%d2 <== NOT EXECUTED 4cd00: 6700 018a beqw 4ce8c <fifo_open+0x210> <== NOT EXECUTED
if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe);
4cd04: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cd08: 95ca subal %a2,%a2 <== NOT EXECUTED 4cd0a: 4e95 jsr %a5@ <== NOT EXECUTED
return 0;
4cd0c: 588f addql #4,%sp <== NOT EXECUTED
out_error: pipe_release(pipep, iop); return err; }
4cd0e: 200a movel %a2,%d0 <== NOT EXECUTED 4cd10: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4cd16: 4e5e unlk %fp <== NOT EXECUTED 4cd18: 4e75 rts <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
4cd1a: 95ca subal %a2,%a2 <== NOT EXECUTED
err = -EINTR; if (*pipep == NULL) {
4cd1c: 4a94 tstl %a4@ <== NOT EXECUTED 4cd1e: 66aa bnes 4ccca <fifo_open+0x4e> <== NOT EXECUTED 4cd20: 6000 01e0 braw 4cf02 <fifo_open+0x286> <== NOT EXECUTED
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
4cd24: 347c fffc moveaw #-4,%a2
return 0; out_error: pipe_release(pipep, iop); return err; }
4cd28: 200a movel %a2,%d0 4cd2a: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4cd30: 4e5e unlk %fp 4cd32: 4e75 rts
{ static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t));
4cd34: 4878 0034 pea 34 <OPER2+0x20> <== NOT EXECUTED 4cd38: 45f9 0004 ac20 lea 4ac20 <malloc>,%a2 <== NOT EXECUTED 4cd3e: 4e92 jsr %a2@ <== NOT EXECUTED
if (pipe == NULL)
4cd40: 588f addql #4,%sp <== NOT EXECUTED
{ static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t));
4cd42: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4cd44: 2400 movel %d0,%d2 <== NOT EXECUTED
if (pipe == NULL)
4cd46: 6700 03a4 beqw 4d0ec <fifo_open+0x470> <== NOT EXECUTED
return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size);
4cd4a: 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));
4cd4e: 2040 moveal %d0,%a0 <== NOT EXECUTED
pipe->Size = PIPE_BUF;
4cd50: 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));
4cd56: 4298 clrl %a0@+ <== NOT EXECUTED 4cd58: 5888 addql #4,%a0 <== NOT EXECUTED 4cd5a: 4298 clrl %a0@+ <== NOT EXECUTED 4cd5c: 4298 clrl %a0@+ <== NOT EXECUTED 4cd5e: 4298 clrl %a0@+ <== NOT EXECUTED 4cd60: 4298 clrl %a0@+ <== NOT EXECUTED 4cd62: 4298 clrl %a0@+ <== NOT EXECUTED 4cd64: 4298 clrl %a0@+ <== NOT EXECUTED 4cd66: 4298 clrl %a0@+ <== NOT EXECUTED 4cd68: 4298 clrl %a0@+ <== NOT EXECUTED 4cd6a: 4298 clrl %a0@+ <== NOT EXECUTED 4cd6c: 4298 clrl %a0@+ <== NOT EXECUTED 4cd6e: 4290 clrl %a0@ <== NOT EXECUTED
pipe->Size = PIPE_BUF;
4cd70: 2b40 0004 movel %d0,%a5@(4) <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
4cd74: 4e92 jsr %a2@ <== NOT EXECUTED
if (! pipe->Buffer)
4cd76: 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);
4cd78: 2a80 movel %d0,%a5@ <== NOT EXECUTED
if (! pipe->Buffer)
4cd7a: 6700 038e beqw 4d10a <fifo_open+0x48e> <== NOT EXECUTED
goto err_buf; err = -EINTR; if (rtems_barrier_create(
4cd7e: 486d 002c pea %a5@(44) <== NOT EXECUTED 4cd82: 45f9 0004 d8b0 lea 4d8b0 <rtems_barrier_create>,%a2 <== NOT EXECUTED 4cd88: 1039 0005 d840 moveb 5d840 <c.6739>,%d0 <== NOT EXECUTED 4cd8e: 42a7 clrl %sp@- <== NOT EXECUTED 4cd90: 49c0 extbl %d0 <== NOT EXECUTED 4cd92: 42a7 clrl %sp@- <== NOT EXECUTED 4cd94: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4cd9a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cd9c: 4e92 jsr %a2@ <== NOT EXECUTED 4cd9e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4cda2: 4a80 tstl %d0 <== NOT EXECUTED 4cda4: 6600 01c4 bnew 4cf6a <fifo_open+0x2ee> <== 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(
4cda8: 486d 0030 pea %a5@(48) <== NOT EXECUTED 4cdac: 283c 0004 d9ac movel #317868,%d4 <== NOT EXECUTED 4cdb2: 1039 0005 d840 moveb 5d840 <c.6739>,%d0 <== NOT EXECUTED 4cdb8: 42a7 clrl %sp@- <== NOT EXECUTED 4cdba: 49c0 extbl %d0 <== NOT EXECUTED 4cdbc: 42a7 clrl %sp@- <== NOT EXECUTED 4cdbe: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4cdc4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cdc6: 4e92 jsr %a2@ <== NOT EXECUTED 4cdc8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4cdcc: 4a80 tstl %d0 <== NOT EXECUTED 4cdce: 6600 0190 bnew 4cf60 <fifo_open+0x2e4> <== 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(
4cdd2: 486d 0028 pea %a5@(40) <== NOT EXECUTED 4cdd6: 1039 0005 d840 moveb 5d840 <c.6739>,%d0 <== NOT EXECUTED 4cddc: 42a7 clrl %sp@- <== NOT EXECUTED 4cdde: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 4cde2: 49c0 extbl %d0 <== NOT EXECUTED 4cde4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4cde8: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4cdee: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cdf0: 4eb9 0004 5a8c jsr 45a8c <rtems_semaphore_create> <== NOT EXECUTED 4cdf6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4cdfa: 4a80 tstl %d0 <== NOT EXECUTED 4cdfc: 6600 0158 bnew 4cf56 <fifo_open+0x2da> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *)
4ce00: 280e movel %fp,%d4 <== NOT EXECUTED 4ce02: 5184 subql #8,%d4 <== NOT EXECUTED 4ce04: 2042 moveal %d2,%a0 <== NOT EXECUTED 4ce06: 4bf9 0004 752c lea 4752c <_Objects_Get>,%a5 <== NOT EXECUTED
{ Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch();
4ce0c: 45f9 0004 7dbc lea 47dbc <_Thread_Enable_dispatch>,%a2 <== NOT EXECUTED 4ce12: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ce14: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4ce18: 4879 0005 f798 pea 5f798 <_Barrier_Information> <== NOT EXECUTED 4ce1e: 4e95 jsr %a5@ <== NOT EXECUTED
/* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
4ce20: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4ce26: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ce28: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch();
4ce2c: 4e92 jsr %a2@ <== NOT EXECUTED 4ce2e: 2042 moveal %d2,%a0 <== NOT EXECUTED 4ce30: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ce32: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4ce36: 4879 0005 f798 pea 5f798 <_Barrier_Information> <== NOT EXECUTED 4ce3c: 4e95 jsr %a5@ <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
4ce3e: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4ce44: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ce46: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch();
4ce4a: 4e92 jsr %a2@ <== NOT EXECUTED
#ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z')
4ce4c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4ce50: 1039 0005 d840 moveb 5d840 <c.6739>,%d0 <== NOT EXECUTED 4ce56: 49c0 extbl %d0 <== NOT EXECUTED 4ce58: 2200 movel %d0,%d1 <== NOT EXECUTED 4ce5a: 5281 addql #1,%d1 <== NOT EXECUTED 4ce5c: 13c1 0005 d840 moveb %d1,5d840 <c.6739> <== NOT EXECUTED 4ce62: 727a moveq #122,%d1 <== NOT EXECUTED 4ce64: b280 cmpl %d0,%d1 <== NOT EXECUTED 4ce66: 6600 fe44 bnew 4ccac <fifo_open+0x30> <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
4ce6a: 2042 moveal %d2,%a0 <== NOT EXECUTED
pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') c = 'a';
4ce6c: 7061 moveq #97,%d0 <== NOT EXECUTED 4ce6e: 13c0 0005 d840 moveb %d0,5d840 <c.6739> <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
4ce74: 42a7 clrl %sp@- <== NOT EXECUTED 4ce76: 42a7 clrl %sp@- <== NOT EXECUTED 4ce78: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4ce7c: 4e93 jsr %a3@ <== NOT EXECUTED 4ce7e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ce82: 4a80 tstl %d0 <== NOT EXECUTED 4ce84: 6700 fe94 beqw 4cd1a <fifo_open+0x9e> <== NOT EXECUTED 4ce88: 6000 fe36 braw 4ccc0 <fifo_open+0x44> <== NOT EXECUTED
pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0)
4ce8c: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4ce90: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ce92: 5288 addql #1,%a0 <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
4ce94: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
4ce98: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4ce9c: 4a80 tstl %d0 <== NOT EXECUTED 4ce9e: 6700 01c2 beqw 4d062 <fifo_open+0x3e6> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) {
4cea2: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4cea6: 6600 fe5c bnew 4cd04 <fifo_open+0x88> <== NOT EXECUTED
/* Not an error */ if (LIBIO_NODELAY(iop))
4ceaa: 7001 moveq #1,%d0 <== NOT EXECUTED 4ceac: 2043 moveal %d3,%a0 <== NOT EXECUTED 4ceae: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4ceb2: 6600 fe50 bnew 4cd04 <fifo_open+0x88> <== NOT EXECUTED
break; prevCounter = pipe->writerCounter;
4ceb6: 282a 0024 movel %a2@(36),%d4 <== NOT EXECUTED 4ceba: 243c 0004 da94 movel #318100,%d2 <== NOT EXECUTED
err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe);
4cec0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cec4: 4e95 jsr %a5@ <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
4cec6: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cec8: 42a7 clrl %sp@- <== NOT EXECUTED 4ceca: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4cece: 4e90 jsr %a0@ <== NOT EXECUTED 4ced0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ced4: 4a80 tstl %d0 <== NOT EXECUTED 4ced6: 6600 01b2 bnew 4d08a <fifo_open+0x40e> <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
4ceda: 42a7 clrl %sp@- <== NOT EXECUTED 4cedc: 42a7 clrl %sp@- <== NOT EXECUTED 4cede: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cee2: 4e93 jsr %a3@ <== NOT EXECUTED 4cee4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cee8: 4a80 tstl %d0 <== NOT EXECUTED 4ceea: 6600 019e bnew 4d08a <fifo_open+0x40e> <== NOT EXECUTED
goto out_error; } while (prevCounter == pipe->writerCounter);
4ceee: b8aa 0024 cmpl %a2@(36),%d4 <== NOT EXECUTED 4cef2: 67cc beqs 4cec0 <fifo_open+0x244> <== NOT EXECUTED
if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe);
4cef4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cef8: 95ca subal %a2,%a2 <== NOT EXECUTED 4cefa: 4e95 jsr %a5@ <== NOT EXECUTED
return 0;
4cefc: 588f addql #4,%sp <== NOT EXECUTED 4cefe: 6000 fe0e braw 4cd0e <fifo_open+0x92> <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err)
4cf02: 4a8a tstl %a2 <== NOT EXECUTED 4cf04: 6600 0198 bnew 4d09e <fifo_open+0x422> <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
4cf08: 2f39 0005 e6b0 movel 5e6b0 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4cf0e: 4bf9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a5 <== NOT EXECUTED
if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe;
4cf14: 2882 movel %d2,%a4@ <== NOT EXECUTED
err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) {
4cf16: 7404 moveq #4,%d2 <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
4cf18: 4e95 jsr %a5@ <== NOT EXECUTED
int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep;
4cf1a: 2454 moveal %a4@,%a2 <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
4cf1c: 2043 moveal %d3,%a0 <== NOT EXECUTED 4cf1e: 7006 moveq #6,%d0 <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
4cf20: 588f addql #4,%sp <== NOT EXECUTED
err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) {
4cf22: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4cf26: c081 andl %d1,%d0 <== NOT EXECUTED 4cf28: b480 cmpl %d0,%d2 <== NOT EXECUTED 4cf2a: 6600 fdc6 bnew 4ccf2 <fifo_open+0x76> <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4cf2e: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4cf32: 666a bnes 4cf9e <fifo_open+0x322> <== NOT EXECUTED 4cf34: 0801 0000 btst #0,%d1 <== NOT EXECUTED 4cf38: 6764 beqs 4cf9e <fifo_open+0x322> <== NOT EXECUTED
PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop);
4cf3a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4cf3c: 347c fffa moveaw #-6,%a2 <== NOT EXECUTED
PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop);
4cf40: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4cf42: 4eb9 0004 cb5c jsr 4cb5c <pipe_release> <== NOT EXECUTED
return err;
4cf48: 508f addql #8,%sp <== NOT EXECUTED
}
4cf4a: 200a movel %a2,%d0 <== NOT EXECUTED 4cf4c: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4cf52: 4e5e unlk %fp <== NOT EXECUTED 4cf54: 4e75 rts <== NOT EXECUTED
if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier);
4cf56: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED 4cf5a: 2044 moveal %d4,%a0 <== NOT EXECUTED 4cf5c: 4e90 jsr %a0@ <== NOT EXECUTED 4cf5e: 588f addql #4,%sp <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier);
4cf60: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED 4cf64: 2044 moveal %d4,%a0 <== NOT EXECUTED 4cf66: 4e90 jsr %a0@ <== NOT EXECUTED 4cf68: 588f addql #4,%sp <== NOT EXECUTED
err_rbar: free(pipe->Buffer);
4cf6a: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 4cf6c: 243c 0004 a688 movel #304776,%d2 <== NOT EXECUTED 4cf72: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cf74: 4e90 jsr %a0@ <== NOT EXECUTED 4cf76: 588f addql #4,%sp <== NOT EXECUTED
err_buf: free(pipe);
4cf78: 2042 moveal %d2,%a0 <== NOT EXECUTED
err_sem: rtems_barrier_delete(pipe->writeBarrier); err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer);
4cf7a: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
err_buf: free(pipe);
4cf7e: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4cf80: 4e90 jsr %a0@ <== NOT EXECUTED 4cf82: 588f addql #4,%sp <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
4cf84: 2f39 0005 e6b0 movel 5e6b0 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4cf8a: 4bf9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a5 <== NOT EXECUTED 4cf90: 4e95 jsr %a5@ <== NOT EXECUTED
pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err)
4cf92: 588f addql #4,%sp <== NOT EXECUTED 4cf94: 4a8a tstl %a2 <== NOT EXECUTED 4cf96: 6700 fd46 beqw 4ccde <fifo_open+0x62> <== NOT EXECUTED 4cf9a: 6000 fd72 braw 4cd0e <fifo_open+0x92> <== NOT EXECUTED
err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0)
4cf9e: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4cfa2: 2200 movel %d0,%d1 <== NOT EXECUTED 4cfa4: 5281 addql #1,%d1 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
4cfa6: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
4cfaa: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4cfae: 4a80 tstl %d0 <== NOT EXECUTED 4cfb0: 6700 00c4 beqw 4d076 <fifo_open+0x3fa> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) {
4cfb4: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4cfb8: 6600 fd4a bnew 4cd04 <fifo_open+0x88> <== NOT EXECUTED
prevCounter = pipe->readerCounter;
4cfbc: 282a 0020 movel %a2@(32),%d4 <== NOT EXECUTED 4cfc0: 243c 0004 da94 movel #318100,%d2 <== NOT EXECUTED
err = -EINTR; do { PIPE_UNLOCK(pipe);
4cfc6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cfca: 4e95 jsr %a5@ <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
4cfcc: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cfce: 42a7 clrl %sp@- <== NOT EXECUTED 4cfd0: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4cfd4: 4e90 jsr %a0@ <== NOT EXECUTED 4cfd6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cfda: 4a80 tstl %d0 <== NOT EXECUTED 4cfdc: 6600 00ac bnew 4d08a <fifo_open+0x40e> <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
4cfe0: 42a7 clrl %sp@- <== NOT EXECUTED 4cfe2: 42a7 clrl %sp@- <== NOT EXECUTED 4cfe4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cfe8: 4e93 jsr %a3@ <== NOT EXECUTED 4cfea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cfee: 4a80 tstl %d0 <== NOT EXECUTED 4cff0: 6600 0098 bnew 4d08a <fifo_open+0x40e> <== NOT EXECUTED
goto out_error; } while (prevCounter == pipe->readerCounter);
4cff4: b8aa 0020 cmpl %a2@(32),%d4 <== NOT EXECUTED 4cff8: 67cc beqs 4cfc6 <fifo_open+0x34a> <== NOT EXECUTED
if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe);
4cffa: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cffe: 95ca subal %a2,%a2 <== NOT EXECUTED 4d000: 4e95 jsr %a5@ <== NOT EXECUTED
return 0;
4d002: 588f addql #4,%sp <== NOT EXECUTED 4d004: 6000 fd08 braw 4cd0e <fifo_open+0x92> <== NOT EXECUTED
} break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0)
4d008: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4d00c: 2200 movel %d0,%d1 <== NOT EXECUTED 4d00e: 5281 addql #1,%d1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
4d010: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
4d014: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4d018: 4a80 tstl %d0 <== NOT EXECUTED 4d01a: 6734 beqs 4d050 <fifo_open+0x3d4> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0)
4d01c: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4d020: 2400 movel %d0,%d2 <== NOT EXECUTED 4d022: 5282 addql #1,%d2 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++;
4d024: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
4d028: 2542 0014 movel %d2,%a2@(20) <== NOT EXECUTED 4d02c: 4a80 tstl %d0 <== NOT EXECUTED 4d02e: 6600 fcd4 bnew 4cd04 <fifo_open+0x88> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
4d032: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d036: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4d03a: 4eb9 0004 da1c jsr 4da1c <rtems_barrier_release> <== NOT EXECUTED 4d040: 508f addql #8,%sp <== NOT EXECUTED
break; } PIPE_UNLOCK(pipe);
4d042: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d046: 95ca subal %a2,%a2 <== NOT EXECUTED 4d048: 4e95 jsr %a5@ <== NOT EXECUTED
return 0;
4d04a: 588f addql #4,%sp <== NOT EXECUTED 4d04c: 6000 fcc0 braw 4cd0e <fifo_open+0x92> <== NOT EXECUTED
break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe);
4d050: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d054: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4d058: 4eb9 0004 da1c jsr 4da1c <rtems_barrier_release> <== NOT EXECUTED 4d05e: 508f addql #8,%sp <== NOT EXECUTED 4d060: 60ba bras 4d01c <fifo_open+0x3a0> <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe);
4d062: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d066: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4d06a: 4eb9 0004 da1c jsr 4da1c <rtems_barrier_release> <== NOT EXECUTED 4d070: 508f addql #8,%sp <== NOT EXECUTED 4d072: 6000 fe2e braw 4cea2 <fifo_open+0x226> <== NOT EXECUTED
goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe);
4d076: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d07a: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4d07e: 4eb9 0004 da1c jsr 4da1c <rtems_barrier_release> <== NOT EXECUTED 4d084: 508f addql #8,%sp <== NOT EXECUTED 4d086: 6000 ff2c braw 4cfb4 <fifo_open+0x338> <== NOT EXECUTED
PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop);
4d08a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0;
4d08c: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
out_error: pipe_release(pipep, iop);
4d090: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4d092: 4eb9 0004 cb5c jsr 4cb5c <pipe_release> <== NOT EXECUTED
return err;
4d098: 508f addql #8,%sp <== NOT EXECUTED 4d09a: 6000 feae braw 4cf4a <fifo_open+0x2ce> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier);
4d09e: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d0a0: 49f9 0004 d9ac lea 4d9ac <rtems_barrier_delete>,%a4 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer);
4d0a6: 47f9 0004 a688 lea 4a688 <free>,%a3 <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier);
4d0ac: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4d0b0: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
4d0b2: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d0b4: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4d0b8: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
4d0ba: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d0bc: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4d0c0: 4eb9 0004 5c54 jsr 45c54 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
4d0c6: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d0c8: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4d0ca: 4e93 jsr %a3@ <== NOT EXECUTED
free(pipe);
4d0cc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d0ce: 4e93 jsr %a3@ <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
4d0d0: 2f39 0005 e6b0 movel 5e6b0 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4d0d6: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED 4d0dc: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
return 0; out_error: pipe_release(pipep, iop); return err; }
4d0e0: 200a movel %a2,%d0 <== NOT EXECUTED 4d0e2: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4d0e8: 4e5e unlk %fp <== NOT EXECUTED 4d0ea: 4e75 rts <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
4d0ec: 2f39 0005 e6b0 movel 5e6b0 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4d0f2: 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)
4d0f8: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
4d0fc: 4e95 jsr %a5@ <== NOT EXECUTED
pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err)
4d0fe: 588f addql #4,%sp <== NOT EXECUTED 4d100: 4a8a tstl %a2 <== NOT EXECUTED 4d102: 6700 fbda beqw 4ccde <fifo_open+0x62> <== NOT EXECUTED 4d106: 6000 fc06 braw 4cd0e <fifo_open+0x92> <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe);
4d10a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4d10c: 243c 0004 a688 movel #304776,%d2 <== NOT EXECUTED 4d112: 2042 moveal %d2,%a0 <== NOT EXECUTED
return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); if (! pipe->Buffer)
4d114: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe);
4d118: 4e90 jsr %a0@ <== NOT EXECUTED 4d11a: 588f addql #4,%sp <== NOT EXECUTED 4d11c: 6000 fe66 braw 4cf84 <fifo_open+0x308> <== NOT EXECUTED
00068ca4 <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)) ) {
68ca4: 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;
68ca8: 2079 000a 6990 moveal a6990 <rtems_filesystem_mount_table_control>,%a0<== NOT EXECUTED 68cae: b1fc 000a 6994 cmpal #682388,%a0 <== NOT EXECUTED 68cb4: 6724 beqs 68cda <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 ) {
68cb6: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 68cba: 2029 0010 movel %a1@(16),%d0 <== NOT EXECUTED 68cbe: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 68cc2: 6710 beqs 68cd4 <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 ) {
68cc4: 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;
68cc6: b1fc 000a 6994 cmpal #682388,%a0 <== NOT EXECUTED 68ccc: 670c beqs 68cda <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 ) {
68cce: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 68cd2: 66f0 bnes 68cc4 <file_systems_below_this_mountpoint+0x20><== NOT EXECUTED
return true; } } return false; }
68cd4: 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;
68cd6: 7001 moveq #1,%d0 <== NOT EXECUTED
return true; } } return false; }
68cd8: 4e75 rts <== NOT EXECUTED 68cda: 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;
68cdc: 4200 clrb %d0 <== NOT EXECUTED
return true; } } return false; }
68cde: 4e75 rts
00045c5c <fork>: #include <errno.h> #include <rtems/seterr.h> int fork( void ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45c5c: 4e56 0000 linkw %fp,#0 45c60: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c66: 7258 moveq #88,%d1 45c68: 2040 moveal %d0,%a0
}
45c6a: 70ff moveq #-1,%d0 45c6c: 4e5e unlk %fp
#include <errno.h> #include <rtems/seterr.h> int fork( void ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45c6e: 2081 movel %d1,%a0@
}
45c70: 4e75 rts
... 00043bb0 <fpathconf>: long fpathconf( int fd, int name ) {
43bb0: 4e56 0000 linkw %fp,#0 43bb4: 202e 0008 movel %fp@(8),%d0 43bb8: 222e 000c movel %fp@(12),%d1 43bbc: 2f02 movel %d2,%sp@-
long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd);
43bbe: b0b9 0006 15f4 cmpl 615f4 <rtems_libio_number_iops>,%d0 43bc4: 6400 00f0 bccw 43cb6 <fpathconf+0x106>
iop = rtems_libio_iop(fd);
43bc8: 2079 0006 2cf8 moveal 62cf8 <rtems_libio_iops>,%a0 43bce: ed88 lsll #6,%d0 43bd0: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43bd2: 2428 0014 movel %a0@(20),%d2 43bd6: 0802 0008 btst #8,%d2 43bda: 6700 00da beqw 43cb6 <fpathconf+0x106>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
43bde: 0802 0001 btst #1,%d2 43be2: 670a beqs 43bee <fpathconf+0x3e>
/* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
43be4: 2068 0028 moveal %a0@(40),%a0
switch ( name ) {
43be8: 700b moveq #11,%d0 43bea: b081 cmpl %d1,%d0 43bec: 6416 bccs 43c04 <fpathconf+0x54>
break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL );
43bee: 4eb9 0005 15b0 jsr 515b0 <__errno>
break; } return return_value; }
43bf4: 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 );
43bf8: 2040 moveal %d0,%a0 43bfa: 7216 moveq #22,%d1 43bfc: 70ff moveq #-1,%d0
break; } return return_value; }
43bfe: 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 );
43c00: 2081 movel %d1,%a0@
break; } return return_value; }
43c02: 4e75 rts
* Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) {
43c04: 303b 1a08 movew %pc@(43c0e <fpathconf+0x5e>,%d1:l:2),%d0 43c08: 48c0 extl %d0 43c0a: 4efb 0802 jmp %pc@(43c0e <fpathconf+0x5e>,%d0:l)
43c0e: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43c14: 006c 0154 <== NOT EXECUTED 43c16: 0060 0140 <== NOT EXECUTED 43c18: 0054 0124 <== NOT EXECUTED 43c1a: 0048 0110 <== NOT EXECUTED 43c1c: 003c 074 <== NOT EXECUTED 43c1e: 0030 060 <== NOT EXECUTED 43c20: 0024 044 <== NOT EXECUTED 43c22: 0018 030 <== NOT EXECUTED 43c24: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c2a: 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;
43c2c: 2028 005c movel %a0@(92),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c30: 4e75 rts 43c32: 242e fffc movel %fp@(-4),%d2 43c36: 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;
43c38: 2028 0050 movel %a0@(80),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c3c: 4e75 rts 43c3e: 242e fffc movel %fp@(-4),%d2 43c42: 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;
43c44: 2028 0064 movel %a0@(100),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c48: 4e75 rts 43c4a: 242e fffc movel %fp@(-4),%d2 43c4e: 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;
43c50: 2028 0058 movel %a0@(88),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c54: 4e75 rts 43c56: 242e fffc movel %fp@(-4),%d2 43c5a: 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;
43c5c: 2028 0054 movel %a0@(84),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c60: 4e75 rts 43c62: 242e fffc movel %fp@(-4),%d2 43c66: 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;
43c68: 2028 004c movel %a0@(76),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c6c: 4e75 rts 43c6e: 242e fffc movel %fp@(-4),%d2 43c72: 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;
43c74: 2028 0048 movel %a0@(72),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c78: 4e75 rts 43c7a: 242e fffc movel %fp@(-4),%d2 43c7e: 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;
43c80: 2028 0044 movel %a0@(68),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c84: 4e75 rts 43c86: 242e fffc movel %fp@(-4),%d2 43c8a: 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;
43c8c: 2028 0040 movel %a0@(64),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c90: 4e75 rts 43c92: 242e fffc movel %fp@(-4),%d2 43c96: 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;
43c98: 2028 003c movel %a0@(60),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43c9c: 4e75 rts 43c9e: 242e fffc movel %fp@(-4),%d2 43ca2: 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;
43ca4: 2028 0038 movel %a0@(56),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43ca8: 4e75 rts 43caa: 242e fffc movel %fp@(-4),%d2 43cae: 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;
43cb0: 2028 0060 movel %a0@(96),%d0
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43cb4: 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);
43cb6: 4eb9 0005 15b0 jsr 515b0 <__errno> 43cbc: 7409 moveq #9,%d2 43cbe: 2040 moveal %d0,%a0 43cc0: 70ff moveq #-1,%d0 43cc2: 2082 movel %d2,%a0@
rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; }
43cc4: 242e fffc movel %fp@(-4),%d2 43cc8: 4e5e unlk %fp 43cca: 4e75 rts
0004a688 <free>: void free( void *ptr ) { MSBUMP(free_calls, 1);
4a688: 4e56 0000 linkw %fp,#0 4a68c: 52b9 0005 edbc addql #1,5edbc <rtems_malloc_statistics+0xc> 4a692: 2f02 movel %d2,%sp@- 4a694: 242e 0008 movel %fp@(8),%d2
if ( !ptr )
4a698: 6732 beqs 4a6cc <free+0x44>
/* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) &&
4a69a: 7003 moveq #3,%d0 4a69c: b0b9 0005 f08c cmpl 5f08c <_System_state_Current>,%d0 4a6a2: 6758 beqs 4a6fc <free+0x74>
#endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
4a6a4: 2079 0005 dd36 moveal 5dd36 <rtems_malloc_statistics_helpers>,%a0 4a6aa: 4a88 tstl %a0 4a6ac: 670a beqs 4a6b8 <free+0x30>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
4a6ae: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a6b0: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 4a6b4: 4e90 jsr %a0@ <== NOT EXECUTED 4a6b6: 588f addql #4,%sp <== NOT EXECUTED
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
4a6b8: 2f02 movel %d2,%sp@- 4a6ba: 2f39 0005 d6b0 movel 5d6b0 <RTEMS_Malloc_Heap>,%sp@- 4a6c0: 4eb9 0004 bfcc jsr 4bfcc <_Protected_heap_Free> 4a6c6: 508f addql #8,%sp 4a6c8: 4a00 tstb %d0 4a6ca: 6708 beqs 4a6d4 <free+0x4c>
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
4a6cc: 242e fffc movel %fp@(-4),%d2 4a6d0: 4e5e unlk %fp 4a6d2: 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
4a6d4: 2079 0005 d6b0 moveal 5d6b0 <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",
4a6da: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 4a6de: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 4a6e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a6e4: 4879 0005 c952 pea 5c952 <IMFS_link_handlers+0x7e> <== NOT EXECUTED 4a6ea: 4eb9 0004 33ac jsr 433ac <printk> <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
4a6f0: 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",
4a6f4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
4a6f8: 4e5e unlk %fp <== NOT EXECUTED 4a6fa: 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()) &&
4a6fc: 4eb9 0004 ab84 jsr 4ab84 <malloc_is_system_state_OK> 4a702: 4a00 tstb %d0 4a704: 669e bnes 4a6a4 <free+0x1c>
!malloc_is_system_state_OK() ) { malloc_deferred_free(ptr);
4a706: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
4a70a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a70e: 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);
4a710: 4ef9 0004 abc4 jmp 4abc4 <malloc_deferred_free> <== NOT EXECUTED
... 00068294 <free_user_env>: * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) {
68294: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 68298: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6829a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env
6829e: b5fc 000a 69a8 cmpal #682408,%a2 <== NOT EXECUTED 682a4: 6740 beqs 682e6 <free_user_env+0x52> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory);
682a6: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 682aa: 4a88 tstl %a0 <== NOT EXECUTED 682ac: 6710 beqs 682be <free_user_env+0x2a> <== NOT EXECUTED 682ae: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 682b2: 4a88 tstl %a0 <== NOT EXECUTED 682b4: 6708 beqs 682be <free_user_env+0x2a> <== NOT EXECUTED 682b6: 486a 0004 pea %a2@(4) <== NOT EXECUTED 682ba: 4e90 jsr %a0@ <== NOT EXECUTED 682bc: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
682be: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 682c2: 4a88 tstl %a0 <== NOT EXECUTED 682c4: 6710 beqs 682d6 <free_user_env+0x42> <== NOT EXECUTED 682c6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 682ca: 4a88 tstl %a0 <== NOT EXECUTED 682cc: 6708 beqs 682d6 <free_user_env+0x42> <== NOT EXECUTED 682ce: 486a 0018 pea %a2@(24) <== NOT EXECUTED 682d2: 4e90 jsr %a0@ <== NOT EXECUTED 682d4: 588f addql #4,%sp <== NOT EXECUTED
free(env);
682d6: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
682da: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 682de: 4e5e unlk %fp <== NOT EXECUTED
&& --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env);
682e0: 4ef9 0004 67a8 jmp 467a8 <free> <== NOT EXECUTED
} }
682e6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 682ea: 4e5e unlk %fp <== NOT EXECUTED
682ec: 4e75 rts
0005b37c <fstat>: int fstat( int fd, struct stat *sbuf ) {
5b37c: 4e56 0000 linkw %fp,#0 5b380: 202e 0008 movel %fp@(8),%d0 5b384: 2f0a movel %a2,%sp@- 5b386: 2f02 movel %d2,%sp@- 5b388: 242e 000c movel %fp@(12),%d2
/* * Check to see if we were passed a valid pointer. */ if ( !sbuf )
5b38c: 6700 0096 beqw 5b424 <fstat+0xa8>
/* * Now process the stat() request. */ iop = rtems_libio_iop( fd );
5b390: b0b9 0005 d6a4 cmpl 5d6a4 <rtems_libio_number_iops>,%d0 5b396: 6456 bccs 5b3ee <fstat+0x72> 5b398: 2479 0005 eda4 moveal 5eda4 <rtems_libio_iops>,%a2 5b39e: ed88 lsll #6,%d0 5b3a0: d5c0 addal %d0,%a2
rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop);
5b3a2: 202a 0014 movel %a2@(20),%d0 5b3a6: 0280 0000 0100 andil #256,%d0 5b3ac: 6740 beqs 5b3ee <fstat+0x72>
if ( !iop->handlers )
5b3ae: 206a 003c moveal %a2@(60),%a0 5b3b2: 4a88 tstl %a0 5b3b4: 6738 beqs 5b3ee <fstat+0x72>
rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h )
5b3b6: 4aa8 0018 tstl %a0@(24) 5b3ba: 674c beqs 5b408 <fstat+0x8c>
/* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) );
5b3bc: 4878 0046 pea 46 <DBL_MANT_DIG+0x11> 5b3c0: 42a7 clrl %sp@- 5b3c2: 2f02 movel %d2,%sp@- 5b3c4: 4eb9 0004 f41c jsr 4f41c <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
5b3ca: 206a 003c moveal %a2@(60),%a0 5b3ce: 45ea 0018 lea %a2@(24),%a2 5b3d2: 4fef 000c lea %sp@(12),%sp 5b3d6: 2d42 000c movel %d2,%fp@(12)
}
5b3da: 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 );
5b3de: 2d4a 0008 movel %a2,%fp@(8)
}
5b3e2: 246e fffc moveal %fp@(-4),%a2 5b3e6: 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 );
5b3e8: 2268 0018 moveal %a0@(24),%a1 5b3ec: 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 );
5b3ee: 4eb9 0004 eb8c jsr 4eb8c <__errno>
* versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); }
5b3f4: 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 );
5b3f8: 2040 moveal %d0,%a0 5b3fa: 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 ); }
5b3fc: 246e fffc moveal %fp@(-4),%a2 5b400: 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 );
5b402: 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 ); }
5b404: 70ff moveq #-1,%d0 5b406: 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 );
5b408: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED
* versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); }
5b40e: 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 );
5b412: 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 ); }
5b414: 70ff moveq #-1,%d0 <== NOT EXECUTED 5b416: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5b41a: 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 );
5b41c: 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 ); }
5b422: 4e75 rts <== NOT EXECUTED
/* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT );
5b424: 4eb9 0004 eb8c jsr 4eb8c <__errno>
* versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); }
5b42a: 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 );
5b42e: 2040 moveal %d0,%a0 5b430: 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 ); }
5b432: 70ff moveq #-1,%d0 5b434: 246e fffc moveal %fp@(-4),%a2 5b438: 4e5e unlk %fp
/* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT );
5b43a: 2081 movel %d1,%a0@
* versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); }
5b43c: 4e75 rts
0006716c <fsync>: #include <rtems/seterr.h> int fsync( int fd ) {
6716c: 4e56 0000 linkw %fp,#0 67170: 202e 0008 movel %fp@(8),%d0
rtems_libio_t *iop; rtems_libio_check_fd( fd );
67174: b0b9 000a 1ca4 cmpl a1ca4 <rtems_libio_number_iops>,%d0 6717a: 6430 bccs 671ac <fsync+0x40>
iop = rtems_libio_iop( fd );
6717c: 2079 000a 694c moveal a694c <rtems_libio_iops>,%a0 67182: ed88 lsll #6,%d0 67184: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
67186: 2028 0014 movel %a0@(20),%d0 6718a: 0800 0008 btst #8,%d0 6718e: 671c beqs 671ac <fsync+0x40>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
67190: 44c0 movew %d0,%ccr 67192: 662a bnes 671be <fsync+0x52>
/* * Now process the fsync(). */ if ( !iop->handlers )
67194: 2268 003c moveal %a0@(60),%a1 67198: 4a89 tstl %a1 6719a: 6710 beqs 671ac <fsync+0x40>
rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h )
6719c: 2269 0028 moveal %a1@(40),%a1 671a0: 4a89 tstl %a1 671a2: 672c beqs 671d0 <fsync+0x64>
rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop );
671a4: 2d48 0008 movel %a0,%fp@(8)
}
671a8: 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 );
671aa: 4ed1 jmp %a1@
/* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF );
671ac: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED
if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); }
671b2: 4e5e unlk %fp <== NOT EXECUTED
/* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF );
671b4: 2040 moveal %d0,%a0 <== NOT EXECUTED 671b6: 7009 moveq #9,%d0 <== NOT EXECUTED 671b8: 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 ); }
671ba: 70ff moveq #-1,%d0 <== NOT EXECUTED 671bc: 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 );
671be: 4eb9 0008 0e64 jsr 80e64 <__errno> 671c4: 7216 moveq #22,%d1 671c6: 2040 moveal %d0,%a0
if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); }
671c8: 70ff moveq #-1,%d0 671ca: 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 );
671cc: 2081 movel %d1,%a0@
if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); }
671ce: 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 );
671d0: 4eb9 0008 0e64 jsr 80e64 <__errno>
return (*iop->handlers->fsync_h)( iop ); }
671d6: 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 );
671d8: 2040 moveal %d0,%a0
return (*iop->handlers->fsync_h)( iop ); }
671da: 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 );
671dc: 20bc 0000 0086 movel #134,%a0@
return (*iop->handlers->fsync_h)( iop ); }
671e2: 4e75 rts
0004a718 <ftruncate>: int ftruncate( int fd, off_t length ) {
4a718: 4e56 ffec linkw %fp,#-20 4a71c: 202e 0008 movel %fp@(8),%d0 4a720: 2f0a movel %a2,%sp@-
rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd );
4a722: b0b9 0005 d6a4 cmpl 5d6a4 <rtems_libio_number_iops>,%d0 4a728: 647a bccs 4a7a4 <ftruncate+0x8c>
iop = rtems_libio_iop( fd );
4a72a: 2479 0005 eda4 moveal 5eda4 <rtems_libio_iops>,%a2 4a730: ed88 lsll #6,%d0 4a732: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
4a734: 202a 0014 movel %a2@(20),%d0 4a738: 0280 0000 0100 andil #256,%d0 4a73e: 6764 beqs 4a7a4 <ftruncate+0x8c>
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
4a740: 43ee ffec lea %fp@(-20),%a1 4a744: 22aa 0018 movel %a2@(24),%a1@ 4a748: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 4a74e: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 4a754: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( !loc.ops->node_type_h )
4a75a: 206e fff8 moveal %fp@(-8),%a0
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
4a75e: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( !loc.ops->node_type_h )
4a764: 2068 0010 moveal %a0@(16),%a0 4a768: 4a88 tstl %a0 4a76a: 6764 beqs 4a7d0 <ftruncate+0xb8>
rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
4a76c: 2f09 movel %a1,%sp@- 4a76e: 4e90 jsr %a0@ 4a770: 588f addql #4,%sp 4a772: 7201 moveq #1,%d1 4a774: b280 cmpl %d0,%d1 4a776: 6770 beqs 4a7e8 <ftruncate+0xd0>
rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4a778: 7004 moveq #4,%d0 4a77a: c0aa 0014 andl %a2@(20),%d0 4a77e: 673a beqs 4a7ba <ftruncate+0xa2>
if ( !iop->handlers->ftruncate_h )
4a780: 206a 003c moveal %a2@(60),%a0 4a784: 2068 0020 moveal %a0@(32),%a0 4a788: 4a88 tstl %a0 4a78a: 6744 beqs 4a7d0 <ftruncate+0xb8>
rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length );
4a78c: 2f2e 0010 movel %fp@(16),%sp@- 4a790: 2f2e 000c movel %fp@(12),%sp@- 4a794: 2f0a movel %a2,%sp@- 4a796: 4e90 jsr %a0@
}
4a798: 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 );
4a79c: 4fef 000c lea %sp@(12),%sp
}
4a7a0: 4e5e unlk %fp 4a7a2: 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);
4a7a4: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); }
4a7aa: 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);
4a7ae: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a7b0: 7209 moveq #9,%d1 <== NOT EXECUTED 4a7b2: 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 ); }
4a7b4: 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);
4a7b6: 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 ); }
4a7b8: 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 );
4a7ba: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); }
4a7c0: 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 );
4a7c4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a7c6: 7216 moveq #22,%d1 <== NOT EXECUTED 4a7c8: 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 ); }
4a7ca: 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 );
4a7cc: 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 ); }
4a7ce: 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 );
4a7d0: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED
return (*iop->handlers->ftruncate_h)( iop, length ); }
4a7d6: 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 );
4a7da: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a7dc: 70ff moveq #-1,%d0 <== NOT EXECUTED
return (*iop->handlers->ftruncate_h)( iop, length ); }
4a7de: 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 );
4a7e0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return (*iop->handlers->ftruncate_h)( iop, length ); }
4a7e6: 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 );
4a7e8: 4eb9 0004 eb8c jsr 4eb8c <__errno>
if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); }
4a7ee: 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 );
4a7f2: 2040 moveal %d0,%a0 4a7f4: 7215 moveq #21,%d1 4a7f6: 70ff moveq #-1,%d0
if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); }
4a7f8: 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 );
4a7fa: 2081 movel %d1,%a0@
if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); }
4a7fc: 4e75 rts
... 00097d10 <getdents>: int getdents( int dd_fd, char *dd_buf, int dd_len ) {
97d10: 4e56 ffec linkw %fp,#-20 97d14: 202e 0008 movel %fp@(8),%d0 97d18: 2f0a movel %a2,%sp@-
/* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd );
97d1a: b0b9 000a 1ca4 cmpl a1ca4 <rtems_libio_number_iops>,%d0 97d20: 655e bcss 97d80 <getdents+0x70>
97d22: 95ca subal %a2,%a2 <== NOT EXECUTED
/* * Make sure we are working on a directory */ loc = iop->pathinfo;
97d24: 43ee ffec lea %fp@(-20),%a1 97d28: 22aa 0018 movel %a2@(24),%a1@ 97d2c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 97d32: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 97d38: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( !loc.ops->node_type_h )
97d3e: 206e fff8 moveal %fp@(-8),%a0
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
97d42: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( !loc.ops->node_type_h )
97d48: 2068 0010 moveal %a0@(16),%a0 97d4c: 4a88 tstl %a0 97d4e: 6752 beqs 97da2 <getdents+0x92>
rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
97d50: 2f09 movel %a1,%sp@- 97d52: 4e90 jsr %a0@ 97d54: 588f addql #4,%sp 97d56: 7201 moveq #1,%d1 97d58: b280 cmpl %d0,%d1 97d5a: 6630 bnes 97d8c <getdents+0x7c>
/* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h )
97d5c: 206a 003c moveal %a2@(60),%a0 97d60: 2068 0008 moveal %a0@(8),%a0 97d64: 4a88 tstl %a0 97d66: 673a beqs 97da2 <getdents+0x92>
rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
97d68: 2f2e 0010 movel %fp@(16),%sp@- 97d6c: 2f2e 000c movel %fp@(12),%sp@- 97d70: 2f0a movel %a2,%sp@- 97d72: 4e90 jsr %a0@
}
97d74: 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 );
97d78: 4fef 000c lea %sp@(12),%sp
}
97d7c: 4e5e unlk %fp 97d7e: 4e75 rts
/* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd );
97d80: 2479 000a 694c moveal a694c <rtems_libio_iops>,%a2 97d86: ed88 lsll #6,%d0 97d88: d5c0 addal %d0,%a2 97d8a: 6098 bras 97d24 <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 );
97d8c: 4eb9 0008 0e64 jsr 80e64 <__errno>
if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); }
97d92: 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 );
97d96: 2040 moveal %d0,%a0 97d98: 7214 moveq #20,%d1 97d9a: 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 ); }
97d9c: 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 );
97d9e: 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 ); }
97da0: 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 );
97da2: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); }
97da8: 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 );
97dac: 2040 moveal %d0,%a0 <== NOT EXECUTED 97dae: 70ff moveq #-1,%d0 <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); }
97db0: 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 );
97db2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); }
97db8: 4e75 rts <== NOT EXECUTED
... 0004a800 <getegid>: * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getegid( void ) {
4a800: 4e56 0000 linkw %fp,#0 4a804: 2079 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a0
return _POSIX_types_Egid; }
4a80a: 4e5e unlk %fp 4a80c: 3028 0038 movew %a0@(56),%d0 4a810: 4e75 rts
... 0004a814 <geteuid>: * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t geteuid( void ) {
4a814: 4e56 0000 linkw %fp,#0 4a818: 2079 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a0
return _POSIX_types_Euid; }
4a81e: 4e5e unlk %fp 4a820: 3028 0036 movew %a0@(54),%d0 4a824: 4e75 rts
... 000672f4 <getgid>: * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) {
672f4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 672f8: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED
return _POSIX_types_Gid; }
672fe: 4e5e unlk %fp <== NOT EXECUTED 67300: 3028 0034 movew %a0@(52),%d0 <== NOT EXECUTED
67304: 4e75 rts
0006789e <getgr_r>: struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
6789e: 4e56 ffe0 linkw %fp,#-32 678a2: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 678a6: 242e 0008 movel %fp@(8),%d2 678aa: 47fa fc26 lea %pc@(674d2 <scangr>),%a3
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0);
678ae: 49f9 0008 6994 lea 86994 <strcmp>,%a4
struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
678b4: 2c2e 000c movel %fp@(12),%d6 678b8: 246e 0010 moveal %fp@(16),%a2 678bc: 2a2e 0014 movel %fp@(20),%d5 678c0: 282e 0018 movel %fp@(24),%d4
FILE *fp; int match; init_etc_passwd_group();
678c4: 4eb9 0006 775a jsr 6775a <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
678ca: 4879 0009 a41b pea 9a41b <rtems_bdpart_shell_usage+0x69f> 678d0: 4879 0009 8cf5 pea 98cf5 <_rodata_start+0x845> 678d6: 4eb9 0008 1808 jsr 81808 <fopen> 678dc: 508f addql #8,%sp 678de: 2600 movel %d0,%d3 678e0: 6778 beqs 6795a <getgr_r+0xbc>
errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) {
678e2: 2f04 movel %d4,%sp@- 678e4: 2f05 movel %d5,%sp@- 678e6: 2f0a movel %a2,%sp@- 678e8: 2f03 movel %d3,%sp@- 678ea: 4e93 jsr %a3@ 678ec: 4fef 0010 lea %sp@(16),%sp 678f0: 4a80 tstl %d0 678f2: 6744 beqs 67938 <getgr_r+0x9a>
errno = EINVAL; fclose(fp); return -1; } if (name) {
678f4: 4a82 tstl %d2 678f6: 672e beqs 67926 <getgr_r+0x88>
match = (strcmp(grp->gr_name, name) == 0);
678f8: 2f02 movel %d2,%sp@- 678fa: 2f12 movel %a2@,%sp@- 678fc: 4e94 jsr %a4@ 678fe: 508f addql #8,%sp 67900: 4a80 tstl %d0 67902: 57c0 seq %d0 67904: 49c0 extbl %d0 67906: 4480 negl %d0
} else { match = (grp->gr_gid == gid); } if (match) {
67908: 67d8 beqs 678e2 <getgr_r+0x44>
fclose(fp);
6790a: 2f03 movel %d3,%sp@- 6790c: 4eb9 0008 0fa2 jsr 80fa2 <fclose>
*result = grp;
67912: 206e 001c moveal %fp@(28),%a0
return 0;
67916: 588f addql #4,%sp
else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp;
67918: 4280 clrl %d0 6791a: 208a movel %a2,%a0@
} } fclose(fp); errno = EINVAL; return -1; }
6791c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 67922: 4e5e unlk %fp 67924: 4e75 rts
} if (name) { match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid);
67926: 4280 clrl %d0 <== NOT EXECUTED 67928: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 6792c: bc80 cmpl %d0,%d6 <== NOT EXECUTED 6792e: 57c0 seq %d0 <== NOT EXECUTED 67930: 49c0 extbl %d0 <== NOT EXECUTED 67932: 4480 negl %d0 <== NOT EXECUTED
} if (match) {
67934: 67ac beqs 678e2 <getgr_r+0x44> <== NOT EXECUTED 67936: 60d2 bras 6790a <getgr_r+0x6c> <== NOT EXECUTED
errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL;
67938: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 6793e: 2040 moveal %d0,%a0 <== NOT EXECUTED 67940: 7016 moveq #22,%d0 <== NOT EXECUTED 67942: 2080 movel %d0,%a0@ <== NOT EXECUTED
fclose(fp);
67944: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67946: 4eb9 0008 0fa2 jsr 80fa2 <fclose> <== NOT EXECUTED
return -1;
6794c: 588f addql #4,%sp <== NOT EXECUTED
return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp);
6794e: 70ff moveq #-1,%d0 <== NOT EXECUTED
} } fclose(fp); errno = EINVAL; return -1; }
67950: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 67956: 4e5e unlk %fp <== NOT EXECUTED 67958: 4e75 rts <== NOT EXECUTED
int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL;
6795a: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 67960: 7216 moveq #22,%d1 <== NOT EXECUTED 67962: 2040 moveal %d0,%a0 <== NOT EXECUTED 67964: 70ff moveq #-1,%d0 <== NOT EXECUTED
} } fclose(fp); errno = EINVAL; return -1; }
67966: 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;
6796c: 2081 movel %d1,%a0@ <== NOT EXECUTED
} } fclose(fp); errno = EINVAL; return -1; }
6796e: 4e5e unlk %fp <== NOT EXECUTED
67970: 4e75 rts
000675ee <getgrent>: return NULL; return p; } struct group *getgrent(void) {
675ee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (group_fp == NULL)
675f2: 2039 000a 60de movel a60de <group_fp>,%d0 <== NOT EXECUTED 675f8: 6608 bnes 67602 <getgrent+0x14> <== NOT EXECUTED
return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
675fa: 4281 clrl %d1 <== NOT EXECUTED
return NULL; return &grent; }
675fc: 2001 movel %d1,%d0 <== NOT EXECUTED 675fe: 4e5e unlk %fp <== NOT EXECUTED 67600: 4e75 rts <== NOT EXECUTED
struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
67602: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 67606: 4879 000a 60e2 pea a60e2 <grbuf> <== NOT EXECUTED 6760c: 4879 000a 61aa pea a61aa <grent> <== NOT EXECUTED 67612: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67614: 4eba febc jsr %pc@(674d2 <scangr>) <== NOT EXECUTED 67618: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 6761c: 223c 000a 61aa movel #680362,%d1 <== NOT EXECUTED 67622: 4a80 tstl %d0 <== NOT EXECUTED 67624: 67d4 beqs 675fa <getgrent+0xc> <== NOT EXECUTED
return NULL; return &grent; }
67626: 2001 movel %d1,%d0 <== NOT EXECUTED 67628: 4e5e unlk %fp <== NOT EXECUTED
6762a: 4e75 rts
00067998 <getgrgid>: gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
67998: 4280 clrl %d0 <== NOT EXECUTED
} struct group *getgrgid( gid_t gid ) {
6799a: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
6799e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 679a2: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 679a6: 4879 000a 60e2 pea a60e2 <grbuf> <== NOT EXECUTED 679ac: 4879 000a 61aa pea a61aa <grent> <== NOT EXECUTED 679b2: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 679b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 679b8: 4eb9 0006 7972 jsr 67972 <getgrgid_r> <== NOT EXECUTED 679be: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 679c2: 4a80 tstl %d0 <== NOT EXECUTED 679c4: 6608 bnes 679ce <getgrgid+0x36> <== NOT EXECUTED
return NULL; return p;
679c6: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
679ca: 4e5e unlk %fp <== NOT EXECUTED 679cc: 4e75 rts <== NOT EXECUTED
gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
679ce: 4280 clrl %d0 <== NOT EXECUTED
return NULL; return p; }
679d0: 4e5e unlk %fp <== NOT EXECUTED
679d2: 4e75 rts
00067972 <getgrgid_r>: char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result);
67972: 4280 clrl %d0 <== NOT EXECUTED
struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
67974: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
67978: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 6797c: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 67980: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 67984: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 67988: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 6798c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6798e: 42a7 clrl %sp@- <== NOT EXECUTED 67990: 4eba ff0c jsr %pc@(6789e <getgr_r>) <== NOT EXECUTED
}
67994: 4e5e unlk %fp <== NOT EXECUTED
67996: 4e75 rts
000679f6 <getgrnam>: struct group *getgrnam( const char *name ) {
679f6: 4e56 fffc linkw %fp,#-4
struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
679fa: 486e fffc pea %fp@(-4) 679fe: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> 67a02: 4879 000a 60e2 pea a60e2 <grbuf> 67a08: 4879 000a 61aa pea a61aa <grent> 67a0e: 2f2e 0008 movel %fp@(8),%sp@- 67a12: 4eb9 0006 79d4 jsr 679d4 <getgrnam_r> 67a18: 4fef 0014 lea %sp@(20),%sp 67a1c: 4a80 tstl %d0 67a1e: 6608 bnes 67a28 <getgrnam+0x32>
return NULL; return p;
67a20: 202e fffc movel %fp@(-4),%d0
}
67a24: 4e5e unlk %fp 67a26: 4e75 rts
const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
67a28: 4280 clrl %d0 <== NOT EXECUTED
return NULL; return p; }
67a2a: 4e5e unlk %fp <== NOT EXECUTED
67a2c: 4e75 rts
000429a8 <getpagesize>: * return a reasonable value. */ int getpagesize(void) { return PAGE_SIZE; }
429a8: 203c 0000 1000 movel #4096,%d0
* This is not a functional version but the SPARC backend for at least * gcc 2.8.1 plus gnat 3.13p and gcc 3.0.1 require it to be there and * return a reasonable value. */ int getpagesize(void) {
429ae: 4e56 0000 linkw %fp,#0
return PAGE_SIZE; }
429b2: 4e5e unlk %fp 429b4: 4e75 rts
... 00067a68 <getpw_r>: struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
67a68: 4e56 ffe0 linkw %fp,#-32 67a6c: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 67a70: 242e 0008 movel %fp@(8),%d2 67a74: 47fa fbb6 lea %pc@(6762c <scanpw>),%a3
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0);
67a78: 49f9 0008 6994 lea 86994 <strcmp>,%a4
struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
67a7e: 2c2e 000c movel %fp@(12),%d6 67a82: 246e 0010 moveal %fp@(16),%a2 67a86: 2a2e 0014 movel %fp@(20),%d5 67a8a: 282e 0018 movel %fp@(24),%d4
FILE *fp; int match; init_etc_passwd_group();
67a8e: 4eb9 0006 775a jsr 6775a <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
67a94: 4879 0009 a41b pea 9a41b <rtems_bdpart_shell_usage+0x69f> 67a9a: 4879 0009 8cb0 pea 98cb0 <_rodata_start+0x800> 67aa0: 4eb9 0008 1808 jsr 81808 <fopen> 67aa6: 508f addql #8,%sp 67aa8: 2600 movel %d0,%d3 67aaa: 6778 beqs 67b24 <getpw_r+0xbc>
errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) {
67aac: 2f04 movel %d4,%sp@- 67aae: 2f05 movel %d5,%sp@- 67ab0: 2f0a movel %a2,%sp@- 67ab2: 2f03 movel %d3,%sp@- 67ab4: 4e93 jsr %a3@ 67ab6: 4fef 0010 lea %sp@(16),%sp 67aba: 4a80 tstl %d0 67abc: 6744 beqs 67b02 <getpw_r+0x9a>
errno = EINVAL; fclose(fp); return -1; } if (name) {
67abe: 4a82 tstl %d2 67ac0: 672e beqs 67af0 <getpw_r+0x88>
match = (strcmp(pwd->pw_name, name) == 0);
67ac2: 2f02 movel %d2,%sp@- 67ac4: 2f12 movel %a2@,%sp@- 67ac6: 4e94 jsr %a4@ 67ac8: 508f addql #8,%sp 67aca: 4a80 tstl %d0 67acc: 57c0 seq %d0 67ace: 49c0 extbl %d0 67ad0: 4480 negl %d0
} else { match = (pwd->pw_uid == uid); } if (match) {
67ad2: 67d8 beqs 67aac <getpw_r+0x44>
fclose(fp);
67ad4: 2f03 movel %d3,%sp@- 67ad6: 4eb9 0008 0fa2 jsr 80fa2 <fclose>
*result = pwd;
67adc: 206e 001c moveal %fp@(28),%a0
return 0;
67ae0: 588f addql #4,%sp
else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd;
67ae2: 4280 clrl %d0 67ae4: 208a movel %a2,%a0@
} } fclose(fp); errno = EINVAL; return -1; }
67ae6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 67aec: 4e5e unlk %fp 67aee: 4e75 rts
} if (name) { match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid);
67af0: 4280 clrl %d0 <== NOT EXECUTED 67af2: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 67af6: bc80 cmpl %d0,%d6 <== NOT EXECUTED 67af8: 57c0 seq %d0 <== NOT EXECUTED 67afa: 49c0 extbl %d0 <== NOT EXECUTED 67afc: 4480 negl %d0 <== NOT EXECUTED
} if (match) {
67afe: 67ac beqs 67aac <getpw_r+0x44> <== NOT EXECUTED 67b00: 60d2 bras 67ad4 <getpw_r+0x6c> <== NOT EXECUTED
errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL;
67b02: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 67b08: 7416 moveq #22,%d2 <== NOT EXECUTED 67b0a: 2040 moveal %d0,%a0 <== NOT EXECUTED 67b0c: 2082 movel %d2,%a0@ <== NOT EXECUTED
fclose(fp);
67b0e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67b10: 4eb9 0008 0fa2 jsr 80fa2 <fclose> <== NOT EXECUTED
return -1;
67b16: 588f addql #4,%sp <== NOT EXECUTED
return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp);
67b18: 70ff moveq #-1,%d0 <== NOT EXECUTED
} } fclose(fp); errno = EINVAL; return -1; }
67b1a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 67b20: 4e5e unlk %fp <== NOT EXECUTED 67b22: 4e75 rts <== NOT EXECUTED
int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL;
67b24: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 67b2a: 7616 moveq #22,%d3 <== NOT EXECUTED 67b2c: 2040 moveal %d0,%a0 <== NOT EXECUTED 67b2e: 70ff moveq #-1,%d0 <== NOT EXECUTED 67b30: 2083 movel %d3,%a0@ <== NOT EXECUTED
} } fclose(fp); errno = EINVAL; return -1; }
67b32: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 67b38: 4e5e unlk %fp <== NOT EXECUTED
67b3a: 4e75 rts
0006771c <getpwent>: return NULL; return p; } struct passwd *getpwent(void) {
6771c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (passwd_fp == NULL)
67720: 2039 000a 5ff6 movel a5ff6 <passwd_fp>,%d0 <== NOT EXECUTED 67726: 6608 bnes 67730 <getpwent+0x14> <== NOT EXECUTED
return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
67728: 4281 clrl %d1 <== NOT EXECUTED
return NULL; return &pwent; }
6772a: 2001 movel %d1,%d0 <== NOT EXECUTED 6772c: 4e5e unlk %fp <== NOT EXECUTED 6772e: 4e75 rts <== NOT EXECUTED
struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
67730: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 67734: 4879 000a 5ffa pea a5ffa <pwbuf> <== NOT EXECUTED 6773a: 4879 000a 60c2 pea a60c2 <pwent> <== NOT EXECUTED 67740: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67742: 4eba fee8 jsr %pc@(6762c <scanpw>) <== NOT EXECUTED 67746: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 6774a: 223c 000a 60c2 movel #680130,%d1 <== NOT EXECUTED 67750: 4a80 tstl %d0 <== NOT EXECUTED 67752: 67d4 beqs 67728 <getpwent+0xc> <== NOT EXECUTED
return NULL; return &pwent; }
67754: 2001 movel %d1,%d0 <== NOT EXECUTED 67756: 4e5e unlk %fp <== NOT EXECUTED
67758: 4e75 rts
00067bc0 <getpwnam>: struct passwd *getpwnam( const char *name ) {
67bc0: 4e56 fffc linkw %fp,#-4
struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
67bc4: 486e fffc pea %fp@(-4) 67bc8: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> 67bcc: 4879 000a 5ffa pea a5ffa <pwbuf> 67bd2: 4879 000a 60c2 pea a60c2 <pwent> 67bd8: 2f2e 0008 movel %fp@(8),%sp@- 67bdc: 4eb9 0006 7b9e jsr 67b9e <getpwnam_r> 67be2: 4fef 0014 lea %sp@(20),%sp 67be6: 4a80 tstl %d0 67be8: 6608 bnes 67bf2 <getpwnam+0x32>
return NULL; return p;
67bea: 202e fffc movel %fp@(-4),%d0
}
67bee: 4e5e unlk %fp 67bf0: 4e75 rts
const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
67bf2: 4280 clrl %d0 <== NOT EXECUTED
return NULL; return p; }
67bf4: 4e5e unlk %fp <== NOT EXECUTED
67bf6: 4e75 rts
00067b62 <getpwuid>: uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
67b62: 4280 clrl %d0 <== NOT EXECUTED
} struct passwd *getpwuid( uid_t uid ) {
67b64: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
67b68: 486e fffc pea %fp@(-4) <== NOT EXECUTED 67b6c: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 67b70: 4879 000a 5ffa pea a5ffa <pwbuf> <== NOT EXECUTED 67b76: 4879 000a 60c2 pea a60c2 <pwent> <== NOT EXECUTED 67b7c: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 67b80: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67b82: 4eb9 0006 7b3c jsr 67b3c <getpwuid_r> <== NOT EXECUTED 67b88: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 67b8c: 4a80 tstl %d0 <== NOT EXECUTED 67b8e: 6608 bnes 67b98 <getpwuid+0x36> <== NOT EXECUTED
return NULL; return p;
67b90: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
67b94: 4e5e unlk %fp <== NOT EXECUTED 67b96: 4e75 rts <== NOT EXECUTED
uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
67b98: 4280 clrl %d0 <== NOT EXECUTED
return NULL; return p; }
67b9a: 4e5e unlk %fp <== NOT EXECUTED
67b9c: 4e75 rts
00067b3c <getpwuid_r>: char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
67b3c: 4280 clrl %d0 <== NOT EXECUTED
struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
67b3e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
67b42: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 67b46: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 67b4a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 67b4e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 67b52: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 67b56: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67b58: 42a7 clrl %sp@- <== NOT EXECUTED 67b5a: 4eba ff0c jsr %pc@(67a68 <getpw_r>) <== NOT EXECUTED
}
67b5e: 4e5e unlk %fp <== NOT EXECUTED
67b60: 4e75 rts
0004a828 <gettimeofday>: */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) {
4a828: 4e56 ffec linkw %fp,#-20 4a82c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a830: 246e 0008 moveal %fp@(8),%a2
/* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) {
4a834: 4a8a tstl %a2 4a836: 673c beqs 4a874 <gettimeofday+0x4c>
{ ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level);
4a838: 203c 0000 0700 movel #1792,%d0 4a83e: 40c2 movew %sr,%d2 4a840: 8082 orl %d2,%d0 4a842: 46c0 movew %d0,%sr
_TOD_Get( &now );
4a844: 486e fff8 pea %fp@(-8) 4a848: 4eb9 0004 bb1c jsr 4bb1c <_TOD_Get>
_ISR_Enable(level);
4a84e: 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;
4a850: 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;
4a856: 588f addql #4,%sp 4a858: 4280 clrl %d0
_ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec;
4a85a: 222e fffc movel %fp@(-4),%d1
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds;
4a85e: 4c43 1801 remsl %d3,%d1,%d1 4a862: 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;
4a866: 24ae fff8 movel %fp@(-8),%a2@
}
4a86a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4a870: 4e5e unlk %fp 4a872: 4e75 rts
void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT;
4a874: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 4a87a: 720e moveq #14,%d1 <== NOT EXECUTED 4a87c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a87e: 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; }
4a880: 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;
4a886: 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; }
4a888: 4e5e unlk %fp <== NOT EXECUTED
4a88a: 4e75 rts
000468c4 <getuid>: * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) {
468c4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 468c8: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED
return _POSIX_types_Uid; }
468ce: 4e5e unlk %fp <== NOT EXECUTED 468d0: 3028 0032 movew %a0@(50),%d0 <== NOT EXECUTED
468d4: 4e75 rts
00053218 <imfs_dir_open>: ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info;
53218: 7001 moveq #1,%d0
rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
5321a: 4e56 0000 linkw %fp,#0 5321e: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info;
53222: 2268 0038 moveal %a0@(56),%a1
rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
53226: 2f02 movel %d2,%sp@-
IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info;
53228: b0a9 0048 cmpl %a1@(72),%d0 5322c: 6708 beqs 53236 <imfs_dir_open+0x1e>
if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; }
5322e: 241f movel %sp@+,%d2 <== NOT EXECUTED
) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info;
53230: 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; }
53232: 4e5e unlk %fp <== NOT EXECUTED 53234: 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;
53236: 4280 clrl %d0 53238: 4281 clrl %d1 5323a: 4282 clrl %d2 5323c: 2141 000c movel %d1,%a0@(12) 53240: 2142 0010 movel %d2,%a0@(16)
return 0; }
53244: 241f movel %sp@+,%d2 53246: 4e5e unlk %fp 53248: 4e75 rts
00053478 <imfs_dir_read>: ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) {
53478: 4e56 fec4 linkw %fp,#-316 5347c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 53480: 266e 0008 moveal %fp@(8),%a3
int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info;
53484: 206b 0038 moveal %a3@(56),%a0 53488: 2a08 movel %a0,%d5 5348a: 0685 0000 0050 addil #80,%d5
ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) {
53490: 262e 0010 movel %fp@(16),%d3
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
53494: 2468 004c moveal %a0@(76),%a2
struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) )
53498: ba8a cmpl %a2,%d5 5349a: 6700 00c4 beqw 53560 <imfs_dir_read+0xe8>
bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
5349e: 223c 0000 0110 movel #272,%d1 534a4: 4c41 3003 remul %d1,%d3,%d3
/* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset;
534a8: 282b 0010 movel %a3@(16),%d4
/* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
534ac: 2003 movel %d3,%d0 534ae: e98b lsll #4,%d3 534b0: e188 lsll #8,%d0 534b2: d680 addl %d0,%d3 534b4: d684 addl %d4,%d3
/* The directory was not empty so try to move to the desired entry in chain*/ for (
534b6: 4a83 tstl %d3 534b8: 6f00 00a6 blew 53560 <imfs_dir_read+0xe8>
tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name );
534bc: 49ee fef0 lea %fp@(-272),%a4 534c0: 41ec 0010 lea %a4@(16),%a0
/* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for (
534c4: 4282 clrl %d2 534c6: 4286 clrl %d6
tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); memcpy(
534c8: 4bf9 0005 4be0 lea 54be0 <memcpy>,%a5
tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name );
534ce: 2d48 feec movel %a0,%fp@(-276)
/* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) {
534d2: b484 cmpl %d4,%d2 534d4: 6c1c bges 534f2 <imfs_dir_read+0x7a>
); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next;
534d6: 2452 moveal %a2@,%a2
* to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read(
534d8: 0682 0000 0110 addil #272,%d2
/* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for (
534de: b682 cmpl %d2,%d3 534e0: 6f04 bles 534e6 <imfs_dir_read+0x6e>
current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){
534e2: ba8a cmpl %a2,%d5 534e4: 66ec bnes 534d2 <imfs_dir_read+0x5a>
the_node = the_node->next; } /* Success */ return bytes_transferred; }
534e6: 2006 movel %d6,%d0 534e8: 4cee 3cfc fec4 moveml %fp@(-316),%d2-%d7/%a2-%a5 534ee: 4e5e unlk %fp 534f0: 4e75 rts
/* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name );
534f2: 2e0a movel %a2,%d7 534f4: 0687 0000 000c addil #12,%d7
if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino;
534fa: 2d6a 0034 fef0 movel %a2@(52),%fp@(-272)
} if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent );
53500: 323c 0110 movew #272,%d1
/* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry;
53504: 2d42 fef8 movel %d2,%fp@(-264) 53508: 5bc0 smi %d0 5350a: 49c0 extbl %d0 5350c: 2d40 fef4 movel %d0,%fp@(-268)
tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name );
53510: 2f07 movel %d7,%sp@-
} if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent );
53512: 3d41 fefc movew %d1,%fp@(-260)
the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name );
53516: 4eb9 0005 573c jsr 5573c <strlen>
strcpy( tmp_dirent.d_name, the_jnode->name );
5351c: 2e87 movel %d7,%sp@
/* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name );
5351e: 3d40 fefe movew %d0,%fp@(-258)
strcpy( tmp_dirent.d_name, the_jnode->name );
53522: 2f2e feec movel %fp@(-276),%sp@- 53526: 4eb9 0005 5290 jsr 55290 <strcpy>
memcpy(
5352c: 4878 0110 pea 110 <DBL_MANT_DIG+0xdb> 53530: 2f0c movel %a4,%sp@- 53532: 206e 000c moveal %fp@(12),%a0 53536: 4870 6800 pea %a0@(00000000,%d6:l)
buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent );
5353a: 0686 0000 0110 addil #272,%d6
tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); memcpy(
53540: 4e95 jsr %a5@
buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent );
53542: 4fef 0014 lea %sp@(20),%sp
memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent);
53546: 4280 clrl %d0 53548: 223c 0000 0110 movel #272,%d1 5354e: d3ab 0010 addl %d1,%a3@(16) 53552: 2e2b 000c movel %a3@(12),%d7 53556: df80 addxl %d0,%d7 53558: 2747 000c movel %d7,%a3@(12) 5355c: 6000 ff78 braw 534d6 <imfs_dir_read+0x5e>
/* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for (
53560: 4286 clrl %d6
the_node = the_node->next; } /* Success */ return bytes_transferred; }
53562: 2006 movel %d6,%d0 53564: 4cee 3cfc fec4 moveml %fp@(-316),%d2-%d7/%a2-%a5 5356a: 4e5e unlk %fp 5356c: 4e75 rts
... 00053386 <imfs_dir_rmnod>: int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) {
53386: 4e56 fff8 linkw %fp,#-8 5338a: 2f0b movel %a3,%sp@- 5338c: 266e 000c moveal %fp@(12),%a3 53390: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access;
53392: 2453 moveal %a3@,%a2 53394: 200a movel %a2,%d0 53396: 0680 0000 0050 addil #80,%d0 5339c: b0aa 004c cmpl %a2@(76),%d0 533a0: 6600 0090 bnew 53432 <imfs_dir_rmnod+0xac>
/* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
533a4: 206b 0010 moveal %a3@(16),%a0 533a8: b5e8 001c cmpal %a0@(28),%a2 533ac: 6700 009e beqw 5344c <imfs_dir_rmnod+0xc6>
/* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL )
533b0: 4aaa 0058 tstl %a2@(88) 533b4: 6600 0096 bnew 5344c <imfs_dir_rmnod+0xc6>
/* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) {
533b8: 4aaa 0008 tstl %a2@(8) 533bc: 670e beqs 533cc <imfs_dir_rmnod+0x46> 533be: 2f0a movel %a2,%sp@- 533c0: 4eb9 0004 870c jsr 4870c <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL;
533c6: 588f addql #4,%sp 533c8: 42aa 0008 clrl %a2@(8)
/* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--;
533cc: 302a 0032 movew %a2@(50),%d0 533d0: 5380 subql #1,%d0 533d2: 3540 0032 movew %d0,%a2@(50)
IMFS_update_ctime( the_jnode );
533d6: 42a7 clrl %sp@- 533d8: 486e fff8 pea %fp@(-8) 533dc: 4eb9 0004 404c jsr 4404c <gettimeofday> 533e2: 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) ) {
533e8: 2f0a movel %a2,%sp@- 533ea: 4eb9 0005 0146 jsr 50146 <rtems_libio_is_file_open> 533f0: 4fef 000c lea %sp@(12),%sp 533f4: 4a80 tstl %d0 533f6: 662c bnes 53424 <imfs_dir_rmnod+0x9e> 533f8: 4a6a 0032 tstw %a2@(50) 533fc: 6626 bnes 53424 <imfs_dir_rmnod+0x9e>
/* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access )
533fe: 2079 0006 381c moveal 6381c <rtems_current_user_env>,%a0 53404: 2653 moveal %a3@,%a3 53406: b7e8 0004 cmpal %a0@(4),%a3 5340a: 675a beqs 53466 <imfs_dir_rmnod+0xe0>
/* * Free memory associated with a memory file. */ free( the_jnode );
5340c: 2f0a movel %a2,%sp@- 5340e: 4eb9 0004 3fbc jsr 43fbc <free> 53414: 588f addql #4,%sp 53416: 4280 clrl %d0
} return 0; }
53418: 246e fff0 moveal %fp@(-16),%a2 5341c: 266e fff4 moveal %fp@(-12),%a3 53420: 4e5e unlk %fp 53422: 4e75 rts 53424: 246e fff0 moveal %fp@(-16),%a2
/* * Free memory associated with a memory file. */ free( the_jnode );
53428: 4280 clrl %d0
} return 0; }
5342a: 266e fff4 moveal %fp@(-12),%a3 5342e: 4e5e unlk %fp 53430: 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 );
53432: 4eb9 0005 43c0 jsr 543c0 <__errno>
free( the_jnode ); } return 0; }
53438: 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 );
5343c: 2040 moveal %d0,%a0 5343e: 725a moveq #90,%d1 53440: 70ff moveq #-1,%d0
free( the_jnode ); } return 0; }
53442: 266e fff4 moveal %fp@(-12),%a3 53446: 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 );
53448: 2081 movel %d1,%a0@
free( the_jnode ); } return 0; }
5344a: 4e75 rts
/* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY );
5344c: 4eb9 0005 43c0 jsr 543c0 <__errno>
free( the_jnode ); } return 0; }
53452: 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 );
53456: 2040 moveal %d0,%a0 53458: 7210 moveq #16,%d1 5345a: 70ff moveq #-1,%d0
free( the_jnode ); } return 0; }
5345c: 266e fff4 moveal %fp@(-12),%a3 53460: 4e5e unlk %fp
/* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY );
53462: 2081 movel %d1,%a0@
free( the_jnode ); } return 0; }
53464: 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;
53466: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED
/* * Free memory associated with a memory file. */ free( the_jnode );
5346a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5346c: 4eb9 0004 3fbc jsr 43fbc <free> <== NOT EXECUTED 53472: 588f addql #4,%sp <== NOT EXECUTED 53474: 4280 clrl %d0 <== NOT EXECUTED 53476: 60a0 bras 53418 <imfs_dir_rmnod+0x92> <== NOT EXECUTED
0006775a <init_etc_passwd_group>: /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) {
6775a: 4e56 0000 linkw %fp,#0 6775e: 2f0a movel %a2,%sp@- 67760: 2f02 movel %d2,%sp@-
FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted)
67762: 4a39 000a 5ff4 tstb a5ff4 <etc_passwd_initted.6308> 67768: 670c beqs 67776 <init_etc_passwd_group+0x1c>
fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } }
6776a: 242e fff8 movel %fp@(-8),%d2 6776e: 246e fffc moveal %fp@(-4),%a2 67772: 4e5e unlk %fp 67774: 4e75 rts
static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777);
67776: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
/* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) {
6777a: 45f9 0008 1808 lea 81808 <fopen>,%a2
static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777);
67780: 4879 0009 8b96 pea 98b96 <_rodata_start+0x6e6>
FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1;
67786: 7001 moveq #1,%d0 67788: 13c0 000a 5ff4 moveb %d0,a5ff4 <etc_passwd_initted.6308>
mkdir("/etc", 0777);
6778e: 4eb9 0004 6fb8 jsr 46fb8 <mkdir>
/* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) {
67794: 4879 0009 a41b pea 9a41b <rtems_bdpart_shell_usage+0x69f> 6779a: 4879 0009 8cb0 pea 98cb0 <_rodata_start+0x800> 677a0: 4e92 jsr %a2@ 677a2: 4fef 0010 lea %sp@(16),%sp 677a6: 4a80 tstl %d0 677a8: 677e beqs 67828 <init_etc_passwd_group+0xce>
fclose(fp);
677aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 677ac: 4eb9 0008 0fa2 jsr 80fa2 <fclose> <== NOT EXECUTED 677b2: 588f addql #4,%sp <== NOT EXECUTED
} /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) {
677b4: 4879 0009 a41b pea 9a41b <rtems_bdpart_shell_usage+0x69f> 677ba: 4879 0009 8cf5 pea 98cf5 <_rodata_start+0x845> 677c0: 4e92 jsr %a2@ 677c2: 508f addql #8,%sp 677c4: 4a80 tstl %d0 677c6: 6716 beqs 677de <init_etc_passwd_group+0x84>
fclose(fp);
677c8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 677ca: 4eb9 0008 0fa2 jsr 80fa2 <fclose> <== NOT EXECUTED
fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } }
677d0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
/* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp);
677d4: 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); } }
677d6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 677da: 4e5e unlk %fp <== NOT EXECUTED 677dc: 4e75 rts <== NOT EXECUTED
* Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) {
677de: 4879 0009 a08c pea 9a08c <rtems_bdpart_shell_usage+0x310> 677e4: 4879 0009 8cf5 pea 98cf5 <_rodata_start+0x845> 677ea: 4eb9 0008 1808 jsr 81808 <fopen> 677f0: 508f addql #8,%sp 677f2: 2440 moveal %d0,%a2 677f4: 4a80 tstl %d0 677f6: 6700 ff72 beqw 6776a <init_etc_passwd_group+0x10>
fprintf( fp, "root:x:0:root\n"
677fa: 2f00 movel %d0,%sp@- 677fc: 4878 002a pea 2a <OPER2+0x16> 67800: 4878 0001 pea 1 <ADD> 67804: 4879 0009 d347 pea 9d347 <IMFS_memfile_handlers+0xe5> 6780a: 4eb9 0008 2a84 jsr 82a84 <fwrite>
"rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp);
67810: 2f0a movel %a2,%sp@- 67812: 4eb9 0008 0fa2 jsr 80fa2 <fclose>
} }
67818: 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);
6781c: 4fef 0014 lea %sp@(20),%sp
} }
67820: 246e fffc moveal %fp@(-4),%a2 67824: 4e5e unlk %fp 67826: 4e75 rts
* Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
67828: 4879 0009 a08c pea 9a08c <rtems_bdpart_shell_usage+0x310> 6782e: 4879 0009 8cb0 pea 98cb0 <_rodata_start+0x800> 67834: 4e92 jsr %a2@ 67836: 508f addql #8,%sp 67838: 2400 movel %d0,%d2 6783a: 6700 ff78 beqw 677b4 <init_etc_passwd_group+0x5a>
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
6783e: 2f00 movel %d0,%sp@- 67840: 4878 0066 pea 66 <DBL_MANT_DIG+0x31> 67844: 4878 0001 pea 1 <ADD> 67848: 4879 0009 d2e0 pea 9d2e0 <IMFS_memfile_handlers+0x7e> 6784e: 4eb9 0008 2a84 jsr 82a84 <fwrite>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp);
67854: 2f02 movel %d2,%sp@- 67856: 4eb9 0008 0fa2 jsr 80fa2 <fclose> 6785c: 4fef 0014 lea %sp@(20),%sp 67860: 6000 ff52 braw 677b4 <init_etc_passwd_group+0x5a>
00046580 <ioctl>: int ioctl( int fd, ioctl_command_t command, ... ) {
46580: 4e56 0000 linkw %fp,#0 46584: 202e 0008 movel %fp@(8),%d0
va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd );
46588: b0b9 0006 3954 cmpl 63954 <rtems_libio_number_iops>,%d0 4658e: 643c bccs 465cc <ioctl+0x4c>
iop = rtems_libio_iop( fd );
46590: 2079 0006 5124 moveal 65124 <rtems_libio_iops>,%a0 46596: ed88 lsll #6,%d0 46598: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
4659a: 2028 0014 movel %a0@(20),%d0 4659e: 0280 0000 0100 andil #256,%d0 465a4: 6726 beqs 465cc <ioctl+0x4c>
va_start(ap, command); buffer = va_arg(ap, void *);
465a6: 202e 0010 movel %fp@(16),%d0
/* * Now process the ioctl(). */ if ( !iop->handlers )
465aa: 2268 003c moveal %a0@(60),%a1 465ae: 4a89 tstl %a1 465b0: 671a beqs 465cc <ioctl+0x4c>
rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h )
465b2: 2269 0010 moveal %a1@(16),%a1 465b6: 4a89 tstl %a1 465b8: 6724 beqs 465de <ioctl+0x5e>
rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
465ba: 2f00 movel %d0,%sp@- 465bc: 2f2e 000c movel %fp@(12),%sp@- 465c0: 2f08 movel %a0,%sp@- 465c2: 4e91 jsr %a1@
return rc;
465c4: 4fef 000c lea %sp@(12),%sp
}
465c8: 4e5e unlk %fp 465ca: 4e75 rts
/* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF );
465cc: 4eb9 0005 459c jsr 5459c <__errno> 465d2: 7209 moveq #9,%d1 465d4: 2040 moveal %d0,%a0 465d6: 70ff moveq #-1,%d0
rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; }
465d8: 4e5e unlk %fp
/* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF );
465da: 2081 movel %d1,%a0@
rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; }
465dc: 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 );
465de: 4eb9 0005 459c jsr 5459c <__errno> <== NOT EXECUTED
rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; }
465e4: 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 );
465e6: 2040 moveal %d0,%a0 <== NOT EXECUTED 465e8: 70ff moveq #-1,%d0 <== NOT EXECUTED 465ea: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; }
465f0: 4e75 rts <== NOT EXECUTED
... 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 d87c moveal 5d87c <__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 d7a4 movel 5d7a4 <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
4425a: 4e75 rts
0004e5dc <killinfo>: int killinfo( pid_t pid, int sig, const union sigval *value ) {
4e5dc: 4e56 ffd0 linkw %fp,#-48 4e5e0: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4e5e4: 262e 000c movel %fp@(12),%d3 4e5e8: 246e 0010 moveal %fp@(16),%a2
POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() )
4e5ec: 4eb9 0004 d53c jsr 4d53c <getpid> 4e5f2: b0ae 0008 cmpl %fp@(8),%d0 4e5f6: 6600 022c bnew 4e824 <killinfo+0x248>
rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig )
4e5fa: 4a83 tstl %d3 4e5fc: 6700 023e beqw 4e83c <killinfo+0x260>
static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 );
4e600: 2003 movel %d3,%d0 4e602: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) )
4e604: 721f moveq #31,%d1 4e606: b280 cmpl %d0,%d1 4e608: 6500 0232 bcsw 4e83c <killinfo+0x260>
rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
4e60c: 2203 movel %d3,%d1 4e60e: 2803 movel %d3,%d4 4e610: 7e01 moveq #1,%d7 4e612: e589 lsll #2,%d1 4e614: e98c lsll #4,%d4 4e616: 9881 subl %d1,%d4 4e618: 2044 moveal %d4,%a0 4e61a: d1fc 0005 f3ba addal #390074,%a0 4e620: be90 cmpl %a0@,%d7 4e622: 6700 00d4 beqw 4e6f8 <killinfo+0x11c>
/* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
4e626: 7208 moveq #8,%d1 4e628: b283 cmpl %d3,%d1 4e62a: 6700 00d8 beqw 4e704 <killinfo+0x128> 4e62e: 7e04 moveq #4,%d7 4e630: be83 cmpl %d3,%d7 4e632: 6700 00d0 beqw 4e704 <killinfo+0x128> 4e636: 123c 000b moveb #11,%d1 4e63a: b283 cmpl %d3,%d1 4e63c: 6700 00c6 beqw 4e704 <killinfo+0x128>
static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1);
4e640: 7401 moveq #1,%d2
/* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER;
4e642: 7e01 moveq #1,%d7 4e644: e1aa lsll %d0,%d2
/* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig;
4e646: 2d43 fff4 movel %d3,%fp@(-12)
siginfo->si_code = SI_USER;
4e64a: 2d47 fff8 movel %d7,%fp@(-8)
if ( !value ) {
4e64e: 4a8a tstl %a2 4e650: 6700 01ca beqw 4e81c <killinfo+0x240>
siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value;
4e654: 2d52 fffc movel %a2@,%fp@(-4) 4e658: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 4e65e: 5280 addql #1,%d0 4e660: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level>
/* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing;
4e666: 2479 0005 efbe moveal 5efbe <_Thread_Executing>,%a2
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4e66c: 206a 010e moveal %a2@(270),%a0 4e670: 2028 00cc movel %a0@(204),%d0 4e674: 4680 notl %d0 4e676: c082 andl %d2,%d0 4e678: 6642 bnes 4e6bc <killinfo+0xe0>
/* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ;
4e67a: 2079 0005 f53e moveal 5f53e <_POSIX_signals_Wait_queue>,%a0 4e680: b1fc 0005 f542 cmpal #390466,%a0 4e686: 6700 00ec beqw 4e774 <killinfo+0x198>
#endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask)
4e68a: 2002 movel %d2,%d0
for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node;
4e68c: 2448 moveal %a0,%a2
#endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask)
4e68e: c0a8 0030 andl %a0@(48),%d0
for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4e692: 2268 010e moveal %a0@(270),%a1
#endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask)
4e696: 6624 bnes 4e6bc <killinfo+0xe0>
/* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask)
4e698: 2029 00cc movel %a1@(204),%d0 4e69c: 4680 notl %d0 4e69e: c082 andl %d2,%d0 4e6a0: 661a bnes 4e6bc <killinfo+0xe0>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) {
4e6a2: 2050 moveal %a0@,%a0
the_thread = (Thread_Control *)the_node;
4e6a4: 2448 moveal %a0,%a2
/* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ;
4e6a6: b1fc 0005 f542 cmpal #390466,%a0 4e6ac: 6700 00c6 beqw 4e774 <killinfo+0x198>
#endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask)
4e6b0: 2002 movel %d2,%d0 <== NOT EXECUTED 4e6b2: c0a8 0030 andl %a0@(48),%d0 <== NOT EXECUTED
for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4e6b6: 2268 010e moveal %a0@(270),%a1 <== NOT EXECUTED
#endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask)
4e6ba: 67dc beqs 4e698 <killinfo+0xbc> <== NOT EXECUTED
* thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true;
4e6bc: 7001 moveq #1,%d0 4e6be: 1540 0074 moveb %d0,%a2@(116)
/* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
4e6c2: 486e fff4 pea %fp@(-12) 4e6c6: 2f03 movel %d3,%sp@- 4e6c8: 2f0a movel %a2,%sp@- 4e6ca: 4eb9 0004 e914 jsr 4e914 <_POSIX_signals_Unblock_thread> 4e6d0: 4fef 000c lea %sp@(12),%sp 4e6d4: 4a00 tstb %d0 4e6d6: 6600 008a bnew 4e762 <killinfo+0x186>
/* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask );
4e6da: 2f02 movel %d2,%sp@- 4e6dc: 4eb9 0004 e8e4 jsr 4e8e4 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
4e6e2: 588f addql #4,%sp 4e6e4: 41f9 0005 f3b2 lea 5f3b2 <_POSIX_signals_Vectors>,%a0 4e6ea: 7202 moveq #2,%d1 4e6ec: b2b0 4800 cmpl %a0@(00000000,%d4:l),%d1 4e6f0: 672e beqs 4e720 <killinfo+0x144>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch();
4e6f2: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e6f8: 4280 clrl %d0
return 0; }
4e6fa: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e700: 4e5e unlk %fp 4e702: 4e75 rts
* P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig );
4e704: 4eb9 0004 eb30 jsr 4eb30 <pthread_self> 4e70a: 2f03 movel %d3,%sp@- 4e70c: 2f00 movel %d0,%sp@- 4e70e: 4eb9 0004 ea54 jsr 4ea54 <pthread_kill> 4e714: 508f addql #8,%sp
} DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; }
4e716: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e71c: 4e5e unlk %fp 4e71e: 4e75 rts
*/ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *)
4e720: 4879 0005 f532 pea 5f532 <_POSIX_signals_Inactive_siginfo> 4e726: 4eb9 0004 b954 jsr 4b954 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) {
4e72c: 588f addql #4,%sp
*/ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *)
4e72e: 2040 moveal %d0,%a0
_Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) {
4e730: 4a80 tstl %d0 4e732: 6700 0120 beqw 4e854 <killinfo+0x278>
_Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo;
4e736: 216e fff4 0008 movel %fp@(-12),%a0@(8)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
4e73c: 0684 0005 f5aa addil #390570,%d4
if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo;
4e742: 216e fff8 000c movel %fp@(-8),%a0@(12) 4e748: 216e fffc 0010 movel %fp@(-4),%a0@(16)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
4e74e: 2f00 movel %d0,%sp@- 4e750: 2f04 movel %d4,%sp@- 4e752: 4eb9 0004 6798 jsr 46798 <_Chain_Append> 4e758: 508f addql #8,%sp
} DEBUG_STEP("\n"); _Thread_Enable_dispatch();
4e75a: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e760: 6096 bras 4e6f8 <killinfo+0x11c>
/* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch();
4e762: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4e768: 4280 clrl %d0
} DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; }
4e76a: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e770: 4e5e unlk %fp 4e772: 4e75 rts
* NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
4e774: 4285 clrl %d5 4e776: 1a39 0005 d752 moveb 5d752 <rtems_maximum_priority>,%d5 4e77c: 49f9 0005 eec4 lea 5eec4 <_Objects_Information_table+0x8>,%a4
*/ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo(
4e782: 95ca subal %a2,%a2
* NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
4e784: 5285 addql #1,%d5
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] )
4e786: 2054 moveal %a4@,%a0 4e788: 4a88 tstl %a0 4e78a: 675e beqs 4e7ea <killinfo+0x20e>
continue; the_info = _Objects_Information_table[ the_api ][ 1 ];
4e78c: 2068 0004 moveal %a0@(4),%a0
*/ if ( !the_info ) continue; #endif maximum = the_info->maximum;
4e790: 4286 clrl %d6 4e792: 3c28 000e movew %a0@(14),%d6
object_table = the_info->local_table;
4e796: 2268 0018 moveal %a0@(24),%a1
for ( index = 1 ; index <= maximum ; index++ ) {
4e79a: 4a86 tstl %d6 4e79c: 674c beqs 4e7ea <killinfo+0x20e> 4e79e: 5889 addql #4,%a1 4e7a0: 7001 moveq #1,%d0
the_thread = (Thread_Control *) object_table[ index ];
4e7a2: 2051 moveal %a1@,%a0
#endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) {
4e7a4: 5280 addql #1,%d0 4e7a6: 5889 addql #4,%a1
the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread )
4e7a8: 4a88 tstl %a0 4e7aa: 673a beqs 4e7e6 <killinfo+0x20a>
/* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority )
4e7ac: 2228 0014 movel %a0@(20),%d1 4e7b0: ba81 cmpl %d1,%d5 4e7b2: 6532 bcss 4e7e6 <killinfo+0x20a>
DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4e7b4: 2668 010e moveal %a0@(270),%a3 4e7b8: 2e2b 00cc movel %a3@(204),%d7 4e7bc: 4687 notl %d7 4e7be: ce82 andl %d2,%d7 4e7c0: 6724 beqs 4e7e6 <killinfo+0x20a>
* * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) {
4e7c2: ba81 cmpl %d1,%d5 4e7c4: 621c bhis 4e7e2 <killinfo+0x206>
* and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) {
4e7c6: 2e2a 0010 movel %a2@(16),%d7 4e7ca: 671a beqs 4e7e6 <killinfo+0x20a>
/* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) {
4e7cc: 2668 0010 moveal %a0@(16),%a3 4e7d0: 4a8b tstl %a3 4e7d2: 670e beqs 4e7e2 <killinfo+0x206>
continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
4e7d4: 0807 001c btst #28,%d7 4e7d8: 660c bnes 4e7e6 <killinfo+0x20a>
DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
4e7da: 2e0b movel %a3,%d7 4e7dc: 0807 001c btst #28,%d7 4e7e0: 6704 beqs 4e7e6 <killinfo+0x20a> 4e7e2: 2a01 movel %d1,%d5 4e7e4: 2448 moveal %a0,%a2
#endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) {
4e7e6: b086 cmpl %d6,%d0 4e7e8: 63b8 blss 4e7a2 <killinfo+0x1c6> 4e7ea: 588c addql #4,%a4
* + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
4e7ec: b9fc 0005 eed0 cmpal #388816,%a4 4e7f2: 6692 bnes 4e786 <killinfo+0x1aa>
} } } } if ( interested ) {
4e7f4: 4a8a tstl %a2 4e7f6: 6700 fee2 beqw 4e6da <killinfo+0xfe>
* thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true;
4e7fa: 7001 moveq #1,%d0 4e7fc: 1540 0074 moveb %d0,%a2@(116)
/* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
4e800: 486e fff4 pea %fp@(-12) 4e804: 2f03 movel %d3,%sp@- 4e806: 2f0a movel %a2,%sp@- 4e808: 4eb9 0004 e914 jsr 4e914 <_POSIX_signals_Unblock_thread> 4e80e: 4fef 000c lea %sp@(12),%sp 4e812: 4a00 tstb %d0 4e814: 6700 fec4 beqw 4e6da <killinfo+0xfe>
4e818: 6000 ff48 braw 4e762 <killinfo+0x186> <== NOT EXECUTED
*/ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0;
4e81c: 42ae fffc clrl %fp@(-4) 4e820: 6000 fe36 braw 4e658 <killinfo+0x7c>
/* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH );
4e824: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4e82a: 7603 moveq #3,%d3 4e82c: 2040 moveal %d0,%a0 4e82e: 70ff moveq #-1,%d0 4e830: 2083 movel %d3,%a0@
} DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; }
4e832: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e838: 4e5e unlk %fp 4e83a: 4e75 rts
*/ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL );
4e83c: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4e842: 7416 moveq #22,%d2 4e844: 2040 moveal %d0,%a0 4e846: 70ff moveq #-1,%d0 4e848: 2082 movel %d2,%a0@
} DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; }
4e84a: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e850: 4e5e unlk %fp 4e852: 4e75 rts
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch();
4e854: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
4e85a: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4e860: 720b moveq #11,%d1 4e862: 2040 moveal %d0,%a0 4e864: 70ff moveq #-1,%d0
} DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; }
4e866: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4
psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN );
4e86c: 2081 movel %d1,%a0@
} DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; }
4e86e: 4e5e unlk %fp 4e870: 4e75 rts
... 00067c6c <link>: int link( const char *existing, const char *new ) {
67c6c: 4e56 ffc4 linkw %fp,#-60 67c70: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 67c74: 242e 0008 movel %fp@(8),%d2
/* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
67c78: 260e movel %fp,%d3 67c7a: 0683 ffff ffe8 addil #-24,%d3 67c80: 2f02 movel %d2,%sp@-
int link( const char *existing, const char *new ) {
67c82: 266e 000c moveal %fp@(12),%a3
/* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
67c86: 4eb9 0008 6f0c jsr 86f0c <strlen> 67c8c: 7201 moveq #1,%d1 67c8e: 2e81 movel %d1,%sp@ 67c90: 2f03 movel %d3,%sp@- 67c92: 42a7 clrl %sp@- 67c94: 2f00 movel %d0,%sp@- 67c96: 2f02 movel %d2,%sp@- 67c98: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path>
0, &existing_loc, true ); if ( result != 0 )
67c9e: 4fef 0014 lea %sp@(20),%sp 67ca2: 4a80 tstl %d0 67ca4: 6600 00cc bnew 67d72 <link+0x106>
/* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc );
67ca8: 742f moveq #47,%d2 67caa: 1213 moveb %a3@,%d1 67cac: 1001 moveb %d1,%d0 67cae: 49c0 extbl %d0 67cb0: b480 cmpl %d0,%d2 67cb2: 670e beqs 67cc2 <link+0x56> 67cb4: 143c 005c moveb #92,%d2 67cb8: b480 cmpl %d0,%d2 67cba: 6706 beqs 67cc2 <link+0x56> 67cbc: 4a01 tstb %d1 67cbe: 6600 00c0 bnew 67d80 <link+0x114> 67cc2: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 67cc8: 45ee ffd4 lea %fp@(-44),%a2 67ccc: 7001 moveq #1,%d0 67cce: 24a8 0018 movel %a0@(24),%a2@ 67cd2: 2d68 001c ffd8 movel %a0@(28),%fp@(-40) 67cd8: 2d68 0020 ffdc movel %a0@(32),%fp@(-36) 67cde: 2d68 0024 ffe0 movel %a0@(36),%fp@(-32) 67ce4: 2d68 0028 ffe4 movel %a0@(40),%fp@(-28)
if ( !parent_loc.ops->evalformake_h ) {
67cea: 206e ffe0 moveal %fp@(-32),%a0 67cee: 2068 0004 moveal %a0@(4),%a0 67cf2: 4a88 tstl %a0 67cf4: 6700 0122 beqw 67e18 <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 );
67cf8: 486e fffc pea %fp@(-4) 67cfc: 2f0a movel %a2,%sp@- 67cfe: 4873 0800 pea %a3@(00000000,%d0:l) 67d02: 4e90 jsr %a0@
if ( result != 0 ) {
67d04: 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 );
67d08: 2640 moveal %d0,%a3
if ( result != 0 ) {
67d0a: 4a80 tstl %d0 67d0c: 6600 00dc bnew 67dea <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 ) {
67d10: 202e fff8 movel %fp@(-8),%d0 67d14: b0ae ffe4 cmpl %fp@(-28),%d0 67d18: 6600 008a bnew 67da4 <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 ) {
67d1c: 226e ffe0 moveal %fp@(-32),%a1 67d20: 2069 0008 moveal %a1@(8),%a0 67d24: 4a88 tstl %a0 67d26: 6700 0122 beqw 67e4a <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 );
67d2a: 2f2e fffc movel %fp@(-4),%sp@- 67d2e: 2f0a movel %a2,%sp@- 67d30: 2f03 movel %d3,%sp@- 67d32: 4e90 jsr %a0@
rtems_filesystem_freenode( &existing_loc );
67d34: 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 );
67d38: 2400 movel %d0,%d2
rtems_filesystem_freenode( &existing_loc );
67d3a: 4fef 000c lea %sp@(12),%sp 67d3e: 4a88 tstl %a0 67d40: 670e beqs 67d50 <link+0xe4> 67d42: 2068 001c moveal %a0@(28),%a0 67d46: 4a88 tstl %a0 67d48: 6706 beqs 67d50 <link+0xe4> 67d4a: 2f03 movel %d3,%sp@- 67d4c: 4e90 jsr %a0@ 67d4e: 588f addql #4,%sp
rtems_filesystem_freenode( &parent_loc );
67d50: 206e ffe0 moveal %fp@(-32),%a0 67d54: 4a88 tstl %a0 67d56: 670e beqs 67d66 <link+0xfa> 67d58: 2068 001c moveal %a0@(28),%a0 67d5c: 4a88 tstl %a0 67d5e: 6706 beqs 67d66 <link+0xfa> 67d60: 2f0a movel %a2,%sp@- 67d62: 4e90 jsr %a0@ 67d64: 588f addql #4,%sp
return result; }
67d66: 2002 movel %d2,%d0 67d68: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 67d6e: 4e5e unlk %fp 67d70: 4e75 rts
* Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 0, &existing_loc, true ); if ( result != 0 )
67d72: 74ff moveq #-1,%d2
rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; }
67d74: 2002 movel %d2,%d0 67d76: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 67d7c: 4e5e unlk %fp 67d7e: 4e75 rts
/* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc );
67d80: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 67d86: 45ee ffd4 lea %fp@(-44),%a2 67d8a: 5888 addql #4,%a0 67d8c: 4280 clrl %d0 67d8e: 2498 movel %a0@+,%a2@ 67d90: 2d58 ffd8 movel %a0@+,%fp@(-40) 67d94: 2d58 ffdc movel %a0@+,%fp@(-36) 67d98: 2d58 ffe0 movel %a0@+,%fp@(-32) 67d9c: 2d50 ffe4 movel %a0@,%fp@(-28) 67da0: 6000 ff48 braw 67cea <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 );
67da4: 206e fff4 moveal %fp@(-12),%a0 67da8: 4a88 tstl %a0 67daa: 670e beqs 67dba <link+0x14e> 67dac: 2068 001c moveal %a0@(28),%a0 67db0: 4a88 tstl %a0 67db2: 6706 beqs 67dba <link+0x14e> 67db4: 2f03 movel %d3,%sp@- 67db6: 4e90 jsr %a0@ 67db8: 588f addql #4,%sp
rtems_filesystem_freenode( &parent_loc );
67dba: 206e ffe0 moveal %fp@(-32),%a0 67dbe: 4a88 tstl %a0 67dc0: 670e beqs 67dd0 <link+0x164> 67dc2: 2068 001c moveal %a0@(28),%a0 67dc6: 4a88 tstl %a0 67dc8: 6706 beqs 67dd0 <link+0x164> 67dca: 2f0a movel %a2,%sp@- 67dcc: 4e90 jsr %a0@ 67dce: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EXDEV );
67dd0: 4eb9 0008 0e64 jsr 80e64 <__errno> 67dd6: 74ff moveq #-1,%d2 67dd8: 2040 moveal %d0,%a0 67dda: 7012 moveq #18,%d0 67ddc: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; }
67dde: 2002 movel %d2,%d0 67de0: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 67de6: 4e5e unlk %fp 67de8: 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 );
67dea: 206e fff4 moveal %fp@(-12),%a0 67dee: 4a88 tstl %a0 67df0: 670e beqs 67e00 <link+0x194> 67df2: 2068 001c moveal %a0@(28),%a0 67df6: 4a88 tstl %a0 67df8: 6706 beqs 67e00 <link+0x194> 67dfa: 2f03 movel %d3,%sp@- 67dfc: 4e90 jsr %a0@ 67dfe: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( result );
67e00: 4eb9 0008 0e64 jsr 80e64 <__errno> 67e06: 74ff moveq #-1,%d2 67e08: 2040 moveal %d0,%a0
rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; }
67e0a: 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 );
67e0c: 208b movel %a3,%a0@
rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; }
67e0e: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 67e14: 4e5e unlk %fp 67e16: 4e75 rts
*/ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc );
67e18: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 67e1c: 4a88 tstl %a0 <== NOT EXECUTED 67e1e: 670e beqs 67e2e <link+0x1c2> <== NOT EXECUTED 67e20: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 67e24: 4a88 tstl %a0 <== NOT EXECUTED 67e26: 6706 beqs 67e2e <link+0x1c2> <== NOT EXECUTED 67e28: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67e2a: 4e90 jsr %a0@ <== NOT EXECUTED 67e2c: 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 );
67e2e: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 67e34: 74ff moveq #-1,%d2 <== NOT EXECUTED 67e36: 2040 moveal %d0,%a0 <== NOT EXECUTED 67e38: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; }
67e3e: 2002 movel %d2,%d0 <== NOT EXECUTED 67e40: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 <== NOT EXECUTED 67e46: 4e5e unlk %fp <== NOT EXECUTED 67e48: 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 );
67e4a: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 67e4e: 4a88 tstl %a0 <== NOT EXECUTED 67e50: 6712 beqs 67e64 <link+0x1f8> <== NOT EXECUTED 67e52: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 67e56: 4a88 tstl %a0 <== NOT EXECUTED 67e58: 670a beqs 67e64 <link+0x1f8> <== NOT EXECUTED 67e5a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67e5c: 4e90 jsr %a0@ <== NOT EXECUTED 67e5e: 226e ffe0 moveal %fp@(-32),%a1 <== NOT EXECUTED 67e62: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
67e64: 4a89 tstl %a1 <== NOT EXECUTED 67e66: 67c6 beqs 67e2e <link+0x1c2> <== NOT EXECUTED 67e68: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 67e6c: 4a88 tstl %a0 <== NOT EXECUTED 67e6e: 67be beqs 67e2e <link+0x1c2> <== NOT EXECUTED 67e70: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
67e72: 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 );
67e74: 4e90 jsr %a0@ <== NOT EXECUTED 67e76: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
67e78: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 67e7e: 2040 moveal %d0,%a0 <== NOT EXECUTED 67e80: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 67e86: 60b6 bras 67e3e <link+0x1d2> <== NOT EXECUTED
00045c74 <lio_listio>: int mode __attribute__((unused)), struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), struct sigevent *sig __attribute__((unused)) ) {
45c74: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45c78: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45c7e: 7258 moveq #88,%d1 45c80: 2040 moveal %d0,%a0
}
45c82: 70ff moveq #-1,%d0 45c84: 4e5e unlk %fp
struct aiocb * const list[] __attribute__((unused)), int nent __attribute__((unused)), struct sigevent *sig __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45c86: 2081 movel %d1,%a0@
}
45c88: 4e75 rts
... 0005b46c <lseek>: off_t lseek( int fd, off_t offset, int whence ) {
5b46c: 4e56 ffe4 linkw %fp,#-28 5b470: 222e 0008 movel %fp@(8),%d1 5b474: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 5b478: 202e 0014 movel %fp@(20),%d0 5b47c: 282e 000c movel %fp@(12),%d4 5b480: 2a2e 0010 movel %fp@(16),%d5
rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd );
5b484: b2b9 0005 d6a4 cmpl 5d6a4 <rtems_libio_number_iops>,%d1 5b48a: 6400 0118 bccw 5b5a4 <lseek+0x138>
iop = rtems_libio_iop( fd );
5b48e: 2479 0005 eda4 moveal 5eda4 <rtems_libio_iops>,%a2 5b494: ed89 lsll #6,%d1 5b496: d5c1 addal %d1,%a2
rtems_libio_check_is_open(iop);
5b498: 222a 0014 movel %a2@(20),%d1 5b49c: 0281 0000 0100 andil #256,%d1 5b4a2: 6700 0100 beqw 5b5a4 <lseek+0x138>
/* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h )
5b4a6: 206a 003c moveal %a2@(60),%a0 5b4aa: 4aa8 0014 tstl %a0@(20) 5b4ae: 6700 0112 beqw 5b5c2 <lseek+0x156>
/* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) {
5b4b2: 7201 moveq #1,%d1
/* * Now process the lseek(). */ old_offset = iop->offset;
5b4b4: 242a 000c movel %a2@(12),%d2 5b4b8: 262a 0010 movel %a2@(16),%d3
switch ( whence ) {
5b4bc: b280 cmpl %d0,%d1 5b4be: 6700 00ae beqw 5b56e <lseek+0x102> 5b4c2: 7c02 moveq #2,%d6 5b4c4: bc80 cmpl %d0,%d6 5b4c6: 6752 beqs 5b51a <lseek+0xae> 5b4c8: 4a80 tstl %d0 5b4ca: 6600 0084 bnew 5b550 <lseek+0xe4>
case SEEK_SET: iop->offset = offset;
5b4ce: 2544 000c movel %d4,%a2@(12) 5b4d2: 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 );
5b4d6: 2f00 movel %d0,%sp@- 5b4d8: 2f05 movel %d5,%sp@- 5b4da: 2f04 movel %d4,%sp@- 5b4dc: 2f0a movel %a2,%sp@- 5b4de: 2068 0014 moveal %a0@(20),%a0 5b4e2: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5b4e4: 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 );
5b4e8: 2800 movel %d0,%d4 5b4ea: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5b4ec: 70ff moveq #-1,%d0 5b4ee: 72ff moveq #-1,%d1 5b4f0: 9285 subl %d5,%d1 5b4f2: 9184 subxl %d4,%d0 5b4f4: 670e beqs 5b504 <lseek+0x98>
/* * So if the operation failed, we have to restore iop->offset. */ return status; }
5b4f6: 2205 movel %d5,%d1 5b4f8: 2004 movel %d4,%d0 5b4fa: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5b500: 4e5e unlk %fp 5b502: 4e75 rts 5b504: 2205 movel %d5,%d1 5b506: 2004 movel %d4,%d0
* new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset;
5b508: 2542 000c movel %d2,%a2@(12) 5b50c: 2543 0010 movel %d3,%a2@(16)
/* * So if the operation failed, we have to restore iop->offset. */ return status; }
5b510: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5b516: 4e5e unlk %fp 5b518: 4e75 rts
case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset;
5b51a: 2c2a 0004 movel %a2@(4),%d6 5b51e: 2e2a 0008 movel %a2@(8),%d7 5b522: de85 addl %d5,%d7 5b524: dd84 addxl %d4,%d6 5b526: 2546 000c movel %d6,%a2@(12) 5b52a: 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 );
5b52e: 2f00 movel %d0,%sp@- 5b530: 2f05 movel %d5,%sp@- 5b532: 2f04 movel %d4,%sp@- 5b534: 2f0a movel %a2,%sp@- 5b536: 2068 0014 moveal %a0@(20),%a0 5b53a: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5b53c: 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 );
5b540: 2800 movel %d0,%d4 5b542: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5b544: 70ff moveq #-1,%d0 5b546: 72ff moveq #-1,%d1 5b548: 9285 subl %d5,%d1 5b54a: 9184 subxl %d4,%d0 5b54c: 66a8 bnes 5b4f6 <lseek+0x8a> 5b54e: 60b4 bras 5b504 <lseek+0x98>
case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL );
5b550: 4eb9 0004 eb8c jsr 4eb8c <__errno> 5b556: 2040 moveal %d0,%a0 5b558: 7016 moveq #22,%d0 5b55a: 78ff moveq #-1,%d4 5b55c: 7aff moveq #-1,%d5 5b55e: 2080 movel %d0,%a0@
/* * So if the operation failed, we have to restore iop->offset. */ return status; }
5b560: 2205 movel %d5,%d1 5b562: 2004 movel %d4,%d0 5b564: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5b56a: 4e5e unlk %fp 5b56c: 4e75 rts
case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset;
5b56e: 2c04 movel %d4,%d6 5b570: 2e05 movel %d5,%d7 5b572: de83 addl %d3,%d7 5b574: dd82 addxl %d2,%d6 5b576: 2546 000c movel %d6,%a2@(12) 5b57a: 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 );
5b57e: 2f00 movel %d0,%sp@- 5b580: 2f05 movel %d5,%sp@- 5b582: 2f04 movel %d4,%sp@- 5b584: 2f0a movel %a2,%sp@- 5b586: 2068 0014 moveal %a0@(20),%a0 5b58a: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5b58c: 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 );
5b590: 2800 movel %d0,%d4 5b592: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5b594: 70ff moveq #-1,%d0 5b596: 72ff moveq #-1,%d1 5b598: 9285 subl %d5,%d1 5b59a: 9184 subxl %d4,%d0 5b59c: 6600 ff58 bnew 5b4f6 <lseek+0x8a>
5b5a0: 6000 ff62 braw 5b504 <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);
5b5a4: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 5b5aa: 7209 moveq #9,%d1 <== NOT EXECUTED 5b5ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b5ae: 78ff moveq #-1,%d4 <== NOT EXECUTED 5b5b0: 7aff moveq #-1,%d5 <== NOT EXECUTED 5b5b2: 2081 movel %d1,%a0@ <== NOT EXECUTED
/* * So if the operation failed, we have to restore iop->offset. */ return status; }
5b5b4: 2205 movel %d5,%d1 <== NOT EXECUTED 5b5b6: 2004 movel %d4,%d0 <== NOT EXECUTED 5b5b8: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5b5be: 4e5e unlk %fp <== NOT EXECUTED 5b5c0: 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 );
5b5c2: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 5b5c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b5ca: 78ff moveq #-1,%d4 <== NOT EXECUTED 5b5cc: 7aff moveq #-1,%d5 <== NOT EXECUTED 5b5ce: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
/* * So if the operation failed, we have to restore iop->offset. */ return status; }
5b5d4: 2205 movel %d5,%d1 <== NOT EXECUTED 5b5d6: 2004 movel %d4,%d0 <== NOT EXECUTED 5b5d8: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5b5de: 4e5e unlk %fp <== NOT EXECUTED
5b5e0: 4e75 rts
00068048 <lstat>: int _STAT_NAME( const char *path, struct stat *buf ) {
68048: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 6804c: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 68050: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED 68054: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
/* * Check to see if we were passed a valid pointer. */ if ( !buf )
68058: 6700 0086 beqw 680e0 <lstat+0x98> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ),
6805c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 6805e: 280e movel %fp,%d4 <== NOT EXECUTED 68060: 0684 ffff ffec addil #-20,%d4 <== NOT EXECUTED 68066: 4eb9 0008 6f0c jsr 86f0c <strlen> <== NOT EXECUTED 6806c: 4297 clrl %sp@ <== NOT EXECUTED 6806e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 68070: 42a7 clrl %sp@- <== NOT EXECUTED 68072: 2f00 movel %d0,%sp@- <== NOT EXECUTED 68074: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68076: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 )
6807c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 68080: 4a80 tstl %d0 <== NOT EXECUTED 68082: 664e bnes 680d2 <lstat+0x8a> <== NOT EXECUTED
return -1; if ( !loc.handlers->fstat_h ){
68084: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 68088: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 6808c: 676c beqs 680fa <lstat+0xb2> <== NOT EXECUTED
/* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) );
6808e: 4878 0046 pea 46 <DBL_MANT_DIG+0x11> <== NOT EXECUTED 68092: 42a7 clrl %sp@- <== NOT EXECUTED 68094: 2f02 movel %d2,%sp@- <== NOT EXECUTED 68096: 4eb9 0008 4008 jsr 84008 <memset> <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
6809c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6809e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 680a0: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 680a4: 2068 0018 moveal %a0@(24),%a0 <== NOT EXECUTED 680a8: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
680aa: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED
* versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf );
680ae: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
680b0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 680b4: 4a88 tstl %a0 <== NOT EXECUTED 680b6: 670e beqs 680c6 <lstat+0x7e> <== NOT EXECUTED 680b8: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 680bc: 4a88 tstl %a0 <== NOT EXECUTED 680be: 6706 beqs 680c6 <lstat+0x7e> <== NOT EXECUTED 680c0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 680c2: 4e90 jsr %a0@ <== NOT EXECUTED 680c4: 588f addql #4,%sp <== NOT EXECUTED
return status; }
680c6: 2002 movel %d2,%d0 <== NOT EXECUTED 680c8: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 680ce: 4e5e unlk %fp <== NOT EXECUTED 680d0: 4e75 rts <== NOT EXECUTED
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 )
680d2: 74ff moveq #-1,%d2 <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; }
680d4: 2002 movel %d2,%d0 <== NOT EXECUTED 680d6: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 680dc: 4e5e unlk %fp <== NOT EXECUTED 680de: 4e75 rts <== NOT EXECUTED
/* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT );
680e0: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 680e6: 74ff moveq #-1,%d2 <== NOT EXECUTED 680e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 680ea: 700e moveq #14,%d0 <== NOT EXECUTED 680ec: 2080 movel %d0,%a0@ <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; }
680ee: 2002 movel %d2,%d0 <== NOT EXECUTED 680f0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 680f6: 4e5e unlk %fp <== NOT EXECUTED 680f8: 4e75 rts <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc );
680fa: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 680fe: 4a88 tstl %a0 <== NOT EXECUTED 68100: 670e beqs 68110 <lstat+0xc8> <== NOT EXECUTED 68102: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 68106: 4a88 tstl %a0 <== NOT EXECUTED 68108: 6706 beqs 68110 <lstat+0xc8> <== NOT EXECUTED 6810a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 6810c: 4e90 jsr %a0@ <== NOT EXECUTED 6810e: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
68110: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 68116: 74ff moveq #-1,%d2 <== NOT EXECUTED 68118: 2040 moveal %d0,%a0 <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; }
6811a: 2002 movel %d2,%d0 <== NOT EXECUTED 6811c: 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 );
68122: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; }
68128: 4e5e unlk %fp <== NOT EXECUTED
6812a: 4e75 rts
0004ac20 <malloc>: size_t size ) { void *return_this; MSBUMP(malloc_calls, 1);
4ac20: 4e56 fff4 linkw %fp,#-12 4ac24: 52b9 0005 edb4 addql #1,5edb4 <rtems_malloc_statistics+0x4> 4ac2a: 48d7 001c moveml %d2-%d4,%sp@ 4ac2e: 262e 0008 movel %fp@(8),%d3
/* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process();
4ac32: 4eb9 0004 abde jsr 4abde <malloc_deferred_frees_process>
/* * Validate the parameters */ if ( !size )
4ac38: 4a83 tstl %d3 4ac3a: 6766 beqs 4aca2 <malloc+0x82>
return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) &&
4ac3c: 7003 moveq #3,%d0 4ac3e: b0b9 0005 f08c cmpl 5f08c <_System_state_Current>,%d0 4ac44: 6752 beqs 4ac98 <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 );
4ac46: 42a7 clrl %sp@- 4ac48: 42a7 clrl %sp@- 4ac4a: 2f03 movel %d3,%sp@- 4ac4c: 2f39 0005 d6b0 movel 5d6b0 <RTEMS_Malloc_Heap>,%sp@- 4ac52: 4eb9 0004 bf8c jsr 4bf8c <_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 ) {
4ac58: 4fef 0010 lea %sp@(16),%sp 4ac5c: 2400 movel %d0,%d2 4ac5e: 675e beqs 4acbe <malloc+0x9e>
if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0;
4ac60: 2800 movel %d0,%d4
} /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper )
4ac62: 2079 0005 dd3e moveal 5dd3e <rtems_malloc_dirty_helper>,%a0 4ac68: 4a88 tstl %a0 4ac6a: 670a beqs 4ac76 <malloc+0x56>
(*rtems_malloc_dirty_helper)( return_this, size );
4ac6c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ac6e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ac70: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4ac72: 4e90 jsr %a0@ <== NOT EXECUTED 4ac74: 508f addql #8,%sp <== NOT EXECUTED
/* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
4ac76: 2079 0005 dd36 moveal 5dd36 <rtems_malloc_statistics_helpers>,%a0 4ac7c: 4a88 tstl %a0 4ac7e: 6730 beqs 4acb0 <malloc+0x90>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
4ac80: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ac82: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4ac86: 2404 movel %d4,%d2 <== NOT EXECUTED 4ac88: 4e90 jsr %a0@ <== NOT EXECUTED 4ac8a: 588f addql #4,%sp <== NOT EXECUTED
if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; }
4ac8c: 2002 movel %d2,%d0 <== NOT EXECUTED 4ac8e: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4ac94: 4e5e unlk %fp <== NOT EXECUTED 4ac96: 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()) &&
4ac98: 4eb9 0004 ab84 jsr 4ab84 <malloc_is_system_state_OK> 4ac9e: 4a00 tstb %d0 4aca0: 66a4 bnes 4ac46 <malloc+0x26>
/* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this);
4aca2: 4282 clrl %d2 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; }
4aca4: 2002 movel %d2,%d0 <== NOT EXECUTED 4aca6: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4acac: 4e5e unlk %fp <== NOT EXECUTED 4acae: 4e75 rts <== NOT EXECUTED
(*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
4acb0: 2404 movel %d4,%d2
if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; }
4acb2: 2002 movel %d2,%d0 4acb4: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4acba: 4e5e unlk %fp 4acbc: 4e75 rts
*/ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers)
4acbe: 2079 0005 dd3a moveal 5dd3a <rtems_malloc_sbrk_helpers>,%a0 4acc4: 4a88 tstl %a0 4acc6: 670e beqs 4acd6 <malloc+0xb6>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
4acc8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4acca: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4acce: 4e90 jsr %a0@ <== NOT EXECUTED
if ( !return_this ) {
4acd0: 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 );
4acd2: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( !return_this ) {
4acd4: 668c bnes 4ac62 <malloc+0x42> <== NOT EXECUTED
errno = ENOMEM;
4acd6: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4acdc: 2040 moveal %d0,%a0 4acde: 700c moveq #12,%d0 4ace0: 2080 movel %d0,%a0@
if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; }
4ace2: 2002 movel %d2,%d0 4ace4: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4acea: 4e5e unlk %fp 4acec: 4e75 rts
... 0004abc4 <malloc_deferred_free>: } void malloc_deferred_free( void *pointer ) {
4abc4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4abc8: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4abcc: 4879 0005 f3a6 pea 5f3a6 <RTEMS_Malloc_GC_list> <== NOT EXECUTED 4abd2: 4eb9 0004 6798 jsr 46798 <_Chain_Append> <== NOT EXECUTED 4abd8: 508f addql #8,%sp <== NOT EXECUTED
rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); }
4abda: 4e5e unlk %fp <== NOT EXECUTED
4abdc: 4e75 rts
0004abde <malloc_deferred_frees_process>: { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) {
4abde: 4e56 0000 linkw %fp,#0 4abe2: 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);
4abe4: 47f9 0004 a688 lea 4a688 <free>,%a3
{ rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) {
4abea: 2f0a movel %a2,%sp@-
*/ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain );
4abec: 4879 0005 f3a6 pea 5f3a6 <RTEMS_Malloc_GC_list> 4abf2: 45f9 0004 b954 lea 4b954 <_Chain_Get>,%a2 4abf8: 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)
4abfa: 588f addql #4,%sp 4abfc: 4a80 tstl %d0 4abfe: 6714 beqs 4ac14 <malloc_deferred_frees_process+0x36>
free(to_be_freed);
4ac00: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ac02: 4e93 jsr %a3@ <== NOT EXECUTED 4ac04: 588f addql #4,%sp <== NOT EXECUTED 4ac06: 4879 0005 f3a6 pea 5f3a6 <RTEMS_Malloc_GC_list> <== NOT EXECUTED 4ac0c: 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)
4ac0e: 588f addql #4,%sp <== NOT EXECUTED 4ac10: 4a80 tstl %d0 <== NOT EXECUTED 4ac12: 66ec bnes 4ac00 <malloc_deferred_frees_process+0x22><== NOT EXECUTED
free(to_be_freed); }
4ac14: 246e fff8 moveal %fp@(-8),%a2 4ac18: 266e fffc moveal %fp@(-4),%a3 4ac1c: 4e5e unlk %fp 4ac1e: 4e75 rts
00068148 <malloc_info>: */ int malloc_info( Heap_Information_block *the_info ) {
68148: 4e56 0000 linkw %fp,#0 6814c: 202e 0008 movel %fp@(8),%d0
if ( !the_info )
68150: 6716 beqs 68168 <malloc_info+0x20>
return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info );
68152: 2f00 movel %d0,%sp@- 68154: 2f39 000a 1cb0 movel a1cb0 <RTEMS_Malloc_Heap>,%sp@- 6815a: 4eb9 0006 b1e8 jsr 6b1e8 <_Protected_heap_Get_information>
return 0;
68160: 508f addql #8,%sp
) { if ( !the_info ) return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info );
68162: 4280 clrl %d0
return 0; }
68164: 4e5e unlk %fp 68166: 4e75 rts
int malloc_info( Heap_Information_block *the_info ) { if ( !the_info )
68168: 70ff moveq #-1,%d0
return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); return 0; }
6816a: 4e5e unlk %fp 6816c: 4e75 rts
... 0004ab84 <malloc_is_system_state_OK>: #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) {
4ab84: 4e56 0000 linkw %fp,#0
if ( _Thread_Dispatch_disable_level > 0 )
4ab88: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 4ab8e: 660e bnes 4ab9e <malloc_is_system_state_OK+0x1a>
return false; if ( _ISR_Nest_level > 0 )
4ab90: 2039 0005 ef9e movel 5ef9e <_ISR_Nest_level>,%d0
#include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void)
4ab96: 57c0 seq %d0
if ( _ISR_Nest_level > 0 ) return false; return true; }
4ab98: 4e5e unlk %fp
#include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void)
4ab9a: 4480 negl %d0
if ( _ISR_Nest_level > 0 ) return false; return true; }
4ab9c: 4e75 rts
4ab9e: 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 )
4aba0: 4200 clrb %d0 <== NOT EXECUTED
if ( _ISR_Nest_level > 0 ) return false; return true; }
4aba2: 4e75 rts
00068170 <malloc_report_statistics_with_plugin>: s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)(
68170: 720a moveq #10,%d1
void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) {
68172: 4e56 ffe0 linkw %fp,#-32
rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed;
68176: 2079 000a 6980 moveal a6980 <rtems_malloc_statistics+0x1c>,%a0 6817c: 2279 000a 6984 moveal a6984 <rtems_malloc_statistics+0x20>,%a1
void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) {
68182: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@
s->space_available / 1024, allocated / 1024, /* avoid float! */ (allocated * 100) / s->space_available, s->max_depth / 1024, (s->max_depth * 100) / s->space_available,
68186: 2479 000a 697c moveal a697c <rtems_malloc_statistics+0x18>,%a2
s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)(
6818c: 200a movel %a2,%d0 6818e: e2a8 lsrl %d1,%d0 68190: 2640 moveal %d0,%a3 68192: 7016 moveq #22,%d0 68194: 2e09 movel %a1,%d7 68196: e2af lsrl %d1,%d7
rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed;
68198: 2639 000a 6988 movel a6988 <rtems_malloc_statistics+0x24>,%d3 6819e: 2839 000a 698c movel a698c <rtems_malloc_statistics+0x28>,%d4
(*print)(
681a4: 2439 000a 6964 movel a6964 <rtems_malloc_statistics>,%d2 681aa: 2c03 movel %d3,%d6 681ac: 2a04 movel %d4,%d5 681ae: e2ad lsrl %d1,%d5 681b0: 123c 0064 moveb #100,%d1 681b4: e1ae lsll %d0,%d6 681b6: 200a movel %a2,%d0 681b8: 4c01 0800 mulsl %d1,%d0 681bc: 8c85 orl %d5,%d6 681be: 2a08 movel %a0,%d5 681c0: 2f06 movel %d6,%sp@- 681c2: 7c16 moveq #22,%d6 681c4: edad lsll %d6,%d5
void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) {
681c6: 2c2e 0008 movel %fp@(8),%d6
s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)(
681ca: 8a87 orl %d7,%d5 681cc: 2e02 movel %d2,%d7 681ce: 2f05 movel %d5,%sp@-
void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) {
681d0: 246e 000c moveal %fp@(12),%a2
s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)(
681d4: 4c42 0000 remul %d2,%d0,%d0 681d8: 2f00 movel %d0,%sp@-
rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed;
681da: 2008 movel %a0,%d0 681dc: 2209 movel %a1,%d1
(*print)(
681de: 2f0b movel %a3,%sp@- 681e0: 4878 0064 pea 64 <DBL_MANT_DIG+0x2f>
rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed;
681e4: 9284 subl %d4,%d1 681e6: 9183 subxl %d3,%d0
(*print)(
681e8: 42a7 clrl %sp@- 681ea: 760a moveq #10,%d3 681ec: e6af lsrl %d3,%d7 681ee: 7616 moveq #22,%d3
rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed;
681f0: 2800 movel %d0,%d4 681f2: 2a01 movel %d1,%d5
(*print)(
681f4: 2f05 movel %d5,%sp@- 681f6: 2f00 movel %d0,%sp@- 681f8: 4eb9 0009 6c30 jsr 96c30 <__muldi3> 681fe: 4fef 000c lea %sp@(12),%sp 68202: 2e82 movel %d2,%sp@ 68204: 2404 movel %d4,%d2 68206: 42a7 clrl %sp@- 68208: e7aa lsll %d3,%d2 6820a: 2f01 movel %d1,%sp@- 6820c: 2605 movel %d5,%d3 6820e: 2f00 movel %d0,%sp@- 68210: 4eb9 0009 75ac jsr 975ac <__udivdi3> 68216: 4fef 0010 lea %sp@(16),%sp 6821a: 2f01 movel %d1,%sp@- 6821c: 2f00 movel %d0,%sp@- 6821e: 700a moveq #10,%d0 68220: e0ab lsrl %d0,%d3 68222: 8682 orl %d2,%d3 68224: 2404 movel %d4,%d2 68226: e0aa lsrl %d0,%d2 68228: 2f03 movel %d3,%sp@- 6822a: 2f02 movel %d2,%sp@- 6822c: 2f07 movel %d7,%sp@- 6822e: 4879 0009 d372 pea 9d372 <IMFS_memfile_handlers+0x110> 68234: 2f06 movel %d6,%sp@- 68236: 4e92 jsr %a2@
s->max_depth / 1024, (s->max_depth * 100) / s->space_available, (uint32_t) (s->lifetime_allocated / 1024), (uint32_t) (s->lifetime_freed / 1024) ); (*print)(
68238: 4fef 0028 lea %sp@(40),%sp 6823c: 2eb9 000a 6978 movel a6978 <rtems_malloc_statistics+0x14>,%sp@ 68242: 2f39 000a 6974 movel a6974 <rtems_malloc_statistics+0x10>,%sp@- 68248: 2f39 000a 6970 movel a6970 <rtems_malloc_statistics+0xc>,%sp@- 6824e: 2f39 000a 696c movel a696c <rtems_malloc_statistics+0x8>,%sp@- 68254: 2f39 000a 6968 movel a6968 <rtems_malloc_statistics+0x4>,%sp@- 6825a: 4879 0009 d3d4 pea 9d3d4 <IMFS_memfile_handlers+0x172> 68260: 2f06 movel %d6,%sp@- 68262: 4e92 jsr %a2@ 68264: 4fef 001c lea %sp@(28),%sp
s->memalign_calls, s->free_calls, s->realloc_calls, s->calloc_calls ); }
68268: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 6826e: 4e5e unlk %fp 68270: 4e75 rts
... 0005242c <memfile_check_rmnod>: return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
5242c: 4e56 0000 linkw %fp,#0 52430: 2f0a movel %a2,%sp@- 52432: 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) ) {
52436: 2f0a movel %a2,%sp@- 52438: 4eb9 0005 0146 jsr 50146 <rtems_libio_is_file_open> 5243e: 588f addql #4,%sp 52440: 4a80 tstl %d0 52442: 662e bnes 52472 <memfile_check_rmnod+0x46> 52444: 4a6a 0032 tstw %a2@(50) 52448: 6628 bnes 52472 <memfile_check_rmnod+0x46>
/* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode )
5244a: 2079 0006 381c moveal 6381c <rtems_current_user_env>,%a0 52450: b5e8 0004 cmpal %a0@(4),%a2 52454: 6726 beqs 5247c <memfile_check_rmnod+0x50>
rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE)
52456: 7006 moveq #6,%d0 52458: b0aa 0048 cmpl %a2@(72),%d0 5245c: 670a beqs 52468 <memfile_check_rmnod+0x3c>
IMFS_memfile_remove( the_jnode );
5245e: 2f0a movel %a2,%sp@- 52460: 4eb9 0005 22d8 jsr 522d8 <IMFS_memfile_remove> 52466: 588f addql #4,%sp
free( the_jnode );
52468: 2f0a movel %a2,%sp@- 5246a: 4eb9 0004 3fbc jsr 43fbc <free> 52470: 588f addql #4,%sp
} return 0; }
52472: 246e fffc moveal %fp@(-4),%a2 52476: 4280 clrl %d0 52478: 4e5e unlk %fp 5247a: 4e75 rts
/* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL;
5247c: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED
/* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE)
52480: 7006 moveq #6,%d0 <== NOT EXECUTED 52482: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 52486: 66d6 bnes 5245e <memfile_check_rmnod+0x32> <== NOT EXECUTED 52488: 60de bras 52468 <memfile_check_rmnod+0x3c> <== NOT EXECUTED
00052226 <memfile_free_blocks_in_table>: void memfile_free_blocks_in_table( block_p **block_table, int entries ) {
52226: 4e56 ffec linkw %fp,#-20 5222a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5222e: 286e 0008 moveal %fp@(8),%a4 52232: 262e 000c movel %fp@(12),%d3
/* * Perform internal consistency checks */ assert( block_table );
52236: 4a8c tstl %a4 52238: 6736 beqs 52270 <memfile_free_blocks_in_table+0x4a>
/* * Now go through all the slots in the table and free the memory. */ b = *block_table;
5223a: 2454 moveal %a4@,%a2 5223c: 47f9 0005 1fea lea 51fea <memfile_free_block>,%a3
for ( i=0 ; i<entries ; i++ ) {
52242: 4a83 tstl %d3 52244: 6f18 bles 5225e <memfile_free_blocks_in_table+0x38> 52246: 4282 clrl %d2
if ( b[i] ) {
52248: 2012 movel %a2@,%d0 5224a: 6708 beqs 52254 <memfile_free_blocks_in_table+0x2e>
memfile_free_block( b[i] );
5224c: 2f00 movel %d0,%sp@- 5224e: 4e93 jsr %a3@
b[i] = 0;
52250: 588f addql #4,%sp 52252: 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++ ) {
52254: 5282 addql #1,%d2 52256: 588a addql #4,%a2 52258: b483 cmpl %d3,%d2 5225a: 6dec blts 52248 <memfile_free_blocks_in_table+0x22> 5225c: 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 );
5225e: 2f0a movel %a2,%sp@- 52260: 4e93 jsr %a3@
*block_table = 0;
52262: 588f addql #4,%sp 52264: 4294 clrl %a4@
}
52266: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 5226c: 4e5e unlk %fp 5226e: 4e75 rts
/* * Perform internal consistency checks */ assert( block_table );
52270: 4879 0006 2c04 pea 62c04 <CSWTCH.8+0x84> <== NOT EXECUTED 52276: 4879 0006 2cc2 pea 62cc2 <__FUNCTION__.6061> <== NOT EXECUTED 5227c: 4878 01b3 pea 1b3 <DBL_MANT_DIG+0x17e> <== NOT EXECUTED 52280: 4879 0006 2b9a pea 62b9a <CSWTCH.8+0x1a> <== NOT EXECUTED 52286: 4eb9 0004 fc30 jsr 4fc30 <__assert_func> <== NOT EXECUTED
000526ec <memfile_ftruncate>: int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) {
526ec: 4e56 ffec linkw %fp,#-20 526f0: 206e 0008 moveal %fp@(8),%a0 526f4: 48d7 040c moveml %d2-%d3/%a2,%sp@
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
526f8: 2468 0038 moveal %a0@(56),%a2
int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) {
526fc: 202e 000c movel %fp@(12),%d0 52700: 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 )
52704: 242a 004c movel %a2@(76),%d2 52708: 262a 0050 movel %a2@(80),%d3 5270c: 9681 subl %d1,%d3 5270e: 9580 subxl %d0,%d2 52710: 6d30 blts 52742 <memfile_ftruncate+0x56>
* 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;
52712: 2540 004c movel %d0,%a2@(76) 52716: 2541 0050 movel %d1,%a2@(80)
iop->size = the_jnode->info.file.size;
5271a: 2140 0004 movel %d0,%a0@(4) 5271e: 2141 0008 movel %d1,%a0@(8)
IMFS_update_atime( the_jnode );
52722: 42a7 clrl %sp@- 52724: 486e fff8 pea %fp@(-8) 52728: 4eb9 0004 404c jsr 4404c <gettimeofday> 5272e: 256e fff8 003c movel %fp@(-8),%a2@(60)
return 0;
52734: 508f addql #8,%sp
*/ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode );
52736: 4280 clrl %d0
return 0; }
52738: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 5273e: 4e5e unlk %fp 52740: 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 );
52742: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52744: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52746: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52748: 4eb9 0005 259a jsr 5259a <IMFS_memfile_extend> <== NOT EXECUTED 5274e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; }
52752: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 52758: 4e5e unlk %fp <== NOT EXECUTED
5275a: 4e75 rts
0005275c <memfile_lseek>: { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) {
5275c: 7006 moveq #6,%d0
rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
5275e: 4e56 ffe8 linkw %fp,#-24 52762: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 52766: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
5276a: 266a 0038 moveal %a2@(56),%a3
if (the_jnode->type == IMFS_LINEAR_FILE) {
5276e: b0ab 0048 cmpl %a3@(72),%d0 52772: 673e beqs 527b2 <memfile_lseek+0x56>
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 ))
52774: 2f2a 0010 movel %a2@(16),%sp@- 52778: 2f2a 000c movel %a2@(12),%sp@- 5277c: 2f0b movel %a3,%sp@- 5277e: 4eb9 0005 259a jsr 5259a <IMFS_memfile_extend> 52784: 4fef 000c lea %sp@(12),%sp 52788: 4a80 tstl %d0 5278a: 6668 bnes 527f4 <memfile_lseek+0x98>
rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size;
5278c: 202b 004c movel %a3@(76),%d0 52790: 222b 0050 movel %a3@(80),%d1 52794: 242a 000c movel %a2@(12),%d2 52798: 262a 0010 movel %a2@(16),%d3 5279c: 2540 0004 movel %d0,%a2@(4) 527a0: 2541 0008 movel %d1,%a2@(8)
} return iop->offset; }
527a4: 2203 movel %d3,%d1 527a6: 2002 movel %d2,%d0 527a8: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 527ae: 4e5e unlk %fp 527b0: 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)
527b2: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 527b6: 222a 0010 movel %a2@(16),%d1 <== NOT EXECUTED 527ba: 242b 004c movel %a3@(76),%d2 <== NOT EXECUTED 527be: 262b 0050 movel %a3@(80),%d3 <== NOT EXECUTED 527c2: 2800 movel %d0,%d4 <== NOT EXECUTED 527c4: 2a01 movel %d1,%d5 <== NOT EXECUTED 527c6: 9a83 subl %d3,%d5 <== NOT EXECUTED 527c8: 9982 subxl %d2,%d4 <== NOT EXECUTED 527ca: 6e12 bgts 527de <memfile_lseek+0x82> <== NOT EXECUTED 527cc: 2400 movel %d0,%d2 <== NOT EXECUTED 527ce: 2601 movel %d1,%d3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; }
527d0: 2203 movel %d3,%d1 <== NOT EXECUTED 527d2: 2002 movel %d2,%d0 <== NOT EXECUTED 527d4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 527da: 4e5e unlk %fp <== NOT EXECUTED 527dc: 4e75 rts <== NOT EXECUTED 527de: 2203 movel %d3,%d1 <== NOT EXECUTED 527e0: 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;
527e2: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 527e6: 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; }
527ea: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 527f0: 4e5e unlk %fp <== NOT EXECUTED 527f2: 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 );
527f4: 4eb9 0005 43c0 jsr 543c0 <__errno> <== NOT EXECUTED 527fa: 761c moveq #28,%d3 <== NOT EXECUTED 527fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 527fe: 2083 movel %d3,%a0@ <== NOT EXECUTED 52800: 74ff moveq #-1,%d2 <== NOT EXECUTED 52802: 76ff moveq #-1,%d3 <== NOT EXECUTED
iop->size = the_jnode->info.file.size; } return iop->offset; }
52804: 2203 movel %d3,%d1 <== NOT EXECUTED 52806: 2002 movel %d2,%d0 <== NOT EXECUTED 52808: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 5280e: 4e5e unlk %fp <== NOT EXECUTED
52810: 4e75 rts
00052adc <memfile_open>: rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
52adc: 4e56 fff0 linkw %fp,#-16 52ae0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 52ae4: 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))
52ae8: 202a 0014 movel %a2@(20),%d0 52aec: 2200 movel %d0,%d1 52aee: 0281 0000 0204 andil #516,%d1
uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
52af4: 266a 0038 moveal %a2@(56),%a3
/* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
52af8: 6708 beqs 52b02 <memfile_open+0x26>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
52afa: 7206 moveq #6,%d1 52afc: b2ab 0048 cmpl %a3@(72),%d1 52b00: 6732 beqs 52b34 <memfile_open+0x58>
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)
52b02: 222b 004c movel %a3@(76),%d1 52b06: 242b 0050 movel %a3@(80),%d2
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND)
52b0a: 0800 0009 btst #9,%d0 52b0e: 6710 beqs 52b20 <memfile_open+0x44>
iop->offset = the_jnode->info.file.size;
52b10: 2541 000c movel %d1,%a2@(12) 52b14: 2542 0010 movel %d2,%a2@(16) 52b18: 222b 004c movel %a3@(76),%d1 52b1c: 242b 0050 movel %a3@(80),%d2
iop->size = the_jnode->info.file.size;
52b20: 4280 clrl %d0 52b22: 2541 0004 movel %d1,%a2@(4) 52b26: 2542 0008 movel %d2,%a2@(8)
return 0; }
52b2a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 52b30: 4e5e unlk %fp 52b32: 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;
52b34: 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;
52b38: 4282 clrl %d2 <== NOT EXECUTED 52b3a: 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;
52b3c: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0;
52b40: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 52b44: 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;
52b48: 7605 moveq #5,%d3 <== NOT EXECUTED
the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0;
52b4a: 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;
52b4e: 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;
52b52: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
52b56: 42ab 005c clrl %a3@(92) <== NOT EXECUTED
if ((count != 0)
52b5a: 4a80 tstl %d0 <== NOT EXECUTED 52b5c: 6610 bnes 52b6e <memfile_open+0x92> <== NOT EXECUTED 52b5e: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 52b62: 4281 clrl %d1 <== NOT EXECUTED 52b64: 4282 clrl %d2 <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND)
52b66: 0800 0009 btst #9,%d0 <== NOT EXECUTED 52b6a: 67b4 beqs 52b20 <memfile_open+0x44> <== NOT EXECUTED 52b6c: 60a2 bras 52b10 <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))
52b6e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52b70: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52b72: 42a7 clrl %sp@- <== NOT EXECUTED 52b74: 42a7 clrl %sp@- <== NOT EXECUTED 52b76: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52b78: 4eb9 0005 2812 jsr 52812 <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)
52b7e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 52b82: 72ff moveq #-1,%d1 <== NOT EXECUTED 52b84: b280 cmpl %d0,%d1 <== NOT EXECUTED 52b86: 6710 beqs 52b98 <memfile_open+0xbc> <== NOT EXECUTED 52b88: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 52b8c: 222b 004c movel %a3@(76),%d1 <== NOT EXECUTED 52b90: 242b 0050 movel %a3@(80),%d2 <== NOT EXECUTED 52b94: 6000 ff74 braw 52b0a <memfile_open+0x2e> <== NOT EXECUTED 52b98: 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; }
52b9a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 52ba0: 4e5e unlk %fp <== NOT EXECUTED
52ba2: 4e75 rts
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> 429d8: 4a01 tstb %d1 429da: 6600 0096 bnew 42a72 <mknod+0xca> 429de: 2079 0005 d7b4 moveal 5d7b4 <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> 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 d7b4 moveal 5d7b4 <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 eb8c jsr 4eb8c <__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 eb8c jsr 4eb8c <__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 eb8c jsr 4eb8c <__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 ff58 jsr 4ff58 <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 ac20 jsr 4ac20 <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 fb0c jsr 4fb0c <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 ff58 jsr 4ff58 <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 eddc moveal 5eddc <rtems_filesystem_mount_table_control>,%a0 42bfc: b1fc 0005 ede0 cmpal #388576,%a0 42c02: 6758 beqs 42c5c <mount+0x136>
!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>
* 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 ede0 cmpal #388576,%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 eb8c jsr 4eb8c <__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 a688 jsr 4a688 <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>
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>
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 eddc pea 5eddc <rtems_filesystem_mount_table_control> 42ca2: 4eb9 0004 6798 jsr 46798 <_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>
*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 a688 jsr 4a688 <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 eb8c jsr 4eb8c <__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 eb8c jsr 4eb8c <__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 a688 jsr 4a688 <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 eb8c jsr 4eb8c <__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 a688 jsr 4a688 <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 eb8c jsr 4eb8c <__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 a688 jsr 4a688 <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 eb8c jsr 4eb8c <__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
42da2: 4e75 rts
00045c8c <mprotect>: const void *addr __attribute__((unused)), size_t len __attribute__((unused)), int prot __attribute__((unused)) ) { return 0; }
45c8c: 4280 clrl %d0
int mprotect( const void *addr __attribute__((unused)), size_t len __attribute__((unused)), int prot __attribute__((unused)) ) {
45c8e: 4e56 0000 linkw %fp,#0
return 0; }
45c92: 4e5e unlk %fp 45c94: 4e75 rts
... 0004b760 <mq_getattr>: int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) {
4b760: 4e56 fffc linkw %fp,#-4 4b764: 2f0a movel %a2,%sp@- 4b766: 246e 000c moveal %fp@(12),%a2
POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat )
4b76a: 4a8a tstl %a2 4b76c: 6762 beqs 4b7d0 <mq_getattr+0x70>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get(
4b76e: 486e fffc pea %fp@(-4) 4b772: 2f2e 0008 movel %fp@(8),%sp@- 4b776: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4b77c: 4eb9 0004 eed8 jsr 4eed8 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) {
4b782: 4fef 000c lea %sp@(12),%sp 4b786: 4aae fffc tstl %fp@(-4) 4b78a: 662e bnes 4b7ba <mq_getattr+0x5a>
* Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag;
4b78c: 2040 moveal %d0,%a0
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue;
4b78e: 2240 moveal %d0,%a1
* Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag;
4b790: 24a8 0014 movel %a0@(20),%a2@
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue;
4b794: 2069 0010 moveal %a1@(16),%a0
*/ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
4b798: 2568 0066 0008 movel %a0@(102),%a2@(8)
mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
4b79e: 2568 005e 0004 movel %a0@(94),%a2@(4)
mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
4b7a4: 2568 0062 000c movel %a0@(98),%a2@(12)
_Thread_Enable_dispatch();
4b7aa: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4b7b0: 246e fff8 moveal %fp@(-8),%a2
mqstat->mq_flags = the_mq_fd->oflag; mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; _Thread_Enable_dispatch();
4b7b4: 4280 clrl %d0
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4b7b6: 4e5e unlk %fp 4b7b8: 4e75 rts
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF );
4b7ba: 4eb9 0005 6684 jsr 56684 <__errno>
}
4b7c0: 246e fff8 moveal %fp@(-8),%a2
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF );
4b7c4: 2040 moveal %d0,%a0 4b7c6: 7209 moveq #9,%d1 4b7c8: 70ff moveq #-1,%d0
}
4b7ca: 4e5e unlk %fp
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF );
4b7cc: 2081 movel %d1,%a0@
}
4b7ce: 4e75 rts
POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL );
4b7d0: 4eb9 0005 6684 jsr 56684 <__errno>
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4b7d6: 246e fff8 moveal %fp@(-8),%a2
POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL );
4b7da: 2040 moveal %d0,%a0 4b7dc: 7216 moveq #22,%d1 4b7de: 70ff moveq #-1,%d0
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4b7e0: 4e5e unlk %fp
POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL );
4b7e2: 2081 movel %d1,%a0@
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4b7e4: 4e75 rts
... 0004b8dc <mq_open>: int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) {
4b8dc: 4e56 ffd8 linkw %fp,#-40
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
4b8e0: 2039 0006 8ae0 movel 68ae0 <_Thread_Dispatch_disable_level>,%d0 4b8e6: 5280 addql #1,%d0 4b8e8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4b8ec: 23c0 0006 8ae0 movel %d0,68ae0 <_Thread_Dispatch_disable_level> 4b8f2: 2a2e 0008 movel %fp@(8),%d5 4b8f6: 242e 000c movel %fp@(12),%d2
POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) {
4b8fa: 2802 movel %d2,%d4 4b8fc: 0284 0000 0200 andil #512,%d4 4b902: 6600 00c4 bnew 4b9c8 <mq_open+0xec>
*/ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *)
4b906: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4b90c: 4286 clrl %d6 4b90e: 4eb9 0004 ea3c jsr 4ea3c <_Objects_Allocate>
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) {
4b914: 588f addql #4,%sp 4b916: 2440 moveal %d0,%a2 4b918: 4a80 tstl %d0 4b91a: 6700 00c6 beqw 4b9e2 <mq_open+0x106>
_Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag;
4b91e: 2542 0014 movel %d2,%a2@(20)
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
4b922: 486e fffc pea %fp@(-4) 4b926: 2f05 movel %d5,%sp@- 4b928: 4eb9 0005 2a6c jsr 52a6c <_POSIX_Message_queue_Name_to_id>
* If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) {
4b92e: 508f addql #8,%sp
_Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
4b930: 2600 movel %d0,%d3
* If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) {
4b932: 6662 bnes 4b996 <mq_open+0xba>
} else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
4b934: 0282 0000 0a00 andil #2560,%d2 4b93a: 0c82 0000 0a00 cmpil #2560,%d2 4b940: 6700 010c beqw 4ba4e <mq_open+0x172>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *)
4b944: 486e fff4 pea %fp@(-12)
_Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch();
4b948: 47f9 0004 f7b8 lea 4f7b8 <_Thread_Enable_dispatch>,%a3 4b94e: 2f2e fffc movel %fp@(-4),%sp@- 4b952: 4879 0006 8dae pea 68dae <_POSIX_Message_queue_Information> 4b958: 4eb9 0004 eed8 jsr 4eed8 <_Objects_Get>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
4b95e: 4281 clrl %d1
/* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1;
4b960: 2040 moveal %d0,%a0 4b962: 52a8 0016 addql #1,%a0@(22) 4b966: 2079 0006 8f34 moveal 68f34 <_POSIX_Message_queue_Information_fds+0x18>,%a0 4b96c: 322a 000a movew %a2@(10),%d1
/* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
4b970: 2d40 fff8 movel %d0,%fp@(-8) 4b974: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4)
the_mq->open_count += 1; the_mq_fd->Queue = the_mq;
4b978: 2540 0010 movel %d0,%a2@(16)
the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name;
4b97c: 42aa 000c clrl %a2@(12)
_Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch();
4b980: 4e93 jsr %a3@
_Thread_Enable_dispatch();
4b982: 4e93 jsr %a3@
return (mqd_t)the_mq_fd->Object.id;
4b984: 202a 0008 movel %a2@(8),%d0 4b988: 4fef 000c lea %sp@(12),%sp
); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; }
4b98c: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b992: 4e5e unlk %fp 4b994: 4e75 rts
if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
4b996: 7002 moveq #2,%d0 4b998: b083 cmpl %d3,%d0 4b99a: 6764 beqs 4ba00 <mq_open+0x124>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
4b99c: 2f0a movel %a2,%sp@- 4b99e: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4b9a4: 4eb9 0004 ed74 jsr 4ed74 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch();
4b9aa: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
4b9b0: 4eb9 0005 6684 jsr 56684 <__errno> 4b9b6: 508f addql #8,%sp 4b9b8: 2040 moveal %d0,%a0 4b9ba: 70ff moveq #-1,%d0 4b9bc: 2083 movel %d3,%a0@
); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; }
4b9be: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b9c4: 4e5e unlk %fp 4b9c6: 4e75 rts
_Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
4b9c8: 2c2e 0014 movel %fp@(20),%d6
*/ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *)
4b9cc: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4b9d2: 4eb9 0004 ea3c jsr 4ea3c <_Objects_Allocate>
va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) {
4b9d8: 588f addql #4,%sp 4b9da: 2440 moveal %d0,%a2 4b9dc: 4a80 tstl %d0 4b9de: 6600 ff3e bnew 4b91e <mq_open+0x42>
_Thread_Enable_dispatch();
4b9e2: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
4b9e8: 7417 moveq #23,%d2 4b9ea: 4eb9 0005 6684 jsr 56684 <__errno> 4b9f0: 2040 moveal %d0,%a0 4b9f2: 70ff moveq #-1,%d0 4b9f4: 2082 movel %d2,%a0@
); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; }
4b9f6: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b9fc: 4e5e unlk %fp 4b9fe: 4e75 rts
if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
4ba00: 4a84 tstl %d4 4ba02: 6798 beqs 4b99c <mq_open+0xc0>
/* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support(
4ba04: 486e fff8 pea %fp@(-8) 4ba08: 2f06 movel %d6,%sp@- 4ba0a: 4878 0001 pea 1 <ADD> 4ba0e: 2f05 movel %d5,%sp@- 4ba10: 4eb9 0005 28ec jsr 528ec <_POSIX_Message_queue_Create_support>
); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) {
4ba16: 4fef 0010 lea %sp@(16),%sp 4ba1a: 72ff moveq #-1,%d1 4ba1c: b280 cmpl %d0,%d1 4ba1e: 675c beqs 4ba7c <mq_open+0x1a0>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
4ba20: 4280 clrl %d0 4ba22: 2079 0006 8f34 moveal 68f34 <_POSIX_Message_queue_Information_fds+0x18>,%a0 4ba28: 302a 000a movew %a2@(10),%d0
_POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq;
4ba2c: 256e fff8 0010 movel %fp@(-8),%a2@(16) 4ba32: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4)
the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name;
4ba36: 42aa 000c clrl %a2@(12)
&_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch();
4ba3a: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
4ba40: 202a 0008 movel %a2@(8),%d0
}
4ba44: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4ba4a: 4e5e unlk %fp 4ba4c: 4e75 rts
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
4ba4e: 2f0a movel %a2,%sp@- 4ba50: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4ba56: 4eb9 0004 ed74 jsr 4ed74 <_Objects_Free>
/* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch();
4ba5c: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
4ba62: 4eb9 0005 6684 jsr 56684 <__errno> 4ba68: 508f addql #8,%sp 4ba6a: 7211 moveq #17,%d1 4ba6c: 2040 moveal %d0,%a0 4ba6e: 70ff moveq #-1,%d0
); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; }
4ba70: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3
* Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
4ba76: 2081 movel %d1,%a0@
); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; }
4ba78: 4e5e unlk %fp 4ba7a: 4e75 rts 4ba7c: 2f0a movel %a2,%sp@- 4ba7e: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4ba84: 4eb9 0004 ed74 jsr 4ed74 <_Objects_Free>
/* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch();
4ba8a: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch>
return (mqd_t) -1;
4ba90: 508f addql #8,%sp
/* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch();
4ba92: 70ff moveq #-1,%d0
); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; }
4ba94: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4ba9a: 4e5e unlk %fp 4ba9c: 4e75 rts
... 0004bdac <mq_setattr>: int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) {
4bdac: 4e56 fffc linkw %fp,#-4 4bdb0: 2f0b movel %a3,%sp@- 4bdb2: 266e 000c moveal %fp@(12),%a3 4bdb6: 2f0a movel %a2,%sp@- 4bdb8: 246e 0010 moveal %fp@(16),%a2
POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat )
4bdbc: 4a8b tstl %a3 4bdbe: 6770 beqs 4be30 <mq_setattr+0x84> 4bdc0: 486e fffc pea %fp@(-4) 4bdc4: 2f2e 0008 movel %fp@(8),%sp@- 4bdc8: 4879 0006 8f1c pea 68f1c <_POSIX_Message_queue_Information_fds> 4bdce: 4eb9 0004 eed8 jsr 4eed8 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) {
4bdd4: 4fef 000c lea %sp@(12),%sp 4bdd8: 2040 moveal %d0,%a0 4bdda: 4aae fffc tstl %fp@(-4) 4bdde: 6636 bnes 4be16 <mq_setattr+0x6a>
case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue;
4bde0: 2268 0010 moveal %a0@(16),%a1
/* * Return the old values. */ if ( omqstat ) {
4bde4: 4a8a tstl %a2 4bde6: 6716 beqs 4bdfe <mq_setattr+0x52>
omqstat->mq_flags = the_mq_fd->oflag;
4bde8: 24a8 0014 movel %a0@(20),%a2@
omqstat->mq_msgsize = the_core_mq->maximum_message_size;
4bdec: 2569 0066 0008 movel %a1@(102),%a2@(8)
omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages;
4bdf2: 2569 005e 0004 movel %a1@(94),%a2@(4)
omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages;
4bdf8: 2569 0062 000c movel %a1@(98),%a2@(12)
} the_mq_fd->oflag = mqstat->mq_flags;
4bdfe: 2153 0014 movel %a3@,%a0@(20)
_Thread_Enable_dispatch();
4be02: 4eb9 0004 f7b8 jsr 4f7b8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4be08: 246e fff4 moveal %fp@(-12),%a2
omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; } the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch();
4be0c: 4280 clrl %d0
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4be0e: 266e fff8 moveal %fp@(-8),%a3 4be12: 4e5e unlk %fp 4be14: 4e75 rts
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF );
4be16: 4eb9 0005 6684 jsr 56684 <__errno>
}
4be1c: 246e fff4 moveal %fp@(-12),%a2
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF );
4be20: 2040 moveal %d0,%a0 4be22: 7209 moveq #9,%d1 4be24: 70ff moveq #-1,%d0
}
4be26: 266e fff8 moveal %fp@(-8),%a3 4be2a: 4e5e unlk %fp
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF );
4be2c: 2081 movel %d1,%a0@
}
4be2e: 4e75 rts
POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL );
4be30: 4eb9 0005 6684 jsr 56684 <__errno>
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4be36: 246e fff4 moveal %fp@(-12),%a2
POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL );
4be3a: 2040 moveal %d0,%a0 4be3c: 7216 moveq #22,%d1 4be3e: 70ff moveq #-1,%d0
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4be40: 266e fff8 moveal %fp@(-8),%a3 4be44: 4e5e unlk %fp
POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL );
4be46: 2081 movel %d1,%a0@
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); }
4be48: 4e75 rts
... 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 ef20 jsr 4ef20 <fileno> 42eaa: 588f addql #4,%sp 42eac: 7202 moveq #2,%d1 42eae: b280 cmpl %d0,%d1 42eb0: 6414 bccs 42ec6 <newlib_free_buffers+0x2e>
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 ecca jsr 4ecca <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>
free( fp->_bf._base );
42ed0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42ed4: 4eb9 0004 a688 jsr 4a688 <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
42ef6: 4e75 rts
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 0006 005c tstb 6005c <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 0006 005c moveb %d0,6005c <initialized>
status = rtems_io_register_name(
43362: 2f02 movel %d2,%sp@- 43364: 4879 0005 dbc4 pea 5dbc4 <IntUartPollCallbacks.6601+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>
rtems_fatal_error_occurred(status); NULL_major = major;
43378: 23c2 0006 087c movel %d2,6087c <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 76e4 jsr 476e4 <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>
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 43330: 4e75 rts
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 a942 jsr 4a942 <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 ff58 lea 4ff58 <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 a902 jsr 4a902 <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 eda4 subl 5eda4 <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 eb8c movel #322444,%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 eb8c movel #322444,%d3
done: va_end(ap); if ( rc ) { if ( iop )
43244: 4a8a tstl %a2 43246: 670a beqs 43252 <open+0x12e>
rtems_libio_free( iop );
43248: 2f0a movel %a2,%sp@- 4324a: 4eb9 0004 aa78 jsr 4aa78 <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> 4325e: 2068 001c moveal %a0@(28),%a0 43262: 4a88 tstl %a0 43264: 67c2 beqs 43228 <open+0x104> 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 eb8c movel #322444,%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>
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 eda4 subl 5eda4 <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 eda4 subl 5eda4 <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 a718 jsr 4a718 <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 eb8c movel #322444,%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 eda4 subl 5eda4 <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 a5e8 jsr 4a5e8 <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 eb8c movel #322444,%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 eb8c movel #322444,%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 eda4 subl 5eda4 <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 a5e8 jsr 4a5e8 <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>
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 c0ec pea 5c0ec <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 c0ec pea 5c0ec <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>
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 c0ec pea 5c0ec <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>
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 6458 jsr 46458 <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 6458 jsr 46458 <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>
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> 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 d87c moveal 5d87c <__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>
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>
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>
rtems_termios_puts ("\r", 1, tty);
43cae: 2f0a movel %a2,%sp@- 43cb0: 4878 0001 pea 1 <ADD> 43cb4: 4879 0005 c600 pea 5c600 <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>
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 d87c moveal 5d87c <__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 c602 pea 5c602 <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 43dca: 4e75 rts
000450b4 <pathconf>: long pathconf( const char *path, int name ) {
450b4: 4e56 0000 linkw %fp,#0 450b8: 2f03 movel %d3,%sp@- 450ba: 2f02 movel %d2,%sp@-
int status; int fd; fd = open( path, O_RDONLY );
450bc: 42a7 clrl %sp@- 450be: 2f2e 0008 movel %fp@(8),%sp@- 450c2: 4eb9 0004 4e2c jsr 44e2c <open>
if ( fd == -1 )
450c8: 508f addql #8,%sp
) { int status; int fd; fd = open( path, O_RDONLY );
450ca: 2400 movel %d0,%d2
if ( fd == -1 )
450cc: 70ff moveq #-1,%d0 450ce: b082 cmpl %d2,%d0 450d0: 6728 beqs 450fa <pathconf+0x46>
return -1; status = fpathconf( fd, name );
450d2: 2f2e 000c movel %fp@(12),%sp@- 450d6: 2f02 movel %d2,%sp@- 450d8: 4eb9 0004 3bb0 jsr 43bb0 <fpathconf> 450de: 2600 movel %d0,%d3
(void) close( fd );
450e0: 2f02 movel %d2,%sp@- 450e2: 4eb9 0004 32e0 jsr 432e0 <close>
return status; }
450e8: 242e fff8 movel %fp@(-8),%d2 450ec: 2003 movel %d3,%d0
status = fpathconf( fd, name ); (void) close( fd ); return status;
450ee: 4fef 000c lea %sp@(12),%sp
}
450f2: 262e fffc movel %fp@(-4),%d3 450f6: 4e5e unlk %fp 450f8: 4e75 rts
{ int status; int fd; fd = open( path, O_RDONLY ); if ( fd == -1 )
450fa: 76ff moveq #-1,%d3
status = fpathconf( fd, name ); (void) close( fd ); return status; }
450fc: 2003 movel %d3,%d0 450fe: 242e fff8 movel %fp@(-8),%d2 45102: 262e fffc movel %fp@(-4),%d3 45106: 4e5e unlk %fp 45108: 4e75 rts
... 00047dd4 <pause>: /* * 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81 */ int pause( void ) {
47dd4: 4e56 fffc linkw %fp,#-4 47dd8: 2f02 movel %d2,%sp@-
sigset_t all_signals; int status; (void) sigfillset( &all_signals );
47dda: 240e movel %fp,%d2 47ddc: 5982 subql #4,%d2 47dde: 2f02 movel %d2,%sp@- 47de0: 4eb9 0004 8aa8 jsr 48aa8 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
47de6: 42a7 clrl %sp@- 47de8: 42a7 clrl %sp@- 47dea: 2f02 movel %d2,%sp@- 47dec: 4eb9 0004 8c30 jsr 48c30 <sigtimedwait>
return status; }
47df2: 242e fff8 movel %fp@(-8),%d2 47df6: 4e5e unlk %fp 47df8: 4e75 rts
... 0004e110 <pipe_create>: * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) {
4e110: 4e56 ffcc linkw %fp,#-52 4e114: 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)
4e118: 4878 0001 pea 1 <ADD> 4e11c: 45ee ffdc lea %fp@(-36),%a2
* Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) {
4e120: 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)
4e124: 2f0a movel %a2,%sp@- 4e126: 4878 0007 pea 7 <TRUNCDFSF> 4e12a: 4878 0003 pea 3 <DIVIDE> 4e12e: 4879 0005 cca2 pea 5cca2 <__FUNCTION__.5851+0x11> 4e134: 4eb9 0004 2720 jsr 42720 <rtems_filesystem_evaluate_path> 4e13a: 4fef 0014 lea %sp@(20),%sp 4e13e: 4a80 tstl %d0 4e140: 6600 00e0 bnew 4e222 <pipe_create+0x112>
return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc);
4e144: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4e148: 47f9 0004 eb8c lea 4eb8c <__errno>,%a3 <== NOT EXECUTED 4e14e: 4a88 tstl %a0 <== NOT EXECUTED 4e150: 670e beqs 4e160 <pipe_create+0x50> <== NOT EXECUTED 4e152: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4e156: 4a88 tstl %a0 <== NOT EXECUTED 4e158: 6706 beqs 4e160 <pipe_create+0x50> <== NOT EXECUTED 4e15a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e15c: 4e90 jsr %a0@ <== NOT EXECUTED 4e15e: 588f addql #4,%sp <== NOT EXECUTED
/* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
4e160: 45ee fff1 lea %fp@(-15),%a2 <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4e164: 3039 0005 e6b8 movew 5e6b8 <rtems_pipe_no>,%d0 <== NOT EXECUTED
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
4e16a: 24bc 2f74 6d70 movel #796159344,%a2@ <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4e170: 2200 movel %d0,%d1 <== NOT EXECUTED 4e172: 5281 addql #1,%d1 <== NOT EXECUTED 4e174: 3f00 movew %d0,%sp@- <== NOT EXECUTED
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
4e176: 203c 2f2e 6669 movel #791570025,%d0 <== NOT EXECUTED 4e17c: 2d40 fff5 movel %d0,%fp@(-11) <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4e180: 4267 clrw %sp@- <== NOT EXECUTED 4e182: 33c1 0005 e6b8 movew %d1,5e6b8 <rtems_pipe_no> <== NOT EXECUTED
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
4e188: 323c 666f movew #26223,%d1 <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4e18c: 4879 0005 cca7 pea 5cca7 <__FUNCTION__.5851+0x16> <== NOT EXECUTED 4e192: 486e fffb pea %fp@(-5) <== NOT EXECUTED
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
4e196: 3d41 fff9 movew %d1,%fp@(-7) <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4e19a: 4eb9 0004 f884 jsr 4f884 <sprintf> <== NOT EXECUTED
/* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4e1a0: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b> <== NOT EXECUTED 4e1a4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e1a6: 4eb9 0004 e340 jsr 4e340 <mkfifo> <== NOT EXECUTED 4e1ac: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4e1b0: 4a80 tstl %d0 <== NOT EXECUTED 4e1b2: 6660 bnes 4e214 <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);
4e1b4: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4e1b8: 4bf9 0004 3124 lea 43124 <open>,%a5 4e1be: 2f0a movel %a2,%sp@- 4e1c0: 4e95 jsr %a5@
if (filsdes[0] < 0) {
4e1c2: 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);
4e1c4: 2880 movel %d0,%a4@
if (filsdes[0] < 0) {
4e1c6: 6d00 00e0 bltw 4e2a8 <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]);
4e1ca: b0b9 0005 d6a4 cmpl 5d6a4 <rtems_libio_number_iops>,%d0 <== NOT EXECUTED 4e1d0: 6400 00d0 bccw 4e2a2 <pipe_create+0x192> <== NOT EXECUTED 4e1d4: 2079 0005 eda4 moveal 5eda4 <rtems_libio_iops>,%a0 <== NOT EXECUTED 4e1da: ed88 lsll #6,%d0 <== NOT EXECUTED 4e1dc: d1c0 addal %d0,%a0 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4e1de: 70fe moveq #-2,%d0 <== NOT EXECUTED 4e1e0: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
4e1e4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4e1e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e1ea: 4e95 jsr %a5@ <== NOT EXECUTED
if (filsdes[1] < 0) {
4e1ec: 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);
4e1ee: 2940 0004 movel %d0,%a4@(4) <== NOT EXECUTED
if (filsdes[1] < 0) {
4e1f2: 6d00 00ce bltw 4e2c2 <pipe_create+0x1b2> <== NOT EXECUTED
err = errno; close(filsdes[0]); } unlink(fifopath);
4e1f6: 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) {
4e1f8: 9bcd subal %a5,%a5 <== NOT EXECUTED
err = errno; close(filsdes[0]); } unlink(fifopath);
4e1fa: 4eb9 0004 e360 jsr 4e360 <unlink> <== NOT EXECUTED 4e200: 588f addql #4,%sp <== NOT EXECUTED
} rtems_set_errno_and_return_minus_one(err);
4e202: 4e93 jsr %a3@ <== NOT EXECUTED 4e204: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e206: 208d movel %a5,%a0@ <== NOT EXECUTED
}
4e208: 70ff moveq #-1,%d0 4e20a: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 4e210: 4e5e unlk %fp 4e212: 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){
4e214: 4e93 jsr %a3@ <== NOT EXECUTED
} unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); }
4e216: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 <== NOT EXECUTED 4e21c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e21e: 4e5e unlk %fp <== NOT EXECUTED 4e220: 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)
4e222: 47f9 0004 eb8c lea 4eb8c <__errno>,%a3 4e228: 4e93 jsr %a3@ 4e22a: 7202 moveq #2,%d1 4e22c: 2040 moveal %d0,%a0 4e22e: b290 cmpl %a0@,%d1 4e230: 66d6 bnes 4e208 <pipe_create+0xf8>
return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
4e232: 4878 03ff pea 3ff <D_BIAS+0x1> 4e236: 4879 0005 cca2 pea 5cca2 <__FUNCTION__.5851+0x11> 4e23c: 4eb9 0004 2988 jsr 42988 <mkdir> 4e242: 508f addql #8,%sp 4e244: 4a80 tstl %d0 4e246: 66c0 bnes 4e208 <pipe_create+0xf8>
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
4e248: 45ee fff1 lea %fp@(-15),%a2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4e24c: 3039 0005 e6b8 movew 5e6b8 <rtems_pipe_no>,%d0
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
4e252: 24bc 2f74 6d70 movel #796159344,%a2@
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4e258: 2200 movel %d0,%d1 4e25a: 5281 addql #1,%d1 4e25c: 3f00 movew %d0,%sp@-
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
4e25e: 203c 2f2e 6669 movel #791570025,%d0 4e264: 2d40 fff5 movel %d0,%fp@(-11)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4e268: 4267 clrw %sp@- 4e26a: 33c1 0005 e6b8 movew %d1,5e6b8 <rtems_pipe_no>
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
4e270: 323c 666f movew #26223,%d1
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4e274: 4879 0005 cca7 pea 5cca7 <__FUNCTION__.5851+0x16> 4e27a: 486e fffb pea %fp@(-5)
else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
4e27e: 3d41 fff9 movew %d1,%fp@(-7)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4e282: 4eb9 0004 f884 jsr 4f884 <sprintf>
/* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4e288: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b> 4e28c: 2f0a movel %a2,%sp@- 4e28e: 4eb9 0004 e340 jsr 4e340 <mkfifo> 4e294: 4fef 0014 lea %sp@(20),%sp 4e298: 4a80 tstl %d0 4e29a: 6700 ff18 beqw 4e1b4 <pipe_create+0xa4>
4e29e: 6000 ff74 braw 4e214 <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]);
4e2a2: 91c8 subal %a0,%a0 <== NOT EXECUTED 4e2a4: 6000 ff38 braw 4e1de <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;
4e2a8: 4e93 jsr %a3@ 4e2aa: 2040 moveal %d0,%a0 4e2ac: 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);
4e2ae: 2f0a movel %a2,%sp@- 4e2b0: 4eb9 0004 e360 jsr 4e360 <unlink> 4e2b6: 588f addql #4,%sp
close(filsdes[0]); } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err);
4e2b8: 4e93 jsr %a3@ 4e2ba: 2040 moveal %d0,%a0 4e2bc: 208d movel %a5,%a0@ 4e2be: 6000 ff48 braw 4e208 <pipe_create+0xf8>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno;
4e2c2: 4e93 jsr %a3@ <== NOT EXECUTED 4e2c4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e2c6: 2a50 moveal %a0@,%a5 <== NOT EXECUTED
close(filsdes[0]);
4e2c8: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4e2ca: 4eb9 0004 a5e8 jsr 4a5e8 <close> <== NOT EXECUTED 4e2d0: 588f addql #4,%sp <== NOT EXECUTED
} unlink(fifopath);
4e2d2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e2d4: 4eb9 0004 e360 jsr 4e360 <unlink> <== NOT EXECUTED 4e2da: 588f addql #4,%sp <== NOT EXECUTED 4e2dc: 6000 ff24 braw 4e202 <pipe_create+0xf2> <== NOT EXECUTED
0004c6f6 <pipe_ioctl>: pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) {
4c6f6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (cmd == FIONREAD) {
4c6fa: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED 4c700: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 4c704: 6706 beqs 4c70c <pipe_ioctl+0x16> <== NOT EXECUTED 4c706: 70ea moveq #-22,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe); return 0; } return -EINVAL; }
4c708: 4e5e unlk %fp <== NOT EXECUTED 4c70a: 4e75 rts <== NOT EXECUTED
void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL)
4c70c: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4c710: 6606 bnes 4c718 <pipe_ioctl+0x22> <== NOT EXECUTED 4c712: 70f2 moveq #-14,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe); return 0; } return -EINVAL; }
4c714: 4e5e unlk %fp <== NOT EXECUTED 4c716: 4e75 rts <== NOT EXECUTED
{ if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe))
4c718: 42a7 clrl %sp@- <== NOT EXECUTED 4c71a: 42a7 clrl %sp@- <== NOT EXECUTED 4c71c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4c720: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c724: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain> <== NOT EXECUTED 4c72a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c72e: 4a80 tstl %d0 <== NOT EXECUTED 4c730: 6706 beqs 4c738 <pipe_ioctl+0x42> <== NOT EXECUTED 4c732: 70fc moveq #-4,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe); return 0; } return -EINVAL; }
4c734: 4e5e unlk %fp <== NOT EXECUTED 4c736: 4e75 rts <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe);
4c738: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 4c73c: 2f29 0028 movel %a1@(40),%sp@- <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length;
4c740: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4c744: 20a9 000c movel %a1@(12),%a0@ <== NOT EXECUTED
PIPE_UNLOCK(pipe);
4c748: 4eb9 0004 5e68 jsr 45e68 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
4c74e: 588f addql #4,%sp <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe);
4c750: 4280 clrl %d0 <== NOT EXECUTED
return 0; } return -EINVAL; }
4c752: 4e5e unlk %fp <== NOT EXECUTED
4c754: 4e75 rts
0004c698 <pipe_lseek>: rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; }
4c698: 70e3 moveq #-29,%d0 <== NOT EXECUTED
pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) {
4c69a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/* Seek on pipe is not supported */ return -ESPIPE; }
4c69e: 4e5e unlk %fp <== NOT EXECUTED
4c6a0: 4e75 rts
0004c756 <pipe_read>: pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
4c756: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 4c75a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
4c75e: 42a7 clrl %sp@- <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
4c760: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
4c764: 47f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%a3 <== NOT EXECUTED 4c76a: 42a7 clrl %sp@- <== NOT EXECUTED 4c76c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
4c770: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED 4c774: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
4c778: 4e93 jsr %a3@ <== NOT EXECUTED 4c77a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c77e: 4a80 tstl %d0 <== NOT EXECUTED 4c780: 6600 00ac bnew 4c82e <pipe_read+0xd8> <== NOT EXECUTED
return -EINTR; while (read < count) {
4c784: 4a84 tstl %d4 <== NOT EXECUTED 4c786: 6700 01ac beqw 4c934 <pipe_read+0x1de> <== NOT EXECUTED
/* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0)
4c78a: 4285 clrl %d5 <== NOT EXECUTED 4c78c: 4283 clrl %d3 <== NOT EXECUTED 4c78e: 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))
4c794: 243c 0004 da94 movel #318100,%d2 <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe);
4c79a: 2e3c 0004 da1c movel #317980,%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);
4c7a0: 2c3c 0004 f3ac movel #324524,%d6 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) {
4c7a6: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4c7aa: 6600 0090 bnew 4c83c <pipe_read+0xe6> <== NOT EXECUTED
/* Not an error */ if (pipe->Writers == 0)
4c7ae: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c7b2: 6700 010a beqw 4c8be <pipe_read+0x168> <== NOT EXECUTED
goto out_locked; if (LIBIO_NODELAY(iop)) {
4c7b6: 7001 moveq #1,%d0 <== NOT EXECUTED 4c7b8: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4c7bc: 6600 0110 bnew 4c8ce <pipe_read+0x178> <== NOT EXECUTED
goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe);
4c7c0: 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 ++;
4c7c4: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
4c7c8: 4e94 jsr %a4@ <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
4c7ca: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c7cc: 42a7 clrl %sp@- <== NOT EXECUTED 4c7ce: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c7d2: 4e90 jsr %a0@ <== NOT EXECUTED 4c7d4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c7d8: 4a80 tstl %d0 <== NOT EXECUTED 4c7da: 673c beqs 4c818 <pipe_read+0xc2> <== NOT EXECUTED 4c7dc: 70fc moveq #-4,%d0 <== NOT EXECUTED 4c7de: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
4c7e2: 42a7 clrl %sp@- <== NOT EXECUTED 4c7e4: 42a7 clrl %sp@- <== NOT EXECUTED 4c7e6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c7ea: 4e93 jsr %a3@ <== NOT EXECUTED 4c7ec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c7f0: 4a80 tstl %d0 <== NOT EXECUTED 4c7f2: 6600 00ec bnew 4c8e0 <pipe_read+0x18a> <== NOT EXECUTED
/* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --;
4c7f6: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED
if (ret != 0)
4c7fa: 4aae fff8 tstl %fp@(-8) <== NOT EXECUTED 4c7fe: 67a6 beqs 4c7a6 <pipe_read+0x50> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe);
4c800: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c804: 4e94 jsr %a4@ <== NOT EXECUTED 4c806: 588f addql #4,%sp <== NOT EXECUTED
out_nolock: if (read > 0)
4c808: 4a83 tstl %d3 <== NOT EXECUTED 4c80a: 6f12 bles 4c81e <pipe_read+0xc8> <== NOT EXECUTED
return read; return ret; }
4c80c: 2003 movel %d3,%d0 <== NOT EXECUTED 4c80e: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c814: 4e5e unlk %fp <== NOT EXECUTED 4c816: 4e75 rts <== NOT EXECUTED
} /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe))
4c818: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 4c81c: 60c4 bras 4c7e2 <pipe_read+0x8c> <== NOT EXECUTED
out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0)
4c81e: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED
return read; return ret; }
4c822: 2003 movel %d3,%d0 <== NOT EXECUTED 4c824: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c82a: 4e5e unlk %fp <== NOT EXECUTED 4c82c: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
4c82e: 76fc moveq #-4,%d3 <== NOT EXECUTED
out_nolock: if (read > 0) return read; return ret; }
4c830: 2003 movel %d3,%d0 <== NOT EXECUTED 4c832: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c838: 4e5e unlk %fp <== NOT EXECUTED 4c83a: 4e75 rts <== NOT EXECUTED
if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length);
4c83c: 2004 movel %d4,%d0 <== NOT EXECUTED 4c83e: 9085 subl %d5,%d0 <== NOT EXECUTED 4c840: b081 cmpl %d1,%d0 <== NOT EXECUTED 4c842: 6402 bccs 4c846 <pipe_read+0xf0> <== NOT EXECUTED 4c844: 2200 movel %d0,%d1 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
4c846: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED 4c84a: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 4c84e: 91c0 subal %d0,%a0 <== NOT EXECUTED
if (chunk > chunk1) {
4c850: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4c852: 6d00 009c bltw 4c8f0 <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);
4c856: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4c858: d092 addl %a2@,%d0 <== NOT EXECUTED 4c85a: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c85c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c85e: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c862: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c866: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c86a: 4e91 jsr %a1@ <== NOT EXECUTED 4c86c: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c870: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
pipe->Start += chunk;
4c874: 2041 moveal %d1,%a0 <== NOT EXECUTED 4c876: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED
pipe->Start %= pipe->Size;
4c87a: 2008 movel %a0,%d0 <== NOT EXECUTED
pipe->Length -= chunk;
4c87c: 226a 000c moveal %a2@(12),%a1 <== NOT EXECUTED 4c880: 93c1 subal %d1,%a1 <== NOT EXECUTED
} else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size;
4c882: 4c6a 0005 0004 remul %a2@(4),%d5,%d0 <== NOT EXECUTED
pipe->Length -= chunk;
4c888: 2549 000c movel %a1,%a2@(12) <== NOT EXECUTED
} else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size;
4c88c: 2545 0008 movel %d5,%a2@(8) <== NOT EXECUTED
pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe))
4c890: 4a89 tstl %a1 <== NOT EXECUTED 4c892: 6604 bnes 4c898 <pipe_read+0x142> <== NOT EXECUTED
pipe->Start = 0;
4c894: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED
if (pipe->waitingWriters > 0)
4c898: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4c89c: 6716 beqs 4c8b4 <pipe_read+0x15e> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
4c89e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c8a2: 2047 moveal %d7,%a0 <== NOT EXECUTED 4c8a4: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c8a8: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c8ac: 4e90 jsr %a0@ <== NOT EXECUTED 4c8ae: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c8b2: 508f addql #8,%sp <== NOT EXECUTED
read += chunk;
4c8b4: d681 addl %d1,%d3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) {
4c8b6: 2a03 movel %d3,%d5 <== NOT EXECUTED 4c8b8: b883 cmpl %d3,%d4 <== NOT EXECUTED 4c8ba: 6200 feea bhiw 4c7a6 <pipe_read+0x50> <== NOT EXECUTED 4c8be: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe);
4c8c2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c8c6: 4e94 jsr %a4@ <== NOT EXECUTED 4c8c8: 588f addql #4,%sp <== NOT EXECUTED 4c8ca: 6000 ff3c braw 4c808 <pipe_read+0xb2> <== NOT EXECUTED
while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) {
4c8ce: 70f5 moveq #-11,%d0 <== NOT EXECUTED 4c8d0: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe);
4c8d4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c8d8: 4e94 jsr %a4@ <== NOT EXECUTED 4c8da: 588f addql #4,%sp <== NOT EXECUTED 4c8dc: 6000 ff2a braw 4c808 <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)) {
4c8e0: 7afc moveq #-4,%d5 <== NOT EXECUTED 4c8e2: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED
out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0)
4c8e6: 4a83 tstl %d3 <== NOT EXECUTED 4c8e8: 6e00 ff22 bgtw 4c80c <pipe_read+0xb6> <== NOT EXECUTED 4c8ec: 6000 ff30 braw 4c81e <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);
4c8f0: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4c8f2: d092 addl %a2@,%d0 <== NOT EXECUTED 4c8f4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c8f6: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4c8fa: 4871 5800 pea %a1@(00000000,%d5:l) <== NOT EXECUTED 4c8fe: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c900: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c904: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED 4c908: 4e91 jsr %a1@ <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
4c90a: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c90e: 2001 movel %d1,%d0 <== NOT EXECUTED 4c910: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c912: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 4c916: 9088 subl %a0,%d0 <== NOT EXECUTED 4c918: da88 addl %a0,%d5 <== NOT EXECUTED 4c91a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c91c: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c91e: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c922: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c926: 4e91 jsr %a1@ <== NOT EXECUTED 4c928: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c92c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4c930: 6000 ff42 braw 4c874 <pipe_read+0x11e> <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) {
4c934: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe);
4c938: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c93c: 49f9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a4 <== NOT EXECUTED 4c942: 4e94 jsr %a4@ <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) {
4c944: 4283 clrl %d3 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe);
4c946: 588f addql #4,%sp <== NOT EXECUTED 4c948: 6000 febe braw 4c808 <pipe_read+0xb2> <== NOT EXECUTED
0004cb5c <pipe_release>: */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
4cb5c: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4cb60: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 4cb64: 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,
4cb68: 47f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%a3 <== NOT EXECUTED 4cb6e: 42a7 clrl %sp@- <== NOT EXECUTED
int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep;
4cb70: 2454 moveal %a4@,%a2 <== NOT EXECUTED
uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore,
4cb72: 42a7 clrl %sp@- <== NOT EXECUTED 4cb74: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cb78: 4e93 jsr %a3@ <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL)
4cb7a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cb7e: 4a80 tstl %d0 <== NOT EXECUTED 4cb80: 6600 00f2 bnew 4cc74 <pipe_release+0x118> <== NOT EXECUTED
rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop);
4cb84: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cb88: 7406 moveq #6,%d2 <== NOT EXECUTED 4cb8a: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
4cb8e: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4cb92: 6704 beqs 4cb98 <pipe_release+0x3c> <== NOT EXECUTED
pipe->Readers --;
4cb94: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
4cb98: 44c2 movew %d2,%ccr <== NOT EXECUTED 4cb9a: 675a beqs 4cbf6 <pipe_release+0x9a> <== NOT EXECUTED
pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
4cb9c: 42a7 clrl %sp@- <== NOT EXECUTED 4cb9e: 42a7 clrl %sp@- <== NOT EXECUTED 4cba0: 2f39 0005 e6b0 movel 5e6b0 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4cba6: 4e93 jsr %a3@ <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL)
4cba8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cbac: 4a80 tstl %d0 <== NOT EXECUTED 4cbae: 6600 00c4 bnew 4cc74 <pipe_release+0x118> <== NOT EXECUTED
rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe);
4cbb2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cbb6: 47f9 0004 5e68 lea 45e68 <rtems_semaphore_release>,%a3 <== NOT EXECUTED 4cbbc: 4e93 jsr %a3@ <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
4cbbe: 588f addql #4,%sp <== NOT EXECUTED 4cbc0: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4cbc4: 6736 beqs 4cbfc <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)
4cbc6: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4cbca: 6616 bnes 4cbe2 <pipe_release+0x86> <== NOT EXECUTED 4cbcc: 7002 moveq #2,%d0 <== NOT EXECUTED 4cbce: b082 cmpl %d2,%d0 <== NOT EXECUTED 4cbd0: 6710 beqs 4cbe2 <pipe_release+0x86> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
4cbd2: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4cbd6: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4cbda: 4eb9 0004 da1c jsr 4da1c <rtems_barrier_release> <== NOT EXECUTED 4cbe0: 508f addql #8,%sp <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
4cbe2: 2f39 0005 e6b0 movel 5e6b0 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4cbe8: 4e93 jsr %a3@ <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; }
4cbea: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4cbf0: 4280 clrl %d0 <== NOT EXECUTED 4cbf2: 4e5e unlk %fp <== NOT EXECUTED 4cbf4: 4e75 rts <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --;
4cbf6: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED 4cbfa: 60a0 bras 4cb9c <pipe_release+0x40> <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) {
4cbfc: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4cc00: 672a beqs 4cc2c <pipe_release+0xd0> <== NOT EXECUTED
delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4cc02: 7004 moveq #4,%d0 <== NOT EXECUTED 4cc04: b082 cmpl %d2,%d0 <== NOT EXECUTED 4cc06: 67da beqs 4cbe2 <pipe_release+0x86> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe);
4cc08: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4cc0c: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4cc10: 4eb9 0004 da1c jsr 4da1c <rtems_barrier_release> <== NOT EXECUTED
delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4cc16: 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);
4cc18: 2f39 0005 e6b0 movel 5e6b0 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4cc1e: 4e93 jsr %a3@ <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; }
4cc20: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4cc26: 4280 clrl %d0 <== NOT EXECUTED 4cc28: 4e5e unlk %fp <== NOT EXECUTED 4cc2a: 4e75 rts <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier);
4cc2c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer);
4cc30: 4bf9 0004 a688 lea 4a688 <free>,%a5 <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier);
4cc36: 243c 0004 d9ac movel #317868,%d2 <== NOT EXECUTED 4cc3c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cc3e: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
4cc40: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4cc44: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cc46: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
4cc48: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cc4c: 4eb9 0004 5c54 jsr 45c54 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
4cc52: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4cc54: 4e95 jsr %a5@ <== NOT EXECUTED
free(pipe);
4cc56: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4cc58: 4e95 jsr %a5@ <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) {
4cc5a: 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;
4cc5e: 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);
4cc60: 2f39 0005 e6b0 movel 5e6b0 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4cc66: 4e93 jsr %a3@ <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; }
4cc68: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4cc6e: 4280 clrl %d0 <== NOT EXECUTED 4cc70: 4e5e unlk %fp <== NOT EXECUTED 4cc72: 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);
4cc74: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cc76: 4eb9 0004 6458 jsr 46458 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004c94c <pipe_write>: pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) {
4c94c: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4c950: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4c954: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4c958: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0)
4c95c: 660e bnes 4c96c <pipe_write+0x20> <== NOT EXECUTED 4c95e: 4282 clrl %d2 <== NOT EXECUTED
#endif if (written > 0) return written; return ret; }
4c960: 2002 movel %d2,%d0 <== NOT EXECUTED 4c962: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c968: 4e5e unlk %fp <== NOT EXECUTED 4c96a: 4e75 rts <== NOT EXECUTED
/* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe))
4c96c: 42a7 clrl %sp@- <== NOT EXECUTED 4c96e: 47f9 0004 5d2c lea 45d2c <rtems_semaphore_obtain>,%a3 <== NOT EXECUTED 4c974: 42a7 clrl %sp@- <== NOT EXECUTED 4c976: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c97a: 4e93 jsr %a3@ <== NOT EXECUTED 4c97c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c980: 4a80 tstl %d0 <== NOT EXECUTED 4c982: 6600 00d2 bnew 4ca56 <pipe_write+0x10a> <== NOT EXECUTED
return -EINTR; if (pipe->Readers == 0) {
4c986: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c98a: 6700 0088 beqw 4ca14 <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;
4c98e: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4c992: b083 cmpl %d3,%d0 <== NOT EXECUTED 4c994: 6500 00e0 bcsw 4ca76 <pipe_write+0x12a> <== NOT EXECUTED 4c998: 2a03 movel %d3,%d5 <== NOT EXECUTED
} pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) {
4c99a: 4286 clrl %d6 <== NOT EXECUTED 4c99c: 4282 clrl %d2 <== NOT EXECUTED 4c99e: 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))
4c9a4: 4bf9 0004 da94 lea 4da94 <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);
4c9aa: 2e3c 0004 f3ac movel #324524,%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) {
4c9b0: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4c9b4: 2800 movel %d0,%d4 <== NOT EXECUTED 4c9b6: 9881 subl %d1,%d4 <== NOT EXECUTED 4c9b8: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4c9ba: 6300 00d6 blsw 4ca92 <pipe_write+0x146> <== NOT EXECUTED
if (LIBIO_NODELAY(iop)) {
4c9be: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4c9c2: 7001 moveq #1,%d0 <== NOT EXECUTED 4c9c4: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4c9c8: 6600 0144 bnew 4cb0e <pipe_write+0x1c2> <== NOT EXECUTED
goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe);
4c9cc: 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 ++;
4c9d0: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
4c9d4: 4e94 jsr %a4@ <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
4c9d6: 42a7 clrl %sp@- <== NOT EXECUTED 4c9d8: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c9dc: 4e95 jsr %a5@ <== NOT EXECUTED 4c9de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c9e2: 4a80 tstl %d0 <== NOT EXECUTED 4c9e4: 672a beqs 4ca10 <pipe_write+0xc4> <== NOT EXECUTED 4c9e6: 78fc moveq #-4,%d4 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
4c9e8: 42a7 clrl %sp@- <== NOT EXECUTED 4c9ea: 42a7 clrl %sp@- <== NOT EXECUTED 4c9ec: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c9f0: 4e93 jsr %a3@ <== NOT EXECUTED 4c9f2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c9f6: 4a80 tstl %d0 <== NOT EXECUTED 4c9f8: 6600 010e bnew 4cb08 <pipe_write+0x1bc> <== NOT EXECUTED
/* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --;
4c9fc: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED
if (ret != 0)
4ca00: 4a84 tstl %d4 <== NOT EXECUTED 4ca02: 661a bnes 4ca1e <pipe_write+0xd2> <== NOT EXECUTED
goto out_locked; if (pipe->Readers == 0) {
4ca04: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4ca08: 675a beqs 4ca64 <pipe_write+0x118> <== NOT EXECUTED 4ca0a: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4ca0e: 60a0 bras 4c9b0 <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))
4ca10: 4284 clrl %d4 <== NOT EXECUTED 4ca12: 60d4 bras 4c9e8 <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) {
4ca14: 78e0 moveq #-32,%d4 <== NOT EXECUTED 4ca16: 4282 clrl %d2 <== NOT EXECUTED 4ca18: 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);
4ca1e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ca22: 4e94 jsr %a4@ <== NOT EXECUTED 4ca24: 588f addql #4,%sp <== NOT EXECUTED
out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE)
4ca26: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4ca28: b084 cmpl %d4,%d0 <== NOT EXECUTED 4ca2a: 6714 beqs 4ca40 <pipe_write+0xf4> <== NOT EXECUTED
kill(getpid(), SIGPIPE); #endif if (written > 0)
4ca2c: 4a82 tstl %d2 <== NOT EXECUTED 4ca2e: 6e00 ff30 bgtw 4c960 <pipe_write+0x14> <== NOT EXECUTED 4ca32: 2404 movel %d4,%d2 <== NOT EXECUTED
return written; return ret; }
4ca34: 2002 movel %d2,%d0 <== NOT EXECUTED 4ca36: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ca3c: 4e5e unlk %fp <== NOT EXECUTED 4ca3e: 4e75 rts <== NOT EXECUTED
out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE);
4ca40: 4eb9 0004 d53c jsr 4d53c <getpid> <== NOT EXECUTED 4ca46: 4878 000d pea d <OPER1+0x1> <== NOT EXECUTED 4ca4a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ca4c: 4eb9 0004 d644 jsr 4d644 <kill> <== NOT EXECUTED 4ca52: 508f addql #8,%sp <== NOT EXECUTED 4ca54: 60d6 bras 4ca2c <pipe_write+0xe0> <== NOT EXECUTED
/* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe))
4ca56: 74fc moveq #-4,%d2 <== NOT EXECUTED
#endif if (written > 0) return written; return ret; }
4ca58: 2002 movel %d2,%d0 <== NOT EXECUTED 4ca5a: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ca60: 4e5e unlk %fp <== NOT EXECUTED 4ca62: 4e75 rts <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe);
4ca64: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
} pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) {
4ca68: 78e0 moveq #-32,%d4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe);
4ca6a: 4e94 jsr %a4@ <== NOT EXECUTED 4ca6c: 588f addql #4,%sp <== NOT EXECUTED
out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE)
4ca6e: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4ca70: b084 cmpl %d4,%d0 <== NOT EXECUTED 4ca72: 66b8 bnes 4ca2c <pipe_write+0xe0> <== NOT EXECUTED 4ca74: 60ca bras 4ca40 <pipe_write+0xf4> <== NOT EXECUTED
} pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) {
4ca76: 7a01 moveq #1,%d5 <== NOT EXECUTED 4ca78: 4286 clrl %d6 <== NOT EXECUTED 4ca7a: 4282 clrl %d2 <== NOT EXECUTED 4ca7c: 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))
4ca82: 4bf9 0004 da94 lea 4da94 <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);
4ca88: 2e3c 0004 f3ac movel #324524,%d7 <== NOT EXECUTED 4ca8e: 6000 ff20 braw 4c9b0 <pipe_write+0x64> <== NOT EXECUTED
ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe));
4ca92: 2043 moveal %d3,%a0 <== NOT EXECUTED 4ca94: 91c6 subal %d6,%a0 <== NOT EXECUTED 4ca96: b1c4 cmpal %d4,%a0 <== NOT EXECUTED 4ca98: 6402 bccs 4ca9c <pipe_write+0x150> <== NOT EXECUTED 4ca9a: 2808 movel %a0,%d4 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
4ca9c: 2a01 movel %d1,%d5 <== NOT EXECUTED 4ca9e: daaa 0008 addl %a2@(8),%d5 <== NOT EXECUTED 4caa2: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED 4caa6: 2a00 movel %d0,%d5 <== NOT EXECUTED 4caa8: 9a81 subl %d1,%d5 <== NOT EXECUTED
if (chunk > chunk1) {
4caaa: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4caac: 6c76 bges 4cb24 <pipe_write+0x1d8> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4caae: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4cab0: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cab4: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4cab8: d292 addl %a2@,%d1 <== NOT EXECUTED 4caba: 2047 moveal %d7,%a0 <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4cabc: 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);
4cabe: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4cac0: 4e90 jsr %a0@ <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4cac2: 2004 movel %d4,%d0 <== NOT EXECUTED 4cac4: 9085 subl %d5,%d0 <== NOT EXECUTED 4cac6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cac8: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cacc: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4cad0: 2047 moveal %d7,%a0 <== NOT EXECUTED 4cad2: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4cad4: 4e90 jsr %a0@ <== NOT EXECUTED 4cad6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
} else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk;
4cada: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
4cade: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4cae2: 6612 bnes 4caf6 <pipe_write+0x1aa> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe); written += chunk;
4cae4: 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) {
4cae6: 2c02 movel %d2,%d6 <== NOT EXECUTED 4cae8: b483 cmpl %d3,%d2 <== NOT EXECUTED 4caea: 645a bccs 4cb46 <pipe_write+0x1fa> <== NOT EXECUTED 4caec: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4caf0: 7a01 moveq #1,%d5 <== NOT EXECUTED 4caf2: 6000 febc braw 4c9b0 <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);
4caf6: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4cafa: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4cafe: 4eb9 0004 da1c jsr 4da1c <rtems_barrier_release> <== NOT EXECUTED 4cb04: 508f addql #8,%sp <== NOT EXECUTED 4cb06: 60dc bras 4cae4 <pipe_write+0x198> <== 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)) {
4cb08: 78fc moveq #-4,%d4 <== NOT EXECUTED 4cb0a: 6000 ff20 braw 4ca2c <pipe_write+0xe0> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe);
4cb0e: 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)) {
4cb12: 78f5 moveq #-11,%d4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe);
4cb14: 4e94 jsr %a4@ <== NOT EXECUTED 4cb16: 588f addql #4,%sp <== NOT EXECUTED
out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE)
4cb18: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4cb1a: b084 cmpl %d4,%d0 <== NOT EXECUTED 4cb1c: 6600 ff0e bnew 4ca2c <pipe_write+0xe0> <== NOT EXECUTED 4cb20: 6000 ff1e braw 4ca40 <pipe_write+0xf4> <== 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);
4cb24: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4cb26: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cb2a: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4cb2e: d292 addl %a2@,%d1 <== NOT EXECUTED 4cb30: 2047 moveal %d7,%a0 <== NOT EXECUTED 4cb32: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4cb34: 4e90 jsr %a0@ <== NOT EXECUTED 4cb36: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
pipe->Length += chunk;
4cb3a: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
4cb3e: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4cb42: 67a0 beqs 4cae4 <pipe_write+0x198> <== NOT EXECUTED 4cb44: 60b0 bras 4caf6 <pipe_write+0x1aa> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe);
4cb46: 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) {
4cb4a: 4284 clrl %d4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe);
4cb4c: 4e94 jsr %a4@ <== NOT EXECUTED 4cb4e: 588f addql #4,%sp <== NOT EXECUTED
out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE)
4cb50: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4cb52: b084 cmpl %d4,%d0 <== NOT EXECUTED 4cb54: 6600 fed6 bnew 4ca2c <pipe_write+0xe0> <== NOT EXECUTED 4cb58: 6000 fee6 braw 4ca40 <pipe_write+0xf4> <== NOT EXECUTED
00045c98 <pthread_atfork>: int pthread_atfork( void (*prepare)(void) __attribute__((unused)), void (*parent)(void) __attribute__((unused)), void (*child)(void) __attribute__((unused)) ) {
45c98: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45c9c: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45ca2: 7258 moveq #88,%d1 45ca4: 2040 moveal %d0,%a0
}
45ca6: 70ff moveq #-1,%d0 45ca8: 4e5e unlk %fp
void (*prepare)(void) __attribute__((unused)), void (*parent)(void) __attribute__((unused)), void (*child)(void) __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45caa: 2081 movel %d1,%a0@
}
45cac: 4e75 rts
... 00049f34 <pthread_attr_destroy>: #include <rtems/system.h> int pthread_attr_destroy( pthread_attr_t *attr ) {
49f34: 4e56 0000 linkw %fp,#0 49f38: 206e 0008 moveal %fp@(8),%a0
if ( !attr || !attr->is_initialized )
49f3c: 4a88 tstl %a0 49f3e: 670c beqs 49f4c <pthread_attr_destroy+0x18> 49f40: 4a90 tstl %a0@ 49f42: 6708 beqs 49f4c <pthread_attr_destroy+0x18>
return EINVAL; attr->is_initialized = false;
49f44: 4280 clrl %d0
return 0; }
49f46: 4e5e unlk %fp
) { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false;
49f48: 4290 clrl %a0@
return 0; }
49f4a: 4e75 rts
{ if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0;
49f4c: 7016 moveq #22,%d0
}
49f4e: 4e5e unlk %fp 49f50: 4e75 rts
... 0004c6d4 <pthread_attr_init>: #include <rtems/posix/pthread.h> int pthread_attr_init( pthread_attr_t *attr ) {
4c6d4: 4e56 0000 linkw %fp,#0 4c6d8: 202e 0008 movel %fp@(8),%d0
if ( !attr )
4c6dc: 671c beqs 4c6fa <pthread_attr_init+0x26>
return EINVAL; *attr = _POSIX_Threads_Default_attributes;
4c6de: 4878 003c pea 3c <DBL_MANT_DIG+0x7> 4c6e2: 4879 0005 da2c pea 5da2c <_POSIX_Threads_Default_attributes> 4c6e8: 2f00 movel %d0,%sp@- 4c6ea: 4eb9 0005 032c jsr 5032c <memcpy>
return 0;
4c6f0: 4fef 000c lea %sp@(12),%sp
) { if ( !attr ) return EINVAL; *attr = _POSIX_Threads_Default_attributes;
4c6f4: 4280 clrl %d0
return 0; }
4c6f6: 4e5e unlk %fp 4c6f8: 4e75 rts
int pthread_attr_init( pthread_attr_t *attr ) { if ( !attr )
4c6fa: 103c 0016 moveb #22,%d0
return EINVAL; *attr = _POSIX_Threads_Default_attributes; return 0; }
4c6fe: 4e5e unlk %fp 4c700: 4e75 rts
... 0004ab54 <pthread_attr_setcputime>: int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) {
4ab54: 4e56 0000 linkw %fp,#0 4ab58: 206e 0008 moveal %fp@(8),%a0 4ab5c: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
4ab60: 4a88 tstl %a0 4ab62: 670a beqs 4ab6e <pthread_attr_setcputime+0x1a> 4ab64: 4a90 tstl %a0@ 4ab66: 6706 beqs 4ab6e <pthread_attr_setcputime+0x1a>
return EINVAL; switch ( clock_allowed ) {
4ab68: 7201 moveq #1,%d1 4ab6a: b280 cmpl %d0,%d1 4ab6c: 6406 bccs 4ab74 <pthread_attr_setcputime+0x20>
case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; return 0;
4ab6e: 7016 moveq #22,%d0
default: return EINVAL; } }
4ab70: 4e5e unlk %fp 4ab72: 4e75 rts
return EINVAL; switch ( clock_allowed ) { case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed;
4ab74: 2140 0034 movel %d0,%a0@(52) 4ab78: 4280 clrl %d0
return 0; default: return EINVAL; } }
4ab7a: 4e5e unlk %fp 4ab7c: 4e75 rts
... 0004a0b4 <pthread_attr_setdetachstate>: int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) {
4a0b4: 4e56 0000 linkw %fp,#0 4a0b8: 206e 0008 moveal %fp@(8),%a0 4a0bc: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
4a0c0: 4a88 tstl %a0 4a0c2: 670a beqs 4a0ce <pthread_attr_setdetachstate+0x1a> 4a0c4: 4a90 tstl %a0@ 4a0c6: 6706 beqs 4a0ce <pthread_attr_setdetachstate+0x1a>
return EINVAL; switch ( detachstate ) {
4a0c8: 7201 moveq #1,%d1 4a0ca: b280 cmpl %d0,%d1 4a0cc: 6406 bccs 4a0d4 <pthread_attr_setdetachstate+0x20>
case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; return 0;
4a0ce: 7016 moveq #22,%d0
default: return EINVAL; } }
4a0d0: 4e5e unlk %fp 4a0d2: 4e75 rts
return EINVAL; switch ( detachstate ) { case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate;
4a0d4: 2140 0038 movel %d0,%a0@(56) 4a0d8: 4280 clrl %d0
return 0; default: return EINVAL; } }
4a0da: 4e5e unlk %fp 4a0dc: 4e75 rts
... 0004a1a8 <pthread_attr_setscope>: int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) {
4a1a8: 4e56 0000 linkw %fp,#0 4a1ac: 206e 0008 moveal %fp@(8),%a0 4a1b0: 222e 000c movel %fp@(12),%d1 4a1b4: 2f02 movel %d2,%sp@-
if ( !attr || !attr->is_initialized )
4a1b6: 4a88 tstl %a0 4a1b8: 6720 beqs 4a1da <pthread_attr_setscope+0x32> 4a1ba: 4a90 tstl %a0@ 4a1bc: 671c beqs 4a1da <pthread_attr_setscope+0x32>
return EINVAL; switch ( contentionscope ) {
4a1be: 4a81 tstl %d1 4a1c0: 660c bnes 4a1ce <pthread_attr_setscope+0x26>
case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope;
4a1c2: 42a8 000c clrl %a0@(12) 4a1c6: 4280 clrl %d0
return ENOTSUP; default: return EINVAL; } }
4a1c8: 241f movel %sp@+,%d2 4a1ca: 4e5e unlk %fp 4a1cc: 4e75 rts
) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) {
4a1ce: 203c 0000 0086 movel #134,%d0 4a1d4: 7401 moveq #1,%d2 4a1d6: b481 cmpl %d1,%d2 4a1d8: 67ee beqs 4a1c8 <pthread_attr_setscope+0x20>
return ENOTSUP; default: return EINVAL; } }
4a1da: 241f movel %sp@+,%d2
return EINVAL; switch ( contentionscope ) { case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0;
4a1dc: 7016 moveq #22,%d0
return ENOTSUP; default: return EINVAL; } }
4a1de: 4e5e unlk %fp 4a1e0: 4e75 rts
... 0004a1e4 <pthread_attr_setstackaddr>: int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) {
4a1e4: 4e56 0000 linkw %fp,#0 4a1e8: 206e 0008 moveal %fp@(8),%a0
if ( !attr || !attr->is_initialized )
4a1ec: 4a88 tstl %a0 4a1ee: 6710 beqs 4a200 <pthread_attr_setstackaddr+0x1c> 4a1f0: 4a90 tstl %a0@ 4a1f2: 670c beqs 4a200 <pthread_attr_setstackaddr+0x1c>
return EINVAL; attr->stackaddr = stackaddr;
4a1f4: 4280 clrl %d0 4a1f6: 216e 000c 0004 movel %fp@(12),%a0@(4)
return 0; }
4a1fc: 4e5e unlk %fp 4a1fe: 4e75 rts
{ if ( !attr || !attr->is_initialized ) return EINVAL; attr->stackaddr = stackaddr; return 0;
4a200: 7016 moveq #22,%d0
}
4a202: 4e5e unlk %fp 4a204: 4e75 rts
... 0004c744 <pthread_attr_setstacksize>: int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) {
4c744: 4e56 0000 linkw %fp,#0 4c748: 206e 0008 moveal %fp@(8),%a0 4c74c: 222e 000c movel %fp@(12),%d1
if ( !attr || !attr->is_initialized )
4c750: 4a88 tstl %a0 4c752: 6724 beqs 4c778 <pthread_attr_setstacksize+0x34> 4c754: 4a90 tstl %a0@ 4c756: 6720 beqs 4c778 <pthread_attr_setstacksize+0x34>
return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
4c758: 2039 0005 eb82 movel 5eb82 <rtems_minimum_stack_size>,%d0 4c75e: d080 addl %d0,%d0 4c760: b280 cmpl %d0,%d1 4c762: 650a bcss 4c76e <pthread_attr_setstacksize+0x2a>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize;
4c764: 4280 clrl %d0
return 0; }
4c766: 4e5e unlk %fp
return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize;
4c768: 2141 0008 movel %d1,%a0@(8)
return 0; }
4c76c: 4e75 rts
{ if ( !attr || !attr->is_initialized ) return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
4c76e: 2140 0008 movel %d0,%a0@(8) 4c772: 4280 clrl %d0
else attr->stacksize = stacksize; return 0; }
4c774: 4e5e unlk %fp 4c776: 4e75 rts
return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize;
4c778: 7016 moveq #22,%d0
return 0; }
4c77a: 4e5e unlk %fp 4c77c: 4e75 rts
... 00046084 <pthread_barrier_destroy>: */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) {
46084: 4e56 fff8 linkw %fp,#-8 46088: 206e 0008 moveal %fp@(8),%a0
POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier )
4608c: 4a88 tstl %a0 4608e: 6730 beqs 460c0 <pthread_barrier_destroy+0x3c>
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get(
46090: 486e fffc pea %fp@(-4) 46094: 2f10 movel %a0@,%sp@- 46096: 4879 0006 09ba pea 609ba <_POSIX_Barrier_Information> 4609c: 4eb9 0004 887c jsr 4887c <_Objects_Get>
return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) {
460a2: 4fef 000c lea %sp@(12),%sp 460a6: 4aae fffc tstl %fp@(-4) 460aa: 6614 bnes 460c0 <pthread_barrier_destroy+0x3c>
case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) {
460ac: 2040 moveal %d0,%a0 460ae: 4aa8 0058 tstl %a0@(88) 460b2: 6712 beqs 460c6 <pthread_barrier_destroy+0x42>
_Thread_Enable_dispatch();
460b4: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch> 460ba: 7010 moveq #16,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
460bc: 4e5e unlk %fp 460be: 4e75 rts
_Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); return 0;
460c0: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
460c2: 4e5e unlk %fp 460c4: 4e75 rts
if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object );
460c6: 2f00 movel %d0,%sp@- 460c8: 4879 0006 09ba pea 609ba <_POSIX_Barrier_Information> 460ce: 2d40 fff8 movel %d0,%fp@(-8) 460d2: 4eb9 0004 8470 jsr 48470 <_Objects_Close>
*/ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object );
460d8: 202e fff8 movel %fp@(-8),%d0 460dc: 2f00 movel %d0,%sp@- 460de: 4879 0006 09ba pea 609ba <_POSIX_Barrier_Information> 460e4: 4eb9 0004 8718 jsr 48718 <_Objects_Free>
_POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch();
460ea: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch>
return 0;
460f0: 4fef 0010 lea %sp@(16),%sp
_Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch();
460f4: 4280 clrl %d0
case OBJECTS_ERROR: break; } return EINVAL; }
460f6: 4e5e unlk %fp 460f8: 4e75 rts
... 000460fc <pthread_barrier_init>: int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) {
460fc: 4e56 ffe0 linkw %fp,#-32 46100: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46104: 246e 0008 moveal %fp@(8),%a2 46108: 262e 000c movel %fp@(12),%d3 4610c: 242e 0010 movel %fp@(16),%d2
const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier )
46110: 4a8a tstl %a2 46112: 677a beqs 4618e <pthread_barrier_init+0x92>
return EINVAL; if ( count == 0 )
46114: 4a82 tstl %d2 46116: 6776 beqs 4618e <pthread_barrier_init+0x92>
return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) {
46118: 4a83 tstl %d3 4611a: 6700 0090 beqw 461ac <pthread_barrier_init+0xb0> 4611e: 2043 moveal %d3,%a0
} /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized )
46120: 4a90 tstl %a0@ 46122: 676a beqs 4618e <pthread_barrier_init+0x92>
return EINVAL; switch ( the_attr->process_shared ) {
46124: 4aa8 0004 tstl %a0@(4) 46128: 6664 bnes 4618e <pthread_barrier_init+0x92>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
4612a: 2039 0006 0678 movel 60678 <_Thread_Dispatch_disable_level>,%d0 46130: 5280 addql #1,%d0
/* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count;
46132: 2d42 fffc movel %d2,%fp@(-4) 46136: 23c0 0006 0678 movel %d0,60678 <_Thread_Dispatch_disable_level>
} /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
4613c: 42ae fff8 clrl %fp@(-8)
* This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *)
46140: 4879 0006 09ba pea 609ba <_POSIX_Barrier_Information> 46146: 4eb9 0004 83e0 jsr 483e0 <_Objects_Allocate>
*/ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) {
4614c: 588f addql #4,%sp 4614e: 2640 moveal %d0,%a3 46150: 4a80 tstl %d0 46152: 6746 beqs 4619a <pthread_barrier_init+0x9e>
_Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
46154: 486e fff8 pea %fp@(-8) 46158: 486b 0010 pea %a3@(16) 4615c: 4eb9 0004 7a50 jsr 47a50 <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
46162: 202b 0008 movel %a3@(8),%d0 46166: 4281 clrl %d1 46168: 2079 0006 09d2 moveal 609d2 <_POSIX_Barrier_Information+0x18>,%a0 4616e: 3200 movew %d0,%d1 46170: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name;
46174: 42ab 000c clrl %a3@(12)
); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id;
46178: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4617a: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch>
return 0;
46180: 508f addql #8,%sp
/* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch();
46182: 4280 clrl %d0
return 0; }
46184: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 4618a: 4e5e unlk %fp 4618c: 4e75 rts
/* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0;
4618e: 7016 moveq #22,%d0
}
46190: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46196: 4e5e unlk %fp 46198: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch();
4619a: 4eb9 0004 908c jsr 4908c <_Thread_Enable_dispatch> 461a0: 700b moveq #11,%d0
* Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; }
461a2: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 461a8: 4e5e unlk %fp 461aa: 4e75 rts
* If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr );
461ac: 260e movel %fp,%d3 461ae: 0683 ffff fff0 addil #-16,%d3 461b4: 2f03 movel %d3,%sp@- 461b6: 4eb9 0004 6038 jsr 46038 <pthread_barrierattr_init> 461bc: 588f addql #4,%sp 461be: 2043 moveal %d3,%a0
} /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized )
461c0: 4a90 tstl %a0@ 461c2: 6600 ff60 bnew 46124 <pthread_barrier_init+0x28>
461c6: 60c6 bras 4618e <pthread_barrier_init+0x92> <== NOT EXECUTED
00045ff4 <pthread_barrierattr_destroy>: */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) {
45ff4: 4e56 0000 linkw %fp,#0 45ff8: 206e 0008 moveal %fp@(8),%a0
if ( !attr || attr->is_initialized == false )
45ffc: 4a88 tstl %a0 45ffe: 670c beqs 4600c <pthread_barrierattr_destroy+0x18> 46000: 4a90 tstl %a0@ 46002: 6708 beqs 4600c <pthread_barrierattr_destroy+0x18>
return EINVAL; attr->is_initialized = false;
46004: 4280 clrl %d0
return 0; }
46006: 4e5e unlk %fp
) { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false;
46008: 4290 clrl %a0@
return 0; }
4600a: 4e75 rts
{ if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0;
4600c: 7016 moveq #22,%d0
}
4600e: 4e5e unlk %fp 46010: 4e75 rts
... 00046058 <pthread_barrierattr_setpshared>: int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) {
46058: 4e56 0000 linkw %fp,#0 4605c: 206e 0008 moveal %fp@(8),%a0 46060: 202e 000c movel %fp@(12),%d0
if ( !attr )
46064: 4a88 tstl %a0 46066: 670a beqs 46072 <pthread_barrierattr_setpshared+0x1a>
return EINVAL; if ( !attr->is_initialized )
46068: 4a90 tstl %a0@ 4606a: 6706 beqs 46072 <pthread_barrierattr_setpshared+0x1a>
return EINVAL; switch ( pshared ) {
4606c: 7201 moveq #1,%d1 4606e: b280 cmpl %d0,%d1 46070: 6406 bccs 46078 <pthread_barrierattr_setpshared+0x20>
case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0;
46072: 7016 moveq #22,%d0
default: return EINVAL; } }
46074: 4e5e unlk %fp 46076: 4e75 rts
return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared;
46078: 2140 0004 movel %d0,%a0@(4) 4607c: 4280 clrl %d0
return 0; default: return EINVAL; } }
4607e: 4e5e unlk %fp 46080: 4e75 rts
... 00045770 <pthread_cancel>: */ int pthread_cancel( pthread_t thread ) {
45770: 4e56 fffc linkw %fp,#-4
/* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() )
45774: 2039 0005 f7b2 movel 5f7b2 <_ISR_Nest_level>,%d0 4577a: 6706 beqs 45782 <pthread_cancel+0x12> 4577c: 7047 moveq #71,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
4577e: 4e5e unlk %fp 45780: 4e75 rts
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *)
45782: 486e fffc pea %fp@(-4) 45786: 2f2e 0008 movel %fp@(8),%sp@- 4578a: 4879 0005 f8fe pea 5f8fe <_POSIX_Threads_Information> 45790: 4eb9 0004 7918 jsr 47918 <_Objects_Get>
if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) {
45796: 4fef 000c lea %sp@(12),%sp 4579a: 4aae fffc tstl %fp@(-4) 4579e: 661c bnes 457bc <pthread_cancel+0x4c>
case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1;
457a0: 2240 moveal %d0,%a1 457a2: 7201 moveq #1,%d1 457a4: 2069 010e moveal %a1@(270),%a0 457a8: 2141 00dc movel %d1,%a0@(220)
/* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread );
457ac: 2f00 movel %d0,%sp@- 457ae: 4eb9 0004 b05c jsr 4b05c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
return 0;
457b4: 588f addql #4,%sp
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread );
457b6: 4280 clrl %d0
case OBJECTS_ERROR: break; } return EINVAL; }
457b8: 4e5e unlk %fp 457ba: 4e75 rts
if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) {
457bc: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
457be: 4e5e unlk %fp 457c0: 4e75 rts
... 00045b68 <pthread_cleanup_push>: void pthread_cleanup_push( void (*routine)( void * ), void *arg ) {
45b68: 4e56 0000 linkw %fp,#0 45b6c: 2f03 movel %d3,%sp@- 45b6e: 262e 000c movel %fp@(12),%d3 45b72: 2f02 movel %d2,%sp@- 45b74: 242e 0008 movel %fp@(8),%d2
/* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine )
45b78: 6754 beqs 45bce <pthread_cleanup_push+0x66>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
45b7a: 2039 0006 0120 movel 60120 <_Thread_Dispatch_disable_level>,%d0 45b80: 5280 addql #1,%d0 45b82: 23c0 0006 0120 movel %d0,60120 <_Thread_Dispatch_disable_level>
return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
45b88: 4878 0010 pea 10 <INVALID_OPERATION> 45b8c: 4eb9 0004 9ff4 jsr 49ff4 <_Workspace_Allocate>
if ( handler ) {
45b92: 588f addql #4,%sp 45b94: 4a80 tstl %d0 45b96: 6726 beqs 45bbe <pthread_cleanup_push+0x56>
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers;
45b98: 2079 0006 01da moveal 601da <_Thread_Executing>,%a0 45b9e: 2228 010e movel %a0@(270),%d1
handler->routine = routine;
45ba2: 2040 moveal %d0,%a0
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers;
45ba4: 0681 0000 00e0 addil #224,%d1
handler->routine = routine;
45baa: 2142 0008 movel %d2,%a0@(8)
handler->arg = arg;
45bae: 2143 000c movel %d3,%a0@(12)
_Chain_Append( handler_stack, &handler->Node );
45bb2: 2f00 movel %d0,%sp@- 45bb4: 2f01 movel %d1,%sp@- 45bb6: 4eb9 0004 7584 jsr 47584 <_Chain_Append> 45bbc: 508f addql #8,%sp
} _Thread_Enable_dispatch(); }
45bbe: 242e fff8 movel %fp@(-8),%d2 45bc2: 262e fffc movel %fp@(-4),%d3 45bc6: 4e5e unlk %fp
handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch();
45bc8: 4ef9 0004 8b28 jmp 48b28 <_Thread_Enable_dispatch>
}
45bce: 242e fff8 movel %fp@(-8),%d2 45bd2: 262e fffc movel %fp@(-4),%d3 45bd6: 4e5e unlk %fp 45bd8: 4e75 rts
... 00046924 <pthread_cond_broadcast>: */ int pthread_cond_broadcast( pthread_cond_t *cond ) {
46924: 4e56 0000 linkw %fp,#0
return _POSIX_Condition_variables_Signal_support( cond, true );
46928: 4878 0001 pea 1 <ADD> 4692c: 2f2e 0008 movel %fp@(8),%sp@- 46930: 4eb9 0004 6afc jsr 46afc <_POSIX_Condition_variables_Signal_support>
}
46936: 4e5e unlk %fp 46938: 4e75 rts
... 00046a2c <pthread_cond_init>: int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) {
46a2c: 4e56 0000 linkw %fp,#0 46a30: 202e 000c movel %fp@(12),%d0 46a34: 2f0b movel %a3,%sp@- 46a36: 2f0a movel %a2,%sp@-
POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr;
46a38: 45f9 0005 f04c lea 5f04c <_POSIX_Condition_variables_Default_attributes>,%a2 46a3e: 4a80 tstl %d0 46a40: 6702 beqs 46a44 <pthread_cond_init+0x18> 46a42: 2440 moveal %d0,%a2
/* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
46a44: 7001 moveq #1,%d0 46a46: b0aa 0004 cmpl %a2@(4),%d0 46a4a: 6704 beqs 46a50 <pthread_cond_init+0x24>
return EINVAL; if ( !the_attr->is_initialized )
46a4c: 4a92 tstl %a2@ 46a4e: 660e bnes 46a5e <pthread_cond_init+0x32>
*cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; }
46a50: 246e fff8 moveal %fp@(-8),%a2
*cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0;
46a54: 7016 moveq #22,%d0
}
46a56: 266e fffc moveal %fp@(-4),%a3 46a5a: 4e5e unlk %fp 46a5c: 4e75 rts
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
46a5e: 2039 0006 1964 movel 61964 <_Thread_Dispatch_disable_level>,%d0 46a64: 5280 addql #1,%d0 46a66: 23c0 0006 1964 movel %d0,61964 <_Thread_Dispatch_disable_level>
*/ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *)
46a6c: 4879 0006 1d32 pea 61d32 <_POSIX_Condition_variables_Information> 46a72: 4eb9 0004 935c jsr 4935c <_Objects_Allocate>
_Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) {
46a78: 588f addql #4,%sp 46a7a: 2640 moveal %d0,%a3 46a7c: 4a80 tstl %d0 46a7e: 6752 beqs 46ad2 <pthread_cond_init+0xa6>
return ENOMEM; } the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
46a80: 42ab 0014 clrl %a3@(20)
if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared;
46a84: 276a 0004 0010 movel %a2@(4),%a3@(16)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize(
46a8a: 4878 0074 pea 74 <DBL_MANT_DIG+0x3f> 46a8e: 4878 0800 pea 800 <D_MAX_EXP+0x1> 46a92: 42a7 clrl %sp@- 46a94: 486b 0018 pea %a3@(24) 46a98: 4eb9 0004 a82c jsr 4a82c <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
46a9e: 202b 0008 movel %a3@(8),%d0 46aa2: 4281 clrl %d1 46aa4: 2079 0006 1d4a moveal 61d4a <_POSIX_Condition_variables_Information+0x18>,%a0 46aaa: 3200 movew %d0,%d1 46aac: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name;
46ab0: 42ab 000c clrl %a3@(12)
&_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id;
46ab4: 206e 0008 moveal %fp@(8),%a0 46ab8: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
46aba: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch>
return 0; }
46ac0: 246e fff8 moveal %fp@(-8),%a2
*cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0;
46ac4: 4fef 0010 lea %sp@(16),%sp
0 ); *cond = the_cond->Object.id; _Thread_Enable_dispatch();
46ac8: 4280 clrl %d0
return 0; }
46aca: 266e fffc moveal %fp@(-4),%a3 46ace: 4e5e unlk %fp 46ad0: 4e75 rts
_Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch();
46ad2: 4eb9 0004 a008 jsr 4a008 <_Thread_Enable_dispatch>
*cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; }
46ad8: 246e fff8 moveal %fp@(-8),%a2
_Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch();
46adc: 700c moveq #12,%d0
*cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; }
46ade: 266e fffc moveal %fp@(-4),%a3 46ae2: 4e5e unlk %fp 46ae4: 4e75 rts
... 00046b64 <pthread_cond_timedwait>: int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) {
46b64: 4e56 fffc linkw %fp,#-4
* So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) {
46b68: 486e fffc pea %fp@(-4) 46b6c: 2f2e 0010 movel %fp@(16),%sp@- 46b70: 4eb9 0004 7060 jsr 47060 <_POSIX_Absolute_timeout_to_ticks> 46b76: 508f addql #8,%sp 46b78: 4a80 tstl %d0 46b7a: 6606 bnes 46b82 <pthread_cond_timedwait+0x1e> 46b7c: 7016 moveq #22,%d0
cond, mutex, ticks, already_timedout ); }
46b7e: 4e5e unlk %fp 46b80: 4e75 rts
* So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) {
46b82: 7202 moveq #2,%d1 46b84: b280 cmpl %d0,%d1 46b86: 55c0 scs %d0 46b88: 49c0 extbl %d0
default: /* only to silence warnings */ already_timedout = false; break; } return _POSIX_Condition_variables_Wait_support(
46b8a: 2040 moveal %d0,%a0 46b8c: 4868 0001 pea %a0@(1) 46b90: 2f2e fffc movel %fp@(-4),%sp@- 46b94: 2f2e 000c movel %fp@(12),%sp@- 46b98: 2f2e 0008 movel %fp@(8),%sp@- 46b9c: 4eb9 0004 6bc8 jsr 46bc8 <_POSIX_Condition_variables_Wait_support> 46ba2: 4fef 0010 lea %sp@(16),%sp
cond, mutex, ticks, already_timedout ); }
46ba6: 4e5e unlk %fp 46ba8: 4e75 rts
... 00046bac <pthread_cond_wait>: int pthread_cond_wait( pthread_cond_t *cond, pthread_mutex_t *mutex ) {
46bac: 4e56 0000 linkw %fp,#0
return _POSIX_Condition_variables_Wait_support(
46bb0: 42a7 clrl %sp@- 46bb2: 42a7 clrl %sp@- 46bb4: 2f2e 000c movel %fp@(12),%sp@- 46bb8: 2f2e 0008 movel %fp@(8),%sp@- 46bbc: 4eb9 0004 6bc8 jsr 46bc8 <_POSIX_Condition_variables_Wait_support>
cond, mutex, THREAD_QUEUE_WAIT_FOREVER, false ); }
46bc2: 4e5e unlk %fp 46bc4: 4e75 rts
... 0004688c <pthread_condattr_destroy>: */ int pthread_condattr_destroy( pthread_condattr_t *attr ) {
4688c: 4e56 0000 linkw %fp,#0 46890: 206e 0008 moveal %fp@(8),%a0
if ( !attr || attr->is_initialized == false )
46894: 4a88 tstl %a0 46896: 670c beqs 468a4 <pthread_condattr_destroy+0x18> 46898: 4a90 tstl %a0@ 4689a: 6708 beqs 468a4 <pthread_condattr_destroy+0x18>
return EINVAL; attr->is_initialized = false;
4689c: 4280 clrl %d0
return 0; }
4689e: 4e5e unlk %fp
) { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false;
468a0: 4290 clrl %a0@
return 0; }
468a2: 4e75 rts
{ if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0;
468a4: 7016 moveq #22,%d0
}
468a6: 4e5e unlk %fp 468a8: 4e75 rts
... 000468fc <pthread_condattr_setpshared>: int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) {
468fc: 4e56 0000 linkw %fp,#0 46900: 206e 0008 moveal %fp@(8),%a0 46904: 202e 000c movel %fp@(12),%d0
if ( !attr )
46908: 4a88 tstl %a0 4690a: 6706 beqs 46912 <pthread_condattr_setpshared+0x16>
return EINVAL; switch ( pshared ) {
4690c: 7201 moveq #1,%d1 4690e: b280 cmpl %d0,%d1 46910: 6406 bccs 46918 <pthread_condattr_setpshared+0x1c>
case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0;
46912: 7016 moveq #22,%d0
default: return EINVAL; } }
46914: 4e5e unlk %fp 46916: 4e75 rts
return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared;
46918: 2140 0004 movel %d0,%a0@(4) 4691c: 4280 clrl %d0
return 0; default: return EINVAL; } }
4691e: 4e5e unlk %fp 46920: 4e75 rts
... 00046014 <pthread_detach>: #include <rtems/posix/pthread.h> int pthread_detach( pthread_t thread ) {
46014: 4e56 fffc linkw %fp,#-4
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *)
46018: 486e fffc pea %fp@(-4) 4601c: 2f2e 0008 movel %fp@(8),%sp@- 46020: 4879 0006 0ffa pea 60ffa <_POSIX_Threads_Information> 46026: 4eb9 0004 84ac jsr 484ac <_Objects_Get>
register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) {
4602c: 4fef 000c lea %sp@(12),%sp 46030: 4aae fffc tstl %fp@(-4) 46034: 6616 bnes 4604c <pthread_detach+0x38>
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED;
46036: 2240 moveal %d0,%a1 46038: 2069 010e moveal %a1@(270),%a0 4603c: 42a8 003c clrl %a0@(60)
_Thread_Enable_dispatch();
46040: 4eb9 0004 8cbc jsr 48cbc <_Thread_Enable_dispatch> 46046: 4280 clrl %d0
case OBJECTS_ERROR: break; } return ESRCH; }
46048: 4e5e unlk %fp 4604a: 4e75 rts
register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) {
4604c: 7003 moveq #3,%d0
case OBJECTS_ERROR: break; } return ESRCH; }
4604e: 4e5e unlk %fp 46050: 4e75 rts
... 000462b8 <pthread_equal>: int pthread_equal( pthread_t t1, pthread_t t2 ) {
462b8: 4e56 0000 linkw %fp,#0 462bc: 202e 000c movel %fp@(12),%d0 462c0: b0ae 0008 cmpl %fp@(8),%d0 462c4: 57c0 seq %d0
break; } return status; #endif }
462c6: 4e5e unlk %fp
int pthread_equal( pthread_t t1, pthread_t t2 ) {
462c8: 49c0 extbl %d0
break; } return status; #endif }
462ca: 4480 negl %d0 462cc: 4e75 rts
... 0004d894 <pthread_exit>: } void pthread_exit( void *value_ptr ) {
4d894: 4e56 0000 linkw %fp,#0
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
4d898: 2f2e 0008 movel %fp@(8),%sp@- 4d89c: 2f39 0005 efbe movel 5efbe <_Thread_Executing>,%sp@- 4d8a2: 4eb9 0004 d824 jsr 4d824 <_POSIX_Thread_Exit>
4d8a8: 508f addql #8,%sp <== NOT EXECUTED
}
4d8aa: 4e5e unlk %fp <== NOT EXECUTED 4d8ac: 4e75 rts <== NOT EXECUTED
... 00045cb0 <pthread_getcpuclockid>: int pthread_getcpuclockid( pthread_t pid, clockid_t *clock_id ) {
45cb0: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45cb4: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45cba: 7258 moveq #88,%d1 45cbc: 2040 moveal %d0,%a0
}
45cbe: 70ff moveq #-1,%d0 45cc0: 4e5e unlk %fp
int pthread_getcpuclockid( pthread_t pid, clockid_t *clock_id ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45cc2: 2081 movel %d1,%a0@
}
45cc4: 4e75 rts
... 000484cc <pthread_getschedparam>: int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) {
484cc: 4e56 fff0 linkw %fp,#-16 484d0: 48d7 1c00 moveml %a2-%a4,%sp@ 484d4: 266e 000c moveal %fp@(12),%a3 484d8: 246e 0010 moveal %fp@(16),%a2
Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param )
484dc: 4a8b tstl %a3 484de: 676e beqs 4854e <pthread_getschedparam+0x82> 484e0: 4a8a tstl %a2 484e2: 676a beqs 4854e <pthread_getschedparam+0x82>
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *)
484e4: 486e fffc pea %fp@(-4) 484e8: 2f2e 0008 movel %fp@(8),%sp@- 484ec: 4879 0006 43ba pea 643ba <_POSIX_Threads_Information> 484f2: 4eb9 0004 aab8 jsr 4aab8 <_Objects_Get>
return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) {
484f8: 4fef 000c lea %sp@(12),%sp 484fc: 4aae fffc tstl %fp@(-4) 48500: 6640 bnes 48542 <pthread_getschedparam+0x76>
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ];
48502: 2040 moveal %d0,%a0
if ( policy ) *policy = api->schedpolicy; if ( param ) { *param = api->schedparam; param->sched_priority =
48504: 4281 clrl %d1
the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ];
48506: 2868 010e moveal %a0@(270),%a4
if ( policy ) *policy = api->schedpolicy; if ( param ) { *param = api->schedparam;
4850a: 204a moveal %a2,%a0 4850c: 43ec 0084 lea %a4@(132),%a1
switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( policy ) *policy = api->schedpolicy;
48510: 26ac 0080 movel %a4@(128),%a3@
if ( param ) { *param = api->schedparam; param->sched_priority =
48514: 1239 0006 29e6 moveb 629e6 <rtems_maximum_priority>,%d1
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( policy ) *policy = api->schedpolicy; if ( param ) { *param = api->schedparam;
4851a: 20d9 movel %a1@+,%a0@+ 4851c: 20d9 movel %a1@+,%a0@+ 4851e: 20d9 movel %a1@+,%a0@+ 48520: 20d9 movel %a1@+,%a0@+ 48522: 20d9 movel %a1@+,%a0@+ 48524: 20d9 movel %a1@+,%a0@+ 48526: 2091 movel %a1@,%a0@
param->sched_priority =
48528: 2040 moveal %d0,%a0 4852a: 92a8 0014 subl %a0@(20),%d1 4852e: 2481 movel %d1,%a2@
_POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch();
48530: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch>
break; } return ESRCH; }
48536: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4
if ( param ) { *param = api->schedparam; param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch();
4853c: 4280 clrl %d0
break; } return ESRCH; }
4853e: 4e5e unlk %fp 48540: 4e75 rts
if ( !policy || !param ) return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) {
48542: 7003 moveq #3,%d0
break; } return ESRCH; }
48544: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 4854a: 4e5e unlk %fp 4854c: 4e75 rts
*param = api->schedparam; param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); return 0;
4854e: 7016 moveq #22,%d0
break; } return ESRCH; }
48550: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 48556: 4e5e unlk %fp 48558: 4e75 rts
... 00045d88 <pthread_key_delete>: */ int pthread_key_delete( pthread_key_t key ) {
45d88: 4e56 ffec linkw %fp,#-20 45d8c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *)
45d90: 486e fffc pea %fp@(-4) 45d94: 2f2e 0008 movel %fp@(8),%sp@- 45d98: 4879 0006 1228 pea 61228 <_POSIX_Keys_Information> 45d9e: 4eb9 0004 85b8 jsr 485b8 <_Objects_Get>
register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) {
45da4: 4fef 000c lea %sp@(12),%sp 45da8: 2600 movel %d0,%d3 45daa: 4aae fffc tstl %fp@(-4) 45dae: 6656 bnes 45e06 <pthread_key_delete+0x7e>
case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
45db0: 2f00 movel %d0,%sp@- 45db2: 4879 0006 1228 pea 61228 <_POSIX_Keys_Information> 45db8: 2440 moveal %d0,%a2 45dba: 45ea 0018 lea %a2@(24),%a2 45dbe: 7401 moveq #1,%d2
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) _Workspace_Free( the_key->Values[ the_api ] );
45dc0: 47f9 0004 a344 lea 4a344 <_Workspace_Free>,%a3
the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
45dc6: 4eb9 0004 81ac jsr 481ac <_Objects_Close> 45dcc: 508f addql #8,%sp
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] )
45dce: 2012 movel %a2@,%d0
switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
45dd0: 5282 addql #1,%d2 45dd2: 588a addql #4,%a2
if ( the_key->Values[ the_api ] )
45dd4: 4a80 tstl %d0 45dd6: 6706 beqs 45dde <pthread_key_delete+0x56>
_Workspace_Free( the_key->Values[ the_api ] );
45dd8: 2f00 movel %d0,%sp@- 45dda: 4e93 jsr %a3@ 45ddc: 588f addql #4,%sp
switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
45dde: 7005 moveq #5,%d0 45de0: b082 cmpl %d2,%d0 45de2: 66ea bnes 45dce <pthread_key_delete+0x46>
*/ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
45de4: 2f03 movel %d3,%sp@- 45de6: 4879 0006 1228 pea 61228 <_POSIX_Keys_Information> 45dec: 4eb9 0004 8454 jsr 48454 <_Objects_Free>
* NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch();
45df2: 4eb9 0004 8dc8 jsr 48dc8 <_Thread_Enable_dispatch>
return 0;
45df8: 508f addql #8,%sp
* NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch();
45dfa: 4280 clrl %d0
case OBJECTS_ERROR: break; } return EINVAL; }
45dfc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 45e02: 4e5e unlk %fp 45e04: 4e75 rts
register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) {
45e06: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
45e08: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 45e0e: 4e5e unlk %fp 45e10: 4e75 rts
... 00047b90 <pthread_mutex_destroy>: */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) {
47b90: 4e56 fffc linkw %fp,#-4 47b94: 2f0a movel %a2,%sp@-
register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location );
47b96: 486e fffc pea %fp@(-4) 47b9a: 2f2e 0008 movel %fp@(8),%sp@- 47b9e: 4eb9 0004 7c8e jsr 47c8e <_POSIX_Mutex_Get>
switch ( location ) {
47ba4: 508f addql #8,%sp
) { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location );
47ba6: 2440 moveal %d0,%a2
switch ( location ) {
47ba8: 4aae fffc tstl %fp@(-4) 47bac: 670a beqs 47bb8 <pthread_mutex_destroy+0x28>
case OBJECTS_ERROR: break; } return EINVAL; }
47bae: 246e fff8 moveal %fp@(-8),%a2
{ register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) {
47bb2: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
47bb4: 4e5e unlk %fp 47bb6: 4e75 rts
/* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) {
47bb8: 4aaa 0062 tstl %a2@(98) 47bbc: 6610 bnes 47bce <pthread_mutex_destroy+0x3e>
_Thread_Enable_dispatch();
47bbe: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return EINVAL; }
47bc4: 246e fff8 moveal %fp@(-8),%a2
* XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { _Thread_Enable_dispatch();
47bc8: 7010 moveq #16,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
47bca: 4e5e unlk %fp 47bcc: 4e75 rts
if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object );
47bce: 2f00 movel %d0,%sp@- 47bd0: 4879 0006 44dc pea 644dc <_POSIX_Mutex_Information> 47bd6: 4eb9 0004 a6ac jsr 4a6ac <_Objects_Close>
_CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL );
47bdc: 4878 0016 pea 16 <OPER2+0x2> 47be0: 42a7 clrl %sp@- 47be2: 486a 0014 pea %a2@(20) 47be6: 4eb9 0004 9c28 jsr 49c28 <_CORE_mutex_Flush>
RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
47bec: 2f0a movel %a2,%sp@- 47bee: 4879 0006 44dc pea 644dc <_POSIX_Mutex_Information> 47bf4: 4eb9 0004 a954 jsr 4a954 <_Objects_Free>
_POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch();
47bfa: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return EINVAL; }
47c00: 246e fff8 moveal %fp@(-8),%a2
_CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); return 0;
47c04: 4fef 001c lea %sp@(28),%sp
_Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch();
47c08: 4280 clrl %d0
case OBJECTS_ERROR: break; } return EINVAL; }
47c0a: 4e5e unlk %fp 47c0c: 4e75 rts
... 00047d04 <pthread_mutex_getprioceiling>: int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) {
47d04: 4e56 fffc linkw %fp,#-4 47d08: 2f0a movel %a2,%sp@- 47d0a: 246e 000c moveal %fp@(12),%a2
register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling )
47d0e: 4a8a tstl %a2 47d10: 6736 beqs 47d48 <pthread_mutex_getprioceiling+0x44>
return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location );
47d12: 486e fffc pea %fp@(-4) 47d16: 2f2e 0008 movel %fp@(8),%sp@- 47d1a: 4eb9 0004 7c8e jsr 47c8e <_POSIX_Mutex_Get>
switch ( location ) {
47d20: 508f addql #8,%sp 47d22: 4aae fffc tstl %fp@(-4) 47d26: 6620 bnes 47d48 <pthread_mutex_getprioceiling+0x44>
case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core(
47d28: 4281 clrl %d1 47d2a: 1239 0006 29e6 moveb 629e6 <rtems_maximum_priority>,%d1 47d30: 2040 moveal %d0,%a0 47d32: 92a8 005e subl %a0@(94),%d1 47d36: 2481 movel %d1,%a2@
the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch();
47d38: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return EINVAL; }
47d3e: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch();
47d42: 4280 clrl %d0
case OBJECTS_ERROR: break; } return EINVAL; }
47d44: 4e5e unlk %fp 47d46: 4e75 rts 47d48: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0;
47d4c: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
47d4e: 4e5e unlk %fp 47d50: 4e75 rts
... 00047fac <pthread_mutex_timedlock>: int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) {
47fac: 4e56 fffc linkw %fp,#-4 47fb0: 2f02 movel %d2,%sp@-
* * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
47fb2: 486e fffc pea %fp@(-4) 47fb6: 2f2e 000c movel %fp@(12),%sp@-
int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) {
47fba: 242e 0008 movel %fp@(8),%d2
* * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
47fbe: 4eb9 0004 8088 jsr 48088 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
47fc4: 508f addql #8,%sp 47fc6: 7203 moveq #3,%d1 47fc8: b280 cmpl %d0,%d1 47fca: 671a beqs 47fe6 <pthread_mutex_timedlock+0x3a>
do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
47fcc: 2f2e fffc movel %fp@(-4),%sp@- 47fd0: 42a7 clrl %sp@- 47fd2: 2f02 movel %d2,%sp@- 47fd4: 4eb9 0004 7ea8 jsr 47ea8 <_POSIX_Mutex_Lock_support>
break; } } return lock_status; }
47fda: 242e fff8 movel %fp@(-8),%d2
*/ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
47fde: 4fef 000c lea %sp@(12),%sp
break; } } return lock_status; }
47fe2: 4e5e unlk %fp 47fe4: 4e75 rts
*/ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
47fe6: 2f2e fffc movel %fp@(-4),%sp@- 47fea: 4878 0001 pea 1 <ADD> 47fee: 2f02 movel %d2,%sp@- 47ff0: 4eb9 0004 7ea8 jsr 47ea8 <_POSIX_Mutex_Lock_support>
break; } } return lock_status; }
47ff6: 242e fff8 movel %fp@(-8),%d2
*/ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
47ffa: 4fef 000c lea %sp@(12),%sp
break; } } return lock_status; }
47ffe: 4e5e unlk %fp 48000: 4e75 rts
... 0004801c <pthread_mutex_trylock>: */ int pthread_mutex_trylock( pthread_mutex_t *mutex ) {
4801c: 4e56 0000 linkw %fp,#0
return _POSIX_Mutex_Lock_support( mutex, false, THREAD_QUEUE_WAIT_FOREVER );
48020: 42a7 clrl %sp@- 48022: 42a7 clrl %sp@- 48024: 2f2e 0008 movel %fp@(8),%sp@- 48028: 4eb9 0004 7ea8 jsr 47ea8 <_POSIX_Mutex_Lock_support>
}
4802e: 4e5e unlk %fp 48030: 4e75 rts
... 00047a1c <pthread_mutexattr_destroy>: */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) {
47a1c: 4e56 0000 linkw %fp,#0 47a20: 206e 0008 moveal %fp@(8),%a0
if ( !attr || !attr->is_initialized )
47a24: 4a88 tstl %a0 47a26: 670c beqs 47a34 <pthread_mutexattr_destroy+0x18> 47a28: 4a90 tstl %a0@ 47a2a: 6708 beqs 47a34 <pthread_mutexattr_destroy+0x18>
return EINVAL; attr->is_initialized = false;
47a2c: 4280 clrl %d0
return 0; }
47a2e: 4e5e unlk %fp
) { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false;
47a30: 4290 clrl %a0@
return 0; }
47a32: 4e75 rts
{ if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0;
47a34: 7016 moveq #22,%d0
}
47a36: 4e5e unlk %fp 47a38: 4e75 rts
... 00047af0 <pthread_mutexattr_setprioceiling>: int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) {
47af0: 4e56 0000 linkw %fp,#0 47af4: 2f0a movel %a2,%sp@- 47af6: 246e 0008 moveal %fp@(8),%a2 47afa: 2f02 movel %d2,%sp@- 47afc: 242e 000c movel %fp@(12),%d2
if ( !attr || !attr->is_initialized )
47b00: 4a8a tstl %a2 47b02: 6704 beqs 47b08 <pthread_mutexattr_setprioceiling+0x18> 47b04: 4a92 tstl %a2@ 47b06: 660e bnes 47b16 <pthread_mutexattr_setprioceiling+0x26>
if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; return 0; }
47b08: 242e fff8 movel %fp@(-8),%d2
if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; return 0;
47b0c: 7016 moveq #22,%d0
}
47b0e: 246e fffc moveal %fp@(-4),%a2 47b12: 4e5e unlk %fp 47b14: 4e75 rts
) { if ( !attr || !attr->is_initialized ) return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) )
47b16: 2f02 movel %d2,%sp@- 47b18: 4eb9 0004 8114 jsr 48114 <_POSIX_Priority_Is_valid> 47b1e: 588f addql #4,%sp 47b20: 4a00 tstb %d0 47b22: 67e4 beqs 47b08 <pthread_mutexattr_setprioceiling+0x18>
return EINVAL; attr->prio_ceiling = prioceiling;
47b24: 2542 0008 movel %d2,%a2@(8)
return 0; }
47b28: 242e fff8 movel %fp@(-8),%d2 47b2c: 246e fffc moveal %fp@(-4),%a2
return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling;
47b30: 4280 clrl %d0
return 0; }
47b32: 4e5e unlk %fp 47b34: 4e75 rts
... 00047b38 <pthread_mutexattr_setprotocol>: int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) {
47b38: 4e56 0000 linkw %fp,#0 47b3c: 206e 0008 moveal %fp@(8),%a0 47b40: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
47b44: 4a88 tstl %a0 47b46: 670a beqs 47b52 <pthread_mutexattr_setprotocol+0x1a> 47b48: 4a90 tstl %a0@ 47b4a: 6706 beqs 47b52 <pthread_mutexattr_setprotocol+0x1a>
return EINVAL; switch ( protocol ) {
47b4c: 7202 moveq #2,%d1 47b4e: b280 cmpl %d0,%d1 47b50: 6406 bccs 47b58 <pthread_mutexattr_setprotocol+0x20>
case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; return 0;
47b52: 7016 moveq #22,%d0
default: return EINVAL; } }
47b54: 4e5e unlk %fp 47b56: 4e75 rts
switch ( protocol ) { case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol;
47b58: 2140 000c movel %d0,%a0@(12) 47b5c: 4280 clrl %d0
return 0; default: return EINVAL; } }
47b5e: 4e5e unlk %fp 47b60: 4e75 rts
... 00047b64 <pthread_mutexattr_setpshared>: int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) {
47b64: 4e56 0000 linkw %fp,#0 47b68: 206e 0008 moveal %fp@(8),%a0 47b6c: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
47b70: 4a88 tstl %a0 47b72: 670a beqs 47b7e <pthread_mutexattr_setpshared+0x1a> 47b74: 4a90 tstl %a0@ 47b76: 6706 beqs 47b7e <pthread_mutexattr_setpshared+0x1a>
return EINVAL; switch ( pshared ) {
47b78: 7201 moveq #1,%d1 47b7a: b280 cmpl %d0,%d1 47b7c: 6406 bccs 47b84 <pthread_mutexattr_setpshared+0x20>
case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0;
47b7e: 7016 moveq #22,%d0
default: return EINVAL; } }
47b80: 4e5e unlk %fp 47b82: 4e75 rts
return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared;
47b84: 2140 0004 movel %d0,%a0@(4) 47b88: 4280 clrl %d0
return 0; default: return EINVAL; } }
47b8a: 4e5e unlk %fp 47b8c: 4e75 rts
... 000459c4 <pthread_mutexattr_settype>: #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) {
459c4: 4e56 0000 linkw %fp,#0 459c8: 206e 0008 moveal %fp@(8),%a0 459cc: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
459d0: 4a88 tstl %a0 459d2: 670a beqs 459de <pthread_mutexattr_settype+0x1a> 459d4: 4a90 tstl %a0@ 459d6: 6706 beqs 459de <pthread_mutexattr_settype+0x1a>
return EINVAL; switch ( type ) {
459d8: 7203 moveq #3,%d1 459da: b280 cmpl %d0,%d1 459dc: 6406 bccs 459e4 <pthread_mutexattr_settype+0x20>
case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0;
459de: 7016 moveq #22,%d0
default: return EINVAL; } }
459e0: 4e5e unlk %fp 459e2: 4e75 rts
switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type;
459e4: 2140 0010 movel %d0,%a0@(16) 459e8: 4280 clrl %d0
return 0; default: return EINVAL; } }
459ea: 4e5e unlk %fp 459ec: 4e75 rts
... 00046768 <pthread_once>: int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) {
46768: 4e56 ffec linkw %fp,#-20 4676c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 46770: 246e 0008 moveal %fp@(8),%a2 46774: 266e 000c moveal %fp@(12),%a3
if ( !once_control || !init_routine )
46778: 4a8a tstl %a2 4677a: 6766 beqs 467e2 <pthread_once+0x7a> 4677c: 4a8b tstl %a3 4677e: 6762 beqs 467e2 <pthread_once+0x7a>
return EINVAL; if ( !once_control->init_executed ) {
46780: 4aaa 0004 tstl %a2@(4) 46784: 670c beqs 46792 <pthread_once+0x2a>
if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
46786: 4280 clrl %d0
} return 0; }
46788: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 4678e: 4e5e unlk %fp 46790: 4e75 rts
if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
46792: 240e movel %fp,%d2 46794: 5982 subql #4,%d2 46796: 49f9 0004 7428 lea 47428 <rtems_task_mode>,%a4 4679c: 2f02 movel %d2,%sp@- 4679e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 467a2: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 467a6: 4e94 jsr %a4@
if ( !once_control->init_executed ) {
467a8: 4fef 000c lea %sp@(12),%sp 467ac: 4aaa 0004 tstl %a2@(4) 467b0: 6714 beqs 467c6 <pthread_once+0x5e>
once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
467b2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 467b4: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED 467b8: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 467bc: 4e94 jsr %a4@ <== NOT EXECUTED 467be: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
467c2: 4280 clrl %d0 467c4: 60c2 bras 46788 <pthread_once+0x20>
if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true;
467c6: 7001 moveq #1,%d0 467c8: 2540 0004 movel %d0,%a2@(4)
if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true;
467cc: 2480 movel %d0,%a2@
once_control->init_executed = true; (*init_routine)();
467ce: 4e93 jsr %a3@
} rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
467d0: 2f02 movel %d2,%sp@- 467d2: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 467d6: 2f2e fffc movel %fp@(-4),%sp@- 467da: 4e94 jsr %a4@ 467dc: 4fef 000c lea %sp@(12),%sp 467e0: 60e0 bras 467c2 <pthread_once+0x5a> 467e2: 7016 moveq #22,%d0
} return 0; }
467e4: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 467ea: 4e5e unlk %fp 467ec: 4e75 rts
... 000469f8 <pthread_rwlock_destroy>: */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) {
469f8: 4e56 fffc linkw %fp,#-4 469fc: 206e 0008 moveal %fp@(8),%a0 46a00: 2f0a movel %a2,%sp@-
POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock )
46a02: 4a88 tstl %a0 46a04: 673e beqs 46a44 <pthread_rwlock_destroy+0x4c>
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get(
46a06: 486e fffc pea %fp@(-4) 46a0a: 2f10 movel %a0@,%sp@- 46a0c: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46a12: 4eb9 0004 9858 jsr 49858 <_Objects_Get>
return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) {
46a18: 4fef 000c lea %sp@(12),%sp 46a1c: 2440 moveal %d0,%a2 46a1e: 4aae fffc tstl %fp@(-4) 46a22: 6620 bnes 46a44 <pthread_rwlock_destroy+0x4c>
case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) {
46a24: 486a 0010 pea %a2@(16) 46a28: 4eb9 0004 a91c jsr 4a91c <_Thread_queue_First> 46a2e: 588f addql #4,%sp 46a30: 4a80 tstl %d0 46a32: 671a beqs 46a4e <pthread_rwlock_destroy+0x56>
_Thread_Enable_dispatch();
46a34: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return EINVAL; }
46a3a: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { _Thread_Enable_dispatch();
46a3e: 7010 moveq #16,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
46a40: 4e5e unlk %fp 46a42: 4e75 rts 46a44: 246e fff8 moveal %fp@(-8),%a2
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); return 0;
46a48: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
46a4a: 4e5e unlk %fp 46a4c: 4e75 rts
/* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
46a4e: 2f0a movel %a2,%sp@- 46a50: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46a56: 4eb9 0004 944c jsr 4944c <_Objects_Close>
*/ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
46a5c: 2f0a movel %a2,%sp@- 46a5e: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46a64: 4eb9 0004 96f4 jsr 496f4 <_Objects_Free>
_POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch();
46a6a: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return EINVAL; }
46a70: 246e fff8 moveal %fp@(-8),%a2
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); return 0;
46a74: 4fef 0010 lea %sp@(16),%sp
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch();
46a78: 4280 clrl %d0
case OBJECTS_ERROR: break; } return EINVAL; }
46a7a: 4e5e unlk %fp 46a7c: 4e75 rts
... 00046d4c <pthread_rwlock_tryrdlock>: */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) {
46d4c: 4e56 fffc linkw %fp,#-4 46d50: 2f0a movel %a2,%sp@- 46d52: 246e 0008 moveal %fp@(8),%a2
POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock )
46d56: 4a8a tstl %a2 46d58: 6752 beqs 46dac <pthread_rwlock_tryrdlock+0x60> 46d5a: 486e fffc pea %fp@(-4) 46d5e: 2f12 movel %a2@,%sp@- 46d60: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46d66: 4eb9 0004 9858 jsr 49858 <_Objects_Get>
return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) {
46d6c: 4fef 000c lea %sp@(12),%sp 46d70: 4aae fffc tstl %fp@(-4) 46d74: 6636 bnes 46dac <pthread_rwlock_tryrdlock+0x60>
case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading(
46d76: 42a7 clrl %sp@- 46d78: 2040 moveal %d0,%a0 46d7a: 42a7 clrl %sp@- 46d7c: 42a7 clrl %sp@- 46d7e: 2f12 movel %a2@,%sp@- 46d80: 4868 0010 pea %a0@(16) 46d84: 4eb9 0004 8b1c jsr 48b1c <_CORE_RWLock_Obtain_for_reading>
0, NULL ); _Thread_Enable_dispatch();
46d8a: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
46d90: 2079 0006 1d12 moveal 61d12 <_Thread_Executing>,%a0 46d96: 2f28 0034 movel %a0@(52),%sp@- 46d9a: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code>
case OBJECTS_ERROR: break; } return EINVAL; }
46da0: 246e fff8 moveal %fp@(-8),%a2
NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code(
46da4: 4fef 0018 lea %sp@(24),%sp
case OBJECTS_ERROR: break; } return EINVAL; }
46da8: 4e5e unlk %fp 46daa: 4e75 rts 46dac: 246e fff8 moveal %fp@(-8),%a2
NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code(
46db0: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
46db2: 4e5e unlk %fp 46db4: 4e75 rts
... 00046db8 <pthread_rwlock_trywrlock>: */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) {
46db8: 4e56 fffc linkw %fp,#-4 46dbc: 2f0a movel %a2,%sp@- 46dbe: 246e 0008 moveal %fp@(8),%a2
POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock )
46dc2: 4a8a tstl %a2 46dc4: 6752 beqs 46e18 <pthread_rwlock_trywrlock+0x60> 46dc6: 486e fffc pea %fp@(-4) 46dca: 2f12 movel %a2@,%sp@- 46dcc: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46dd2: 4eb9 0004 9858 jsr 49858 <_Objects_Get>
return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) {
46dd8: 4fef 000c lea %sp@(12),%sp 46ddc: 4aae fffc tstl %fp@(-4) 46de0: 6636 bnes 46e18 <pthread_rwlock_trywrlock+0x60>
case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing(
46de2: 42a7 clrl %sp@- 46de4: 2040 moveal %d0,%a0 46de6: 42a7 clrl %sp@- 46de8: 42a7 clrl %sp@- 46dea: 2f12 movel %a2@,%sp@- 46dec: 4868 0010 pea %a0@(16) 46df0: 4eb9 0004 8bdc jsr 48bdc <_CORE_RWLock_Obtain_for_writing>
false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch();
46df6: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
46dfc: 2079 0006 1d12 moveal 61d12 <_Thread_Executing>,%a0 46e02: 2f28 0034 movel %a0@(52),%sp@- 46e06: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code>
case OBJECTS_ERROR: break; } return EINVAL; }
46e0c: 246e fff8 moveal %fp@(-8),%a2
0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code(
46e10: 4fef 0018 lea %sp@(24),%sp
case OBJECTS_ERROR: break; } return EINVAL; }
46e14: 4e5e unlk %fp 46e16: 4e75 rts 46e18: 246e fff8 moveal %fp@(-8),%a2
0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code(
46e1c: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
46e1e: 4e5e unlk %fp 46e20: 4e75 rts
... 00046e24 <pthread_rwlock_unlock>: */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) {
46e24: 4e56 fffc linkw %fp,#-4 46e28: 206e 0008 moveal %fp@(8),%a0 46e2c: 2f02 movel %d2,%sp@-
POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock )
46e2e: 4a88 tstl %a0 46e30: 6742 beqs 46e74 <pthread_rwlock_unlock+0x50> 46e32: 486e fffc pea %fp@(-4) 46e36: 2f10 movel %a0@,%sp@- 46e38: 4879 0006 1e04 pea 61e04 <_POSIX_RWLock_Information> 46e3e: 4eb9 0004 9858 jsr 49858 <_Objects_Get>
return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) {
46e44: 4fef 000c lea %sp@(12),%sp 46e48: 4aae fffc tstl %fp@(-4) 46e4c: 6626 bnes 46e74 <pthread_rwlock_unlock+0x50>
case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock );
46e4e: 2040 moveal %d0,%a0 46e50: 4868 0010 pea %a0@(16) 46e54: 4eb9 0004 8c6c jsr 48c6c <_CORE_RWLock_Release> 46e5a: 2400 movel %d0,%d2
_Thread_Enable_dispatch();
46e5c: 4eb9 0004 a068 jsr 4a068 <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code( status );
46e62: 2f02 movel %d2,%sp@- 46e64: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code>
case OBJECTS_ERROR: break; } return EINVAL; }
46e6a: 242e fff8 movel %fp@(-8),%d2
switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status );
46e6e: 508f addql #8,%sp
case OBJECTS_ERROR: break; } return EINVAL; }
46e70: 4e5e unlk %fp 46e72: 4e75 rts 46e74: 242e fff8 movel %fp@(-8),%d2
switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status );
46e78: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
46e7a: 4e5e unlk %fp 46e7c: 4e75 rts
... 00047574 <pthread_rwlockattr_destroy>: */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) {
47574: 4e56 0000 linkw %fp,#0 47578: 206e 0008 moveal %fp@(8),%a0
if ( !attr || attr->is_initialized == false )
4757c: 4a88 tstl %a0 4757e: 670c beqs 4758c <pthread_rwlockattr_destroy+0x18> 47580: 4a90 tstl %a0@ 47582: 6708 beqs 4758c <pthread_rwlockattr_destroy+0x18>
return EINVAL; attr->is_initialized = false;
47584: 4280 clrl %d0
return 0; }
47586: 4e5e unlk %fp
) { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false;
47588: 4290 clrl %a0@
return 0; }
4758a: 4e75 rts
{ if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0;
4758c: 7016 moveq #22,%d0
}
4758e: 4e5e unlk %fp 47590: 4e75 rts
... 000475d8 <pthread_rwlockattr_setpshared>: int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) {
475d8: 4e56 0000 linkw %fp,#0 475dc: 206e 0008 moveal %fp@(8),%a0 475e0: 202e 000c movel %fp@(12),%d0
if ( !attr )
475e4: 4a88 tstl %a0 475e6: 670a beqs 475f2 <pthread_rwlockattr_setpshared+0x1a>
return EINVAL; if ( !attr->is_initialized )
475e8: 4a90 tstl %a0@ 475ea: 6706 beqs 475f2 <pthread_rwlockattr_setpshared+0x1a>
return EINVAL; switch ( pshared ) {
475ec: 7201 moveq #1,%d1 475ee: b280 cmpl %d0,%d1 475f0: 6406 bccs 475f8 <pthread_rwlockattr_setpshared+0x20>
case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0;
475f2: 7016 moveq #22,%d0
default: return EINVAL; } }
475f4: 4e5e unlk %fp 475f6: 4e75 rts
return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared;
475f8: 2140 0004 movel %d0,%a0@(4) 475fc: 4280 clrl %d0
return 0; default: return EINVAL; } }
475fe: 4e5e unlk %fp 47600: 4e75 rts
... 0004eb30 <pthread_self>: #include <rtems/system.h> #include <rtems/score/thread.h> pthread_t pthread_self( void ) {
4eb30: 4e56 0000 linkw %fp,#0 4eb34: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0
return _Thread_Executing->Object.id; }
4eb3a: 4e5e unlk %fp 4eb3c: 2028 0008 movel %a0@(8),%d0 4eb40: 4e75 rts
... 00045864 <pthread_setcancelstate>: int pthread_setcancelstate( int state, int *oldstate ) {
45864: 4e56 0000 linkw %fp,#0 45868: 222e 0008 movel %fp@(8),%d1 4586c: 206e 000c moveal %fp@(12),%a0
* Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() )
45870: 2039 0005 f7b2 movel 5f7b2 <_ISR_Nest_level>,%d0 45876: 6610 bnes 45888 <pthread_setcancelstate+0x24>
return EPROTO; if ( !oldstate )
45878: 4a88 tstl %a0 4587a: 6706 beqs 45882 <pthread_setcancelstate+0x1e>
return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
4587c: 7001 moveq #1,%d0 4587e: b081 cmpl %d1,%d0 45880: 640c bccs 4588e <pthread_setcancelstate+0x2a>
/* * _Thread_Enable_dispatch is invoked by above call. */ return 0;
45882: 7016 moveq #22,%d0
}
45884: 4e5e unlk %fp 45886: 4e75 rts
* Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() )
45888: 7047 moveq #71,%d0
/* * _Thread_Enable_dispatch is invoked by above call. */ return 0; }
4588a: 4e5e unlk %fp 4588c: 4e75 rts
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
4588e: 2039 0005 f718 movel 5f718 <_Thread_Dispatch_disable_level>,%d0 45894: 5280 addql #1,%d0
return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
45896: 2279 0005 f7d2 moveal 5f7d2 <_Thread_Executing>,%a1 4589c: 23c0 0005 f718 movel %d0,5f718 <_Thread_Dispatch_disable_level> 458a2: 2269 010e moveal %a1@(270),%a1
_Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state;
458a6: 20a9 00d4 movel %a1@(212),%a0@
thread_support->cancelability_state = state;
458aa: 2341 00d4 movel %d1,%a1@(212)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
458ae: 2f39 0005 f7d2 movel 5f7d2 <_Thread_Executing>,%sp@- 458b4: 4eb9 0004 b05c jsr 4b05c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/* * _Thread_Enable_dispatch is invoked by above call. */ return 0;
458ba: 588f addql #4,%sp
_Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
458bc: 4280 clrl %d0
/* * _Thread_Enable_dispatch is invoked by above call. */ return 0; }
458be: 4e5e unlk %fp 458c0: 4e75 rts
... 000458c4 <pthread_setcanceltype>: int pthread_setcanceltype( int type, int *oldtype ) {
458c4: 4e56 0000 linkw %fp,#0 458c8: 222e 0008 movel %fp@(8),%d1 458cc: 206e 000c moveal %fp@(12),%a0
* Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() )
458d0: 2039 0005 f7b2 movel 5f7b2 <_ISR_Nest_level>,%d0 458d6: 6610 bnes 458e8 <pthread_setcanceltype+0x24>
return EPROTO; if ( !oldtype )
458d8: 4a88 tstl %a0 458da: 6706 beqs 458e2 <pthread_setcanceltype+0x1e>
return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
458dc: 7001 moveq #1,%d0 458de: b081 cmpl %d1,%d0 458e0: 640c bccs 458ee <pthread_setcanceltype+0x2a>
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); /* * _Thread_Enable_dispatch is invoked by above call. */ return 0;
458e2: 7016 moveq #22,%d0
}
458e4: 4e5e unlk %fp 458e6: 4e75 rts
* Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() )
458e8: 7047 moveq #71,%d0
/* * _Thread_Enable_dispatch is invoked by above call. */ return 0; }
458ea: 4e5e unlk %fp 458ec: 4e75 rts 458ee: 2039 0005 f718 movel 5f718 <_Thread_Dispatch_disable_level>,%d0 458f4: 5280 addql #1,%d0
return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
458f6: 2279 0005 f7d2 moveal 5f7d2 <_Thread_Executing>,%a1 458fc: 23c0 0005 f718 movel %d0,5f718 <_Thread_Dispatch_disable_level> 45902: 2269 010e moveal %a1@(270),%a1
_Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type;
45906: 20a9 00d8 movel %a1@(216),%a0@
thread_support->cancelability_type = type;
4590a: 2341 00d8 movel %d1,%a1@(216)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
4590e: 2f39 0005 f7d2 movel 5f7d2 <_Thread_Executing>,%sp@- 45914: 4eb9 0004 b05c jsr 4b05c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/* * _Thread_Enable_dispatch is invoked by above call. */ return 0;
4591a: 588f addql #4,%sp
_Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
4591c: 4280 clrl %d0
/* * _Thread_Enable_dispatch is invoked by above call. */ return 0; }
4591e: 4e5e unlk %fp 45920: 4e75 rts
... 0004897c <pthread_setschedparam>: int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) {
4897c: 4e56 ffe0 linkw %fp,#-32 48980: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 48984: 282e 000c movel %fp@(12),%d4 48988: 242e 0010 movel %fp@(16),%d2
int rc; /* * Check all the parameters */ if ( !param )
4898c: 6700 00c4 beqw 48a52 <pthread_setschedparam+0xd6>
return EINVAL; rc = _POSIX_Thread_Translate_sched_param(
48990: 486e fff8 pea %fp@(-8) 48994: 486e fffc pea %fp@(-4) 48998: 2f02 movel %d2,%sp@- 4899a: 2f04 movel %d4,%sp@- 4899c: 4eb9 0004 e798 jsr 4e798 <_POSIX_Thread_Translate_sched_param>
policy, param, &budget_algorithm, &budget_callout ); if ( rc )
489a2: 4fef 0010 lea %sp@(16),%sp
* Check all the parameters */ if ( !param ) return EINVAL; rc = _POSIX_Thread_Translate_sched_param(
489a6: 2600 movel %d0,%d3
policy, param, &budget_algorithm, &budget_callout ); if ( rc )
489a8: 670c beqs 489b6 <pthread_setschedparam+0x3a>
case OBJECTS_ERROR: break; } return ESRCH; }
489aa: 2003 movel %d3,%d0 489ac: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 489b2: 4e5e unlk %fp 489b4: 4e75 rts 489b6: 486e fff4 pea %fp@(-12) 489ba: 2f2e 0008 movel %fp@(8),%sp@- 489be: 4879 0006 43ba pea 643ba <_POSIX_Threads_Information> 489c4: 4eb9 0004 aab8 jsr 4aab8 <_Objects_Get>
/* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) {
489ca: 4fef 000c lea %sp@(12),%sp 489ce: 2440 moveal %d0,%a2 489d0: 4aae fff4 tstl %fp@(-12) 489d4: 6600 008a bnew 48a60 <pthread_setschedparam+0xe4>
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ];
489d8: 266a 010e moveal %a2@(270),%a3
if ( api->schedpolicy == SCHED_SPORADIC )
489dc: 7004 moveq #4,%d0 489de: b0ab 0080 cmpl %a3@(128),%d0 489e2: 6700 00ba beqw 48a9e <pthread_setschedparam+0x122>
(void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param;
489e6: 2242 moveal %d2,%a1 489e8: 41eb 0084 lea %a3@(132),%a0
api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy;
489ec: 2744 0080 movel %d4,%a3@(128)
api->schedparam = *param;
489f0: 20d9 movel %a1@+,%a0@+ 489f2: 20d9 movel %a1@+,%a0@+ 489f4: 20d9 movel %a1@+,%a0@+ 489f6: 20d9 movel %a1@+,%a0@+ 489f8: 20d9 movel %a1@+,%a0@+ 489fa: 20d9 movel %a1@+,%a0@+
the_thread->budget_algorithm = budget_algorithm;
489fc: 256e fffc 007a movel %fp@(-4),%a2@(122)
if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param;
48a02: 2091 movel %a1@,%a0@
the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout;
48a04: 256e fff8 007e movel %fp@(-8),%a2@(126)
switch ( api->schedpolicy ) {
48a0a: 4a84 tstl %d4 48a0c: 6d32 blts 48a40 <pthread_setschedparam+0xc4> 48a0e: 7002 moveq #2,%d0 48a10: b084 cmpl %d4,%d0 48a12: 6d5c blts 48a70 <pthread_setschedparam+0xf4> 48a14: 4280 clrl %d0 48a16: 1039 0006 29e6 moveb 629e6 <rtems_maximum_priority>,%d0
case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
48a1c: 41f9 0006 4184 lea 64184 <_Thread_Ticks_per_timeslice>,%a0 48a22: 90ab 0084 subl %a3@(132),%d0 48a26: 2550 0076 movel %a0@,%a2@(118)
the_thread->real_priority =
48a2a: 2540 0018 movel %d0,%a2@(24)
_POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority(
48a2e: 4878 0001 pea 1 <ADD> 48a32: 2f00 movel %d0,%sp@- 48a34: 2f0a movel %a2,%sp@- 48a36: 4eb9 0004 ada8 jsr 4ada8 <_Thread_Change_priority>
the_thread, the_thread->real_priority, true ); break;
48a3c: 4fef 000c lea %sp@(12),%sp
_Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch();
48a40: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return ESRCH; }
48a46: 2003 movel %d3,%d0 48a48: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a4e: 4e5e unlk %fp 48a50: 4e75 rts
int rc; /* * Check all the parameters */ if ( !param )
48a52: 7616 moveq #22,%d3
case OBJECTS_ERROR: break; } return ESRCH; }
48a54: 2003 movel %d3,%d0 48a56: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a5c: 4e5e unlk %fp 48a5e: 4e75 rts
/* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) {
48a60: 163c 0003 moveb #3,%d3
case OBJECTS_ERROR: break; } return ESRCH; }
48a64: 2003 movel %d3,%d0 48a66: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a6c: 4e5e unlk %fp 48a6e: 4e75 rts
api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) {
48a70: 103c 0004 moveb #4,%d0 48a74: b084 cmpl %d4,%d0 48a76: 66c8 bnes 48a40 <pthread_setschedparam+0xc4>
true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority;
48a78: 276b 0084 00a0 movel %a3@(132),%a3@(160)
_Watchdog_Remove( &api->Sporadic_timer );
48a7e: 486b 00a4 pea %a3@(164) 48a82: 4eb9 0004 c738 jsr 4c738 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
48a88: 2f0a movel %a2,%sp@- 48a8a: 42a7 clrl %sp@- 48a8c: 4eb9 0004 88c0 jsr 488c0 <_POSIX_Threads_Sporadic_budget_TSR> 48a92: 4fef 000c lea %sp@(12),%sp
break; } _Thread_Enable_dispatch();
48a96: 4eb9 0004 b2c8 jsr 4b2c8 <_Thread_Enable_dispatch> 48a9c: 60a8 bras 48a46 <pthread_setschedparam+0xca>
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer );
48a9e: 486b 00a4 pea %a3@(164) 48aa2: 4eb9 0004 c738 jsr 4c738 <_Watchdog_Remove>
api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm;
48aa8: 256e fffc 007a movel %fp@(-4),%a2@(122)
if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param;
48aae: 2242 moveal %d2,%a1 48ab0: 41eb 0084 lea %a3@(132),%a0
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer );
48ab4: 588f addql #4,%sp
api->schedpolicy = policy;
48ab6: 2744 0080 movel %d4,%a3@(128)
api->schedparam = *param;
48aba: 20d9 movel %a1@+,%a0@+ 48abc: 20d9 movel %a1@+,%a0@+ 48abe: 20d9 movel %a1@+,%a0@+ 48ac0: 20d9 movel %a1@+,%a0@+ 48ac2: 20d9 movel %a1@+,%a0@+ 48ac4: 20d9 movel %a1@+,%a0@+
the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout;
48ac6: 256e fff8 007e movel %fp@(-8),%a2@(126)
if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param;
48acc: 2091 movel %a1@,%a0@
the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) {
48ace: 4a84 tstl %d4 48ad0: 6c00 ff3c bgew 48a0e <pthread_setschedparam+0x92>
48ad4: 6000 ff6a braw 48a40 <pthread_setschedparam+0xc4> <== NOT EXECUTED
00045e88 <pthread_setspecific>: int pthread_setspecific( pthread_key_t key, const void *value ) {
45e88: 4e56 fffc linkw %fp,#-4 45e8c: 2f03 movel %d3,%sp@- 45e8e: 2f02 movel %d2,%sp@- 45e90: 486e fffc pea %fp@(-4) 45e94: 2f2e 0008 movel %fp@(8),%sp@- 45e98: 4879 0006 1228 pea 61228 <_POSIX_Keys_Information> 45e9e: 4eb9 0004 85b8 jsr 485b8 <_Objects_Get>
uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) {
45ea4: 4fef 000c lea %sp@(12),%sp 45ea8: 4aae fffc tstl %fp@(-4) 45eac: 663e bnes 45eec <pthread_setspecific+0x64>
case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id );
45eae: 2079 0006 0f4e moveal 60f4e <_Thread_Executing>,%a0
index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value;
45eb4: 7618 moveq #24,%d3 45eb6: 2240 moveal %d0,%a1
the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id );
45eb8: 2428 0008 movel %a0@(8),%d2
index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value;
45ebc: 2202 movel %d2,%d1 45ebe: e6a9 lsrl %d3,%d1 45ec0: 163c 0007 moveb #7,%d3 45ec4: c283 andl %d3,%d1 45ec6: 0282 0000 ffff andil #65535,%d2 45ecc: 2071 1c14 moveal %a1@(00000014,%d1:l:4),%a0 45ed0: 43ee 000c lea %fp@(12),%a1 45ed4: 2191 2c00 movel %a1@,%a0@(00000000,%d2:l:4)
_Thread_Enable_dispatch();
45ed8: 4eb9 0004 8dc8 jsr 48dc8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return EINVAL; }
45ede: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; _Thread_Enable_dispatch();
45ee2: 4280 clrl %d0
case OBJECTS_ERROR: break; } return EINVAL; }
45ee4: 262e fff8 movel %fp@(-8),%d3 45ee8: 4e5e unlk %fp 45eea: 4e75 rts 45eec: 242e fff4 movel %fp@(-12),%d2
uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) {
45ef0: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
45ef2: 262e fff8 movel %fp@(-8),%d3 45ef6: 4e5e unlk %fp 45ef8: 4e75 rts
... 00045e5c <pthread_spin_destroy>: */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) {
45e5c: 4e56 fff8 linkw %fp,#-8 45e60: 206e 0008 moveal %fp@(8),%a0
POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock )
45e64: 4a88 tstl %a0 45e66: 6730 beqs 45e98 <pthread_spin_destroy+0x3c>
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get(
45e68: 486e fffc pea %fp@(-4) 45e6c: 2f10 movel %a0@,%sp@- 45e6e: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 45e74: 4eb9 0004 80d4 jsr 480d4 <_Objects_Get>
return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) {
45e7a: 4fef 000c lea %sp@(12),%sp 45e7e: 4aae fffc tstl %fp@(-4) 45e82: 6614 bnes 45e98 <pthread_spin_destroy+0x3c>
*/ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0);
45e84: 2040 moveal %d0,%a0 45e86: 2228 0018 movel %a0@(24),%d1
case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) {
45e8a: 6712 beqs 45e9e <pthread_spin_destroy+0x42>
_Thread_Enable_dispatch();
45e8c: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch> 45e92: 7010 moveq #16,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
45e94: 4e5e unlk %fp 45e96: 4e75 rts
_Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); return 0;
45e98: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
45e9a: 4e5e unlk %fp 45e9c: 4e75 rts
if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object );
45e9e: 2f00 movel %d0,%sp@- 45ea0: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 45ea6: 2d40 fff8 movel %d0,%fp@(-8) 45eaa: 4eb9 0004 7cc8 jsr 47cc8 <_Objects_Close>
*/ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object );
45eb0: 202e fff8 movel %fp@(-8),%d0 45eb4: 2f00 movel %d0,%sp@- 45eb6: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 45ebc: 4eb9 0004 7f70 jsr 47f70 <_Objects_Free>
_POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch();
45ec2: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch>
return 0;
45ec8: 4fef 0010 lea %sp@(16),%sp
_Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch();
45ecc: 4280 clrl %d0
case OBJECTS_ERROR: break; } return EINVAL; }
45ece: 4e5e unlk %fp 45ed0: 4e75 rts
... 00045ed4 <pthread_spin_init>: int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) {
45ed4: 4e56 fffc linkw %fp,#-4 45ed8: 2f0b movel %a3,%sp@- 45eda: 2f0a movel %a2,%sp@- 45edc: 246e 0008 moveal %fp@(8),%a2
POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock )
45ee0: 4a8a tstl %a2 45ee2: 6764 beqs 45f48 <pthread_spin_init+0x74>
return EINVAL; switch ( pshared ) {
45ee4: 4aae 000c tstl %fp@(12) 45ee8: 665e bnes 45f48 <pthread_spin_init+0x74>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
45eea: 2039 0006 0094 movel 60094 <_Thread_Dispatch_disable_level>,%d0 45ef0: 5280 addql #1,%d0 45ef2: 23c0 0006 0094 movel %d0,60094 <_Thread_Dispatch_disable_level>
* This function allocates a spinlock control block from * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *)
45ef8: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 45efe: 4eb9 0004 7c38 jsr 47c38 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) {
45f04: 588f addql #4,%sp 45f06: 2640 moveal %d0,%a3 45f08: 4a80 tstl %d0 45f0a: 674a beqs 45f56 <pthread_spin_init+0x82>
_Thread_Enable_dispatch(); return EAGAIN; } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes );
45f0c: 486e fffc pea %fp@(-4) 45f10: 486b 0010 pea %a3@(16) 45f14: 4eb9 0004 762c jsr 4762c <_CORE_spinlock_Initialize>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
45f1a: 202b 0008 movel %a3@(8),%d0 45f1e: 4281 clrl %d1 45f20: 2079 0006 02cc moveal 602cc <_POSIX_Spinlock_Information+0x18>,%a0 45f26: 3200 movew %d0,%d1 45f28: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name;
45f2c: 42ab 000c clrl %a3@(12)
_Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id;
45f30: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
45f32: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch>
return 0; }
45f38: 246e fff4 moveal %fp@(-12),%a2
_Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0;
45f3c: 508f addql #8,%sp
_Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch();
45f3e: 4280 clrl %d0
return 0; }
45f40: 266e fff8 moveal %fp@(-8),%a3 45f44: 4e5e unlk %fp 45f46: 4e75 rts 45f48: 246e fff4 moveal %fp@(-12),%a2
_Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0;
45f4c: 7016 moveq #22,%d0
}
45f4e: 266e fff8 moveal %fp@(-8),%a3 45f52: 4e5e unlk %fp 45f54: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { _Thread_Enable_dispatch();
45f56: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch>
*spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; }
45f5c: 246e fff4 moveal %fp@(-12),%a2
_Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { _Thread_Enable_dispatch();
45f60: 700b moveq #11,%d0
*spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; }
45f62: 266e fff8 moveal %fp@(-8),%a3 45f66: 4e5e unlk %fp 45f68: 4e75 rts
... 00045f6c <pthread_spin_lock>: */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) {
45f6c: 4e56 fffc linkw %fp,#-4 45f70: 206e 0008 moveal %fp@(8),%a0 45f74: 2f02 movel %d2,%sp@-
POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock )
45f76: 4a88 tstl %a0 45f78: 674a beqs 45fc4 <pthread_spin_lock+0x58>
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get(
45f7a: 486e fffc pea %fp@(-4) 45f7e: 2f10 movel %a0@,%sp@- 45f80: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 45f86: 4eb9 0004 80d4 jsr 480d4 <_Objects_Get>
return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) {
45f8c: 4fef 000c lea %sp@(12),%sp 45f90: 4aae fffc tstl %fp@(-4) 45f94: 662e bnes 45fc4 <pthread_spin_lock+0x58>
case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 );
45f96: 42a7 clrl %sp@- 45f98: 4878 0001 pea 1 <ADD> 45f9c: 2040 moveal %d0,%a0 45f9e: 4868 0010 pea %a0@(16) 45fa2: 4eb9 0004 76a4 jsr 476a4 <_CORE_spinlock_Wait> 45fa8: 2400 movel %d0,%d2
_Thread_Enable_dispatch();
45faa: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
45fb0: 2f02 movel %d2,%sp@- 45fb2: 4eb9 0004 5fd0 jsr 45fd0 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
case OBJECTS_ERROR: break; } return EINVAL; }
45fb8: 242e fff8 movel %fp@(-8),%d2
switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
45fbc: 4fef 0010 lea %sp@(16),%sp
case OBJECTS_ERROR: break; } return EINVAL; }
45fc0: 4e5e unlk %fp 45fc2: 4e75 rts 45fc4: 242e fff8 movel %fp@(-8),%d2
switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
45fc8: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
45fca: 4e5e unlk %fp 45fcc: 4e75 rts
... 00046048 <pthread_spin_unlock>: */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) {
46048: 4e56 fffc linkw %fp,#-4 4604c: 206e 0008 moveal %fp@(8),%a0 46050: 2f02 movel %d2,%sp@-
POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock )
46052: 4a88 tstl %a0 46054: 6742 beqs 46098 <pthread_spin_unlock+0x50> 46056: 486e fffc pea %fp@(-4) 4605a: 2f10 movel %a0@,%sp@- 4605c: 4879 0006 02b4 pea 602b4 <_POSIX_Spinlock_Information> 46062: 4eb9 0004 80d4 jsr 480d4 <_Objects_Get>
return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) {
46068: 4fef 000c lea %sp@(12),%sp 4606c: 4aae fffc tstl %fp@(-4) 46070: 6626 bnes 46098 <pthread_spin_unlock+0x50>
case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock );
46072: 2040 moveal %d0,%a0 46074: 4868 0010 pea %a0@(16) 46078: 4eb9 0004 764c jsr 4764c <_CORE_spinlock_Release> 4607e: 2400 movel %d0,%d2
_Thread_Enable_dispatch();
46080: 4eb9 0004 88e4 jsr 488e4 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
46086: 2f02 movel %d2,%sp@- 46088: 4eb9 0004 5fd0 jsr 45fd0 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
case OBJECTS_ERROR: break; } return EINVAL; }
4608e: 242e fff8 movel %fp@(-8),%d2
switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
46092: 508f addql #8,%sp
case OBJECTS_ERROR: break; } return EINVAL; }
46094: 4e5e unlk %fp 46096: 4e75 rts 46098: 242e fff8 movel %fp@(-8),%d2
switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
4609c: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return EINVAL; }
4609e: 4e5e unlk %fp 460a0: 4e75 rts
... 00046454 <pthread_testcancel>: * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) {
46454: 4e56 0000 linkw %fp,#0
* Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() )
46458: 2039 0006 01ba movel 601ba <_ISR_Nest_level>,%d0 4645e: 663c bnes 4649c <pthread_testcancel+0x48>
return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
46460: 2079 0006 01da moveal 601da <_Thread_Executing>,%a0 46466: 2039 0006 0120 movel 60120 <_Thread_Dispatch_disable_level>,%d0 4646c: 5280 addql #1,%d0 4646e: 2068 010e moveal %a0@(270),%a0 46472: 23c0 0006 0120 movel %d0,60120 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
46478: 4aa8 00d4 tstl %a0@(212) 4647c: 6622 bnes 464a0 <pthread_testcancel+0x4c>
thread_support->cancelation_requested )
4647e: 4aa8 00dc tstl %a0@(220) 46482: 671c beqs 464a0 <pthread_testcancel+0x4c>
cancel = true; _Thread_Enable_dispatch();
46484: 4eb9 0004 8b28 jsr 48b28 <_Thread_Enable_dispatch>
if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
4648a: 4878 ffff pea ffffffff <LESS> 4648e: 2f39 0006 01da movel 601da <_Thread_Executing>,%sp@- 46494: 4eb9 0004 c180 jsr 4c180 <_POSIX_Thread_Exit>
4649a: 508f addql #8,%sp <== NOT EXECUTED
}
4649c: 4e5e unlk %fp <== NOT EXECUTED 4649e: 4e75 rts <== NOT EXECUTED
464a0: 4e5e unlk %fp
_Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch();
464a2: 4ef9 0004 8b28 jmp 48b28 <_Thread_Enable_dispatch>
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 ddb0 moveal 5ddb0 <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 ddb0 moveal 5ddb0 <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
... 0005b624 <read>: ssize_t read( int fd, void *buffer, size_t count ) {
5b624: 4e56 fff4 linkw %fp,#-12 5b628: 202e 0008 movel %fp@(8),%d0 5b62c: 222e 000c movel %fp@(12),%d1 5b630: 206e 0010 moveal %fp@(16),%a0 5b634: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
5b638: b0b9 0005 d6a4 cmpl 5d6a4 <rtems_libio_number_iops>,%d0 5b63e: 6468 bccs 5b6a8 <read+0x84>
iop = rtems_libio_iop( fd );
5b640: 2479 0005 eda4 moveal 5eda4 <rtems_libio_iops>,%a2 5b646: ed88 lsll #6,%d0 5b648: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5b64a: 202a 0014 movel %a2@(20),%d0 5b64e: 0800 0008 btst #8,%d0 5b652: 6754 beqs 5b6a8 <read+0x84>
rtems_libio_check_buffer( buffer );
5b654: 4a81 tstl %d1 5b656: 6768 beqs 5b6c0 <read+0x9c>
rtems_libio_check_count( count );
5b658: 4a88 tstl %a0 5b65a: 6740 beqs 5b69c <read+0x78>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5b65c: 0800 0001 btst #1,%d0 5b660: 675e beqs 5b6c0 <read+0x9c>
/* * Now process the read(). */ if ( !iop->handlers->read_h )
5b662: 226a 003c moveal %a2@(60),%a1 5b666: 2269 0008 moveal %a1@(8),%a1 5b66a: 4a89 tstl %a1 5b66c: 676a beqs 5b6d8 <read+0xb4>
rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count );
5b66e: 2f08 movel %a0,%sp@- 5b670: 2f01 movel %d1,%sp@- 5b672: 2f0a movel %a2,%sp@- 5b674: 4e91 jsr %a1@
if ( rc > 0 )
5b676: 4fef 000c lea %sp@(12),%sp 5b67a: 4a80 tstl %d0 5b67c: 6f14 bles 5b692 <read+0x6e>
iop->offset += rc;
5b67e: 2400 movel %d0,%d2 5b680: 5bc1 smi %d1 5b682: 49c1 extbl %d1 5b684: d5aa 0010 addl %d2,%a2@(16) 5b688: 262a 000c movel %a2@(12),%d3 5b68c: d781 addxl %d1,%d3 5b68e: 2543 000c movel %d3,%a2@(12)
return rc; }
5b692: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b698: 4e5e unlk %fp 5b69a: 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 );
5b69c: 4280 clrl %d0 <== NOT EXECUTED
if ( rc > 0 ) iop->offset += rc; return rc; }
5b69e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5b6a4: 4e5e unlk %fp <== NOT EXECUTED 5b6a6: 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 );
5b6a8: 4eb9 0004 eb8c jsr 4eb8c <__errno> 5b6ae: 7409 moveq #9,%d2 5b6b0: 2040 moveal %d0,%a0 5b6b2: 70ff moveq #-1,%d0 5b6b4: 2082 movel %d2,%a0@
if ( rc > 0 ) iop->offset += rc; return rc; }
5b6b6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b6bc: 4e5e unlk %fp 5b6be: 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 );
5b6c0: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 5b6c6: 7216 moveq #22,%d1 <== NOT EXECUTED 5b6c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b6ca: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 ) iop->offset += rc; return rc; }
5b6cc: 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 );
5b6d2: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( rc > 0 ) iop->offset += rc; return rc; }
5b6d4: 4e5e unlk %fp <== NOT EXECUTED 5b6d6: 4e75 rts <== NOT EXECUTED
/* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
5b6d8: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 5b6de: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b6e0: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 ) iop->offset += rc; return rc; }
5b6e2: 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 );
5b6e8: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if ( rc > 0 ) iop->offset += rc; return rc; }
5b6ee: 4e5e unlk %fp <== NOT EXECUTED
5b6f0: 4e75 rts
000685b0 <readlink>: ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) {
685b0: 4e56 ffe0 linkw %fp,#-32 685b4: 48d7 001c moveml %d2-%d4,%sp@ 685b8: 262e 0008 movel %fp@(8),%d3 685bc: 282e 000c movel %fp@(12),%d4
rtems_filesystem_location_info_t loc; int result; if (!buf)
685c0: 6700 0092 beqw 68654 <readlink+0xa4>
rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
685c4: 2f03 movel %d3,%sp@- 685c6: 240e movel %fp,%d2 685c8: 0682 ffff ffec addil #-20,%d2 685ce: 4eb9 0008 6f0c jsr 86f0c <strlen> 685d4: 4297 clrl %sp@ 685d6: 2f02 movel %d2,%sp@- 685d8: 42a7 clrl %sp@- 685da: 2f00 movel %d0,%sp@- 685dc: 2f03 movel %d3,%sp@- 685de: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path>
0, &loc, false ); if ( result != 0 )
685e4: 4fef 0014 lea %sp@(20),%sp 685e8: 4a80 tstl %d0 685ea: 665a bnes 68646 <readlink+0x96>
return -1; if ( !loc.ops->node_type_h ){
685ec: 226e fff8 moveal %fp@(-8),%a1 685f0: 2069 0010 moveal %a1@(16),%a0 685f4: 4a88 tstl %a0 685f6: 6700 00a6 beqw 6869e <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 ){
685fa: 2f02 movel %d2,%sp@- 685fc: 4e90 jsr %a0@ 685fe: 588f addql #4,%sp 68600: 7204 moveq #4,%d1 68602: b280 cmpl %d0,%d1 68604: 6668 bnes 6866e <readlink+0xbe>
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){
68606: 226e fff8 moveal %fp@(-8),%a1 6860a: 2069 003c moveal %a1@(60),%a0 6860e: 4a88 tstl %a0 68610: 6700 008c beqw 6869e <readlink+0xee>
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
68614: 2f2e 0010 movel %fp@(16),%sp@- 68618: 2f04 movel %d4,%sp@- 6861a: 2f02 movel %d2,%sp@- 6861c: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
6861e: 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 );
68622: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
68624: 4fef 000c lea %sp@(12),%sp 68628: 4a88 tstl %a0 6862a: 670e beqs 6863a <readlink+0x8a> 6862c: 2068 001c moveal %a0@(28),%a0 68630: 4a88 tstl %a0 68632: 6706 beqs 6863a <readlink+0x8a> 68634: 2f02 movel %d2,%sp@- 68636: 4e90 jsr %a0@ 68638: 588f addql #4,%sp
return result; }
6863a: 2003 movel %d3,%d0 6863c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 68642: 4e5e unlk %fp 68644: 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 )
68646: 76ff moveq #-1,%d3 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; }
68648: 2003 movel %d3,%d0 <== NOT EXECUTED 6864a: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68650: 4e5e unlk %fp <== NOT EXECUTED 68652: 4e75 rts <== NOT EXECUTED
{ rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT );
68654: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 6865a: 76ff moveq #-1,%d3 <== NOT EXECUTED 6865c: 720e moveq #14,%d1 <== NOT EXECUTED 6865e: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; }
68660: 2003 movel %d3,%d0 <== NOT EXECUTED 68662: 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 );
68668: 2081 movel %d1,%a0@ <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; }
6866a: 4e5e unlk %fp <== NOT EXECUTED 6866c: 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 );
6866e: 206e fff8 moveal %fp@(-8),%a0 68672: 4a88 tstl %a0 68674: 670e beqs 68684 <readlink+0xd4> 68676: 2068 001c moveal %a0@(28),%a0 6867a: 4a88 tstl %a0 6867c: 6706 beqs 68684 <readlink+0xd4> 6867e: 2f02 movel %d2,%sp@- 68680: 4e90 jsr %a0@ 68682: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EINVAL );
68684: 4eb9 0008 0e64 jsr 80e64 <__errno> 6868a: 76ff moveq #-1,%d3 6868c: 2040 moveal %d0,%a0 6868e: 7016 moveq #22,%d0 68690: 2080 movel %d0,%a0@
result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; }
68692: 2003 movel %d3,%d0 68694: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 6869a: 4e5e unlk %fp 6869c: 4e75 rts
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc );
6869e: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 686a2: 4a88 tstl %a0 <== NOT EXECUTED 686a4: 6706 beqs 686ac <readlink+0xfc> <== NOT EXECUTED 686a6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 686a8: 4e90 jsr %a0@ <== NOT EXECUTED 686aa: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
686ac: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 686b2: 76ff moveq #-1,%d3 <== NOT EXECUTED 686b4: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; }
686b6: 2003 movel %d3,%d0 <== NOT EXECUTED 686b8: 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 );
686be: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; }
686c4: 4e5e unlk %fp <== NOT EXECUTED
686c6: 4e75 rts
00044948 <readv>: ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) {
44948: 4e56 ffe0 linkw %fp,#-32 4494c: 202e 0008 movel %fp@(8),%d0 44950: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 44954: 246e 000c moveal %fp@(12),%a2 44958: 242e 0010 movel %fp@(16),%d2
int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd );
4495c: b0b9 0006 1344 cmpl 61344 <rtems_libio_number_iops>,%d0 44962: 6400 00f0 bccw 44a54 <readv+0x10c>
iop = rtems_libio_iop( fd );
44966: 2679 0006 3218 moveal 63218 <rtems_libio_iops>,%a3 4496c: ed88 lsll #6,%d0 4496e: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
44970: 202b 0014 movel %a3@(20),%d0 44974: 0800 0008 btst #8,%d0 44978: 6700 00da beqw 44a54 <readv+0x10c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
4497c: 0800 0001 btst #1,%d0 44980: 6700 009c beqw 44a1e <readv+0xd6>
/* * Argument validation on IO vector */ if ( !iov )
44984: 4a8a tstl %a2 44986: 6700 0096 beqw 44a1e <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 )
4498a: 4a82 tstl %d2 4498c: 6f00 0090 blew 44a1e <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX )
44990: 0c82 0000 0400 cmpil #1024,%d2 44996: 6e00 0086 bgtw 44a1e <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h )
4499a: 206b 003c moveal %a3@(60),%a0 4499e: 2868 0008 moveal %a0@(8),%a4 449a2: 4a8c tstl %a4 449a4: 6700 00c8 beqw 44a6e <readv+0x126>
rtems_set_errno_and_return_minus_one( ENOTSUP );
449a8: 204a moveal %a2,%a0 449aa: 93c9 subal %a1,%a1 449ac: 4281 clrl %d1 449ae: 7a01 moveq #1,%d5
all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base )
449b0: 4a90 tstl %a0@ 449b2: 676a beqs 44a1e <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;
449b4: 2828 0004 movel %a0@(4),%d4 449b8: 2601 movel %d1,%d3 449ba: d684 addl %d4,%d3
if ( total < old )
449bc: b283 cmpl %d3,%d1 449be: 6e5e bgts 44a1e <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len )
449c0: 4a84 tstl %d4 449c2: 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++ ) {
449c4: 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 )
449c6: 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++ ) {
449c8: 5289 addql #1,%a1 449ca: 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 )
449cc: c684 andl %d4,%d3 449ce: 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++ ) {
449d0: b3c2 cmpal %d2,%a1 449d2: 6ddc blts 449b0 <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 ) {
449d4: 4a03 tstb %d3 449d6: 6660 bnes 44a38 <readv+0xf0> 449d8: 588a addql #4,%a2 449da: 4283 clrl %d3 449dc: 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 );
449de: 2f12 movel %a2@,%sp@-
} /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
449e0: 5283 addql #1,%d3
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
449e2: 2f2a fffc movel %a2@(-4),%sp@- 449e6: 2f0b movel %a3,%sp@- 449e8: 4e94 jsr %a4@
if ( bytes < 0 )
449ea: 4fef 000c lea %sp@(12),%sp 449ee: 4a80 tstl %d0 449f0: 6d54 blts 44a46 <readv+0xfe>
return -1; if ( bytes > 0 ) {
449f2: 6716 beqs 44a0a <readv+0xc2>
iop->offset += bytes; total += bytes;
449f4: d880 addl %d0,%d4
if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes;
449f6: 2c00 movel %d0,%d6 449f8: 5bc5 smi %d5 449fa: 49c5 extbl %d5 449fc: ddab 0010 addl %d6,%a3@(16) 44a00: 222b 000c movel %a3@(12),%d1 44a04: d385 addxl %d5,%d1 44a06: 2741 000c movel %d1,%a3@(12)
total += bytes; } if (bytes != iov[ v ].iov_len)
44a0a: b092 cmpl %a2@,%d0 44a0c: 661e bnes 44a2c <readv+0xe4>
} /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44a0e: 508a addql #8,%a2 44a10: b682 cmpl %d2,%d3 44a12: 6c18 bges 44a2c <readv+0xe4> 44a14: 206b 003c moveal %a3@(60),%a0 44a18: 2868 0008 moveal %a0@(8),%a4 44a1c: 60c0 bras 449de <readv+0x96>
/* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL );
44a1e: 4eb9 0005 10f4 jsr 510f4 <__errno> 44a24: 78ff moveq #-1,%d4 44a26: 2040 moveal %d0,%a0 44a28: 7016 moveq #22,%d0 44a2a: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len) break; } return total; }
44a2c: 2004 movel %d4,%d0 44a2e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a34: 4e5e unlk %fp 44a36: 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 ) {
44a38: 4284 clrl %d4
if (bytes != iov[ v ].iov_len) break; } return total; }
44a3a: 2004 movel %d4,%d0 44a3c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a42: 4e5e unlk %fp 44a44: 4e75 rts
} /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44a46: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len) break; } return total; }
44a48: 2004 movel %d4,%d0 <== NOT EXECUTED 44a4a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 44a50: 4e5e unlk %fp <== NOT EXECUTED 44a52: 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 );
44a54: 4eb9 0005 10f4 jsr 510f4 <__errno> <== NOT EXECUTED 44a5a: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a5c: 7209 moveq #9,%d1 <== NOT EXECUTED 44a5e: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len) break; } return total; }
44a60: 2004 movel %d4,%d0 <== NOT EXECUTED 44a62: 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 );
44a68: 2081 movel %d1,%a0@ <== NOT EXECUTED
if (bytes != iov[ v ].iov_len) break; } return total; }
44a6a: 4e5e unlk %fp <== NOT EXECUTED 44a6c: 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 );
44a6e: 4eb9 0005 10f4 jsr 510f4 <__errno> <== NOT EXECUTED 44a74: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a76: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len) break; } return total; }
44a78: 2004 movel %d4,%d0 <== NOT EXECUTED 44a7a: 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 );
44a80: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if (bytes != iov[ v ].iov_len) break; } return total; }
44a86: 4e5e unlk %fp <== NOT EXECUTED 44a88: 4e75 rts <== NOT EXECUTED
... 0005b770 <realloc>: /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) {
5b770: 7003 moveq #3,%d0
{ uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
5b772: 4e56 fff0 linkw %fp,#-16 5b776: 52b9 0005 edc0 addql #1,5edc0 <rtems_malloc_statistics+0x10> 5b77c: 48d7 001c moveml %d2-%d4,%sp@ 5b780: 242e 0008 movel %fp@(8),%d2 5b784: 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())) {
5b788: b0b9 0005 f08c cmpl 5f08c <_System_state_Current>,%d0 5b78e: 677a beqs 5b80a <realloc+0x9a>
} /* * Continue with realloc(). */ if ( !ptr )
5b790: 4a82 tstl %d2 5b792: 6700 00de beqw 5b872 <realloc+0x102>
return malloc( size ); if ( !size ) {
5b796: 4a83 tstl %d3 5b798: 673e beqs 5b7d8 <realloc+0x68>
free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
5b79a: 486e fffc pea %fp@(-4) 5b79e: 2f02 movel %d2,%sp@- 5b7a0: 2f39 0005 d6b0 movel 5d6b0 <RTEMS_Malloc_Heap>,%sp@- 5b7a6: 4eb9 0005 b958 jsr 5b958 <_Protected_heap_Get_block_size> 5b7ac: 4fef 000c lea %sp@(12),%sp 5b7b0: 4a00 tstb %d0 5b7b2: 673c beqs 5b7f0 <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 ) ) {
5b7b4: 2f03 movel %d3,%sp@- 5b7b6: 2f02 movel %d2,%sp@- 5b7b8: 2f39 0005 d6b0 movel 5d6b0 <RTEMS_Malloc_Heap>,%sp@- 5b7be: 4eb9 0005 b994 jsr 5b994 <_Protected_heap_Resize_block> 5b7c4: 4fef 000c lea %sp@(12),%sp 5b7c8: 4a00 tstb %d0 5b7ca: 6754 beqs 5b820 <realloc+0xb0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; }
5b7cc: 2002 movel %d2,%d0 5b7ce: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5b7d4: 4e5e unlk %fp 5b7d6: 4e75 rts
*/ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr );
5b7d8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5b7da: 4282 clrl %d2 <== NOT EXECUTED 5b7dc: 4eb9 0004 a688 jsr 4a688 <free> <== NOT EXECUTED
return (void *) 0;
5b7e2: 588f addql #4,%sp <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; }
5b7e4: 2002 movel %d2,%d0 <== NOT EXECUTED 5b7e6: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5b7ec: 4e5e unlk %fp <== NOT EXECUTED 5b7ee: 4e75 rts <== NOT EXECUTED
free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL;
5b7f0: 4eb9 0004 eb8c jsr 4eb8c <__errno> 5b7f6: 4282 clrl %d2 5b7f8: 2040 moveal %d0,%a0 5b7fa: 7016 moveq #22,%d0 5b7fc: 2080 movel %d0,%a0@
memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; }
5b7fe: 2002 movel %d2,%d0 5b800: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5b806: 4e5e unlk %fp 5b808: 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)
5b80a: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 5b810: 6752 beqs 5b864 <realloc+0xf4>
} memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area;
5b812: 4282 clrl %d2
}
5b814: 2002 movel %d2,%d0 5b816: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5b81c: 4e5e unlk %fp 5b81e: 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 );
5b820: 2f03 movel %d3,%sp@- 5b822: 4eb9 0004 ac20 jsr 4ac20 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) {
5b828: 588f addql #4,%sp
* and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
5b82a: 53b9 0005 edb4 subql #1,5edb4 <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 );
5b830: 2800 movel %d0,%d4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) {
5b832: 67de beqs 5b812 <realloc+0xa2>
return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size );
5b834: 202e fffc movel %fp@(-4),%d0 5b838: b083 cmpl %d3,%d0 5b83a: 6402 bccs 5b83e <realloc+0xce> 5b83c: 2600 movel %d0,%d3 5b83e: 2f03 movel %d3,%sp@- 5b840: 2f02 movel %d2,%sp@- 5b842: 2f04 movel %d4,%sp@- 5b844: 4eb9 0004 f3ac jsr 4f3ac <memcpy>
free( ptr );
5b84a: 2f02 movel %d2,%sp@- 5b84c: 2404 movel %d4,%d2 5b84e: 4eb9 0004 a688 jsr 4a688 <free>
return new_area;
5b854: 4fef 0010 lea %sp@(16),%sp
}
5b858: 2002 movel %d2,%d0 5b85a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5b860: 4e5e unlk %fp 5b862: 4e75 rts
if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0)
5b864: 2039 0005 ef9e movel 5ef9e <_ISR_Nest_level>,%d0 5b86a: 6700 ff24 beqw 5b790 <realloc+0x20>
} memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area;
5b86e: 4282 clrl %d2 <== NOT EXECUTED 5b870: 60a2 bras 5b814 <realloc+0xa4> <== NOT EXECUTED
/* * Continue with realloc(). */ if ( !ptr ) return malloc( size );
5b872: 2f03 movel %d3,%sp@- 5b874: 4eb9 0004 ac20 jsr 4ac20 <malloc> 5b87a: 588f addql #4,%sp 5b87c: 2400 movel %d0,%d2
memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; }
5b87e: 2002 movel %d2,%d0 5b880: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5b886: 4e5e unlk %fp 5b888: 4e75 rts
... 000686c8 <rmdir>: #include <rtems/seterr.h> int rmdir( const char *pathname ) {
686c8: 4e56 ffbc linkw %fp,#-68 686cc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 686d0: 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 );
686d4: 2f04 movel %d4,%sp@- 686d6: 4eb9 0004 6538 jsr 46538 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
686dc: 588f addql #4,%sp
/* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname );
686de: 2400 movel %d0,%d2
if ( parentpathlen == 0 )
686e0: 6600 01ce bnew 688b0 <rmdir+0x1e8>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
686e4: 2044 moveal %d4,%a0 686e6: 762f moveq #47,%d3 686e8: 1210 moveb %a0@,%d1 686ea: 1001 moveb %d1,%d0 686ec: 49c0 extbl %d0 686ee: b680 cmpl %d0,%d3 686f0: 670e beqs 68700 <rmdir+0x38>
686f2: 163c 005c moveb #92,%d3 <== NOT EXECUTED 686f6: b680 cmpl %d0,%d3 <== NOT EXECUTED 686f8: 6706 beqs 68700 <rmdir+0x38> <== NOT EXECUTED 686fa: 4a01 tstb %d1 <== NOT EXECUTED 686fc: 6600 00fc bnew 687fa <rmdir+0x132> <== NOT EXECUTED
68700: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 68706: 45ee ffec lea %fp@(-20),%a2 6870a: 49ee fff0 lea %fp@(-16),%a4 6870e: 200e movel %fp,%d0 68710: 0680 ffff fff4 addil #-12,%d0 68716: 2640 moveal %d0,%a3 68718: 4bee fff8 lea %fp@(-8),%a5 6871c: 224e moveal %fp,%a1 6871e: 24a8 0018 movel %a0@(24),%a2@ 68722: 28a8 001c movel %a0@(28),%a4@ 68726: 26a8 0020 movel %a0@(32),%a3@ 6872a: 2aa8 0024 movel %a0@(36),%a5@ 6872e: 2328 0028 movel %a0@(40),%a1@- 68732: 4203 clrb %d3
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
68734: 2040 moveal %d0,%a0
name = pathname + parentpathlen;
68736: 2644 moveal %d4,%a3 68738: d7c2 addal %d2,%a3
name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
6873a: 240e movel %fp,%d2 6873c: 0682 ffff ffd8 addil #-40,%d2
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
68742: 2d50 ffe0 movel %a0@,%fp@(-32) 68746: 2d51 ffe8 movel %a1@,%fp@(-24) 6874a: 2d54 ffdc movel %a4@,%fp@(-36)
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
6874e: 49f9 0008 6f0c lea 86f0c <strlen>,%a4
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
68754: 2d55 ffe4 movel %a5@,%fp@(-28) 68758: 2d52 ffd8 movel %a2@,%fp@(-40)
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
6875c: 2f0b movel %a3,%sp@- 6875e: 4e94 jsr %a4@ 68760: 2e80 movel %d0,%sp@ 68762: 2f0b movel %a3,%sp@- 68764: 4eb9 0004 64f0 jsr 464f0 <rtems_filesystem_prefix_separators> 6876a: d7c0 addal %d0,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
6876c: 2f0b movel %a3,%sp@- 6876e: 4e94 jsr %a4@ 68770: 4297 clrl %sp@ 68772: 2f02 movel %d2,%sp@- 68774: 42a7 clrl %sp@- 68776: 2f00 movel %d0,%sp@- 68778: 2f0b movel %a3,%sp@- 6877a: 4eb9 0004 65aa jsr 465aa <rtems_filesystem_evaluate_relative_path>
0, &loc, false ); if ( result != 0 ) {
68780: 4fef 001c lea %sp@(28),%sp 68784: 4a80 tstl %d0 68786: 6600 00ee bnew 68876 <rmdir+0x1ae>
/* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){
6878a: 226e ffe4 moveal %fp@(-28),%a1 6878e: 2069 0010 moveal %a1@(16),%a0 68792: 4a88 tstl %a0 68794: 6700 01a0 beqw 68936 <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 ){
68798: 2f02 movel %d2,%sp@- 6879a: 4e90 jsr %a0@ 6879c: 588f addql #4,%sp 6879e: 7201 moveq #1,%d1 687a0: b280 cmpl %d0,%d1 687a2: 6600 0086 bnew 6882a <rmdir+0x162>
/* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){
687a6: 206e ffe0 moveal %fp@(-32),%a0 687aa: 2068 0034 moveal %a0@(52),%a0 687ae: 4a88 tstl %a0 687b0: 6700 0136 beqw 688e8 <rmdir+0x220>
if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
687b4: 2f02 movel %d2,%sp@- 687b6: 2f0a movel %a2,%sp@- 687b8: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
687ba: 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 );
687be: 2640 moveal %d0,%a3
rtems_filesystem_freenode( &loc );
687c0: 508f addql #8,%sp 687c2: 4a88 tstl %a0 687c4: 670e beqs 687d4 <rmdir+0x10c> 687c6: 2068 001c moveal %a0@(28),%a0 687ca: 4a88 tstl %a0 687cc: 6706 beqs 687d4 <rmdir+0x10c> 687ce: 2f02 movel %d2,%sp@- 687d0: 4e90 jsr %a0@ 687d2: 588f addql #4,%sp
if ( free_parentloc )
687d4: 4a03 tstb %d3 687d6: 6716 beqs 687ee <rmdir+0x126>
rtems_filesystem_freenode( &parentloc );
687d8: 206e fff8 moveal %fp@(-8),%a0 687dc: 4a88 tstl %a0 687de: 670e beqs 687ee <rmdir+0x126> 687e0: 2068 001c moveal %a0@(28),%a0 687e4: 4a88 tstl %a0 687e6: 6706 beqs 687ee <rmdir+0x126> 687e8: 2f0a movel %a2,%sp@- 687ea: 4e90 jsr %a0@ 687ec: 588f addql #4,%sp
return result; }
687ee: 200b movel %a3,%d0 687f0: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 687f6: 4e5e unlk %fp 687f8: 4e75 rts
*/ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
687fa: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED 68800: 45ee ffec lea %fp@(-20),%a2 <== NOT EXECUTED 68804: 5888 addql #4,%a0 <== NOT EXECUTED 68806: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED 6880a: 200e movel %fp,%d0 <== NOT EXECUTED 6880c: 0680 ffff fff4 addil #-12,%d0 <== NOT EXECUTED 68812: 2640 moveal %d0,%a3 <== NOT EXECUTED 68814: 4bee fff8 lea %fp@(-8),%a5 <== NOT EXECUTED 68818: 224e moveal %fp,%a1 <== NOT EXECUTED 6881a: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 6881c: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 6881e: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 68820: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 68822: 2310 movel %a0@,%a1@- <== NOT EXECUTED 68824: 4203 clrb %d3 <== NOT EXECUTED 68826: 6000 ff0c braw 68734 <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 );
6882a: 206e ffe4 moveal %fp@(-28),%a0 6882e: 4a88 tstl %a0 68830: 670e beqs 68840 <rmdir+0x178> 68832: 2068 001c moveal %a0@(28),%a0 68836: 4a88 tstl %a0 68838: 6706 beqs 68840 <rmdir+0x178> 6883a: 2f02 movel %d2,%sp@- 6883c: 4e90 jsr %a0@ 6883e: 588f addql #4,%sp
if ( free_parentloc )
68840: 4a03 tstb %d3 68842: 6716 beqs 6885a <rmdir+0x192>
rtems_filesystem_freenode( &parentloc );
68844: 206e fff8 moveal %fp@(-8),%a0 68848: 4a88 tstl %a0 6884a: 670e beqs 6885a <rmdir+0x192> 6884c: 2068 001c moveal %a0@(28),%a0 68850: 4a88 tstl %a0 68852: 6706 beqs 6885a <rmdir+0x192> 68854: 2f0a movel %a2,%sp@- 68856: 4e90 jsr %a0@ 68858: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
6885a: 4eb9 0008 0e64 jsr 80e64 <__errno> 68860: 367c ffff moveaw #-1,%a3 68864: 2040 moveal %d0,%a0 68866: 7014 moveq #20,%d0 68868: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; }
6886a: 200b movel %a3,%d0 6886c: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 68872: 4e5e unlk %fp 68874: 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 )
68876: 4a03 tstb %d3 68878: 6610 bnes 6888a <rmdir+0x1c2>
result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc );
6887a: 367c ffff moveaw #-1,%a3
return result; }
6887e: 200b movel %a3,%d0 68880: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 68886: 4e5e unlk %fp 68888: 4e75 rts
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc );
6888a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 6888e: 4a88 tstl %a0 <== NOT EXECUTED 68890: 67e8 beqs 6887a <rmdir+0x1b2> <== NOT EXECUTED 68892: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 68896: 67e2 beqs 6887a <rmdir+0x1b2> <== NOT EXECUTED 68898: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6889a: 2040 moveal %d0,%a0 <== NOT EXECUTED 6889c: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 688a0: 4e90 jsr %a0@ <== NOT EXECUTED 688a2: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; }
688a4: 200b movel %a3,%d0 <== NOT EXECUTED 688a6: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 688ac: 4e5e unlk %fp <== NOT EXECUTED 688ae: 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,
688b0: 42a7 clrl %sp@- 688b2: 45ee ffec lea %fp@(-20),%a2 688b6: 2f0a movel %a2,%sp@- 688b8: 4878 0002 pea 2 <DOUBLE_FLOAT> 688bc: 2f00 movel %d0,%sp@- 688be: 2f04 movel %d4,%sp@- 688c0: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 )
688c6: 4fef 0014 lea %sp@(20),%sp 688ca: 4a80 tstl %d0 688cc: 66ac bnes 6887a <rmdir+0x1b2> 688ce: 200e movel %fp,%d0 688d0: 49ee fff0 lea %fp@(-16),%a4 688d4: 0680 ffff fff4 addil #-12,%d0 688da: 4bee fff8 lea %fp@(-8),%a5 688de: 43ee fffc lea %fp@(-4),%a1 688e2: 7601 moveq #1,%d3 688e4: 6000 fe4e braw 68734 <rmdir+0x6c>
/* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc );
688e8: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 688ec: 4a88 tstl %a0 <== NOT EXECUTED 688ee: 670e beqs 688fe <rmdir+0x236> <== NOT EXECUTED 688f0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 688f4: 4a88 tstl %a0 <== NOT EXECUTED 688f6: 6706 beqs 688fe <rmdir+0x236> <== NOT EXECUTED 688f8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 688fa: 4e90 jsr %a0@ <== NOT EXECUTED 688fc: 588f addql #4,%sp <== NOT EXECUTED
if ( free_parentloc )
688fe: 4a03 tstb %d3 <== NOT EXECUTED 68900: 6716 beqs 68918 <rmdir+0x250> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
68902: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 68906: 4a88 tstl %a0 <== NOT EXECUTED 68908: 670e beqs 68918 <rmdir+0x250> <== NOT EXECUTED 6890a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6890e: 4a88 tstl %a0 <== NOT EXECUTED 68910: 6706 beqs 68918 <rmdir+0x250> <== NOT EXECUTED 68912: 2f0a movel %a2,%sp@- <== NOT EXECUTED 68914: 4e90 jsr %a0@ <== NOT EXECUTED 68916: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
68918: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 6891e: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 68922: 2040 moveal %d0,%a0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; }
68924: 200b movel %a3,%d0 <== NOT EXECUTED 68926: 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 );
6892c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; }
68932: 4e5e unlk %fp <== NOT EXECUTED 68934: 4e75 rts <== NOT EXECUTED
/* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc );
68936: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 6893a: 4a88 tstl %a0 <== NOT EXECUTED 6893c: 67c0 beqs 688fe <rmdir+0x236> <== NOT EXECUTED
/* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc );
6893e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 68940: 4e90 jsr %a0@ <== NOT EXECUTED 68942: 588f addql #4,%sp <== NOT EXECUTED 68944: 60b8 bras 688fe <rmdir+0x236> <== NOT EXECUTED
... 0004d4a0 <rtems_assoc_local_by_remote>: uint32_t rtems_assoc_local_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) {
4d4a0: 4e56 0000 linkw %fp,#0
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value);
4d4a4: 2f2e 000c movel %fp@(12),%sp@- 4d4a8: 2f2e 0008 movel %fp@(8),%sp@- 4d4ac: 4eb9 0004 d4d4 jsr 4d4d4 <rtems_assoc_ptr_by_remote>
if (nap)
4d4b2: 508f addql #8,%sp 4d4b4: 4a80 tstl %d0 4d4b6: 6706 beqs 4d4be <rtems_assoc_local_by_remote+0x1e>
return nap->local_value;
4d4b8: 2040 moveal %d0,%a0 4d4ba: 2028 0004 movel %a0@(4),%d0
return 0; }
4d4be: 4e5e unlk %fp 4d4c0: 4e75 rts
... 0004d454 <rtems_assoc_local_by_remote_bitfield>: uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) {
4d454: 4e56 ffe8 linkw %fp,#-24 4d458: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4d45c: 2c2e 0008 movel %fp@(8),%d6 4d460: 4283 clrl %d3 4d462: 4285 clrl %d5 4d464: 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);
4d466: 45f9 0004 d4a0 lea 4d4a0 <rtems_assoc_local_by_remote>,%a2
uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) {
4d46c: 282e 000c movel %fp@(12),%d4
uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value)
4d470: 2002 movel %d2,%d0
) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) {
4d472: 5283 addql #1,%d3
if (b & remote_value)
4d474: c084 andl %d4,%d0 4d476: 6614 bnes 4d48c <rtems_assoc_local_by_remote_bitfield+0x38>
) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) {
4d478: 7020 moveq #32,%d0 4d47a: d482 addl %d2,%d2 4d47c: b083 cmpl %d3,%d0 4d47e: 66f0 bnes 4d470 <rtems_assoc_local_by_remote_bitfield+0x1c>
if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; }
4d480: 2005 movel %d5,%d0 4d482: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4d488: 4e5e unlk %fp 4d48a: 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);
4d48c: 2f02 movel %d2,%sp@-
) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) {
4d48e: d482 addl %d2,%d2
if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b);
4d490: 2f06 movel %d6,%sp@- 4d492: 4e92 jsr %a2@ 4d494: 508f addql #8,%sp 4d496: 8a80 orl %d0,%d5
) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) {
4d498: 7020 moveq #32,%d0 4d49a: b083 cmpl %d3,%d0 4d49c: 66d2 bnes 4d470 <rtems_assoc_local_by_remote_bitfield+0x1c>
4d49e: 60e0 bras 4d480 <rtems_assoc_local_by_remote_bitfield+0x2c><== NOT EXECUTED
0004d4c4 <rtems_assoc_name_bad>: uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) {
4d4c4: 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; }
4d4c8: 203c 0005 d844 movel #383044,%d0 <== NOT EXECUTED 4d4ce: 4e5e unlk %fp <== NOT EXECUTED 4d4d0: 4e75 rts <== NOT EXECUTED
... 0004a4fc <rtems_assoc_name_by_local>: const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
4a4fc: 4e56 0000 linkw %fp,#0 4a500: 2f02 movel %d2,%sp@- 4a502: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value);
4a506: 2f02 movel %d2,%sp@- 4a508: 2f2e 0008 movel %fp@(8),%sp@- 4a50c: 4eb9 0004 a534 jsr 4a534 <rtems_assoc_ptr_by_local>
if (nap)
4a512: 508f addql #8,%sp 4a514: 4a80 tstl %d0 4a516: 670c beqs 4a524 <rtems_assoc_name_by_local+0x28>
return nap->name; return rtems_assoc_name_bad(local_value); }
4a518: 2040 moveal %d0,%a0 4a51a: 242e fffc movel %fp@(-4),%d2 4a51e: 4e5e unlk %fp 4a520: 2010 movel %a0@,%d0 4a522: 4e75 rts
nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value);
4a524: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
}
4a528: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a52c: 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);
4a52e: 4ef9 0004 d4c4 jmp 4d4c4 <rtems_assoc_name_bad> <== NOT EXECUTED
0004a534 <rtems_assoc_ptr_by_local>: const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
4a534: 4e56 0000 linkw %fp,#0 4a538: 2f0a movel %a2,%sp@- 4a53a: 246e 0008 moveal %fp@(8),%a2 4a53e: 2f02 movel %d2,%sp@- 4a540: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
4a544: 2012 movel %a2@,%d0 4a546: 6742 beqs 4a58a <rtems_assoc_ptr_by_local+0x56> 4a548: 4879 0005 c948 pea 5c948 <IMFS_link_handlers+0x74> 4a54e: 2f00 movel %d0,%sp@- 4a550: 4eb9 0004 fa94 jsr 4fa94 <strcmp> 4a556: 508f addql #8,%sp 4a558: 4a80 tstl %d0 4a55a: 662a bnes 4a586 <rtems_assoc_ptr_by_local+0x52>
default_ap = ap++;
4a55c: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED
for ( ; ap->name; ap++)
4a560: 4a90 tstl %a0@ <== NOT EXECUTED 4a562: 6714 beqs 4a578 <rtems_assoc_ptr_by_local+0x44> <== NOT EXECUTED 4a564: 200a movel %a2,%d0 <== NOT EXECUTED 4a566: 2448 moveal %a0,%a2 <== NOT EXECUTED
if (ap->local_value == local_value)
4a568: b4aa 0004 cmpl %a2@(4),%d2 4a56c: 670a beqs 4a578 <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++)
4a56e: 45ea 000c lea %a2@(12),%a2 4a572: 4a92 tstl %a2@ 4a574: 66f2 bnes 4a568 <rtems_assoc_ptr_by_local+0x34> 4a576: 2440 moveal %d0,%a2
if (ap->local_value == local_value) return ap; return default_ap; }
4a578: 200a movel %a2,%d0 4a57a: 242e fff8 movel %fp@(-8),%d2 4a57e: 246e fffc moveal %fp@(-4),%a2 4a582: 4e5e unlk %fp 4a584: 4e75 rts
uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
4a586: 4280 clrl %d0 4a588: 60de bras 4a568 <rtems_assoc_ptr_by_local+0x34>
4a58a: 95ca subal %a2,%a2 <== NOT EXECUTED
for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; }
4a58c: 200a movel %a2,%d0 <== NOT EXECUTED 4a58e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4a592: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a596: 4e5e unlk %fp <== NOT EXECUTED 4a598: 4e75 rts <== NOT EXECUTED
... 0004d4d4 <rtems_assoc_ptr_by_remote>: const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) {
4d4d4: 4e56 0000 linkw %fp,#0 4d4d8: 2f0a movel %a2,%sp@- 4d4da: 246e 0008 moveal %fp@(8),%a2 4d4de: 2f02 movel %d2,%sp@- 4d4e0: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
4d4e4: 2012 movel %a2@,%d0 4d4e6: 6742 beqs 4d52a <rtems_assoc_ptr_by_remote+0x56> 4d4e8: 4879 0005 c948 pea 5c948 <IMFS_link_handlers+0x74> 4d4ee: 2f00 movel %d0,%sp@- 4d4f0: 4eb9 0004 fa94 jsr 4fa94 <strcmp> 4d4f6: 508f addql #8,%sp 4d4f8: 4a80 tstl %d0 4d4fa: 662a bnes 4d526 <rtems_assoc_ptr_by_remote+0x52>
default_ap = ap++;
4d4fc: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED
for ( ; ap->name; ap++)
4d500: 4a90 tstl %a0@ <== NOT EXECUTED 4d502: 6714 beqs 4d518 <rtems_assoc_ptr_by_remote+0x44> <== NOT EXECUTED 4d504: 200a movel %a2,%d0 <== NOT EXECUTED 4d506: 2448 moveal %a0,%a2 <== NOT EXECUTED
if (ap->remote_value == remote_value)
4d508: b4aa 0008 cmpl %a2@(8),%d2 4d50c: 670a beqs 4d518 <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++)
4d50e: 45ea 000c lea %a2@(12),%a2 4d512: 4a92 tstl %a2@ 4d514: 66f2 bnes 4d508 <rtems_assoc_ptr_by_remote+0x34> 4d516: 2440 moveal %d0,%a2
if (ap->remote_value == remote_value) return ap; return default_ap; }
4d518: 200a movel %a2,%d0 4d51a: 242e fff8 movel %fp@(-8),%d2 4d51e: 246e fffc moveal %fp@(-4),%a2 4d522: 4e5e unlk %fp 4d524: 4e75 rts
uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap))
4d526: 4280 clrl %d0 4d528: 60de bras 4d508 <rtems_assoc_ptr_by_remote+0x34>
4d52a: 95ca subal %a2,%a2 <== NOT EXECUTED
for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; }
4d52c: 200a movel %a2,%d0 <== NOT EXECUTED 4d52e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4d532: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4d536: 4e5e unlk %fp <== NOT EXECUTED 4d538: 4e75 rts <== NOT EXECUTED
... 0004e31c <rtems_assoc_remote_by_local>: uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
4e31c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value);
4e320: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4e324: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4e328: 4eb9 0004 a534 jsr 4a534 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
4e32e: 508f addql #8,%sp <== NOT EXECUTED 4e330: 4a80 tstl %d0 <== NOT EXECUTED 4e332: 6706 beqs 4e33a <rtems_assoc_remote_by_local+0x1e><== NOT EXECUTED
return nap->remote_value;
4e334: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e336: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED
return 0; }
4e33a: 4e5e unlk %fp <== NOT EXECUTED 4e33c: 4e75 rts <== NOT EXECUTED
... 0004d8b0 <rtems_barrier_create>: rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) {
4d8b0: 4e56 ffe8 linkw %fp,#-24 4d8b4: 202e 0010 movel %fp@(16),%d0 4d8b8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4d8bc: 242e 0008 movel %fp@(8),%d2 4d8c0: 262e 000c movel %fp@(12),%d3 4d8c4: 246e 0014 moveal %fp@(20),%a2
Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) )
4d8c8: 4a82 tstl %d2 4d8ca: 677a beqs 4d946 <rtems_barrier_create+0x96>
return RTEMS_INVALID_NAME; if ( !id )
4d8cc: 4a8a tstl %a2 4d8ce: 6700 00ce beqw 4d99e <rtems_barrier_create+0xee>
return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
4d8d2: 0803 0004 btst #4,%d3 4d8d6: 677a beqs 4d952 <rtems_barrier_create+0xa2>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 )
4d8d8: 4a80 tstl %d0 4d8da: 6700 00b4 beqw 4d990 <rtems_barrier_create+0xe0> 4d8de: 2239 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d1 4d8e4: 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;
4d8e6: 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;
4d8ea: 2d40 fffc movel %d0,%fp@(-4) 4d8ee: 23c1 0005 ef04 movel %d1,5ef04 <_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 );
4d8f4: 4879 0005 f798 pea 5f798 <_Barrier_Information> 4d8fa: 4eb9 0004 7090 jsr 47090 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) {
4d900: 588f addql #4,%sp 4d902: 2640 moveal %d0,%a3 4d904: 4a80 tstl %d0 4d906: 6776 beqs 4d97e <rtems_barrier_create+0xce>
_Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set;
4d908: 2743 0010 movel %d3,%a3@(16)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
4d90c: 486e fff8 pea %fp@(-8) 4d910: 486b 0014 pea %a3@(20) 4d914: 4eb9 0004 de44 jsr 4de44 <_CORE_barrier_Initialize> 4d91a: 202b 0008 movel %a3@(8),%d0 4d91e: 4281 clrl %d1 4d920: 2079 0005 f7b0 moveal 5f7b0 <_Barrier_Information+0x18>,%a0 4d926: 3200 movew %d0,%d1
information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name;
4d928: 2742 000c movel %d2,%a3@(12)
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
4d92c: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id;
4d930: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4d932: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4d938: 508f addql #8,%sp
(Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch();
4d93a: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
4d93c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d942: 4e5e unlk %fp 4d944: 4e75 rts
) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) )
4d946: 7003 moveq #3,%d0
*id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
4d948: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d94e: 4e5e unlk %fp 4d950: 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;
4d952: 7201 moveq #1,%d1 4d954: 2d41 fff8 movel %d1,%fp@(-8) 4d958: 2239 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d1 4d95e: 5281 addql #1,%d1
the_attributes.maximum_count = maximum_waiters;
4d960: 2d40 fffc movel %d0,%fp@(-4) 4d964: 23c1 0005 ef04 movel %d1,5ef04 <_Thread_Dispatch_disable_level> 4d96a: 4879 0005 f798 pea 5f798 <_Barrier_Information> 4d970: 4eb9 0004 7090 jsr 47090 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) {
4d976: 588f addql #4,%sp 4d978: 2640 moveal %d0,%a3 4d97a: 4a80 tstl %d0 4d97c: 668a bnes 4d908 <rtems_barrier_create+0x58>
_Thread_Enable_dispatch();
4d97e: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch> 4d984: 7005 moveq #5,%d0
*id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
4d986: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d98c: 4e5e unlk %fp 4d98e: 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 )
4d990: 103c 000a moveb #10,%d0
*id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
4d994: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d99a: 4e5e unlk %fp 4d99c: 4e75 rts
CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id )
4d99e: 7009 moveq #9,%d0
*id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
4d9a0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4d9a6: 4e5e unlk %fp 4d9a8: 4e75 rts
... 0004da1c <rtems_barrier_release>: rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) {
4da1c: 4e56 fffc linkw %fp,#-4 4da20: 2f0a movel %a2,%sp@- 4da22: 246e 000c moveal %fp@(12),%a2 4da26: 2f02 movel %d2,%sp@- 4da28: 242e 0008 movel %fp@(8),%d2
Barrier_Control *the_barrier; Objects_Locations location; if ( !released )
4da2c: 4a8a tstl %a2 4da2e: 6754 beqs 4da84 <rtems_barrier_release+0x68>
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *)
4da30: 486e fffc pea %fp@(-4) 4da34: 2f02 movel %d2,%sp@- 4da36: 4879 0005 f798 pea 5f798 <_Barrier_Information> 4da3c: 4eb9 0004 752c jsr 4752c <_Objects_Get>
return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) {
4da42: 4fef 000c lea %sp@(12),%sp 4da46: 4aae fffc tstl %fp@(-4) 4da4a: 662a bnes 4da76 <rtems_barrier_release+0x5a>
case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL );
4da4c: 42a7 clrl %sp@- 4da4e: 2040 moveal %d0,%a0 4da50: 2f02 movel %d2,%sp@- 4da52: 4868 0014 pea %a0@(20) 4da56: 4eb9 0004 de80 jsr 4de80 <_CORE_barrier_Release> 4da5c: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4da5e: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4da64: 242e fff4 movel %fp@(-12),%d2
switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL;
4da68: 4fef 000c lea %sp@(12),%sp
the_barrier = _Barrier_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); _Thread_Enable_dispatch();
4da6c: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4da6e: 246e fff8 moveal %fp@(-8),%a2 4da72: 4e5e unlk %fp 4da74: 4e75 rts 4da76: 242e fff4 movel %fp@(-12),%d2
if ( !released ) return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) {
4da7a: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4da7c: 246e fff8 moveal %fp@(-8),%a2 4da80: 4e5e unlk %fp 4da82: 4e75 rts 4da84: 242e fff4 movel %fp@(-12),%d2
) { Barrier_Control *the_barrier; Objects_Locations location; if ( !released )
4da88: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4da8a: 246e fff8 moveal %fp@(-8),%a2 4da8e: 4e5e unlk %fp 4da90: 4e75 rts
... 0004da94 <rtems_barrier_wait>: rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) {
4da94: 4e56 fffc linkw %fp,#-4 4da98: 2f02 movel %d2,%sp@- 4da9a: 486e fffc pea %fp@(-4) 4da9e: 242e 0008 movel %fp@(8),%d2 4daa2: 2f02 movel %d2,%sp@- 4daa4: 4879 0005 f798 pea 5f798 <_Barrier_Information> 4daaa: 4eb9 0004 752c jsr 4752c <_Objects_Get>
Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) {
4dab0: 4fef 000c lea %sp@(12),%sp 4dab4: 4aae fffc tstl %fp@(-4) 4dab8: 663a bnes 4daf4 <rtems_barrier_wait+0x60>
case OBJECTS_LOCAL: _CORE_barrier_Wait(
4daba: 42a7 clrl %sp@- 4dabc: 2f2e 000c movel %fp@(12),%sp@- 4dac0: 2040 moveal %d0,%a0 4dac2: 4878 0001 pea 1 <ADD> 4dac6: 2f02 movel %d2,%sp@- 4dac8: 4868 0014 pea %a0@(20) 4dacc: 4eb9 0004 debc jsr 4debc <_CORE_barrier_Wait>
id, true, timeout, NULL ); _Thread_Enable_dispatch();
4dad2: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch>
return _Barrier_Translate_core_barrier_return_code(
4dad8: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0 4dade: 2f28 0034 movel %a0@(52),%sp@- 4dae2: 4eb9 0004 eb44 jsr 4eb44 <_Barrier_Translate_core_barrier_return_code>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4dae8: 242e fff8 movel %fp@(-8),%d2
true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code(
4daec: 4fef 0018 lea %sp@(24),%sp
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4daf0: 4e5e unlk %fp 4daf2: 4e75 rts 4daf4: 242e fff8 movel %fp@(-8),%d2
{ Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) {
4daf8: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4dafa: 4e5e unlk %fp 4dafc: 4e75 rts
... 000426f8 <rtems_bsp_cmdline_get>: #include <rtems/bspcmdline.h> extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get(void) {
426f8: 4e56 0000 linkw %fp,#0
return bsp_boot_cmdline; }
426fc: 2039 0005 fb30 movel 5fb30 <bsp_boot_cmdline>,%d0 42702: 4e5e unlk %fp 42704: 4e75 rts
... 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> 4274a: 202e 0010 movel %fp@(16),%d0 4274e: 5380 subql #1,%d0 42750: 67cc beqs 4271e <rtems_bsp_cmdline_get_param+0x16> 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>
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 0005 0574 jsr 50574 <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>
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>
... 00047614 <rtems_build_id>: uint32_t api, uint32_t class, uint32_t node, uint32_t index ) {
47614: 7218 moveq #24,%d1 47616: 4e56 0000 linkw %fp,#0 4761a: 202e 000c movel %fp@(12),%d0 4761e: 2f02 movel %d2,%sp@- 47620: 242e 0008 movel %fp@(8),%d2 47624: e3aa lsll %d1,%d2 47626: 123c 001b moveb #27,%d1 4762a: e3a8 lsll %d1,%d0 4762c: 222e 0010 movel %fp@(16),%d1 47630: 8082 orl %d2,%d0 47632: 4841 swap %d1 47634: 4241 clrw %d1
return _Objects_Build_id( api, class, node, index ); }
47636: 241f movel %sp@+,%d2
uint32_t api, uint32_t class, uint32_t node, uint32_t index ) {
47638: 80ae 0014 orl %fp@(20),%d0
return _Objects_Build_id( api, class, node, index ); }
4763c: 4e5e unlk %fp 4763e: 8081 orl %d1,%d0 47640: 4e75 rts
... 000455fc <rtems_clock_get_ticks_since_boot>: #include <rtems/score/thread.h> #include <rtems/score/tod.h> #include <rtems/score/watchdog.h> rtems_interval rtems_clock_get_ticks_since_boot(void) {
455fc: 4e56 0000 linkw %fp,#0
return _Watchdog_Ticks_since_boot;
45600: 2039 0005 f048 movel 5f048 <_Watchdog_Ticks_since_boot>,%d0
}
45606: 4e5e unlk %fp 45608: 4e75 rts
... 00069b2c <rtems_clock_get_uptime>: * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) {
69b2c: 4e56 0000 linkw %fp,#0 69b30: 202e 0008 movel %fp@(8),%d0
if ( !uptime )
69b34: 6710 beqs 69b46 <rtems_clock_get_uptime+0x1a>
return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime );
69b36: 2f00 movel %d0,%sp@- 69b38: 4eb9 0006 abd0 jsr 6abd0 <_TOD_Get_uptime_as_timespec>
return RTEMS_SUCCESSFUL;
69b3e: 588f addql #4,%sp
) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime );
69b40: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
69b42: 4e5e unlk %fp 69b44: 4e75 rts
*/ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime )
69b46: 103c 0009 moveb #9,%d0
return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; }
69b4a: 4e5e unlk %fp 69b4c: 4e75 rts
... 0004560c <rtems_clock_set_nanoseconds_extension>: * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) {
4560c: 4e56 0000 linkw %fp,#0 45610: 202e 0008 movel %fp@(8),%d0
if ( !routine )
45614: 670c beqs 45622 <rtems_clock_set_nanoseconds_extension+0x16>
return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine;
45616: 23c0 0005 f090 movel %d0,5f090 <_Watchdog_Nanoseconds_since_tick_handler> 4561c: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
4561e: 4e5e unlk %fp 45620: 4e75 rts
*/ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine )
45622: 103c 0009 moveb #9,%d0
return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; }
45626: 4e5e unlk %fp 45628: 4e75 rts
... 0004b8b8 <rtems_debug_is_enabled>: * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) {
4b8b8: 4e56 0000 linkw %fp,#0 4b8bc: 202e 0008 movel %fp@(8),%d0
return (_Debug_Level & level) ? true : false; }
4b8c0: 4e5e unlk %fp
* rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) {
4b8c2: c0b9 0005 efc2 andl 5efc2 <_Debug_Level>,%d0 4b8c8: 56c0 sne %d0
return (_Debug_Level & level) ? true : false; }
4b8ca: 4480 negl %d0 4b8cc: 4e75 rts
... 0004e2e0 <rtems_deviceio_errno>: { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) {
4e2e0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4e2e4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
4e2e6: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4e2ea: 4879 0005 cd18 pea 5cd18 <errno_assoc> <== NOT EXECUTED 4e2f0: 4eb9 0004 e31c jsr 4e31c <rtems_assoc_remote_by_local> <== NOT EXECUTED 4e2f6: 508f addql #8,%sp <== NOT EXECUTED 4e2f8: 2400 movel %d0,%d2 <== NOT EXECUTED 4e2fa: 660a bnes 4e306 <rtems_deviceio_errno+0x26> <== NOT EXECUTED
{ errno = rc; return -1; } return -1; }
4e2fc: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4e300: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e302: 4e5e unlk %fp <== NOT EXECUTED 4e304: 4e75 rts <== NOT EXECUTED
{ int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc;
4e306: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 4e30c: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1; } return -1; }
4e30e: 70ff moveq #-1,%d0 <== NOT EXECUTED
{ int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc;
4e310: 2082 movel %d2,%a0@ <== NOT EXECUTED
return -1; } return -1; }
4e312: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4e316: 4e5e unlk %fp <== NOT EXECUTED 4e318: 4e75 rts <== 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
4255a: 4e75 rts
0004566c <rtems_event_receive>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) {
4566c: 4e56 0000 linkw %fp,#0 45670: 202e 0008 movel %fp@(8),%d0 45674: 206e 0014 moveal %fp@(20),%a0
RTEMS_API_Control *api; if ( !event_out )
45678: 4a88 tstl %a0 4567a: 674c beqs 456c8 <rtems_event_receive+0x5c>
return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
4567c: 2279 0005 efbe moveal 5efbe <_Thread_Executing>,%a1 45682: 2269 010a moveal %a1@(266),%a1
if ( _Event_sets_Is_empty( event_in ) ) {
45686: 4a80 tstl %d0 45688: 6606 bnes 45690 <rtems_event_receive+0x24>
*event_out = api->pending_events;
4568a: 2091 movel %a1@,%a0@
_Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); }
4568c: 4e5e unlk %fp 4568e: 4e75 rts
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
45690: 2239 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d1 45696: 5281 addql #1,%d1 45698: 23c1 0005 ef04 movel %d1,5ef04 <_Thread_Dispatch_disable_level>
*event_out = api->pending_events; return RTEMS_SUCCESSFUL; } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out );
4569e: 2f08 movel %a0,%sp@- 456a0: 2f2e 0010 movel %fp@(16),%sp@- 456a4: 2f2e 000c movel %fp@(12),%sp@- 456a8: 2f00 movel %d0,%sp@- 456aa: 4eb9 0004 56d0 jsr 456d0 <_Event_Seize>
_Thread_Enable_dispatch();
456b0: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch>
return( _Thread_Executing->Wait.return_code );
456b6: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0 456bc: 4fef 0010 lea %sp@(16),%sp
}
456c0: 4e5e unlk %fp
} _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code );
456c2: 2028 0034 movel %a0@(52),%d0
}
456c6: 4e75 rts
rtems_event_set *event_out ) { RTEMS_API_Control *api; if ( !event_out )
456c8: 7009 moveq #9,%d0
_Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); }
456ca: 4e5e unlk %fp 456cc: 4e75 rts
... 00045814 <rtems_event_send>: rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) {
45814: 4e56 fffc linkw %fp,#-4 45818: 2f02 movel %d2,%sp@-
register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location );
4581a: 486e fffc pea %fp@(-4) 4581e: 2f2e 0008 movel %fp@(8),%sp@- 45822: 4eb9 0004 7de4 jsr 47de4 <_Thread_Get>
switch ( location ) {
45828: 508f addql #8,%sp 4582a: 4aae fffc tstl %fp@(-4) 4582e: 6634 bnes 45864 <rtems_event_send+0x50>
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
45830: 2240 moveal %d0,%a1
rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level );
45832: 223c 0000 0700 movel #1792,%d1 45838: 2069 010a moveal %a1@(266),%a0 4583c: 40c2 movew %sr,%d2 4583e: 8282 orl %d2,%d1 45840: 46c1 movew %d1,%sr
*the_event_set |= the_new_events;
45842: 222e 000c movel %fp@(12),%d1 45846: 8390 orl %d1,%a0@
_ISR_Enable( level );
45848: 46c2 movew %d2,%sr
_Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread );
4584a: 2f00 movel %d0,%sp@- 4584c: 4eb9 0004 5870 jsr 45870 <_Event_Surrender>
_Thread_Enable_dispatch();
45852: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
45858: 242e fff8 movel %fp@(-8),%d2
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL;
4585c: 588f addql #4,%sp
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); _Thread_Enable_dispatch();
4585e: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
45860: 4e5e unlk %fp 45862: 4e75 rts 45864: 242e fff8 movel %fp@(-8),%d2
register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) {
45868: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4586a: 4e5e unlk %fp 4586c: 4e75 rts
... 0004b840 <rtems_extension_delete>: #include <rtems/extension.h> rtems_status_code rtems_extension_delete( rtems_id id ) {
4b840: 4e56 fffc linkw %fp,#-4 4b844: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *)
4b846: 486e fffc pea %fp@(-4) 4b84a: 2f2e 0008 movel %fp@(8),%sp@- 4b84e: 4879 0006 ceb8 pea 6ceb8 <_Extension_Information> 4b854: 4eb9 0004 c9ec jsr 4c9ec <_Objects_Get>
Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) {
4b85a: 4fef 000c lea %sp@(12),%sp 4b85e: 2440 moveal %d0,%a2 4b860: 4aae fffc tstl %fp@(-4) 4b864: 663a bnes 4b8a0 <rtems_extension_delete+0x60>
case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension );
4b866: 486a 0010 pea %a2@(16) 4b86a: 4eb9 0004 e39c jsr 4e39c <_User_extensions_Remove_set>
_Objects_Close( &_Extension_Information, &the_extension->Object );
4b870: 2f0a movel %a2,%sp@- 4b872: 4879 0006 ceb8 pea 6ceb8 <_Extension_Information> 4b878: 4eb9 0004 c5e0 jsr 4c5e0 <_Objects_Close>
RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object );
4b87e: 2f0a movel %a2,%sp@- 4b880: 4879 0006 ceb8 pea 6ceb8 <_Extension_Information> 4b886: 4eb9 0004 c888 jsr 4c888 <_Objects_Free>
_Extension_Free( the_extension ); _Thread_Enable_dispatch();
4b88c: 4eb9 0004 d380 jsr 4d380 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4b892: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); _Objects_Close( &_Extension_Information, &the_extension->Object ); _Extension_Free( the_extension ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL;
4b896: 4fef 0014 lea %sp@(20),%sp
switch ( location ) { case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); _Objects_Close( &_Extension_Information, &the_extension->Object ); _Extension_Free( the_extension ); _Thread_Enable_dispatch();
4b89a: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4b89c: 4e5e unlk %fp 4b89e: 4e75 rts 4b8a0: 246e fff8 moveal %fp@(-8),%a2
{ Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) {
4b8a4: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4b8a6: 4e5e unlk %fp 4b8a8: 4e75 rts
... 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 ff58 jsr 4ff58 <strlen> 425b8: 588f addql #4,%sp
while ( len ) {
425ba: 4a80 tstl %d0 425bc: 6742 beqs 42600 <rtems_filesystem_dirname+0x5c>
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> 425d0: 183c 005c moveb #92,%d4 425d4: b882 cmpl %d2,%d4 425d6: 6732 beqs 4260a <rtems_filesystem_dirname+0x66> 425d8: 4a03 tstb %d3 425da: 672e beqs 4260a <rtems_filesystem_dirname+0x66> 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> 425fc: 4a02 tstb %d2 425fe: 66e2 bnes 425e2 <rtems_filesystem_dirname+0x3e>
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
42614: 4e75 rts
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> 4275c: 4a02 tstb %d2 4275e: 6646 bnes 427a6 <rtems_filesystem_evaluate_path+0x86> 42760: 2279 0005 d7b4 moveal 5d7b4 <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 d7b4 moveal 5d7b4 <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 eb8c jsr 4eb8c <__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 eb8c jsr 4eb8c <__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
42812: 4e75 rts
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>
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>
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>
* 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 eb8c jsr 4eb8c <__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 eb8c jsr 4eb8c <__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 eb8c jsr 4eb8c <__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 eb8c jsr 4eb8c <__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
4271e: 4e75 rts
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 d7b4 moveal 5d7b4 <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 be18 tstl 5be18 <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 d6ac moveal 5d6ac <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 d7b4 moveal 5d7b4 <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 c182 pea 5c182 <IntUartPollCallbacks.6601+0x20> 42282: 4e94 jsr %a4@
rtems_filesystem_root = loc;
42284: 2079 0005 d7b4 moveal 5d7b4 <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 c182 pea 5c182 <IntUartPollCallbacks.6601+0x20> 422b4: 4e94 jsr %a4@
rtems_filesystem_current = loc;
422b6: 2079 0005 d7b4 moveal 5d7b4 <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 c184 pea 5c184 <IntUartPollCallbacks.6601+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>
* 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 6458 jsr 46458 <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 6458 jsr 46458 <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 6458 jsr 46458 <rtems_fatal_error_occurred> <== NOT EXECUTED
... 00068c8c <rtems_filesystem_nodes_equal>: ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){
68c8c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 68c90: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 68c94: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access ); }
68c98: 4e5e unlk %fp <== NOT EXECUTED
); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){
68c9a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 68c9c: b1d1 cmpal %a1@,%a0 <== NOT EXECUTED 68c9e: 57c0 seq %d0 <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access ); }
68ca0: 4480 negl %d0 <== NOT EXECUTED
68ca2: 4e75 rts
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> 4256e: 4a89 tstl %a1 42570: 672a beqs 4259c <rtems_filesystem_prefix_separators+0x40> 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>
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> 42592: b089 cmpl %a1,%d0 42594: 66de bnes 42574 <rtems_filesystem_prefix_separators+0x18>
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
425a2: 4e75 rts
0004833c <rtems_get_version_string>: #endif #include <rtems/system.h> const char *rtems_get_version_string(void) {
4833c: 4e56 0000 linkw %fp,#0
return _RTEMS_version; }
48340: 203c 0006 0662 movel #394850,%d0 48346: 4e5e unlk %fp 48348: 4e75 rts
... 0004634e <rtems_initialize_data_structures>: #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) {
4634e: 4e56 0000 linkw %fp,#0 46352: 42b9 0005 f08c clrl 5f08c <_System_state_Current>
#endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize();
46358: 4eb9 0004 9344 jsr 49344 <_CPU_Initialize>
/* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization();
4635e: 4eb9 0004 b884 jsr 4b884 <_Debug_Manager_initialization>
_API_extensions_Initialization();
46364: 4eb9 0004 6604 jsr 46604 <_API_extensions_Initialization>
* This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1;
4636a: 7001 moveq #1,%d0 4636c: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level>
/* * Before this is called, we are not allowed to allocate memory * from the Workspace because it is not initialized. */ _Workspace_Handler_initialization();
46372: 4eb9 0004 9218 jsr 49218 <_Workspace_Handler_initialization>
_User_extensions_Handler_initialization();
46378: 4eb9 0004 8ca0 jsr 48ca0 <_User_extensions_Handler_initialization>
_ISR_Handler_initialization();
4637e: 4eb9 0004 7028 jsr 47028 <_ISR_Handler_initialization>
/* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; _API_Mutex_Initialization( 1 );
46384: 4878 0001 pea 1 <ADD>
_ISR_Handler_initialization(); /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
46388: 203c 0005 ef1a movel #388890,%d0 4638e: 23c0 0005 eec0 movel %d0,5eec0 <_Objects_Information_table+0x4>
_API_Mutex_Initialization( 1 );
46394: 4eb9 0004 6738 jsr 46738 <_API_Mutex_Initialization>
_API_Mutex_Allocate( &_RTEMS_Allocator_Mutex );
4639a: 4879 0005 efb6 pea 5efb6 <_RTEMS_Allocator_Mutex> 463a0: 4eb9 0004 66a0 jsr 466a0 <_API_Mutex_Allocate>
#include <rtems/itron/itronapi.h> #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void)
463a6: 508f addql #8,%sp
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0;
463a8: 41f9 0005 f024 lea 5f024 <_Priority_Bit_map>,%a0 463ae: 4240 clrw %d0 463b0: 33c0 0005 efb4 movew %d0,5efb4 <_Priority_Major_bit_map>
for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0;
463b6: 4258 clrw %a0@+
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ )
463b8: b1fc 0005 f044 cmpal #389188,%a0 463be: 66f6 bnes 463b6 <rtems_initialize_data_structures+0x68>
_API_Mutex_Initialization( 1 ); _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); _Priority_Handler_initialization(); _Watchdog_Handler_initialization();
463c0: 4eb9 0004 9048 jsr 49048 <_Watchdog_Handler_initialization>
_TOD_Handler_initialization();
463c6: 4eb9 0004 6bbc jsr 46bbc <_TOD_Handler_initialization>
_Thread_Handler_initialization();
463cc: 4eb9 0004 80c8 jsr 480c8 <_Thread_Handler_initialization>
_MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize();
463d2: 4eb9 0004 65b0 jsr 465b0 <_RTEMS_API_Initialize>
_Extension_Manager_initialization();
463d8: 4eb9 0004 6428 jsr 46428 <_Extension_Manager_initialization>
_IO_Manager_initialization();
463de: 4eb9 0004 64a6 jsr 464a6 <_IO_Manager_initialization>
#ifdef RTEMS_POSIX_API _POSIX_API_Initialize();
463e4: 4eb9 0004 655c jsr 4655c <_POSIX_API_Initialize>
_Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ }
463ea: 4e5e unlk %fp 463ec: 7001 moveq #1,%d0 463ee: 23c0 0005 f08c movel %d0,5f08c <_System_state_Current>
* _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle();
463f4: 4ef9 0004 7b78 jmp 47b78 <_Thread_Create_idle>
... 00045a48 <rtems_interrupt_catch>: rtems_status_code rtems_interrupt_catch( rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) {
45a48: 4e56 0000 linkw %fp,#0 45a4c: 222e 0008 movel %fp@(8),%d1 45a50: 202e 000c movel %fp@(12),%d0 45a54: 206e 0010 moveal %fp@(16),%a0
if ( !_ISR_Is_vector_number_valid( vector ) )
45a58: 0c80 0000 00ff cmpil #255,%d0 45a5e: 621e bhis 45a7e <rtems_interrupt_catch+0x36>
return RTEMS_INVALID_NUMBER; if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) )
45a60: 4a81 tstl %d1 45a62: 6720 beqs 45a84 <rtems_interrupt_catch+0x3c>
return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) )
45a64: 4a88 tstl %a0 45a66: 671c beqs 45a84 <rtems_interrupt_catch+0x3c>
return RTEMS_INVALID_ADDRESS; _ISR_Install_vector(
45a68: 2f08 movel %a0,%sp@- 45a6a: 2f01 movel %d1,%sp@- 45a6c: 2f00 movel %d0,%sp@- 45a6e: 4eb9 0004 937e jsr 4937e <_CPU_ISR_install_vector>
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL;
45a74: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) return RTEMS_INVALID_ADDRESS; _ISR_Install_vector(
45a78: 4280 clrl %d0
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; }
45a7a: 4e5e unlk %fp 45a7c: 4e75 rts
rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { if ( !_ISR_Is_vector_number_valid( vector ) )
45a7e: 700a moveq #10,%d0
_ISR_Install_vector( vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; }
45a80: 4e5e unlk %fp 45a82: 4e75 rts
return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL;
45a84: 7009 moveq #9,%d0
}
45a86: 4e5e unlk %fp 45a88: 4e75 rts
... 000463f0 <rtems_interrupt_level_attribute>: rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { return RTEMS_INTERRUPT_LEVEL(level); }
463f0: 7007 moveq #7,%d0
uint32_t rtems_interrupt_mask = RTEMS_INTERRUPT_MASK; rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) {
463f2: 4e56 0000 linkw %fp,#0
return RTEMS_INTERRUPT_LEVEL(level); }
463f6: c0ae 0008 andl %fp@(8),%d0 463fa: 4e5e unlk %fp 463fc: 4e75 rts
... 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 ff58 lea 4ff58 <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 eb8c jsr 4eb8c <__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
421b4: 4e75 rts
000482d4 <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 ) {
482d4: 4e56 fff4 linkw %fp,#-12 482d8: 226e 000c moveal %fp@(12),%a1 482dc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 482e0: 242e 0008 movel %fp@(8),%d2 482e4: 246e 0010 moveal %fp@(16),%a2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
482e8: 2039 0006 5906 movel 65906 <_IO_Number_of_drivers>,%d0
if ( rtems_interrupt_is_in_progress() )
482ee: 2239 0006 50e6 movel 650e6 <_ISR_Nest_level>,%d1 482f4: 6600 009c bnew 48392 <rtems_io_register_driver+0xbe>
return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL )
482f8: 4a8a tstl %a2 482fa: 6700 00ea beqw 483e6 <rtems_io_register_driver+0x112>
return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit;
482fe: 2480 movel %d0,%a2@
if ( driver_table == NULL )
48300: 4a89 tstl %a1 48302: 6700 00e2 beqw 483e6 <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;
48306: 4a91 tstl %a1@ 48308: 6700 00d4 beqw 483de <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 )
4830c: b480 cmpl %d0,%d2 4830e: 6476 bccs 48386 <rtems_io_register_driver+0xb2>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
48310: 2039 0006 504c movel 6504c <_Thread_Dispatch_disable_level>,%d0 48316: 5280 addql #1,%d0 48318: 23c0 0006 504c movel %d0,6504c <_Thread_Dispatch_disable_level>
return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) {
4831e: 4a82 tstl %d2 48320: 667c bnes 4839e <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;
48322: 2039 0006 5906 movel 65906 <_IO_Number_of_drivers>,%d0
rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) {
48328: 6700 00fc beqw 48426 <rtems_io_register_driver+0x152> 4832c: 2239 0006 590a movel 6590a <_IO_Driver_address_table>,%d1 48332: 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;
48334: 4a90 tstl %a0@ 48336: 6700 008e beqw 483c6 <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 ) {
4833a: 5282 addql #1,%d2 4833c: 41e8 0018 lea %a0@(24),%a0 48340: b480 cmpl %d0,%d2 48342: 65f0 bcss 48334 <rtems_io_register_driver+0x60>
if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m;
48344: 2482 movel %d2,%a2@
if ( m != n )
48346: b480 cmpl %d0,%d2 48348: 6700 00de beqw 48428 <rtems_io_register_driver+0x154> 4834c: 2602 movel %d2,%d3 4834e: 2002 movel %d2,%d0 48350: 2041 moveal %d1,%a0 48352: e78b lsll #3,%d3 48354: eb88 lsll #5,%d0 48356: 9083 subl %d3,%d0 48358: d1c0 addal %d0,%a0
} *registered_major = major; } _IO_Driver_address_table [major] = *driver_table;
4835a: 20d9 movel %a1@+,%a0@+ 4835c: 20d9 movel %a1@+,%a0@+ 4835e: 20d9 movel %a1@+,%a0@+ 48360: 20d9 movel %a1@+,%a0@+ 48362: 20d9 movel %a1@+,%a0@+ 48364: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
48366: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
4836c: 2d42 0008 movel %d2,%fp@(8)
}
48370: 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 );
48376: 42ae 0010 clrl %fp@(16) 4837a: 42ae 000c clrl %fp@(12)
}
4837e: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL );
48380: 4ef9 0005 1298 jmp 51298 <rtems_io_initialize>
return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit )
48386: 700a moveq #10,%d0
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
48388: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4838e: 4e5e unlk %fp 48390: 4e75 rts
rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() )
48392: 7012 moveq #18,%d0
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
48394: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4839a: 4e5e unlk %fp 4839c: 4e75 rts
_Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major;
4839e: 2202 movel %d2,%d1 483a0: 2002 movel %d2,%d0 483a2: e789 lsll #3,%d1 483a4: eb88 lsll #5,%d0 483a6: 2079 0006 590a moveal 6590a <_IO_Driver_address_table>,%a0 483ac: 9081 subl %d1,%d0 483ae: 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;
483b0: 4a90 tstl %a0@ 483b2: 673e beqs 483f2 <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();
483b4: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 483ba: 700c moveq #12,%d0
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
483bc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483c2: 4e5e unlk %fp 483c4: 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;
483c6: 4aa8 0004 tstl %a0@(4) 483ca: 6700 ff78 beqw 48344 <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 ) {
483ce: 5282 addql #1,%d2 483d0: 41e8 0018 lea %a0@(24),%a0 483d4: b480 cmpl %d0,%d2 483d6: 6500 ff5c bcsw 48334 <rtems_io_register_driver+0x60> 483da: 6000 ff68 braw 48344 <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;
483de: 4aa9 0004 tstl %a1@(4) 483e2: 6600 ff28 bnew 4830c <rtems_io_register_driver+0x38>
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL );
483e6: 7009 moveq #9,%d0
}
483e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483ee: 4e5e unlk %fp 483f0: 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;
483f2: 4aa8 0004 tstl %a0@(4) 483f6: 66bc bnes 483b4 <rtems_io_register_driver+0xe0>
} *registered_major = major; } _IO_Driver_address_table [major] = *driver_table;
483f8: 20d9 movel %a1@+,%a0@+ 483fa: 20d9 movel %a1@+,%a0@+ 483fc: 20d9 movel %a1@+,%a0@+ 483fe: 20d9 movel %a1@+,%a0@+ 48400: 20d9 movel %a1@+,%a0@+ 48402: 2091 movel %a1@,%a0@
if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major;
48404: 2482 movel %d2,%a2@
} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch();
48406: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
4840c: 2d42 0008 movel %d2,%fp@(8)
}
48410: 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 );
48416: 42ae 0010 clrl %fp@(16) 4841a: 42ae 000c clrl %fp@(12)
}
4841e: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL );
48420: 4ef9 0005 1298 jmp 51298 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m;
48426: 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();
48428: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 4842e: 7005 moveq #5,%d0
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
48430: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48436: 4e5e unlk %fp 48438: 4e75 rts
... 000421b6 <rtems_io_register_name>: rtems_status_code rtems_io_register_name( const char *device_name, rtems_device_major_number major, rtems_device_minor_number minor ) {
421b6: 4e56 0000 linkw %fp,#0
rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major;
421ba: 202e 000c movel %fp@(12),%d0
temp.__overlay.minor = _minor;
421be: 222e 0010 movel %fp@(16),%d1
int status; dev_t dev; dev = rtems_filesystem_make_dev_t( major, minor ); status = mknod( device_name, 0777 | S_IFCHR, dev );
421c2: 2f01 movel %d1,%sp@- 421c4: 2f00 movel %d0,%sp@- 421c6: 4878 21ff pea 21ff <D_MAX_EXP+0x1a00> 421ca: 2f2e 0008 movel %fp@(8),%sp@- 421ce: 4eb9 0004 29a8 jsr 429a8 <mknod>
/* this is the only error returned by the old version */ if ( status )
421d4: 4fef 0010 lea %sp@(16),%sp 421d8: 4a80 tstl %d0 421da: 6604 bnes 421e0 <rtems_io_register_name+0x2a>
return RTEMS_TOO_MANY; return RTEMS_SUCCESSFUL; }
421dc: 4e5e unlk %fp 421de: 4e75 rts
dev = rtems_filesystem_make_dev_t( major, minor ); status = mknod( device_name, 0777 | S_IFCHR, dev ); /* this is the only error returned by the old version */ if ( status )
421e0: 7005 moveq #5,%d0
return RTEMS_TOO_MANY; return RTEMS_SUCCESSFUL; }
421e2: 4e5e unlk %fp 421e4: 4e75 rts
... 0004843c <rtems_io_unregister_driver>: */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) {
4843c: 4e56 0000 linkw %fp,#0 48440: 202e 0008 movel %fp@(8),%d0
if ( rtems_interrupt_is_in_progress() )
48444: 2239 0006 50e6 movel 650e6 <_ISR_Nest_level>,%d1 4844a: 6644 bnes 48490 <rtems_io_unregister_driver+0x54>
return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) {
4844c: b0b9 0006 5906 cmpl 65906 <_IO_Number_of_drivers>,%d0 48452: 6506 bcss 4845a <rtems_io_unregister_driver+0x1e> 48454: 700d moveq #13,%d0
return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; }
48456: 4e5e unlk %fp 48458: 4e75 rts 4845a: 2239 0006 504c movel 6504c <_Thread_Dispatch_disable_level>,%d1 48460: 5281 addql #1,%d1 48462: 23c1 0006 504c movel %d1,6504c <_Thread_Dispatch_disable_level>
if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset(
48468: 2200 movel %d0,%d1 4846a: e788 lsll #3,%d0 4846c: eb89 lsll #5,%d1 4846e: 2079 0006 590a moveal 6590a <_IO_Driver_address_table>,%a0 48474: 9280 subl %d0,%d1 48476: d1c1 addal %d1,%a0 48478: 4298 clrl %a0@+ 4847a: 4298 clrl %a0@+ 4847c: 4298 clrl %a0@+ 4847e: 4298 clrl %a0@+ 48480: 4298 clrl %a0@+ 48482: 4290 clrl %a0@
&_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch();
48484: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 4848a: 4280 clrl %d0
return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; }
4848c: 4e5e unlk %fp 4848e: 4e75 rts
rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() )
48490: 7012 moveq #18,%d0
return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; }
48492: 4e5e unlk %fp 48494: 4e75 rts
... 00048b04 <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) {
48b04: 4e56 fff0 linkw %fp,#-16 48b08: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48b0c: 266e 0008 moveal %fp@(8),%a3
uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine )
48b10: 4a8b tstl %a3 48b12: 6744 beqs 48b58 <rtems_iterate_over_all_threads+0x54> 48b14: 49f9 0006 94d0 lea 694d0 <_Objects_Information_table+0x4>,%a4
return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] )
48b1a: 2054 moveal %a4@,%a0 48b1c: 4a88 tstl %a0 48b1e: 672e beqs 48b4e <rtems_iterate_over_all_threads+0x4a>
continue; information = _Objects_Information_table[ api_index ][ 1 ];
48b20: 2468 0004 moveal %a0@(4),%a2
if ( !information )
48b24: 4a8a tstl %a2 48b26: 6726 beqs 48b4e <rtems_iterate_over_all_threads+0x4a>
continue; for ( i=1 ; i <= information->maximum ; i++ ) {
48b28: 4a6a 000e tstw %a2@(14) 48b2c: 6720 beqs 48b4e <rtems_iterate_over_all_threads+0x4a> 48b2e: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
48b30: 206a 0018 moveal %a2@(24),%a0 48b34: 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++ ) {
48b38: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread )
48b3a: 4a80 tstl %d0 48b3c: 6706 beqs 48b44 <rtems_iterate_over_all_threads+0x40>
continue; (*routine)(the_thread);
48b3e: 2f00 movel %d0,%sp@- 48b40: 4e93 jsr %a3@ 48b42: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) {
48b44: 4280 clrl %d0 48b46: 302a 000e movew %a2@(14),%d0 48b4a: b480 cmpl %d0,%d2 48b4c: 63e2 blss 48b30 <rtems_iterate_over_all_threads+0x2c> 48b4e: 588c addql #4,%a4
Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
48b50: b9fc 0006 94e0 cmpal #431328,%a4 48b56: 66c2 bnes 48b1a <rtems_iterate_over_all_threads+0x16>
(*routine)(the_thread); } } }
48b58: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48b5e: 4e5e unlk %fp 48b60: 4e75 rts
... 0004aa78 <rtems_libio_free>: */ void rtems_libio_free( rtems_libio_t *iop ) {
4aa78: 4e56 0000 linkw %fp,#0 4aa7c: 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 );
4aa7e: 42a7 clrl %sp@- 4aa80: 246e 0008 moveal %fp@(8),%a2 4aa84: 42a7 clrl %sp@- 4aa86: 2f39 0005 edac movel 5edac <rtems_libio_semaphore>,%sp@- 4aa8c: 4eb9 0004 5d2c jsr 45d2c <rtems_semaphore_obtain>
rtems_libio_lock(); if (iop->sem)
4aa92: 202a 002c movel %a2@(44),%d0 4aa96: 4fef 000c lea %sp@(12),%sp 4aa9a: 6630 bnes 4aacc <rtems_libio_free+0x54>
rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist;
4aa9c: 41f9 0005 eda8 lea 5eda8 <rtems_libio_iop_freelist>,%a0 <== NOT EXECUTED
rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN;
4aaa2: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
4aaa8: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED
} static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore );
4aaac: 41f9 0005 edac lea 5edac <rtems_libio_semaphore>,%a0 <== NOT EXECUTED 4aab2: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED
rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN;
4aab6: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop;
4aaba: 23ca 0005 eda8 movel %a2,5eda8 <rtems_libio_iop_freelist> <== NOT EXECUTED
rtems_libio_unlock(); }
4aac0: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4aac4: 4e5e unlk %fp <== NOT EXECUTED 4aac6: 4ef9 0004 5e68 jmp 45e68 <rtems_semaphore_release> <== NOT EXECUTED
) { rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem);
4aacc: 2f00 movel %d0,%sp@- 4aace: 4eb9 0004 5c54 jsr 45c54 <rtems_semaphore_delete> 4aad4: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist;
4aad6: 41f9 0005 eda8 lea 5eda8 <rtems_libio_iop_freelist>,%a0
rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN;
4aadc: 203c ffff feff movel #-257,%d0
iop->data1 = rtems_libio_iop_freelist;
4aae2: 2550 0034 movel %a0@,%a2@(52) 4aae6: 41f9 0005 edac lea 5edac <rtems_libio_semaphore>,%a0 4aaec: 2d50 0008 movel %a0@,%fp@(8)
rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN;
4aaf0: c1aa 0014 andl %d0,%a2@(20)
iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop;
4aaf4: 23ca 0005 eda8 movel %a2,5eda8 <rtems_libio_iop_freelist>
rtems_libio_unlock(); }
4aafa: 246e fffc moveal %fp@(-4),%a2 4aafe: 4e5e unlk %fp 4ab00: 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 d6a4 movel 5d6a4 <rtems_libio_number_iops>,%d0 4281e: 674a beqs 4286a <rtems_libio_init+0x56>
{ 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 a59c jsr 4a59c <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 eda4 movel %d0,5eda4 <rtems_libio_iops>
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL)
42836: 6770 beqs 428a8 <rtems_libio_init+0x94>
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 d6a4 moveal 5d6a4 <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 eda8 movel %d0,5eda8 <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> 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 edac pea 5edac <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>
/* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper)
4288e: 2279 0005 d6a0 moveal 5d6a0 <rtems_fs_init_helper>,%a1 42894: 4a89 tstl %a1 42896: 6704 beqs 4289c <rtems_libio_init+0x88>
(* 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 6458 jsr 46458 <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 6458 jsr 46458 <rtems_fatal_error_occurred> <== NOT EXECUTED
... 000683ac <rtems_libio_set_private_env>: rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) {
683ac: 4e56 ffd4 linkw %fp,#-44 683b0: 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);
683b4: 486e fffc pea %fp@(-4) 683b8: 42a7 clrl %sp@- 683ba: 42a7 clrl %sp@- 683bc: 4eb9 0006 a1dc jsr 6a1dc <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
683c2: 4fef 000c lea %sp@(12),%sp 683c6: 4a80 tstl %d0 683c8: 6600 00cc bnew 68496 <rtems_libio_set_private_env+0xea>
/* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) {
683cc: 2479 000a 1fac moveal a1fac <rtems_current_user_env>,%a2 683d2: b5fc 000a 69a8 cmpal #682408,%a2 683d8: 6700 00ca beqw 684a4 <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*/
683dc: 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);
683e0: 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*/
683e4: 4879 000a 69a8 pea a69a8 <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);
683ea: 4bf9 0004 66b4 lea 466b4 <rtems_filesystem_evaluate_path>,%a5
rtems_filesystem_root = loc;
683f0: 49ee fff8 lea %fp@(-8),%a4
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc;
683f4: 4282 clrl %d2
return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/
683f6: 2f0a movel %a2,%sp@- 683f8: 4eb9 0008 3e9c jsr 83e9c <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
683fe: 2079 000a 6990 moveal a6990 <rtems_filesystem_mount_table_control>,%a0 68404: 2568 001c 0018 movel %a0@(28),%a2@(24) 6840a: 2568 0020 001c movel %a0@(32),%a2@(28) 68410: 2568 0024 0020 movel %a0@(36),%a2@(32) 68416: 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*/
6841c: 24ae fffc movel %fp@(-4),%a2@
/* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
68420: 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);
68426: 42a7 clrl %sp@- 68428: 2f0b movel %a3,%sp@- 6842a: 42a7 clrl %sp@- 6842c: 4878 0001 pea 1 <ADD> 68430: 4879 000a 19e8 pea a19e8 <basefix.3825+0x26> 68436: 4e95 jsr %a5@
rtems_filesystem_root = loc;
68438: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
6843e: 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;
68442: 2153 0018 movel %a3@,%a0@(24) 68446: 216e ffec 001c movel %fp@(-20),%a0@(28) 6844c: 216e fff0 0020 movel %fp@(-16),%a0@(32) 68452: 216e fff4 0024 movel %fp@(-12),%a0@(36) 68458: 2154 0028 movel %a4@,%a0@(40)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
6845c: 42a7 clrl %sp@- 6845e: 2f0b movel %a3,%sp@- 68460: 42a7 clrl %sp@- 68462: 4878 0001 pea 1 <ADD> 68466: 4879 000a 19e8 pea a19e8 <basefix.3825+0x26> 6846c: 4e95 jsr %a5@
rtems_filesystem_current = loc;
6846e: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 68474: 5888 addql #4,%a0
return RTEMS_SUCCESSFUL;
68476: 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;
6847a: 20d3 movel %a3@,%a0@+ 6847c: 20ee ffec movel %fp@(-20),%a0@+ 68480: 20ee fff0 movel %fp@(-16),%a0@+ 68484: 20ee fff4 movel %fp@(-12),%a0@+ 68488: 2094 movel %a4@,%a0@
return RTEMS_SUCCESSFUL; }
6848a: 2002 movel %d2,%d0 6848c: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 68492: 4e5e unlk %fp 68494: 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;
68496: 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; }
68498: 2002 movel %d2,%d0 <== NOT EXECUTED 6849a: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 684a0: 4e5e unlk %fp <== NOT EXECUTED 684a2: 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));
684a4: 4878 0048 pea 48 <DBL_MANT_DIG+0x13> 684a8: 4eb9 0004 6de8 jsr 46de8 <malloc>
if (!tmp)
684ae: 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));
684b0: 2440 moveal %d0,%a2
if (!tmp)
684b2: 4a80 tstl %d0 684b4: 6700 00d6 beqw 6858c <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<
684b8: 487a fdda pea %pc@(68294 <free_user_env>) 684bc: 4879 000a 1fac pea a1fac <rtems_current_user_env> 684c2: 42a7 clrl %sp@- 684c4: 4eb9 0006 a5bc jsr 6a5bc <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
684ca: 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<
684ce: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
684d0: 6600 00c8 bnew 6859a <rtems_libio_set_private_env+0x1ee>
* not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp;
684d4: 23ca 000a 1fac movel %a2,a1fac <rtems_current_user_env>
}; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/
684da: 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);
684de: 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*/
684e2: 4879 000a 69a8 pea a69a8 <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);
684e8: 4bf9 0004 66b4 lea 466b4 <rtems_filesystem_evaluate_path>,%a5
rtems_filesystem_root = loc;
684ee: 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*/
684f2: 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;
684f4: 4282 clrl %d2
return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/
684f6: 4eb9 0008 3e9c jsr 83e9c <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
684fc: 2079 000a 6990 moveal a6990 <rtems_filesystem_mount_table_control>,%a0 68502: 2568 001c 0018 movel %a0@(28),%a2@(24) 68508: 2568 0020 001c movel %a0@(32),%a2@(28) 6850e: 2568 0024 0020 movel %a0@(36),%a2@(32) 68514: 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*/
6851a: 24ae fffc movel %fp@(-4),%a2@
/* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
6851e: 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);
68524: 42a7 clrl %sp@- 68526: 2f0b movel %a3,%sp@- 68528: 42a7 clrl %sp@- 6852a: 4878 0001 pea 1 <ADD> 6852e: 4879 000a 19e8 pea a19e8 <basefix.3825+0x26> 68534: 4e95 jsr %a5@
rtems_filesystem_root = loc;
68536: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
6853c: 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;
68540: 2153 0018 movel %a3@,%a0@(24) 68544: 216e ffec 001c movel %fp@(-20),%a0@(28) 6854a: 216e fff0 0020 movel %fp@(-16),%a0@(32) 68550: 216e fff4 0024 movel %fp@(-12),%a0@(36) 68556: 2154 0028 movel %a4@,%a0@(40)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
6855a: 42a7 clrl %sp@- 6855c: 2f0b movel %a3,%sp@- 6855e: 42a7 clrl %sp@- 68560: 4878 0001 pea 1 <ADD> 68564: 4879 000a 19e8 pea a19e8 <basefix.3825+0x26> 6856a: 4e95 jsr %a5@
rtems_filesystem_current = loc;
6856c: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 68572: 5888 addql #4,%a0
return RTEMS_SUCCESSFUL;
68574: 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;
68578: 20d3 movel %a3@,%a0@+ 6857a: 20ee ffec movel %fp@(-20),%a0@+ 6857e: 20ee fff0 movel %fp@(-16),%a0@+ 68582: 20ee fff4 movel %fp@(-12),%a0@+ 68586: 2094 movel %a4@,%a0@ 68588: 6000 ff00 braw 6848a <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)
6858c: 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; }
6858e: 2002 movel %d2,%d0 <== NOT EXECUTED 68590: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 68596: 4e5e unlk %fp <== NOT EXECUTED 68598: 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);
6859a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6859c: 4eb9 0004 67a8 jsr 467a8 <free> <== NOT EXECUTED
return sc;
685a2: 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; }
685a4: 2002 movel %d2,%d0 <== NOT EXECUTED 685a6: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 685ac: 4e5e unlk %fp <== NOT EXECUTED
685ae: 4e75 rts
000682ee <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) {
682ee: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 682f2: 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);
682f4: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 682f8: 42a7 clrl %sp@- <== NOT EXECUTED 682fa: 42a7 clrl %sp@- <== NOT EXECUTED 682fc: 4eb9 0006 a1dc jsr 6a1dc <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
68302: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 68306: 4a80 tstl %d0 <== NOT EXECUTED 68308: 6636 bnes 68340 <rtems_libio_share_private_env+0x52><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
6830a: 2479 000a 1fac moveal a1fac <rtems_current_user_env>,%a2 <== NOT EXECUTED 68310: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 68314: b092 cmpl %a2@,%d0 <== NOT EXECUTED 68316: 6730 beqs 68348 <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,
68318: 486e fffc pea %fp@(-4) <== NOT EXECUTED 6831c: 4879 000a 1fac pea a1fac <rtems_current_user_env> <== NOT EXECUTED 68322: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 68326: 4eb9 0006 a6f4 jsr 6a6f4 <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
6832c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 68330: 4a80 tstl %d0 <== NOT EXECUTED 68332: 674c beqs 68380 <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;
68334: 223c 000a 69a8 movel #682408,%d1 <== NOT EXECUTED 6833a: 23c1 000a 1fac movel %d1,a1fac <rtems_current_user_env> <== NOT EXECUTED
return sc; }
68340: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 68344: 4e5e unlk %fp <== NOT EXECUTED 68346: 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);
68348: 4879 000a 1fac pea a1fac <rtems_current_user_env> <== NOT EXECUTED 6834e: 42a7 clrl %sp@- <== NOT EXECUTED 68350: 4eb9 0006 a660 jsr 6a660 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
68356: 508f addql #8,%sp <== NOT EXECUTED 68358: 4a80 tstl %d0 <== NOT EXECUTED 6835a: 66e4 bnes 68340 <rtems_libio_share_private_env+0x52><== NOT EXECUTED
free_user_env(tmp);
6835c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6835e: 4eba ff34 jsr %pc@(68294 <free_user_env>) <== NOT EXECUTED 68362: 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,
68364: 486e fffc pea %fp@(-4) <== NOT EXECUTED 68368: 4879 000a 1fac pea a1fac <rtems_current_user_env> <== NOT EXECUTED 6836e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 68372: 4eb9 0006 a6f4 jsr 6a6f4 <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
68378: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 6837c: 4a80 tstl %d0 <== NOT EXECUTED 6837e: 66b4 bnes 68334 <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);
68380: 487a ff12 pea %pc@(68294 <free_user_env>) <== NOT EXECUTED 68384: 4879 000a 1fac pea a1fac <rtems_current_user_env> <== NOT EXECUTED 6838a: 42a7 clrl %sp@- <== NOT EXECUTED 6838c: 4eb9 0006 a5bc jsr 6a5bc <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
68392: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 68396: 4a80 tstl %d0 <== NOT EXECUTED 68398: 669a bnes 68334 <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;
6839a: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED
bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; }
6839e: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 683a2: 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;
683a4: 23d0 000a 1fac movel %a0@,a1fac <rtems_current_user_env> <== NOT EXECUTED
bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; }
683aa: 4e75 rts
0004a8b4 <rtems_libio_to_fcntl_flags>: uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a8b4: 7006 moveq #6,%d0
*/ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) {
4a8b6: 4e56 0000 linkw %fp,#0 4a8ba: 222e 0008 movel %fp@(8),%d1
uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a8be: c081 andl %d1,%d0
*/ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) {
4a8c0: 2f02 movel %d2,%sp@-
uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a8c2: 7406 moveq #6,%d2 4a8c4: b480 cmpl %d0,%d2 4a8c6: 6736 beqs 4a8fe <rtems_libio_to_fcntl_flags+0x4a>
fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4a8c8: 0801 0001 btst #1,%d1 4a8cc: 6726 beqs 4a8f4 <rtems_libio_to_fcntl_flags+0x40> 4a8ce: 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 ) {
4a8d0: 0801 0000 btst #0,%d1 4a8d4: 6704 beqs 4a8da <rtems_libio_to_fcntl_flags+0x26>
fcntl_flags |= O_NONBLOCK;
4a8d6: 08c0 000e bset #14,%d0
} if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
4a8da: 0801 0009 btst #9,%d1 4a8de: 6704 beqs 4a8e4 <rtems_libio_to_fcntl_flags+0x30>
fcntl_flags |= O_APPEND;
4a8e0: 7408 moveq #8,%d2 4a8e2: 8082 orl %d2,%d0
} if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
4a8e4: 0801 000a btst #10,%d1 4a8e8: 6704 beqs 4a8ee <rtems_libio_to_fcntl_flags+0x3a>
fcntl_flags |= O_CREAT;
4a8ea: 08c0 0009 bset #9,%d0
} return fcntl_flags; }
4a8ee: 241f movel %sp@+,%d2 4a8f0: 4e5e unlk %fp 4a8f2: 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) {
4a8f4: 2001 movel %d1,%d0 <== NOT EXECUTED 4a8f6: e488 lsrl #2,%d0 <== NOT EXECUTED 4a8f8: 7401 moveq #1,%d2 <== NOT EXECUTED 4a8fa: c082 andl %d2,%d0 <== NOT EXECUTED 4a8fc: 60d2 bras 4a8d0 <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 ) {
4a8fe: 7002 moveq #2,%d0 <== NOT EXECUTED 4a900: 60ce bras 4a8d0 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED
00046eb8 <rtems_malloc_statistics_at_free>: * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) {
46eb8: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 46ebc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46ebe: 2f02 movel %d2,%sp@- <== NOT EXECUTED
uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
46ec0: 486e fffc pea %fp@(-4) <== NOT EXECUTED 46ec4: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 46ec8: 2f39 000a 1cb0 movel a1cb0 <RTEMS_Malloc_Heap>,%sp@- <== NOT EXECUTED 46ece: 4eb9 0004 c8d0 jsr 4c8d0 <_Protected_heap_Get_block_size> <== NOT EXECUTED 46ed4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 46ed8: 4a00 tstb %d0 <== NOT EXECUTED 46eda: 671a beqs 46ef6 <rtems_malloc_statistics_at_free+0x3e><== NOT EXECUTED
MSBUMP(lifetime_freed, size);
46edc: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 46ee0: 4282 clrl %d2 <== NOT EXECUTED 46ee2: d7b9 000a 698c addl %d3,a698c <rtems_malloc_statistics+0x28><== NOT EXECUTED 46ee8: 2039 000a 6988 movel a6988 <rtems_malloc_statistics+0x24>,%d0<== NOT EXECUTED 46eee: d182 addxl %d2,%d0 <== NOT EXECUTED 46ef0: 23c0 000a 6988 movel %d0,a6988 <rtems_malloc_statistics+0x24><== NOT EXECUTED
} }
46ef6: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 46efa: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 46efe: 4e5e unlk %fp <== NOT EXECUTED
46f00: 4e75 rts
00046f02 <rtems_malloc_statistics_at_malloc>: } static void rtems_malloc_statistics_at_malloc( void *pointer ) {
46f02: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 46f06: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 46f0a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46f0c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer )
46f0e: 4a80 tstl %d0 <== NOT EXECUTED 46f10: 674e beqs 46f60 <rtems_malloc_statistics_at_malloc+0x5e><== NOT EXECUTED
static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0;
46f12: 204e moveal %fp,%a0 <== NOT EXECUTED
if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size);
46f14: 4282 clrl %d2 <== NOT EXECUTED
static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0;
46f16: 42a0 clrl %a0@- <== NOT EXECUTED
rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
46f18: 2f08 movel %a0,%sp@- <== NOT EXECUTED 46f1a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46f1c: 2f39 000a 1cb0 movel a1cb0 <RTEMS_Malloc_Heap>,%sp@- <== NOT EXECUTED 46f22: 4eb9 0004 c8d0 jsr 4c8d0 <_Protected_heap_Get_block_size> <== NOT EXECUTED
MSBUMP(lifetime_allocated, actual_size);
46f28: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth)
46f2c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size);
46f30: 2039 000a 6980 movel a6980 <rtems_malloc_statistics+0x1c>,%d0<== NOT EXECUTED 46f36: d6b9 000a 6984 addl a6984 <rtems_malloc_statistics+0x20>,%d3<== NOT EXECUTED 46f3c: d580 addxl %d0,%d2 <== NOT EXECUTED
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
46f3e: 2003 movel %d3,%d0 <== NOT EXECUTED 46f40: 90b9 000a 698c subl a698c <rtems_malloc_statistics+0x28>,%d0<== NOT EXECUTED
if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size);
46f46: 23c2 000a 6980 movel %d2,a6980 <rtems_malloc_statistics+0x1c><== NOT EXECUTED 46f4c: 23c3 000a 6984 movel %d3,a6984 <rtems_malloc_statistics+0x20><== NOT EXECUTED
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth)
46f52: b0b9 000a 697c cmpl a697c <rtems_malloc_statistics+0x18>,%d0<== NOT EXECUTED 46f58: 6306 blss 46f60 <rtems_malloc_statistics_at_malloc+0x5e><== NOT EXECUTED
s->max_depth = current_depth;
46f5a: 23c0 000a 697c movel %d0,a697c <rtems_malloc_statistics+0x18><== NOT EXECUTED
}
46f60: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 46f64: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 46f68: 4e5e unlk %fp <== NOT EXECUTED
46f6a: 4e75 rts
00046f6c <rtems_malloc_statistics_initialize>: #include <sys/reent.h> #include <stdlib.h> static void rtems_malloc_statistics_initialize( void ) {
46f6c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); }
46f70: 4e5e unlk %fp <== NOT EXECUTED
static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics));
46f72: 42b9 000a 6964 clrl a6964 <rtems_malloc_statistics> <== NOT EXECUTED 46f78: 42b9 000a 6968 clrl a6968 <rtems_malloc_statistics+0x4> <== NOT EXECUTED 46f7e: 42b9 000a 696c clrl a696c <rtems_malloc_statistics+0x8> <== NOT EXECUTED 46f84: 42b9 000a 6970 clrl a6970 <rtems_malloc_statistics+0xc> <== NOT EXECUTED 46f8a: 42b9 000a 6974 clrl a6974 <rtems_malloc_statistics+0x10> <== NOT EXECUTED 46f90: 42b9 000a 6978 clrl a6978 <rtems_malloc_statistics+0x14> <== NOT EXECUTED 46f96: 42b9 000a 697c clrl a697c <rtems_malloc_statistics+0x18> <== NOT EXECUTED 46f9c: 42b9 000a 6980 clrl a6980 <rtems_malloc_statistics+0x1c> <== NOT EXECUTED 46fa2: 42b9 000a 6984 clrl a6984 <rtems_malloc_statistics+0x20> <== NOT EXECUTED 46fa8: 42b9 000a 6988 clrl a6988 <rtems_malloc_statistics+0x24> <== NOT EXECUTED 46fae: 42b9 000a 698c clrl a698c <rtems_malloc_statistics+0x28> <== NOT EXECUTED
}
46fb4: 4e75 rts <== NOT EXECUTED
... 000501c4 <rtems_memalign>: int rtems_memalign( void **pointer, size_t alignment, size_t size ) {
501c4: 4e56 0000 linkw %fp,#0 501c8: 2f0a movel %a2,%sp@- 501ca: 246e 0008 moveal %fp@(8),%a2 501ce: 2f02 movel %d2,%sp@-
void *return_this; /* * Parameter error checks */ if ( !pointer )
501d0: 4a8a tstl %a2 501d2: 675e beqs 50232 <rtems_memalign+0x6e>
return EINVAL; *pointer = NULL;
501d4: 4292 clrl %a2@
/* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) &&
501d6: 7003 moveq #3,%d0 501d8: b0b9 0006 51d4 cmpl 651d4 <_System_state_Current>,%d0 501de: 6748 beqs 50228 <rtems_memalign+0x64>
/* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process();
501e0: 4eb9 0004 41d2 jsr 441d2 <malloc_deferred_frees_process>
uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
501e6: 42a7 clrl %sp@- 501e8: 2f2e 000c movel %fp@(12),%sp@- 501ec: 2f2e 0010 movel %fp@(16),%sp@- 501f0: 2f39 0006 3730 movel 63730 <RTEMS_Malloc_Heap>,%sp@- 501f6: 4eb9 0004 97e0 jsr 497e0 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this )
501fc: 4fef 0010 lea %sp@(16),%sp 50200: 2400 movel %d0,%d2 50202: 673c beqs 50240 <rtems_memalign+0x7c>
return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers )
50204: 2079 0006 3dd6 moveal 63dd6 <rtems_malloc_statistics_helpers>,%a0 5020a: 4a88 tstl %a0 5020c: 670a beqs 50218 <rtems_memalign+0x54>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
5020e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50210: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 50214: 4e90 jsr %a0@ <== NOT EXECUTED 50216: 588f addql #4,%sp <== NOT EXECUTED
*/ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this;
50218: 2482 movel %d2,%a2@
return 0; }
5021a: 242e fff8 movel %fp@(-8),%d2
*/ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this;
5021e: 4280 clrl %d0
return 0; }
50220: 246e fffc moveal %fp@(-4),%a2 50224: 4e5e unlk %fp 50226: 4e75 rts
*pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) &&
50228: 4eb9 0004 4178 jsr 44178 <malloc_is_system_state_OK> 5022e: 4a00 tstb %d0 50230: 66ae bnes 501e0 <rtems_memalign+0x1c>
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; }
50232: 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;
50236: 7016 moveq #22,%d0
}
50238: 246e fffc moveal %fp@(-4),%a2 5023c: 4e5e unlk %fp 5023e: 4e75 rts 50240: 242e fff8 movel %fp@(-8),%d2
return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this )
50244: 700c moveq #12,%d0
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; }
50246: 246e fffc moveal %fp@(-4),%a2 5024a: 4e5e unlk %fp 5024c: 4e75 rts
... 00056484 <rtems_message_queue_broadcast>: rtems_id id, const void *buffer, size_t size, uint32_t *count ) {
56484: 4e56 fff0 linkw %fp,#-16 56488: 48d7 001c moveml %d2-%d4,%sp@ 5648c: 282e 0008 movel %fp@(8),%d4 56490: 242e 000c movel %fp@(12),%d2 56494: 262e 0014 movel %fp@(20),%d3
register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer )
56498: 4a82 tstl %d2 5649a: 6762 beqs 564fe <rtems_message_queue_broadcast+0x7a>
return RTEMS_INVALID_ADDRESS; if ( !count )
5649c: 4a83 tstl %d3 5649e: 675e beqs 564fe <rtems_message_queue_broadcast+0x7a>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *)
564a0: 486e fffc pea %fp@(-4) 564a4: 2f04 movel %d4,%sp@- 564a6: 4879 0007 efb2 pea 7efb2 <_Message_queue_Information> 564ac: 4eb9 0005 b9a0 jsr 5b9a0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) {
564b2: 4fef 000c lea %sp@(12),%sp 564b6: 4aae fffc tstl %fp@(-4) 564ba: 6636 bnes 564f2 <rtems_message_queue_broadcast+0x6e>
case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast(
564bc: 2f03 movel %d3,%sp@- 564be: 2040 moveal %d0,%a0 564c0: 42a7 clrl %sp@- 564c2: 2f04 movel %d4,%sp@- 564c4: 2f2e 0010 movel %fp@(16),%sp@- 564c8: 2f02 movel %d2,%sp@- 564ca: 4868 0014 pea %a0@(20) 564ce: 4eb9 0005 9f8c jsr 59f8c <_CORE_message_queue_Broadcast> 564d4: 2400 movel %d0,%d2
NULL, #endif count ); _Thread_Enable_dispatch();
564d6: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code( core_status );
564dc: 2f02 movel %d2,%sp@- 564de: 4eb9 0005 6888 jsr 56888 <_Message_queue_Translate_core_message_queue_return_code>
#endif count ); _Thread_Enable_dispatch(); return
564e4: 4fef 001c lea %sp@(28),%sp
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
564e8: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 564ee: 4e5e unlk %fp 564f0: 4e75 rts
if ( !count ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) {
564f2: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
564f4: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 564fa: 4e5e unlk %fp 564fc: 4e75 rts
#endif count ); _Thread_Enable_dispatch(); return
564fe: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56500: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 56506: 4e5e unlk %fp 56508: 4e75 rts
... 000566e0 <rtems_message_queue_get_number_pending>: rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) {
566e0: 4e56 fffc linkw %fp,#-4 566e4: 2f0a movel %a2,%sp@- 566e6: 246e 000c moveal %fp@(12),%a2
register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count )
566ea: 4a8a tstl %a2 566ec: 673e beqs 5672c <rtems_message_queue_get_number_pending+0x4c> 566ee: 486e fffc pea %fp@(-4) 566f2: 2f2e 0008 movel %fp@(8),%sp@- 566f6: 4879 0007 efb2 pea 7efb2 <_Message_queue_Information> 566fc: 4eb9 0005 b9a0 jsr 5b9a0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) {
56702: 4fef 000c lea %sp@(12),%sp 56706: 4aae fffc tstl %fp@(-4) 5670a: 6616 bnes 56722 <rtems_message_queue_get_number_pending+0x42>
case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages;
5670c: 2040 moveal %d0,%a0 5670e: 24a8 005c movel %a0@(92),%a2@
_Thread_Enable_dispatch();
56712: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56718: 246e fff8 moveal %fp@(-8),%a2
the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; _Thread_Enable_dispatch();
5671c: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
5671e: 4e5e unlk %fp 56720: 4e75 rts 56722: 246e fff8 moveal %fp@(-8),%a2
if ( !count ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) {
56726: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56728: 4e5e unlk %fp 5672a: 4e75 rts 5672c: 246e fff8 moveal %fp@(-8),%a2
) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count )
56730: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56732: 4e5e unlk %fp 56734: 4e75 rts
... 0004eb5c <rtems_message_queue_ident>: rtems_status_code rtems_message_queue_ident( rtems_name name, uint32_t node, rtems_id *id ) {
4eb5c: 4e56 0000 linkw %fp,#0
Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32(
4eb60: 2f2e 0010 movel %fp@(16),%sp@- 4eb64: 2f2e 000c movel %fp@(12),%sp@- 4eb68: 2f2e 0008 movel %fp@(8),%sp@- 4eb6c: 4879 0006 9f3e pea 69f3e <_Message_queue_Information> 4eb72: 4eb9 0005 1098 jsr 51098 <_Objects_Name_to_id_u32> 4eb78: 41f9 0006 6d48 lea 66d48 <_Status_Object_name_errors_to_status>,%a0
node, id ); return _Status_Object_name_errors_to_status[ status ]; }
4eb7e: 4e5e unlk %fp 4eb80: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4eb84: 4e75 rts
... 0004eb88 <rtems_message_queue_receive>: void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) {
4eb88: 4e56 fff0 linkw %fp,#-16 4eb8c: 48d7 001c moveml %d2-%d4,%sp@ 4eb90: 242e 000c movel %fp@(12),%d2 4eb94: 262e 0010 movel %fp@(16),%d3
register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer )
4eb98: 4a82 tstl %d2 4eb9a: 6776 beqs 4ec12 <rtems_message_queue_receive+0x8a>
return RTEMS_INVALID_ADDRESS; if ( !size )
4eb9c: 4a83 tstl %d3 4eb9e: 6772 beqs 4ec12 <rtems_message_queue_receive+0x8a>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *)
4eba0: 486e fffc pea %fp@(-4) 4eba4: 2f2e 0008 movel %fp@(8),%sp@- 4eba8: 4879 0006 9f3e pea 69f3e <_Message_queue_Information> 4ebae: 4eb9 0005 0eec jsr 50eec <_Objects_Get>
return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) {
4ebb4: 4fef 000c lea %sp@(12),%sp 4ebb8: 4aae fffc tstl %fp@(-4) 4ebbc: 6648 bnes 4ec06 <rtems_message_queue_receive+0x7e>
if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize(
4ebbe: 2f2e 0018 movel %fp@(24),%sp@- 4ebc2: 7201 moveq #1,%d1 4ebc4: 7801 moveq #1,%d4 4ebc6: 2040 moveal %d0,%a0 4ebc8: c2ae 0014 andl %fp@(20),%d1 4ebcc: b384 eorl %d1,%d4 4ebce: 2f04 movel %d4,%sp@- 4ebd0: 2f03 movel %d3,%sp@- 4ebd2: 2f02 movel %d2,%sp@- 4ebd4: 2f28 0008 movel %a0@(8),%sp@- 4ebd8: 4868 0014 pea %a0@(20) 4ebdc: 4eb9 0004 ff18 jsr 4ff18 <_CORE_message_queue_Seize>
buffer, size, wait, timeout ); _Thread_Enable_dispatch();
4ebe2: 4eb9 0005 187c jsr 5187c <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
4ebe8: 2079 0006 97b2 moveal 697b2 <_Thread_Executing>,%a0 4ebee: 2f28 0034 movel %a0@(52),%sp@- 4ebf2: 4eb9 0004 ecac jsr 4ecac <_Message_queue_Translate_core_message_queue_return_code> 4ebf8: 4fef 001c lea %sp@(28),%sp
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4ebfc: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ec02: 4e5e unlk %fp 4ec04: 4e75 rts
if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) {
4ec06: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4ec08: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ec0e: 4e5e unlk %fp 4ec10: 4e75 rts
size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code(
4ec12: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4ec14: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ec1a: 4e5e unlk %fp 4ec1c: 4e75 rts
... 00047770 <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 ) {
47770: 4e56 0000 linkw %fp,#0 47774: 2f0a movel %a2,%sp@- 47776: 246e 0010 moveal %fp@(16),%a2 4777a: 2f02 movel %d2,%sp@-
int i; /* * Validate parameters and look up information structure. */ if ( !info )
4777c: 4a8a tstl %a2 4777e: 6766 beqs 477e6 <rtems_object_get_class_information+0x76>
return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class );
47780: 2f2e 000c movel %fp@(12),%sp@- 47784: 2f2e 0008 movel %fp@(8),%sp@- 47788: 4eb9 0004 937c jsr 4937c <_Objects_Get_information>
if ( !obj_info )
4778e: 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 );
47790: 2040 moveal %d0,%a0
if ( !obj_info )
47792: 4a80 tstl %d0 47794: 675e beqs 477f4 <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;
47796: 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;
4779a: 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;
4779c: 2568 000a 0004 movel %a0@(10),%a2@(4)
info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum;
477a2: 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;
477a6: 1568 0010 000c moveb %a0@(16),%a2@(12)
info->maximum = obj_info->maximum;
477ac: 2542 0008 movel %d2,%a2@(8)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
477b0: 6750 beqs 47802 <rtems_object_get_class_information+0x92> 477b2: 2068 0018 moveal %a0@(24),%a0 477b6: 7201 moveq #1,%d1 477b8: 7001 moveq #1,%d0 477ba: 93c9 subal %a1,%a1 477bc: 5280 addql #1,%d0
if ( !obj_info->local_table[i] )
477be: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 477c2: 6718 beqs 477dc <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++ )
477c4: 2200 movel %d0,%d1 477c6: b082 cmpl %d2,%d0 477c8: 63f2 blss 477bc <rtems_object_get_class_information+0x4c>
if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated;
477ca: 2549 000e movel %a1,%a2@(14) 477ce: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
477d0: 242e fff8 movel %fp@(-8),%d2 477d4: 246e fffc moveal %fp@(-4),%a2 477d8: 4e5e unlk %fp 477da: 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++;
477dc: 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++ )
477de: 2200 movel %d0,%d1 477e0: b082 cmpl %d2,%d0 477e2: 63d8 blss 477bc <rtems_object_get_class_information+0x4c> 477e4: 60e4 bras 477ca <rtems_object_get_class_information+0x5a>
unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; }
477e6: 242e fff8 movel %fp@(-8),%d2
int i; /* * Validate parameters and look up information structure. */ if ( !info )
477ea: 7009 moveq #9,%d0
unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; }
477ec: 246e fffc moveal %fp@(-4),%a2 477f0: 4e5e unlk %fp 477f2: 4e75 rts 477f4: 242e fff8 movel %fp@(-8),%d2
*/ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info )
477f8: 700a moveq #10,%d0
unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; }
477fa: 246e fffc moveal %fp@(-4),%a2 477fe: 4e5e unlk %fp 47800: 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++ )
47802: 93c9 subal %a1,%a1 <== NOT EXECUTED
if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated;
47804: 4280 clrl %d0 <== NOT EXECUTED 47806: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 4780a: 60c4 bras 477d0 <rtems_object_get_class_information+0x60><== NOT EXECUTED
0004ab8c <rtems_object_get_classic_name>: rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) {
4ab8c: 4e56 fffc linkw %fp,#-4 4ab90: 2f0a movel %a2,%sp@- 4ab92: 246e 000c moveal %fp@(12),%a2
Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name )
4ab96: 4a8a tstl %a2 4ab98: 6726 beqs 4abc0 <rtems_object_get_classic_name+0x34>
return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u );
4ab9a: 486e fffc pea %fp@(-4) 4ab9e: 2f2e 0008 movel %fp@(8),%sp@- 4aba2: 4eb9 0004 ca58 jsr 4ca58 <_Objects_Id_to_name>
*name = name_u.name_u32;
4aba8: 24ae fffc movel %fp@(-4),%a2@
return _Status_Object_name_errors_to_status[ status ];
4abac: 41f9 0006 8530 lea 68530 <_Status_Object_name_errors_to_status>,%a0 4abb2: 508f addql #8,%sp
}
4abb4: 246e fff8 moveal %fp@(-8),%a2 4abb8: 4e5e unlk %fp
return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ];
4abba: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
}
4abbe: 4e75 rts 4abc0: 246e fff8 moveal %fp@(-8),%a2
) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name )
4abc4: 7009 moveq #9,%d0
status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; }
4abc6: 4e5e unlk %fp 4abc8: 4e75 rts
... 00047818 <rtems_object_id_api_maximum>: #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { return OBJECTS_ITRON_API; }
47818: 7004 moveq #4,%d0
#include <rtems/score/object.h> #include <rtems/rtems/types.h> #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) {
4781a: 4e56 0000 linkw %fp,#0
return OBJECTS_ITRON_API; }
4781e: 4e5e unlk %fp 47820: 4e75 rts
... 00047824 <rtems_object_id_api_minimum>: #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { return OBJECTS_INTERNAL_API; }
47824: 7001 moveq #1,%d0
#include <rtems/score/object.h> #include <rtems/rtems/types.h> #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) {
47826: 4e56 0000 linkw %fp,#0
return OBJECTS_INTERNAL_API; }
4782a: 4e5e unlk %fp 4782c: 4e75 rts
... 00047830 <rtems_object_id_get_api>: #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) {
47830: 4280 clrl %d0
return _Objects_Get_API( id ); }
47832: 7207 moveq #7,%d1
#undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) {
47834: 4e56 0000 linkw %fp,#0 47838: 102e 0008 moveb %fp@(8),%d0
return _Objects_Get_API( id ); }
4783c: 4e5e unlk %fp 4783e: c081 andl %d1,%d0 47840: 4e75 rts
... 00047854 <rtems_object_id_get_index>: int rtems_object_id_get_index( rtems_id id ) { return _Objects_Get_index( id ); }
47854: 4280 clrl %d0
#undef rtems_object_id_get_index int rtems_object_id_get_index( rtems_id id ) {
47856: 4e56 0000 linkw %fp,#0
return _Objects_Get_index( id ); }
4785a: 302e 000a movew %fp@(10),%d0 4785e: 4e5e unlk %fp 47860: 4e75 rts
... 00047864 <rtems_object_id_get_node>: int rtems_object_id_get_node( rtems_id id ) { return _Objects_Get_node( id ); }
47864: 4280 clrl %d0
#undef rtems_object_id_get_node int rtems_object_id_get_node( rtems_id id ) {
47866: 4e56 0000 linkw %fp,#0
return _Objects_Get_node( id ); }
4786a: 102e 0009 moveb %fp@(9),%d0 4786e: 4e5e unlk %fp 47870: 4e75 rts
... 00045dbc <rtems_object_set_name>: */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) {
45dbc: 4e56 fff0 linkw %fp,#-16 45dc0: 48d7 001c moveml %d2-%d4,%sp@ 45dc4: 262e 0008 movel %fp@(8),%d3 45dc8: 282e 000c movel %fp@(12),%d4
Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name )
45dcc: 6764 beqs 45e32 <rtems_object_set_name+0x76>
return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
45dce: 4a83 tstl %d3 45dd0: 6754 beqs 45e26 <rtems_object_set_name+0x6a>
information = _Objects_Get_information_id( tmpId );
45dd2: 2f03 movel %d3,%sp@- 45dd4: 4eb9 0004 774c jsr 4774c <_Objects_Get_information_id>
if ( !information )
45dda: 588f addql #4,%sp
if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; information = _Objects_Get_information_id( tmpId );
45ddc: 2400 movel %d0,%d2
if ( !information )
45dde: 673a beqs 45e1a <rtems_object_set_name+0x5e>
return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location );
45de0: 486e fffc pea %fp@(-4) 45de4: 2f03 movel %d3,%sp@- 45de6: 2f00 movel %d0,%sp@- 45de8: 4eb9 0004 792c jsr 4792c <_Objects_Get>
switch ( location ) {
45dee: 4fef 000c lea %sp@(12),%sp 45df2: 4aae fffc tstl %fp@(-4) 45df6: 6622 bnes 45e1a <rtems_object_set_name+0x5e>
case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name );
45df8: 2f04 movel %d4,%sp@- 45dfa: 2f00 movel %d0,%sp@- 45dfc: 2f02 movel %d2,%sp@- 45dfe: 4eb9 0004 7ad8 jsr 47ad8 <_Objects_Set_name>
_Thread_Enable_dispatch();
45e04: 4eb9 0004 8234 jsr 48234 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
45e0a: 4fef 000c lea %sp@(12),%sp
the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch();
45e0e: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
45e10: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 45e16: 4e5e unlk %fp 45e18: 4e75 rts
switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL;
45e1a: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
45e1c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 45e22: 4e5e unlk %fp 45e24: 4e75 rts
Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
45e26: 2079 0005 fbc6 moveal 5fbc6 <_Thread_Executing>,%a0 45e2c: 2628 0008 movel %a0@(8),%d3 45e30: 60a0 bras 45dd2 <rtems_object_set_name+0x16>
Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name )
45e32: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
45e34: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 45e3a: 4e5e unlk %fp 45e3c: 4e75 rts
... 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
42542: 4e75 rts
00056a90 <rtems_partition_get_buffer>: rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) {
56a90: 4e56 fff0 linkw %fp,#-16 56a94: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 56a98: 246e 000c moveal %fp@(12),%a2
register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer )
56a9c: 4a8a tstl %a2 56a9e: 6754 beqs 56af4 <rtems_partition_get_buffer+0x64>
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *)
56aa0: 486e fffc pea %fp@(-4) 56aa4: 2f2e 0008 movel %fp@(8),%sp@- 56aa8: 4879 0007 e5e2 pea 7e5e2 <_Partition_Information> 56aae: 4eb9 0005 b9a0 jsr 5b9a0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) {
56ab4: 4fef 000c lea %sp@(12),%sp 56ab8: 2640 moveal %d0,%a3 56aba: 4aae fffc tstl %fp@(-4) 56abe: 6628 bnes 56ae8 <rtems_partition_get_buffer+0x58>
*/ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory );
56ac0: 486b 0024 pea %a3@(36) 56ac4: 4eb9 0005 9f08 jsr 59f08 <_Chain_Get>
case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) {
56aca: 588f addql #4,%sp 56acc: 2400 movel %d0,%d2 56ace: 6730 beqs 56b00 <rtems_partition_get_buffer+0x70>
the_partition->number_of_used_blocks += 1;
56ad0: 52ab 0020 addql #1,%a3@(32)
_Thread_Enable_dispatch();
56ad4: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch>
*buffer = the_buffer;
56ada: 4280 clrl %d0 56adc: 2482 movel %d2,%a2@
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56ade: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56ae4: 4e5e unlk %fp 56ae6: 4e75 rts
if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) {
56ae8: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56aea: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56af0: 4e5e unlk %fp 56af2: 4e75 rts
{ register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer )
56af4: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56af6: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56afc: 4e5e unlk %fp 56afe: 4e75 rts
the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch();
56b00: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch> 56b06: 700d moveq #13,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56b08: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56b0e: 4e5e unlk %fp 56b10: 4e75 rts
... 00056b14 <rtems_partition_ident>: rtems_status_code rtems_partition_ident( rtems_name name, uint32_t node, rtems_id *id ) {
56b14: 4e56 0000 linkw %fp,#0
Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id );
56b18: 2f2e 0010 movel %fp@(16),%sp@- 56b1c: 2f2e 000c movel %fp@(12),%sp@- 56b20: 2f2e 0008 movel %fp@(8),%sp@- 56b24: 4879 0007 e5e2 pea 7e5e2 <_Partition_Information> 56b2a: 4eb9 0005 bbd8 jsr 5bbd8 <_Objects_Name_to_id_u32> 56b30: 41f9 0007 7a80 lea 77a80 <_Status_Object_name_errors_to_status>,%a0
return _Status_Object_name_errors_to_status[ status ]; }
56b36: 4e5e unlk %fp 56b38: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 56b3c: 4e75 rts
... 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 e5e2 pea 7e5e2 <_Partition_Information> 56b56: 242e 000c movel %fp@(12),%d2 56b5a: 4eb9 0005 b9a0 jsr 5b9a0 <_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>
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 9ed0 jsr 59ed0 <_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 c2bc jsr 5c2bc <_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 c2bc jsr 5c2bc <_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 56bd4: 4e75 rts
... 0004c6a2 <rtems_pipe_initialize>: /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) {
4c6a2: 4e56 0000 linkw %fp,#0
if (!rtems_pipe_configured)
4c6a6: 4a39 0005 dd34 tstb 5dd34 <rtems_pipe_configured> 4c6ac: 6708 beqs 4c6b6 <rtems_pipe_initialize+0x14>
return; if (rtems_pipe_semaphore)
4c6ae: 4ab9 0005 e6b0 tstl 5e6b0 <rtems_pipe_semaphore> <== NOT EXECUTED 4c6b4: 6704 beqs 4c6ba <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; }
4c6b6: 4e5e unlk %fp 4c6b8: 4e75 rts
if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create(
4c6ba: 4879 0005 e6b0 pea 5e6b0 <rtems_pipe_semaphore> <== NOT EXECUTED 4c6c0: 42a7 clrl %sp@- <== NOT EXECUTED 4c6c2: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> <== NOT EXECUTED 4c6c6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4c6ca: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 4c6d0: 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)
4c6d6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4c6da: 4a80 tstl %d0 <== NOT EXECUTED 4c6dc: 6610 bnes 4c6ee <rtems_pipe_initialize+0x4c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot();
4c6de: 4eb9 0004 55fc jsr 455fc <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
rtems_pipe_no = now; }
4c6e4: 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;
4c6e6: 33c0 0005 e6b8 movew %d0,5e6b8 <rtems_pipe_no> <== NOT EXECUTED
}
4c6ec: 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);
4c6ee: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c6f0: 4eb9 0004 6458 jsr 46458 <rtems_fatal_error_occurred> <== NOT EXECUTED
00055e24 <rtems_port_create>: void *internal_start, void *external_start, uint32_t length, rtems_id *id ) {
55e24: 4e56 fff0 linkw %fp,#-16 55e28: 48d7 041c moveml %d2-%d4/%a2,%sp@ 55e2c: 242e 0008 movel %fp@(8),%d2 55e30: 282e 000c movel %fp@(12),%d4 55e34: 262e 0010 movel %fp@(16),%d3 55e38: 246e 0018 moveal %fp@(24),%a2
register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) )
55e3c: 4a82 tstl %d2 55e3e: 671a beqs 55e5a <rtems_port_create+0x36>
return RTEMS_INVALID_NAME; if ( !id )
55e40: 4a8a tstl %a2 55e42: 670a beqs 55e4e <rtems_port_create+0x2a>
return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) ||
55e44: 2003 movel %d3,%d0 55e46: 7203 moveq #3,%d1 55e48: 8084 orl %d4,%d0 55e4a: c081 andl %d1,%d0 55e4c: 6718 beqs 55e66 <rtems_port_create+0x42>
(Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL;
55e4e: 7009 moveq #9,%d0
}
55e50: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 55e56: 4e5e unlk %fp 55e58: 4e75 rts
rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) )
55e5a: 7003 moveq #3,%d0
); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
55e5c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 55e62: 4e5e unlk %fp 55e64: 4e75 rts
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
55e66: 2039 0007 e758 movel 7e758 <_Thread_Dispatch_disable_level>,%d0 55e6c: 5280 addql #1,%d0 55e6e: 23c0 0007 e758 movel %d0,7e758 <_Thread_Dispatch_disable_level>
* of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *)
55e74: 4879 0007 e5a8 pea 7e5a8 <_Dual_ported_memory_Information> 55e7a: 4eb9 0005 b4c8 jsr 5b4c8 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) {
55e80: 588f addql #4,%sp 55e82: 2040 moveal %d0,%a0 55e84: 4a80 tstl %d0 55e86: 673c beqs 55ec4 <rtems_port_create+0xa0>
return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1;
55e88: 222e 0014 movel %fp@(20),%d1 55e8c: 5381 subql #1,%d1
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
55e8e: 2028 0008 movel %a0@(8),%d0 55e92: 2141 0018 movel %d1,%a0@(24) 55e96: 4281 clrl %d1 55e98: 2279 0007 e5c0 moveal 7e5c0 <_Dual_ported_memory_Information+0x18>,%a1 55e9e: 3200 movew %d0,%d1
information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name;
55ea0: 2142 000c movel %d2,%a0@(12)
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
55ea4: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4)
&_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id;
55ea8: 2480 movel %d0,%a2@
if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start;
55eaa: 2144 0010 movel %d4,%a0@(16)
the_port->external_base = external_start;
55eae: 2143 0014 movel %d3,%a0@(20)
&the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch();
55eb2: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
55eb8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
&the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch();
55ebe: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
55ec0: 4e5e unlk %fp 55ec2: 4e75 rts
_Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch();
55ec4: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch> 55eca: 7005 moveq #5,%d0
); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
55ecc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 55ed2: 4e5e unlk %fp 55ed4: 4e75 rts
... 00046a60 <rtems_rate_monotonic_create>: rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) {
46a60: 4e56 fff4 linkw %fp,#-12 46a64: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 46a68: 242e 0008 movel %fp@(8),%d2 46a6c: 246e 000c moveal %fp@(12),%a2
Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) )
46a70: 6700 00ae beqw 46b20 <rtems_rate_monotonic_create+0xc0>
return RTEMS_INVALID_NAME; if ( !id )
46a74: 4a8a tstl %a2 46a76: 6700 00c6 beqw 46b3e <rtems_rate_monotonic_create+0xde>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
46a7a: 2039 0006 1050 movel 61050 <_Thread_Dispatch_disable_level>,%d0 46a80: 5280 addql #1,%d0 46a82: 23c0 0006 1050 movel %d0,61050 <_Thread_Dispatch_disable_level>
* This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *)
46a88: 4879 0006 0f4c pea 60f4c <_Rate_monotonic_Information> 46a8e: 4eb9 0004 8ad8 jsr 48ad8 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) {
46a94: 588f addql #4,%sp 46a96: 2040 moveal %d0,%a0 46a98: 4a80 tstl %d0 46a9a: 6700 0090 beqw 46b2c <rtems_rate_monotonic_create+0xcc>
_Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing;
46a9e: 47f9 0006 110a lea 6110a <_Thread_Executing>,%a3
the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period );
46aa4: 43e8 007c lea %a0@(124),%a1
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
46aa8: 4281 clrl %d1
if ( !the_period ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing;
46aaa: 2153 0040 movel %a3@,%a0@(64) 46aae: 2028 0008 movel %a0@(8),%d0
the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period );
46ab2: 42a8 0054 clrl %a0@(84) 46ab6: 3200 movew %d0,%d1 46ab8: 42a8 0058 clrl %a0@(88) 46abc: 42a8 0064 clrl %a0@(100) 46ac0: 42a8 0068 clrl %a0@(104) 46ac4: 42a8 006c clrl %a0@(108) 46ac8: 42a8 0070 clrl %a0@(112) 46acc: 4299 clrl %a1@+ 46ace: 4299 clrl %a1@+ 46ad0: 4299 clrl %a1@+ 46ad2: 4291 clrl %a1@ 46ad4: 2279 0006 0f64 moveal 60f64 <_Rate_monotonic_Information+0x18>,%a1 46ada: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) 46ade: 223c 7fff ffff movel #2147483647,%d1
information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name;
46ae4: 2142 000c movel %d2,%a0@(12)
void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id;
46ae8: 42a8 0030 clrl %a0@(48) 46aec: 2141 005c movel %d1,%a0@(92) 46af0: 2141 0060 movel %d1,%a0@(96) 46af4: 2141 0074 movel %d1,%a0@(116) 46af8: 2141 0078 movel %d1,%a0@(120)
_Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; the_period->state = RATE_MONOTONIC_INACTIVE;
46afc: 42a8 0038 clrl %a0@(56)
&_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id;
46b00: 2480 movel %d0,%a2@
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
46b02: 42a8 0018 clrl %a0@(24)
the_watchdog->routine = routine;
46b06: 42a8 002c clrl %a0@(44)
the_watchdog->id = id; the_watchdog->user_data = user_data;
46b0a: 42a8 0034 clrl %a0@(52)
_Thread_Enable_dispatch();
46b0e: 4eb9 0004 9904 jsr 49904 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
46b14: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
&the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; _Thread_Enable_dispatch();
46b1a: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
46b1c: 4e5e unlk %fp 46b1e: 4e75 rts
rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) )
46b20: 7003 moveq #3,%d0
); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
46b22: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 46b28: 4e5e unlk %fp 46b2a: 4e75 rts
_Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch();
46b2c: 4eb9 0004 9904 jsr 49904 <_Thread_Enable_dispatch> 46b32: 7005 moveq #5,%d0
); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
46b34: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 46b3a: 4e5e unlk %fp 46b3c: 4e75 rts
Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id )
46b3e: 7009 moveq #9,%d0
); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
46b40: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 46b46: 4e5e unlk %fp 46b48: 4e75 rts
... 00056d30 <rtems_rate_monotonic_delete>: */ rtems_status_code rtems_rate_monotonic_delete( rtems_id id ) {
56d30: 4e56 fffc linkw %fp,#-4 56d34: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *)
56d36: 486e fffc pea %fp@(-4) 56d3a: 2f2e 0008 movel %fp@(8),%sp@- 56d3e: 4879 0007 e61c pea 7e61c <_Rate_monotonic_Information> 56d44: 4eb9 0005 b9a0 jsr 5b9a0 <_Objects_Get>
Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) {
56d4a: 4fef 000c lea %sp@(12),%sp 56d4e: 2440 moveal %d0,%a2 56d50: 4aae fffc tstl %fp@(-4) 56d54: 663e bnes 56d94 <rtems_rate_monotonic_delete+0x64>
case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object );
56d56: 2f00 movel %d0,%sp@- 56d58: 4879 0007 e61c pea 7e61c <_Rate_monotonic_Information> 56d5e: 4eb9 0005 b558 jsr 5b558 <_Objects_Close>
(void) _Watchdog_Remove( &the_period->Timer );
56d64: 486a 0010 pea %a2@(16) 56d68: 4eb9 0005 d8d0 jsr 5d8d0 <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
56d6e: 42aa 0038 clrl %a2@(56)
*/ RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free ( Rate_monotonic_Control *the_period ) { _Objects_Free( &_Rate_monotonic_Information, &the_period->Object );
56d72: 2f0a movel %a2,%sp@- 56d74: 4879 0007 e61c pea 7e61c <_Rate_monotonic_Information> 56d7a: 4eb9 0005 b800 jsr 5b800 <_Objects_Free>
_Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch();
56d80: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56d86: 246e fff8 moveal %fp@(-8),%a2
_Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); (void) _Watchdog_Remove( &the_period->Timer ); the_period->state = RATE_MONOTONIC_INACTIVE; _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL;
56d8a: 4fef 0014 lea %sp@(20),%sp
case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); (void) _Watchdog_Remove( &the_period->Timer ); the_period->state = RATE_MONOTONIC_INACTIVE; _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch();
56d8e: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56d90: 4e5e unlk %fp 56d92: 4e75 rts 56d94: 246e fff8 moveal %fp@(-8),%a2
{ Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) {
56d98: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
56d9a: 4e5e unlk %fp 56d9c: 4e75 rts
... 0007b398 <rtems_rate_monotonic_get_statistics>: rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) {
7b398: 4e56 fffc linkw %fp,#-4 7b39c: 2f0a movel %a2,%sp@- 7b39e: 246e 000c moveal %fp@(12),%a2
Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics )
7b3a2: 4a8a tstl %a2 7b3a4: 6700 00a6 beqw 7b44c <rtems_rate_monotonic_get_statistics+0xb4> 7b3a8: 486e fffc pea %fp@(-4) 7b3ac: 2f2e 0008 movel %fp@(8),%sp@- 7b3b0: 4879 000a 755c pea a755c <_Rate_monotonic_Information> 7b3b6: 4eb9 0004 c5e0 jsr 4c5e0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) {
7b3bc: 4fef 000c lea %sp@(12),%sp 7b3c0: 2040 moveal %d0,%a0 7b3c2: 4aae fffc tstl %fp@(-4) 7b3c6: 667a bnes 7b442 <rtems_rate_monotonic_get_statistics+0xaa>
case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count;
7b3c8: 24a8 0054 movel %a0@(84),%a2@
dst->missed_count = src->missed_count;
7b3cc: 2568 0058 0004 movel %a0@(88),%a2@(4)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
7b3d2: 2028 005c movel %a0@(92),%d0 7b3d6: 2228 0060 movel %a0@(96),%d1 7b3da: 2540 0008 movel %d0,%a2@(8) 7b3de: 2541 000c movel %d1,%a2@(12)
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
7b3e2: 2028 0064 movel %a0@(100),%d0 7b3e6: 2228 0068 movel %a0@(104),%d1 7b3ea: 2540 0010 movel %d0,%a2@(16) 7b3ee: 2541 0014 movel %d1,%a2@(20)
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
7b3f2: 2028 006c movel %a0@(108),%d0 7b3f6: 2228 0070 movel %a0@(112),%d1 7b3fa: 2540 0018 movel %d0,%a2@(24) 7b3fe: 2541 001c movel %d1,%a2@(28)
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
7b402: 2028 0074 movel %a0@(116),%d0 7b406: 2228 0078 movel %a0@(120),%d1 7b40a: 2540 0020 movel %d0,%a2@(32) 7b40e: 2541 0024 movel %d1,%a2@(36)
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
7b412: 2028 007c movel %a0@(124),%d0 7b416: 2228 0080 movel %a0@(128),%d1 7b41a: 2540 0028 movel %d0,%a2@(40) 7b41e: 2541 002c movel %d1,%a2@(44)
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
7b422: 2028 0084 movel %a0@(132),%d0 7b426: 2228 0088 movel %a0@(136),%d1 7b42a: 2540 0030 movel %d0,%a2@(48) 7b42e: 2541 0034 movel %d1,%a2@(52)
dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch();
7b432: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7b438: 246e fff8 moveal %fp@(-8),%a2
dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch();
7b43c: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7b43e: 4e5e unlk %fp 7b440: 4e75 rts 7b442: 246e fff8 moveal %fp@(-8),%a2
if ( !statistics ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) {
7b446: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7b448: 4e5e unlk %fp 7b44a: 4e75 rts 7b44c: 246e fff8 moveal %fp@(-8),%a2
Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics )
7b450: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7b452: 4e5e unlk %fp 7b454: 4e75 rts
... 0007b768 <rtems_rate_monotonic_period>: rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) {
7b768: 4e56 ffec linkw %fp,#-20 7b76c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7b770: 486e fffc pea %fp@(-4) 7b774: 242e 0008 movel %fp@(8),%d2 7b778: 2f02 movel %d2,%sp@- 7b77a: 4879 000a 755c pea a755c <_Rate_monotonic_Information> 7b780: 4eb9 0004 c5e0 jsr 4c5e0 <_Objects_Get>
rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) {
7b786: 4fef 000c lea %sp@(12),%sp 7b78a: 2440 moveal %d0,%a2 7b78c: 4aae fffc tstl %fp@(-4) 7b790: 661e bnes 7b7b0 <rtems_rate_monotonic_period+0x48>
case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) {
7b792: 2039 000a 6b72 movel a6b72 <_Thread_Executing>,%d0 7b798: b0aa 0040 cmpl %a2@(64),%d0 7b79c: 671e beqs 7b7bc <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
7b79e: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> 7b7a4: 7017 moveq #23,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7b7a6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b7ac: 4e5e unlk %fp 7b7ae: 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;
7b7b0: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7b7b2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b7b8: 4e5e unlk %fp 7b7ba: 4e75 rts
if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) {
7b7bc: 4aae 000c tstl %fp@(12) 7b7c0: 6700 00ce beqw 7b890 <rtems_rate_monotonic_period+0x128>
} _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level );
7b7c4: 203c 0000 0700 movel #1792,%d0 7b7ca: 40c3 movew %sr,%d3 7b7cc: 8083 orl %d3,%d0 7b7ce: 46c0 movew %d0,%sr
switch ( the_period->state ) {
7b7d0: 202a 0038 movel %a2@(56),%d0 7b7d4: 7202 moveq #2,%d1 7b7d6: b280 cmpl %d0,%d1 7b7d8: 6700 00dc beqw 7b8b6 <rtems_rate_monotonic_period+0x14e> 7b7dc: 123c 0004 moveb #4,%d1 7b7e0: b280 cmpl %d0,%d1 7b7e2: 6762 beqs 7b846 <rtems_rate_monotonic_period+0xde> 7b7e4: 4a80 tstl %d0 7b7e6: 66c8 bnes 7b7b0 <rtems_rate_monotonic_period+0x48>
case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level );
7b7e8: 46c3 movew %d3,%sr
/* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period );
7b7ea: 2f0a movel %a2,%sp@- 7b7ec: 2d40 fff8 movel %d0,%fp@(-8) 7b7f0: 4eb9 0007 b520 jsr 7b520 <_Rate_monotonic_Initiate_statistics>
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
7b7f6: 223c 0007 b954 movel #506196,%d1
the_watchdog->id = id;
7b7fc: 2542 0030 movel %d2,%a2@(48)
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
7b800: 242e 000c movel %fp@(12),%d2
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
7b804: 2541 002c movel %d1,%a2@(44)
the_period->state = RATE_MONOTONIC_ACTIVE;
7b808: 7202 moveq #2,%d1
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
7b80a: 2542 001c movel %d2,%a2@(28) 7b80e: 2541 0038 movel %d1,%a2@(56)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
7b812: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
7b816: 42aa 0034 clrl %a2@(52)
_Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length;
7b81a: 2542 003c movel %d2,%a2@(60)
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
7b81e: 486a 0010 pea %a2@(16) 7b822: 4879 000a 6b90 pea a6b90 <_Watchdog_Ticks_chain> 7b828: 4eb9 0004 e0b0 jsr 4e0b0 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
7b82e: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
7b834: 202e fff8 movel %fp@(-8),%d0 7b838: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7b83c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b842: 4e5e unlk %fp 7b844: 4e75 rts
case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period );
7b846: 2f0a movel %a2,%sp@- 7b848: 4eb9 0007 b64e jsr 7b64e <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
7b84e: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
7b850: 7202 moveq #2,%d1
the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
7b852: 7006 moveq #6,%d0
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
7b854: 242e 000c movel %fp@(12),%d2
*/ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE;
7b858: 2541 0038 movel %d1,%a2@(56) 7b85c: 2542 001c movel %d2,%a2@(28)
the_period->next_length = length;
7b860: 2542 003c movel %d2,%a2@(60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
7b864: 486a 0010 pea %a2@(16) 7b868: 4879 000a 6b90 pea a6b90 <_Watchdog_Ticks_chain> 7b86e: 2d40 fff8 movel %d0,%fp@(-8) 7b872: 4eb9 0004 e0b0 jsr 4e0b0 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
7b878: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
7b87e: 202e fff8 movel %fp@(-8),%d0 7b882: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7b886: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b88c: 4e5e unlk %fp 7b88e: 4e75 rts
_Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) {
7b890: 202a 0038 movel %a2@(56),%d0 7b894: 7204 moveq #4,%d1 7b896: b280 cmpl %d0,%d1 7b898: 6400 009c bccw 7b936 <rtems_rate_monotonic_period+0x1ce>
7b89c: 4280 clrl %d0 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch();
7b89e: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 7b8a2: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> <== NOT EXECUTED
return( return_value );
7b8a8: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7b8ac: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b8b2: 4e5e unlk %fp 7b8b4: 4e75 rts
case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period );
7b8b6: 2f0a movel %a2,%sp@- 7b8b8: 4eb9 0007 b64e jsr 7b64e <_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;
7b8be: 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;
7b8c2: 7001 moveq #1,%d0
the_period->next_length = length;
7b8c4: 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;
7b8c8: 2540 0038 movel %d0,%a2@(56)
the_period->next_length = length; _ISR_Enable( level );
7b8cc: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
7b8ce: 2079 000a 6b72 moveal a6b72 <_Thread_Executing>,%a0 7b8d4: 216a 0008 0020 movel %a2@(8),%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
7b8da: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 7b8de: 2f08 movel %a0,%sp@- 7b8e0: 4eb9 0004 d874 jsr 4d874 <_Thread_Set_state>
/* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level );
7b8e6: 203c 0000 0700 movel #1792,%d0 7b8ec: 40c1 movew %sr,%d1 7b8ee: 8081 orl %d1,%d0 7b8f0: 46c0 movew %d0,%sr
local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE;
7b8f2: 7402 moveq #2,%d2
/* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state;
7b8f4: 202a 0038 movel %a2@(56),%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
7b8f8: 2542 0038 movel %d2,%a2@(56)
_ISR_Enable( level );
7b8fc: 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 )
7b8fe: 7203 moveq #3,%d1 7b900: 4fef 000c lea %sp@(12),%sp 7b904: b280 cmpl %d0,%d1 7b906: 6712 beqs 7b91a <rtems_rate_monotonic_period+0x1b2>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch();
7b908: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> 7b90e: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7b910: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7b916: 4e5e unlk %fp 7b918: 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 );
7b91a: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 7b91e: 2f39 000a 6b72 movel a6b72 <_Thread_Executing>,%sp@- 7b924: 4eb9 0004 cb4c jsr 4cb4c <_Thread_Clear_state> 7b92a: 508f addql #8,%sp
_Thread_Enable_dispatch();
7b92c: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch> 7b932: 4280 clrl %d0 7b934: 60da bras 7b910 <rtems_rate_monotonic_period+0x1a8>
_Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) {
7b936: 41f9 000a 0aee lea a0aee <CSWTCH.43>,%a0 7b93c: 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();
7b940: 2d40 fff8 movel %d0,%fp@(-8) 7b944: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch>
return( return_value );
7b94a: 202e fff8 movel %fp@(-8),%d0 7b94e: 6000 ff5c braw 7b8ac <rtems_rate_monotonic_period+0x144>
... 00069ff2 <rtems_rate_monotonic_report_statistics>: } } } void rtems_rate_monotonic_report_statistics( void ) {
69ff2: 4e56 0000 linkw %fp,#0
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
69ff6: 4879 0004 79f4 pea 479f4 <printk_plugin> 69ffc: 42a7 clrl %sp@- 69ffe: 4eb9 0006 9e50 jsr 69e50 <rtems_rate_monotonic_report_statistics_with_plugin> 6a004: 508f addql #8,%sp
}
6a006: 4e5e unlk %fp 6a008: 4e75 rts
... 00069e50 <rtems_rate_monotonic_report_statistics_with_plugin>: */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) {
69e50: 4e56 ff78 linkw %fp,#-136 69e54: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 69e58: 262e 0008 movel %fp@(8),%d3 69e5c: 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 )
69e60: 4a8a tstl %a2 69e62: 6700 0082 beqw 69ee6 <rtems_rate_monotonic_report_statistics_with_plugin+0x96>
return; (*print)( context, "Period information by period\n" );
69e66: 4879 0009 d686 pea 9d686 <_TOD_Days_per_month+0x68> 69e6c: 2f03 movel %d3,%sp@- 69e6e: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" );
69e70: 4879 0009 d6a4 pea 9d6a4 <_TOD_Days_per_month+0x86> 69e76: 2f03 movel %d3,%sp@- 69e78: 4e92 jsr %a2@
(*print)( context, "--- Wall times are in seconds ---\n" );
69e7a: 4879 0009 d6c6 pea 9d6c6 <_TOD_Days_per_month+0xa8> 69e80: 2f03 movel %d3,%sp@- 69e82: 4e92 jsr %a2@
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
69e84: 4879 0009 d6e9 pea 9d6e9 <_TOD_Days_per_month+0xcb> 69e8a: 2f03 movel %d3,%sp@- 69e8c: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " "
69e8e: 4fef 001c lea %sp@(28),%sp 69e92: 2ebc 0009 d734 movel #644916,%sp@ 69e98: 2f03 movel %d3,%sp@- 69e9a: 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 ;
69e9c: 2439 000a 7562 movel a7562 <_Rate_monotonic_Information+0x6>,%d2 69ea2: 508f addql #8,%sp 69ea4: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 69eaa: 623a bhis 69ee6 <rtems_rate_monotonic_report_statistics_with_plugin+0x96> 69eac: 280e movel %fp,%d4
#if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name );
69eae: 2a0e movel %fp,%d5 69eb0: 0684 ffff ffa2 addil #-94,%d4 69eb6: 47f9 0007 b398 lea 7b398 <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 );
69ebc: 4bf9 0007 b458 lea 7b458 <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 );
69ec2: 5b85 subql #5,%d5 69ec4: 49f9 0004 a924 lea 4a924 <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 );
69eca: 2e3c 0006 b6a0 movel #439968,%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 );
69ed0: 2f04 movel %d4,%sp@- 69ed2: 2f02 movel %d2,%sp@- 69ed4: 4e93 jsr %a3@
if ( status != RTEMS_SUCCESSFUL )
69ed6: 508f addql #8,%sp 69ed8: 4a80 tstl %d0 69eda: 6714 beqs 69ef0 <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++ ) {
69edc: 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 ;
69ede: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 69ee4: 63ea blss 69ed0 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } }
69ee6: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 69eec: 4e5e unlk %fp 69eee: 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 );
69ef0: 486e ffda pea %fp@(-38) 69ef4: 2f02 movel %d2,%sp@- 69ef6: 4e95 jsr %a5@
#if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name );
69ef8: 2f05 movel %d5,%sp@- 69efa: 4878 0005 pea 5 <COMPARE> 69efe: 2f2e ffda movel %fp@(-38),%sp@- 69f02: 4e94 jsr %a4@
/* * Print part of report line that is not dependent on granularity */ (*print)( context,
69f04: 2f2e ffa6 movel %fp@(-90),%sp@- 69f08: 2f2e ffa2 movel %fp@(-94),%sp@- 69f0c: 2f05 movel %d5,%sp@- 69f0e: 2f02 movel %d2,%sp@- 69f10: 4879 0009 d780 pea 9d780 <_TOD_Days_per_month+0x162> 69f16: 2f03 movel %d3,%sp@- 69f18: 4e92 jsr %a2@
); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) {
69f1a: 202e ffa2 movel %fp@(-94),%d0 69f1e: 4fef 002c lea %sp@(44),%sp 69f22: 6618 bnes 69f3c <rtems_rate_monotonic_report_statistics_with_plugin+0xec>
(*print)( context, "\n" );
69f24: 4879 0009 ef77 pea 9ef77 <__FUNCTION__.5973+0x5d>
* 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++ ) {
69f2a: 5282 addql #1,%d2
/* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" );
69f2c: 2f03 movel %d3,%sp@- 69f2e: 4e92 jsr %a2@
continue;
69f30: 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 ;
69f32: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 69f38: 6396 blss 69ed0 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
69f3a: 60aa bras 69ee6 <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 );
69f3c: 486e fff2 pea %fp@(-14) 69f40: 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++ ) {
69f42: 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 );
69f44: 2f00 movel %d0,%sp@- 69f46: 486e ffba pea %fp@(-70) 69f4a: 4e90 jsr %a0@
(*print)( context,
69f4c: 202e fff6 movel %fp@(-10),%d0 69f50: 223c 0000 03e8 movel #1000,%d1 69f56: 4c41 0800 remsl %d1,%d0,%d0 69f5a: 2c2e ffb6 movel %fp@(-74),%d6 69f5e: 2f00 movel %d0,%sp@- 69f60: 2001 movel %d1,%d0 69f62: 2f2e fff2 movel %fp@(-14),%sp@- 69f66: 4c40 6806 remsl %d0,%d6,%d6 69f6a: 202e ffae movel %fp@(-82),%d0 69f6e: 2246 moveal %d6,%a1 69f70: 223c 0000 03e8 movel #1000,%d1 69f76: 2f09 movel %a1,%sp@- 69f78: 2f2e ffb2 movel %fp@(-78),%sp@- 69f7c: 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,
69f80: 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,
69f86: 2f00 movel %d0,%sp@- 69f88: 2f2e ffaa movel %fp@(-86),%sp@- 69f8c: 4879 0009 d797 pea 9d797 <_TOD_Days_per_month+0x179> 69f92: 2f03 movel %d3,%sp@- 69f94: 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);
69f96: 4fef 002c lea %sp@(44),%sp 69f9a: 2047 moveal %d7,%a0 69f9c: 486e fff2 pea %fp@(-14) 69fa0: 2f2e ffa2 movel %fp@(-94),%sp@- 69fa4: 486e ffd2 pea %fp@(-46) 69fa8: 4e90 jsr %a0@
(*print)( context,
69faa: 202e fff6 movel %fp@(-10),%d0 69fae: 4c46 0800 remsl %d6,%d0,%d0 69fb2: 222e ffce movel %fp@(-50),%d1 69fb6: 2f00 movel %d0,%sp@- 69fb8: 2f2e fff2 movel %fp@(-14),%sp@- 69fbc: 4c46 1801 remsl %d6,%d1,%d1 69fc0: 202e ffc6 movel %fp@(-58),%d0 69fc4: 2241 moveal %d1,%a1 69fc6: 2f09 movel %a1,%sp@- 69fc8: 2f2e ffca movel %fp@(-54),%sp@- 69fcc: 4c46 0800 remsl %d6,%d0,%d0 69fd0: 2f00 movel %d0,%sp@- 69fd2: 2f2e ffc2 movel %fp@(-62),%sp@- 69fd6: 4879 0009 d7b6 pea 9d7b6 <_TOD_Days_per_month+0x198> 69fdc: 2f03 movel %d3,%sp@- 69fde: 4e92 jsr %a2@ 69fe0: 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 ;
69fe4: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 69fea: 6300 fee4 blsw 69ed0 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
69fee: 6000 fef6 braw 69ee6 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
0006a00c <rtems_rate_monotonic_reset_all_statistics>: /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) {
6a00c: 4e56 0000 linkw %fp,#0 6a010: 2039 000a 6ab8 movel a6ab8 <_Thread_Dispatch_disable_level>,%d0 6a016: 5280 addql #1,%d0 6a018: 2f0a movel %a2,%sp@- 6a01a: 23c0 000a 6ab8 movel %d0,a6ab8 <_Thread_Dispatch_disable_level> 6a020: 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 ;
6a022: 2439 000a 7562 movel a7562 <_Rate_monotonic_Information+0x6>,%d2 6a028: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 6a02e: 6216 bhis 6a046 <rtems_rate_monotonic_reset_all_statistics+0x3a> 6a030: 45f9 0006 a058 lea 6a058 <rtems_rate_monotonic_reset_statistics>,%a2
id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id );
6a036: 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++ ) {
6a038: 5282 addql #1,%d2
status = rtems_rate_monotonic_reset_statistics( id );
6a03a: 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 ;
6a03c: 588f addql #4,%sp 6a03e: b4b9 000a 7566 cmpl a7566 <_Rate_monotonic_Information+0xa>,%d2 6a044: 63f0 blss 6a036 <rtems_rate_monotonic_reset_all_statistics+0x2a>
/* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); }
6a046: 242e fff8 movel %fp@(-8),%d2 6a04a: 246e fffc moveal %fp@(-4),%a2 6a04e: 4e5e unlk %fp
} /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch();
6a050: 4ef9 0004 cf20 jmp 4cf20 <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 574a2: 4eb9 0005 9e3c jsr 59e3c <_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 e656 pea 7e656 <_Region_Information> 574ae: 4eb9 0005 b4c8 jsr 5b4c8 <_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 af4c jsr 5af4c <_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 e656 pea 7e656 <_Region_Information> 574e2: 103c 0008 moveb #8,%d0 574e6: 2d40 fffc movel %d0,%fp@(-4) 574ea: 4eb9 0005 b800 jsr 5b800 <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 574fc: 2d40 fffc movel %d0,%fp@(-4) 57500: 4eb9 0005 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 cab4 jsr 5cab4 <_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 e66e moveal 7e66e <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 575a6: 2d40 fffc movel %d0,%fp@(-4) 575aa: 4eb9 0005 9e9c jsr 59e9c <_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>
... 000575bc <rtems_region_delete>: */ rtems_status_code rtems_region_delete( rtems_id id ) {
575bc: 4e56 fffc linkw %fp,#-4 575c0: 2f0a movel %a2,%sp@- 575c2: 2f02 movel %d2,%sp@-
Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator();
575c4: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 575ca: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *)
575d0: 486e fffc pea %fp@(-4) 575d4: 2f2e 0008 movel %fp@(8),%sp@- 575d8: 4879 0007 e656 pea 7e656 <_Region_Information> 575de: 4eb9 0005 b964 jsr 5b964 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location ); switch ( location ) {
575e4: 4fef 0010 lea %sp@(16),%sp 575e8: 2440 moveal %d0,%a2 575ea: 4aae fffc tstl %fp@(-4) 575ee: 671c beqs 5760c <rtems_region_delete+0x50>
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
575f0: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@-
Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) {
575f6: 7404 moveq #4,%d2
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
575f8: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status; }
575fe: 246e fff8 moveal %fp@(-8),%a2 57602: 2002 movel %d2,%d0 57604: 242e fff4 movel %fp@(-12),%d2 57608: 4e5e unlk %fp 5760a: 4e75 rts
the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 )
5760c: 4aaa 0064 tstl %a2@(100) 57610: 671c beqs 5762e <rtems_region_delete+0x72>
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57612: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@-
the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 )
57618: 740c moveq #12,%d2
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
5761a: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status; }
57620: 246e fff8 moveal %fp@(-8),%a2 57624: 2002 movel %d2,%d0 57626: 242e fff4 movel %fp@(-12),%d2 5762a: 4e5e unlk %fp 5762c: 4e75 rts
case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object );
5762e: 2f00 movel %d0,%sp@- 57630: 4879 0007 e656 pea 7e656 <_Region_Information>
*/ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object );
57636: 4282 clrl %d2 57638: 4eb9 0005 b558 jsr 5b558 <_Objects_Close> 5763e: 2f0a movel %a2,%sp@- 57640: 4879 0007 e656 pea 7e656 <_Region_Information> 57646: 4eb9 0005 b800 jsr 5b800 <_Objects_Free> 5764c: 4fef 0010 lea %sp@(16),%sp
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57650: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57656: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status; }
5765c: 246e fff8 moveal %fp@(-8),%a2 57660: 2002 movel %d2,%d0 57662: 242e fff4 movel %fp@(-12),%d2 57666: 4e5e unlk %fp 57668: 4e75 rts
... 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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57680: 4eb9 0005 9e3c jsr 59e3c <_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 e656 pea 7e656 <_Region_Information> 57694: 4eb9 0005 b964 jsr 5b964 <_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 ac40 jsr 5ac40 <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 5771e: 4eb9 0005 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status;
57736: 588f addql #4,%sp 57738: 609e bras 576d8 <rtems_region_extend+0x6c>
... 0005773c <rtems_region_get_free_information>: rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) {
5773c: 4e56 fffc linkw %fp,#-4 57740: 2f0a movel %a2,%sp@- 57742: 246e 000c moveal %fp@(12),%a2 57746: 2f02 movel %d2,%sp@-
Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info )
57748: 4a8a tstl %a2 5774a: 6776 beqs 577c2 <rtems_region_get_free_information+0x86>
return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator();
5774c: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57752: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> 57758: 486e fffc pea %fp@(-4) 5775c: 2f2e 0008 movel %fp@(8),%sp@- 57760: 4879 0007 e656 pea 7e656 <_Region_Information> 57766: 4eb9 0005 b964 jsr 5b964 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location ); switch ( location ) {
5776c: 4fef 0010 lea %sp@(16),%sp 57770: 4aae fffc tstl %fp@(-4) 57774: 663a bnes 577b0 <rtems_region_get_free_information+0x74>
the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free );
57776: 2f0a movel %a2,%sp@- 57778: 2040 moveal %d0,%a0 5777a: 4868 0068 pea %a0@(104) 5777e: 4282 clrl %d2
the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0;
57780: 42aa 000c clrl %a2@(12)
the_info->Used.total = 0;
57784: 42aa 0014 clrl %a2@(20)
the_info->Used.largest = 0;
57788: 42aa 0010 clrl %a2@(16)
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
5778c: 4eb9 0005 ae70 jsr 5ae70 <_Heap_Get_free_information>
return_status = RTEMS_SUCCESSFUL; break;
57792: 508f addql #8,%sp
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57794: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 5779a: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status;
577a0: 588f addql #4,%sp
}
577a2: 2002 movel %d2,%d0 577a4: 242e fff4 movel %fp@(-12),%d2 577a8: 246e fff8 moveal %fp@(-8),%a2 577ac: 4e5e unlk %fp 577ae: 4e75 rts
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
577b0: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) {
577b6: 7404 moveq #4,%d2
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
577b8: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status;
577be: 588f addql #4,%sp 577c0: 60e0 bras 577a2 <rtems_region_get_free_information+0x66>
{ Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info )
577c2: 7409 moveq #9,%d2
break; } _RTEMS_Unlock_allocator(); return return_status; }
577c4: 2002 movel %d2,%d0 577c6: 242e fff4 movel %fp@(-12),%d2 577ca: 246e fff8 moveal %fp@(-8),%a2 577ce: 4e5e unlk %fp 577d0: 4e75 rts
... 00057854 <rtems_region_get_segment>: uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) {
57854: 4e56 ffe4 linkw %fp,#-28 57858: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5785c: 262e 0008 movel %fp@(8),%d3 57860: 242e 000c movel %fp@(12),%d2 57864: 246e 0018 moveal %fp@(24),%a2
Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment )
57868: 4a8a tstl %a2 5786a: 6700 00be beqw 5792a <rtems_region_get_segment+0xd6>
return RTEMS_INVALID_ADDRESS; *segment = NULL;
5786e: 4292 clrl %a2@
if ( size == 0 )
57870: 4a82 tstl %d2 57872: 660c bnes 57880 <rtems_region_get_segment+0x2c> 57874: 7008 moveq #8,%d0
break; } _RTEMS_Unlock_allocator(); return return_status; }
57876: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 5787c: 4e5e unlk %fp 5787e: 4e75 rts
*segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator();
57880: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57886: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> 5788c: 486e fffc pea %fp@(-4) 57890: 2f03 movel %d3,%sp@- 57892: 4879 0007 e656 pea 7e656 <_Region_Information>
executing = _Thread_Executing;
57898: 2879 0007 e812 moveal 7e812 <_Thread_Executing>,%a4 5789e: 4eb9 0005 b964 jsr 5b964 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location ); switch ( location ) {
578a4: 4fef 0010 lea %sp@(16),%sp 578a8: 2640 moveal %d0,%a3 578aa: 4aae fffc tstl %fp@(-4) 578ae: 6628 bnes 578d8 <rtems_region_get_segment+0x84>
case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size )
578b0: b4ab 005c cmpl %a3@(92),%d2 578b4: 633c blss 578f2 <rtems_region_get_segment+0x9e>
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
578b6: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@-
executing = _Thread_Executing; the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size )
578bc: 7008 moveq #8,%d0
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
578be: 2d40 fff8 movel %d0,%fp@(-8) 578c2: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status;
578c8: 202e fff8 movel %fp@(-8),%d0 578cc: 588f addql #4,%sp
}
578ce: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 578d4: 4e5e unlk %fp 578d6: 4e75 rts
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
578d8: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@-
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code;
578de: 7004 moveq #4,%d0
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
578e0: 2d40 fff8 movel %d0,%fp@(-8) 578e4: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status;
578ea: 202e fff8 movel %fp@(-8),%d0 578ee: 588f addql #4,%sp 578f0: 60dc bras 578ce <rtems_region_get_segment+0x7a>
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
578f2: 42a7 clrl %sp@- 578f4: 42a7 clrl %sp@- 578f6: 2f02 movel %d2,%sp@- 578f8: 486b 0068 pea %a3@(104) 578fc: 4eb9 0005 aaac jsr 5aaac <_Heap_Allocate_aligned_with_boundary>
the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) {
57902: 4fef 0010 lea %sp@(16),%sp 57906: 2200 movel %d0,%d1 57908: 672c beqs 57936 <rtems_region_get_segment+0xe2>
the_region->number_of_used_blocks += 1;
5790a: 52ab 0064 addql #1,%a3@(100)
*segment = the_segment;
5790e: 4280 clrl %d0 57910: 2481 movel %d1,%a2@
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57912: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57918: 2d40 fff8 movel %d0,%fp@(-8) 5791c: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status;
57922: 202e fff8 movel %fp@(-8),%d0 57926: 588f addql #4,%sp 57928: 60a4 bras 578ce <rtems_region_get_segment+0x7a>
Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment )
5792a: 7009 moveq #9,%d0
break; } _RTEMS_Unlock_allocator(); return return_status; }
5792c: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 57932: 4e5e unlk %fp 57934: 4e75 rts
if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) {
57936: 202e 0010 movel %fp@(16),%d0 5793a: 0800 0000 btst #0,%d0 5793e: 671c beqs 5795c <rtems_region_get_segment+0x108>
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57940: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@-
if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) {
57946: 700d moveq #13,%d0
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57948: 2d40 fff8 movel %d0,%fp@(-8) 5794c: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status;
57952: 202e fff8 movel %fp@(-8),%d0 57956: 588f addql #4,%sp 57958: 6000 ff74 braw 578ce <rtems_region_get_segment+0x7a>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
5795c: 2039 0007 e758 movel 7e758 <_Thread_Dispatch_disable_level>,%d0 57962: 5280 addql #1,%d0 57964: 23c0 0007 e758 movel %d0,7e758 <_Thread_Dispatch_disable_level>
* Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator();
5796a: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57970: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
executing->Wait.queue = &the_region->Wait_queue;
57976: 200b movel %a3,%d0 57978: 0680 0000 0010 addil #16,%d0
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;
5797e: 7201 moveq #1,%d1 57980: 2940 0044 movel %d0,%a4@(68) 57984: 2741 0040 movel %d1,%a3@(64)
executing->Wait.id = id;
57988: 2943 0020 movel %d3,%a4@(32)
executing->Wait.count = size;
5798c: 2942 0024 movel %d2,%a4@(36)
executing->Wait.return_argument = segment;
57990: 294a 0028 movel %a2,%a4@(40)
_Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
57994: 4879 0005 cb98 pea 5cb98 <_Thread_queue_Timeout> 5799a: 2f2e 0014 movel %fp@(20),%sp@- 5799e: 2f00 movel %d0,%sp@- 579a0: 4eb9 0005 c838 jsr 5c838 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
579a6: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch>
return (rtems_status_code) executing->Wait.return_code;
579ac: 202c 0034 movel %a4@(52),%d0 579b0: 4fef 0010 lea %sp@(16),%sp
break; } _RTEMS_Unlock_allocator(); return return_status; }
579b4: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 579ba: 4e5e unlk %fp 579bc: 4e75 rts
... 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 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 579e0: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> 579e6: 486e fffc pea %fp@(-4) 579ea: 2f2e 0008 movel %fp@(8),%sp@- 579ee: 4879 0007 e656 pea 7e656 <_Region_Information> 579f4: 4eb9 0005 b964 jsr 5b964 <_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 b3a0 jsr 5b3a0 <_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>
case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57a1c: 2f39 0007 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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>
case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57a40: 2f39 0007 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 e80a movel 7e80a <_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 9e9c jsr 59e9c <_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 57a72: 4e75 rts
00057b70 <rtems_region_return_segment>: rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) {
57b70: 4e56 fffc linkw %fp,#-4 57b74: 2f0a movel %a2,%sp@- 57b76: 2f02 movel %d2,%sp@-
uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator();
57b78: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@- 57b7e: 4eb9 0005 9e3c jsr 59e3c <_API_Mutex_Lock> 57b84: 486e fffc pea %fp@(-4) 57b88: 2f2e 0008 movel %fp@(8),%sp@- 57b8c: 4879 0007 e656 pea 7e656 <_Region_Information> 57b92: 4eb9 0005 b964 jsr 5b964 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location ); switch ( location ) {
57b98: 4fef 0010 lea %sp@(16),%sp 57b9c: 2440 moveal %d0,%a2 57b9e: 4aae fffc tstl %fp@(-4) 57ba2: 671e beqs 57bc2 <rtems_region_return_segment+0x52>
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57ba4: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@-
register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) {
57baa: 7404 moveq #4,%d2
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57bac: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status;
57bb2: 588f addql #4,%sp
}
57bb4: 2002 movel %d2,%d0 57bb6: 242e fff4 movel %fp@(-12),%d2 57bba: 246e fff8 moveal %fp@(-8),%a2 57bbe: 4e5e unlk %fp 57bc0: 4e75 rts
RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment );
57bc2: 2f2e 000c movel %fp@(12),%sp@- 57bc6: 486a 0068 pea %a2@(104) 57bca: 4eb9 0005 acf0 jsr 5acf0 <_Heap_Free>
#endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status )
57bd0: 508f addql #8,%sp 57bd2: 4a00 tstb %d0 57bd4: 6612 bnes 57be8 <rtems_region_return_segment+0x78>
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57bd6: 2f39 0007 e80a movel 7e80a <_RTEMS_Allocator_Mutex>,%sp@-
else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL;
57bdc: 7409 moveq #9,%d2
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57bde: 4eb9 0005 9e9c jsr 59e9c <_API_Mutex_Unlock>
return return_status;
57be4: 588f addql #4,%sp 57be6: 60cc bras 57bb4 <rtems_region_return_segment+0x44>
_Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1;
57be8: 53aa 0064 subql #1,%a2@(100)
_Region_Process_queue(the_region); /* unlocks allocator */
57bec: 4282 clrl %d2 57bee: 2f0a movel %a2,%sp@- 57bf0: 4eb9 0005 fe1c jsr 5fe1c <_Region_Process_queue>
break; } _RTEMS_Unlock_allocator(); return return_status; }
57bf6: 246e fff8 moveal %fp@(-8),%a2 57bfa: 2002 movel %d2,%d0
else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL;
57bfc: 588f addql #4,%sp
break; } _RTEMS_Unlock_allocator(); return return_status; }
57bfe: 242e fff4 movel %fp@(-12),%d2 57c02: 4e5e unlk %fp 57c04: 4e75 rts
... 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 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 45b04: 5280 addql #1,%d0 45b06: 23c0 0005 ef04 movel %d0,5ef04 <_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 ee3c pea 5ee3c <_Semaphore_Information> 45b12: 4eb9 0004 7090 jsr 47090 <_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 67dc jsr 467dc <_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 ee3c pea 5ee3c <_Semaphore_Information> 45b78: 4eb9 0004 73c8 jsr 473c8 <_Objects_Free>
_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch();
45b7e: 4eb9 0004 7dbc jsr 47dbc <_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 6b24 jsr 46b24 <_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 ee54 moveal 5ee54 <_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 7dbc jsr 47dbc <_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 7dbc jsr 47dbc <_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 ee3c pea 5ee3c <_Semaphore_Information> 45c68: 4eb9 0004 752c jsr 4752c <_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 7dbc jsr 47dbc <_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 67d0 jsr 467d0 <_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 ee3c pea 5ee3c <_Semaphore_Information> 45cc4: 4eb9 0004 7120 jsr 47120 <_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 ee3c pea 5ee3c <_Semaphore_Information> 45cd2: 4eb9 0004 73c8 jsr 473c8 <_Objects_Free>
0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch();
45cd8: 4eb9 0004 7dbc jsr 47dbc <_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 6b18 jsr 46b18 <_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 ee3c pea 5ee3c <_Semaphore_Information> 45d08: 4eb9 0004 7120 jsr 47120 <_Objects_Close> 45d0e: 2f0a movel %a2,%sp@- 45d10: 4879 0005 ee3c pea 5ee3c <_Semaphore_Information> 45d16: 4eb9 0004 73c8 jsr 473c8 <_Objects_Free>
0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch();
45d1c: 4eb9 0004 7dbc jsr 47dbc <_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>
... 00050dcc <rtems_semaphore_flush>: #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) {
50dcc: 4e56 fffc linkw %fp,#-4 50dd0: 486e fffc pea %fp@(-4) 50dd4: 2f2e 0008 movel %fp@(8),%sp@- 50dd8: 4879 0006 4f84 pea 64f84 <_Semaphore_Information> 50dde: 4eb9 0004 9568 jsr 49568 <_Objects_Get>
register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) {
50de4: 4fef 000c lea %sp@(12),%sp 50de8: 4aae fffc tstl %fp@(-4) 50dec: 6706 beqs 50df4 <rtems_semaphore_flush+0x28> 50dee: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
50df0: 4e5e unlk %fp 50df2: 4e75 rts
the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
50df4: 7230 moveq #48,%d1 50df6: 2040 moveal %d0,%a0 50df8: c2a8 0010 andl %a0@(16),%d1 50dfc: 6720 beqs 50e1e <rtems_semaphore_flush+0x52>
_CORE_mutex_Flush(
50dfe: 4878 0001 pea 1 <ADD> 50e02: 42a7 clrl %sp@- 50e04: 4868 0014 pea %a0@(20) 50e08: 4eb9 0004 8770 jsr 48770 <_CORE_mutex_Flush> 50e0e: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch();
50e12: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 50e18: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
50e1a: 4e5e unlk %fp 50e1c: 4e75 rts
&the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush(
50e1e: 4878 0001 pea 1 <ADD> 50e22: 2040 moveal %d0,%a0 50e24: 42a7 clrl %sp@- 50e26: 4868 0014 pea %a0@(20) 50e2a: 4eb9 0004 8ab8 jsr 48ab8 <_CORE_semaphore_Flush> 50e30: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch();
50e34: 4eb9 0004 9e78 jsr 49e78 <_Thread_Enable_dispatch> 50e3a: 4280 clrl %d0 50e3c: 60dc bras 50e1a <rtems_semaphore_flush+0x4e>
... 00057f5c <rtems_semaphore_ident>: rtems_status_code rtems_semaphore_ident( rtems_name name, uint32_t node, rtems_id *id ) {
57f5c: 4e56 0000 linkw %fp,#0
Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id );
57f60: 2f2e 0010 movel %fp@(16),%sp@- 57f64: 2f2e 000c movel %fp@(12),%sp@- 57f68: 2f2e 0008 movel %fp@(8),%sp@- 57f6c: 4879 0007 e690 pea 7e690 <_Semaphore_Information> 57f72: 4eb9 0005 bbd8 jsr 5bbd8 <_Objects_Name_to_id_u32> 57f78: 41f9 0007 7a80 lea 77a80 <_Status_Object_name_errors_to_status>,%a0
return _Status_Object_name_errors_to_status[ status ]; }
57f7e: 4e5e unlk %fp 57f80: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 57f84: 4e75 rts
... 000463fc <rtems_shutdown_executive>: void rtems_shutdown_executive( uint32_t result ) { if ( !_System_state_Is_shutdown( _System_state_Get() ) ) {
463fc: 7004 moveq #4,%d0
*/ void rtems_shutdown_executive( uint32_t result ) {
463fe: 4e56 0000 linkw %fp,#0
if ( !_System_state_Is_shutdown( _System_state_Get() ) ) {
46402: b0b9 0005 f08c cmpl 5f08c <_System_state_Current>,%d0 46408: 6718 beqs 46422 <rtems_shutdown_executive+0x26> 4640a: 23c0 0005 f08c movel %d0,5f08c <_System_state_Current>
* if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context );
46410: 203c 0005 eed0 movel #388816,%d0 46416: 2d40 0008 movel %d0,%fp@(8)
_System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } }
4641a: 4e5e unlk %fp 4641c: 4ef9 0004 9296 jmp 49296 <_CPU_Context_Restart_self> 46422: 4e5e unlk %fp 46424: 4e75 rts
... 00044c5e <rtems_stack_checker_create_extension>: */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) {
44c5e: 4e56 0000 linkw %fp,#0 44c62: 2f0a movel %a2,%sp@- 44c64: 246e 000c moveal %fp@(12),%a2
Stack_check_Initialize();
44c68: 4eb9 0004 4bf8 jsr 44bf8 <Stack_check_Initialize>
if (the_thread)
44c6e: 4a8a tstl %a2 44c70: 6716 beqs 44c88 <rtems_stack_checker_create_extension+0x2a>
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
44c72: 2f2a 00be movel %a2@(190),%sp@- 44c76: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70> 44c7a: 2f2a 00c2 movel %a2@(194),%sp@- 44c7e: 4eb9 0008 4008 jsr 84008 <memset> 44c84: 4fef 000c lea %sp@(12),%sp
return true; }
44c88: 246e fffc moveal %fp@(-4),%a2 44c8c: 4e5e unlk %fp 44c8e: 7001 moveq #1,%d0 44c90: 4e75 rts
... 00044ae4 <rtems_stack_checker_is_blown>: /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) {
44ae4: 4e56 0000 linkw %fp,#0
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
44ae8: 2279 000a 6b72 moveal a6b72 <_Thread_Executing>,%a1
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
44aee: 2069 00c2 moveal %a1@(194),%a0
/* * Check if blown */ bool rtems_stack_checker_is_blown( void ) {
44af2: 2f02 movel %d2,%sp@-
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
44af4: b1ce cmpal %fp,%a0 44af6: 6354 blss 44b4c <rtems_stack_checker_is_blown+0x68>
44af8: 4202 clrb %d2 <== NOT EXECUTED
/* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) {
44afa: 4ab9 000a 39f0 tstl a39f0 <Stack_check_Initialized> 44b00: 662a bnes 44b2c <rtems_stack_checker_is_blown+0x48>
44b02: 7001 moveq #1,%d0 <== NOT EXECUTED
} /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok )
44b04: 4a02 tstb %d2 44b06: 6704 beqs 44b0c <rtems_stack_checker_is_blown+0x28> 44b08: 4a00 tstb %d0 44b0a: 664e bnes 44b5a <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 );
44b0c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44b12: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44b14: 2f39 000a 6b72 movel a6b72 <_Thread_Executing>,%sp@- <== NOT EXECUTED 44b1a: 4eb9 0004 4a34 jsr 44a34 <Stack_check_report_blown_task> <== NOT EXECUTED
return true; }
44b20: 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;
44b24: 508f addql #8,%sp <== NOT EXECUTED
}
44b26: 4e5e unlk %fp <== NOT EXECUTED
return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
44b28: 7001 moveq #1,%d0 <== NOT EXECUTED
return true; }
44b2a: 4e75 rts <== NOT EXECUTED
/* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp(
44b2c: 4878 0010 pea 10 <INVALID_OPERATION> 44b30: 4879 000a 6930 pea a6930 <Stack_check_Pattern> 44b36: 4868 0008 pea %a0@(8) 44b3a: 4eb9 0008 3e24 jsr 83e24 <memcmp> 44b40: 4fef 000c lea %sp@(12),%sp 44b44: 4a80 tstl %d0 44b46: 57c0 seq %d0 44b48: 4480 negl %d0 44b4a: 60b8 bras 44b04 <rtems_stack_checker_is_blown+0x20>
} /* * Check if blown */ bool rtems_stack_checker_is_blown( void )
44b4c: 2008 movel %a0,%d0 44b4e: d0a9 00be addl %a1@(190),%d0 44b52: b08e cmpl %fp,%d0 44b54: 54c2 scc %d2 44b56: 4482 negl %d2 44b58: 60a0 bras 44afa <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; }
44b5a: 242e fffc movel %fp@(-4),%d2 44b5e: 4e5e unlk %fp
} /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok )
44b60: 4200 clrb %d0
/* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; }
44b62: 4e75 rts
00044a1c <rtems_stack_checker_report_usage>: void rtems_stack_checker_report_usage( void ) {
44a1c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
44a20: 4879 0004 79f4 pea 479f4 <printk_plugin> <== NOT EXECUTED 44a26: 42a7 clrl %sp@- <== NOT EXECUTED 44a28: 4eb9 0004 49ba jsr 449ba <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED 44a2e: 508f addql #8,%sp <== NOT EXECUTED
}
44a30: 4e5e unlk %fp <== NOT EXECUTED
44a32: 4e75 rts
000449ba <rtems_stack_checker_report_usage_with_plugin>: void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) {
449ba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 449be: 2f0a movel %a2,%sp@- <== NOT EXECUTED 449c0: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 449c4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n");
449c6: 4879 0009 929c pea 9929c <IntUartPollCallbacks.6601+0x6c> <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) {
449cc: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
print_context = context; print_handler = print;
449d0: 23ca 000a 39f8 movel %a2,a39f8 <print_handler> <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
449d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context;
449d8: 23c2 000a 39f4 movel %d2,a39f4 <print_context> <== NOT EXECUTED
print_handler = print; (*print)( context, "Stack usage by thread\n");
449de: 4e92 jsr %a2@ <== NOT EXECUTED
(*print)( context,
449e0: 4879 0009 92b3 pea 992b3 <IntUartPollCallbacks.6601+0x83> <== NOT EXECUTED 449e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 449e8: 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 );
449ea: 4879 0004 4832 pea 44832 <Stack_check_Dump_threads_usage> <== NOT EXECUTED 449f0: 4eb9 0004 bfe4 jsr 4bfe4 <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1);
449f6: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 449fa: 4eb9 0004 4832 jsr 44832 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL; print_handler = NULL; }
44a00: 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;
44a04: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
}
44a08: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 44a0c: 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;
44a0e: 42b9 000a 39f4 clrl a39f4 <print_context> <== NOT EXECUTED
print_handler = NULL;
44a14: 42b9 000a 39f8 clrl a39f8 <print_handler> <== NOT EXECUTED
}
44a1a: 4e75 rts
00044b64 <rtems_stack_checker_switch_extension>: */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) {
44b64: 4e56 0000 linkw %fp,#0 44b68: 2f0a movel %a2,%sp@- 44b6a: 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;
44b6e: 222a 00c2 movel %a2@(194),%d1 44b72: 5081 addql #8,%d1
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
44b74: 202a 00c2 movel %a2@(194),%d0 44b78: b08e cmpl %fp,%d0 44b7a: 6208 bhis 44b84 <rtems_stack_checker_switch_extension+0x20>
void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack;
44b7c: d0aa 00be addl %a2@(190),%d0 44b80: b08e cmpl %fp,%d0 44b82: 6436 bccs 44bba <rtems_stack_checker_switch_extension+0x56>
/* * 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,
44b84: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 44b88: 4879 000a 6930 pea a6930 <Stack_check_Pattern> <== NOT EXECUTED 44b8e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 44b90: 4eb9 0008 3e24 jsr 83e24 <memcmp> <== NOT EXECUTED 44b96: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44b9a: 4a80 tstl %d0 <== NOT EXECUTED 44b9c: 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 );
44b9e: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
44ba2: 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,
44ba6: 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 );
44ba8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44bae: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
} }
44bb2: 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 );
44bb4: 4ef9 0004 4a34 jmp 44a34 <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,
44bba: 4878 0010 pea 10 <INVALID_OPERATION> 44bbe: 4879 000a 6930 pea a6930 <Stack_check_Pattern> 44bc4: 2f01 movel %d1,%sp@- 44bc6: 4eb9 0008 3e24 jsr 83e24 <memcmp> 44bcc: 4fef 000c lea %sp@(12),%sp
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) {
44bd0: 4a80 tstl %d0 44bd2: 671c beqs 44bf0 <rtems_stack_checker_switch_extension+0x8c>
Stack_check_report_blown_task( running, pattern_ok );
44bd4: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
44bd8: 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 ) {
44bdc: 4200 clrb %d0 <== NOT EXECUTED
Stack_check_report_blown_task( running, pattern_ok );
44bde: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44be4: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
} }
44be8: 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 );
44bea: 4ef9 0004 4a34 jmp 44a34 <Stack_check_report_blown_task> <== NOT EXECUTED
} }
44bf0: 246e fffc moveal %fp@(-4),%a2 44bf4: 4e5e unlk %fp 44bf6: 4e75 rts
0004d524 <rtems_string_to_double>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
4d524: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4d528: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4d52c: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4d530: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4d534: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
4d538: 4a8a tstl %a2 <== NOT EXECUTED 4d53a: 677a beqs 4d5b6 <rtems_string_to_double+0x92> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS; errno = 0;
4d53c: 49f9 0005 0358 lea 50358 <__errno>,%a4 <== NOT EXECUTED 4d542: 4e94 jsr %a4@ <== NOT EXECUTED
*n = 0;
4d544: 4281 clrl %d1 <== NOT EXECUTED
char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0;
4d546: 2040 moveal %d0,%a0 <== NOT EXECUTED
*n = 0;
4d548: 4280 clrl %d0 <== NOT EXECUTED
char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0;
4d54a: 4290 clrl %a0@ <== NOT EXECUTED
*n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end );
4d54c: 486e fffc pea %fp@(-4) <== NOT EXECUTED
if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0;
4d550: 2480 movel %d0,%a2@ <== NOT EXECUTED 4d552: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
#ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end );
4d556: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d558: 4eb9 0005 2dac jsr 52dac <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 )
4d55e: 508f addql #8,%sp <== NOT EXECUTED
errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end );
4d560: 2600 movel %d0,%d3 <== NOT EXECUTED 4d562: 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 )
4d564: 4a8b tstl %a3 <== NOT EXECUTED 4d566: 6704 beqs 4d56c <rtems_string_to_double+0x48> <== NOT EXECUTED
*endptr = end;
4d568: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED
/* nothing was converted */ if ( end == s )
4d56c: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4d570: 6750 beqs 4d5c2 <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))
4d572: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 4d576: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4d57c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d57e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d580: 4eb9 0005 dbec jsr 5dbec <__gtdf2> <== NOT EXECUTED 4d586: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d58a: 4a80 tstl %d0 <== NOT EXECUTED 4d58c: 6e12 bgts 4d5a0 <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;
4d58e: 2483 movel %d3,%a2@ <== NOT EXECUTED 4d590: 4280 clrl %d0 <== NOT EXECUTED 4d592: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED
#endif return RTEMS_SUCCESSFUL; }
4d596: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d59c: 4e5e unlk %fp <== NOT EXECUTED 4d59e: 4e75 rts <== NOT EXECUTED
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d5a0: 4e94 jsr %a4@ <== NOT EXECUTED 4d5a2: 7222 moveq #34,%d1 <== NOT EXECUTED 4d5a4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d5a6: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d5a8: 66e4 bnes 4d58e <rtems_string_to_double+0x6a> <== NOT EXECUTED 4d5aa: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4d5ac: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5b2: 4e5e unlk %fp <== NOT EXECUTED 4d5b4: 4e75 rts <== NOT EXECUTED
) { STRING_TO_INPUT_TYPE result; char *end; if ( !n )
4d5b6: 7009 moveq #9,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4d5b8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5be: 4e5e unlk %fp <== NOT EXECUTED 4d5c0: 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 )
4d5c2: 700b moveq #11,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4d5c4: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5ca: 4e5e unlk %fp <== NOT EXECUTED 4d5cc: 4e75 rts <== NOT EXECUTED
... 0004d5d0 <rtems_string_to_float>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
4d5d0: 4e56 ffe8 linkw %fp,#-24 4d5d4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d5d8: 242e 0008 movel %fp@(8),%d2 4d5dc: 246e 000c moveal %fp@(12),%a2 4d5e0: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
4d5e4: 4a8a tstl %a2 4d5e6: 6768 beqs 4d650 <rtems_string_to_float+0x80>
return RTEMS_INVALID_ADDRESS; errno = 0;
4d5e8: 49f9 0005 0358 lea 50358 <__errno>,%a4 4d5ee: 4e94 jsr %a4@ 4d5f0: 2040 moveal %d0,%a0 4d5f2: 4290 clrl %a0@
*n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end );
4d5f4: 486e fffc pea %fp@(-4)
if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0;
4d5f8: 24bc 0000 0000 movel #0,%a2@
#ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end );
4d5fe: 2f02 movel %d2,%sp@- 4d600: 4eb9 0005 2d4e jsr 52d4e <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 )
4d606: 508f addql #8,%sp
errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end );
4d608: 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 )
4d60a: 4a8b tstl %a3 4d60c: 6704 beqs 4d612 <rtems_string_to_float+0x42>
*endptr = end;
4d60e: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */ if ( end == s )
4d612: b4ae fffc cmpl %fp@(-4),%d2 4d616: 6744 beqs 4d65c <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))
4d618: 2f3c 7f7f ffff movel #2139095039,%sp@- 4d61e: 2f03 movel %d3,%sp@- 4d620: 4eb9 0005 dc7c jsr 5dc7c <__gtsf2> 4d626: 508f addql #8,%sp 4d628: 4a80 tstl %d0 4d62a: 6e0e bgts 4d63a <rtems_string_to_float+0x6a>
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
4d62c: 2483 movel %d3,%a2@ 4d62e: 4280 clrl %d0
#endif return RTEMS_SUCCESSFUL; }
4d630: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d636: 4e5e unlk %fp 4d638: 4e75 rts
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d63a: 4e94 jsr %a4@ <== NOT EXECUTED 4d63c: 7222 moveq #34,%d1 <== NOT EXECUTED 4d63e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d640: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d642: 66e8 bnes 4d62c <rtems_string_to_float+0x5c> <== NOT EXECUTED 4d644: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4d646: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d64c: 4e5e unlk %fp <== NOT EXECUTED 4d64e: 4e75 rts <== NOT EXECUTED
) { STRING_TO_INPUT_TYPE result; char *end; if ( !n )
4d650: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4d652: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d658: 4e5e unlk %fp 4d65a: 4e75 rts
/* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s )
4d65c: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4d65e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d664: 4e5e unlk %fp 4d666: 4e75 rts
0005ccf4 <rtems_string_to_int>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
5ccf4: 4e56 ffe8 linkw %fp,#-24 5ccf8: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5ccfc: 242e 0008 movel %fp@(8),%d2 5cd00: 246e 000c moveal %fp@(12),%a2 5cd04: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
5cd08: 4a8a tstl %a2 5cd0a: 675e beqs 5cd6a <rtems_string_to_int+0x76>
return RTEMS_INVALID_ADDRESS; errno = 0;
5cd0c: 49f9 0008 0e64 lea 80e64 <__errno>,%a4 5cd12: 4e94 jsr %a4@ 5cd14: 2040 moveal %d0,%a0 5cd16: 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 );
5cd18: 2f2e 0014 movel %fp@(20),%sp@- 5cd1c: 486e fffc pea %fp@(-4)
if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0;
5cd20: 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 );
5cd22: 2f02 movel %d2,%sp@- 5cd24: 4eb9 0008 7c22 jsr 87c22 <strtol>
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
5cd2a: 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 );
5cd2e: 2600 movel %d0,%d3
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
5cd30: 4a8b tstl %a3 5cd32: 6704 beqs 5cd38 <rtems_string_to_int+0x44>
*endptr = end;
5cd34: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */ if ( end == s )
5cd38: b4ae fffc cmpl %fp@(-4),%d2 5cd3c: 6738 beqs 5cd76 <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))
5cd3e: 0c83 7fff ffff cmpil #2147483647,%d3 5cd44: 670e beqs 5cd54 <rtems_string_to_int+0x60>
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
5cd46: 2483 movel %d3,%a2@ 5cd48: 4280 clrl %d0
#endif return RTEMS_SUCCESSFUL; }
5cd4a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5cd50: 4e5e unlk %fp 5cd52: 4e75 rts
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
5cd54: 4e94 jsr %a4@ 5cd56: 7222 moveq #34,%d1 5cd58: 2040 moveal %d0,%a0 5cd5a: b290 cmpl %a0@,%d1 5cd5c: 66e8 bnes 5cd46 <rtems_string_to_int+0x52> 5cd5e: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
5cd60: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5cd66: 4e5e unlk %fp 5cd68: 4e75 rts
) { STRING_TO_INPUT_TYPE result; char *end; if ( !n )
5cd6a: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
5cd6c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5cd72: 4e5e unlk %fp 5cd74: 4e75 rts
/* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s )
5cd76: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
5cd78: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5cd7e: 4e5e unlk %fp 5cd80: 4e75 rts
... 0004d7ac <rtems_string_to_long>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
4d7ac: 4e56 ffe8 linkw %fp,#-24 4d7b0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d7b4: 262e 0008 movel %fp@(8),%d3 4d7b8: 246e 000c moveal %fp@(12),%a2 4d7bc: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
4d7c0: 4a8a tstl %a2 4d7c2: 6766 beqs 4d82a <rtems_string_to_long+0x7e>
return RTEMS_INVALID_ADDRESS; errno = 0;
4d7c4: 49f9 0005 0358 lea 50358 <__errno>,%a4 4d7ca: 4e94 jsr %a4@ 4d7cc: 2040 moveal %d0,%a0 4d7ce: 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 );
4d7d0: 2f2e 0014 movel %fp@(20),%sp@- 4d7d4: 486e fffc pea %fp@(-4)
if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0;
4d7d8: 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 );
4d7da: 2f03 movel %d3,%sp@- 4d7dc: 4eb9 0005 2f2e jsr 52f2e <strtol>
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
4d7e2: 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 );
4d7e6: 2400 movel %d0,%d2
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
4d7e8: 4a8b tstl %a3 4d7ea: 6704 beqs 4d7f0 <rtems_string_to_long+0x44>
*endptr = end;
4d7ec: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */ if ( end == s )
4d7f0: b6ae fffc cmpl %fp@(-4),%d3 4d7f4: 6740 beqs 4d836 <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))
4d7f6: 0c82 7fff ffff cmpil #2147483647,%d2 4d7fc: 6716 beqs 4d814 <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))
4d7fe: 0c82 8000 0000 cmpil #-2147483648,%d2 4d804: 670e beqs 4d814 <rtems_string_to_long+0x68>
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
4d806: 2482 movel %d2,%a2@ 4d808: 4280 clrl %d0
#endif return RTEMS_SUCCESSFUL; }
4d80a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d810: 4e5e unlk %fp 4d812: 4e75 rts
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4d814: 4e94 jsr %a4@ 4d816: 7222 moveq #34,%d1 4d818: 2040 moveal %d0,%a0 4d81a: b290 cmpl %a0@,%d1 4d81c: 66e8 bnes 4d806 <rtems_string_to_long+0x5a>
#if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL;
4d81e: 700a moveq #10,%d0
}
4d820: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d826: 4e5e unlk %fp 4d828: 4e75 rts
) { STRING_TO_INPUT_TYPE result; char *end; if ( !n )
4d82a: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4d82c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d832: 4e5e unlk %fp 4d834: 4e75 rts
/* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s )
4d836: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4d838: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d83e: 4e5e unlk %fp 4d840: 4e75 rts
... 0004d6f8 <rtems_string_to_long_long>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
4d6f8: 4e56 ffe4 linkw %fp,#-28 4d6fc: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d700: 242e 0008 movel %fp@(8),%d2 4d704: 246e 000c moveal %fp@(12),%a2 4d708: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
4d70c: 4a8a tstl %a2 4d70e: 6700 0082 beqw 4d792 <rtems_string_to_long_long+0x9a>
return RTEMS_INVALID_ADDRESS; errno = 0;
4d712: 49f9 0005 0358 lea 50358 <__errno>,%a4 4d718: 4e94 jsr %a4@ 4d71a: 2040 moveal %d0,%a0
*n = 0;
4d71c: 4280 clrl %d0 4d71e: 4281 clrl %d1
char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0;
4d720: 4290 clrl %a0@
*n = 0;
4d722: 2480 movel %d0,%a2@ 4d724: 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 );
4d728: 2f2e 0014 movel %fp@(20),%sp@- 4d72c: 486e fffc pea %fp@(-4) 4d730: 2f02 movel %d2,%sp@- 4d732: 4eb9 0005 2f50 jsr 52f50 <strtoll>
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
4d738: 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 );
4d73c: 2600 movel %d0,%d3 4d73e: 2801 movel %d1,%d4
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
4d740: 4a8b tstl %a3 4d742: 6704 beqs 4d748 <rtems_string_to_long_long+0x50>
*endptr = end;
4d744: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */ if ( end == s )
4d748: b4ae fffc cmpl %fp@(-4),%d2 4d74c: 6750 beqs 4d79e <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))
4d74e: 203c 7fff ffff movel #2147483647,%d0 4d754: 72ff moveq #-1,%d1 4d756: 9284 subl %d4,%d1 4d758: 9183 subxl %d3,%d0 4d75a: 6720 beqs 4d77c <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))
4d75c: 203c 8000 0000 movel #-2147483648,%d0 4d762: 4281 clrl %d1 4d764: 9284 subl %d4,%d1 4d766: 9183 subxl %d3,%d0 4d768: 6712 beqs 4d77c <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;
4d76a: 4280 clrl %d0 4d76c: 2483 movel %d3,%a2@ 4d76e: 2544 0004 movel %d4,%a2@(4)
#endif return RTEMS_SUCCESSFUL; }
4d772: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d778: 4e5e unlk %fp 4d77a: 4e75 rts
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4d77c: 4e94 jsr %a4@ 4d77e: 7222 moveq #34,%d1 4d780: 2040 moveal %d0,%a0 4d782: b290 cmpl %a0@,%d1 4d784: 66e4 bnes 4d76a <rtems_string_to_long_long+0x72>
#if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL;
4d786: 700a moveq #10,%d0
}
4d788: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d78e: 4e5e unlk %fp 4d790: 4e75 rts
) { STRING_TO_INPUT_TYPE result; char *end; if ( !n )
4d792: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4d794: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d79a: 4e5e unlk %fp 4d79c: 4e75 rts
/* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s )
4d79e: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4d7a0: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d7a6: 4e5e unlk %fp 4d7a8: 4e75 rts
... 0005cd84 <rtems_string_to_pointer>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
5cd84: 4e56 ffe8 linkw %fp,#-24 5cd88: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5cd8c: 242e 0008 movel %fp@(8),%d2 5cd90: 246e 000c moveal %fp@(12),%a2 5cd94: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
5cd98: 4a8a tstl %a2 5cd9a: 675c beqs 5cdf8 <rtems_string_to_pointer+0x74>
return RTEMS_INVALID_ADDRESS; errno = 0;
5cd9c: 49f9 0008 0e64 lea 80e64 <__errno>,%a4 5cda2: 4e94 jsr %a4@ 5cda4: 2040 moveal %d0,%a0 5cda6: 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 );
5cda8: 4878 0010 pea 10 <INVALID_OPERATION> 5cdac: 486e fffc pea %fp@(-4)
if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0;
5cdb0: 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 );
5cdb2: 2f02 movel %d2,%sp@- 5cdb4: 4eb9 0008 8054 jsr 88054 <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 )
5cdba: 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 );
5cdbe: 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 )
5cdc0: 4a8b tstl %a3 5cdc2: 6704 beqs 5cdc8 <rtems_string_to_pointer+0x44>
*endptr = end;
5cdc4: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */ if ( end == s )
5cdc8: b4ae fffc cmpl %fp@(-4),%d2 5cdcc: 6736 beqs 5ce04 <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))
5cdce: 70ff moveq #-1,%d0 5cdd0: b083 cmpl %d3,%d0 5cdd2: 670e beqs 5cde2 <rtems_string_to_pointer+0x5e>
if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result;
5cdd4: 2483 movel %d3,%a2@ 5cdd6: 4280 clrl %d0
#else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
5cdd8: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5cdde: 4e5e unlk %fp 5cde0: 4e75 rts
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
5cde2: 4e94 jsr %a4@ <== NOT EXECUTED 5cde4: 7222 moveq #34,%d1 <== NOT EXECUTED 5cde6: 2040 moveal %d0,%a0 <== NOT EXECUTED 5cde8: b290 cmpl %a0@,%d1 <== NOT EXECUTED 5cdea: 66e8 bnes 5cdd4 <rtems_string_to_pointer+0x50> <== NOT EXECUTED 5cdec: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
5cdee: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 5cdf4: 4e5e unlk %fp <== NOT EXECUTED 5cdf6: 4e75 rts <== NOT EXECUTED
) { STRING_TO_INPUT_TYPE result; char *end; if ( !n )
5cdf8: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
5cdfa: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5ce00: 4e5e unlk %fp 5ce02: 4e75 rts
/* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s )
5ce04: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
5ce06: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5ce0c: 4e5e unlk %fp 5ce0e: 4e75 rts
0005ce10 <rtems_string_to_unsigned_char>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
5ce10: 4e56 fff0 linkw %fp,#-16 5ce14: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 5ce18: 242e 0008 movel %fp@(8),%d2 5ce1c: 246e 000c moveal %fp@(12),%a2 5ce20: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
5ce24: 4a8a tstl %a2 5ce26: 673e beqs 5ce66 <rtems_string_to_unsigned_char+0x56>
return RTEMS_INVALID_ADDRESS; errno = 0;
5ce28: 4eb9 0008 0e64 jsr 80e64 <__errno> 5ce2e: 2040 moveal %d0,%a0 5ce30: 4290 clrl %a0@
*n = 0;
5ce32: 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 );
5ce34: 2f2e 0014 movel %fp@(20),%sp@- 5ce38: 486e fffc pea %fp@(-4) 5ce3c: 2f02 movel %d2,%sp@- 5ce3e: 4eb9 0008 8054 jsr 88054 <strtoul>
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
5ce44: 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 );
5ce48: 2200 movel %d0,%d1
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
5ce4a: 4a8b tstl %a3 5ce4c: 6704 beqs 5ce52 <rtems_string_to_unsigned_char+0x42>
*endptr = end;
5ce4e: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */ if ( end == s )
5ce52: b4ae fffc cmpl %fp@(-4),%d2 5ce56: 671a beqs 5ce72 <rtems_string_to_unsigned_char+0x62>
#endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result;
5ce58: 4280 clrl %d0 5ce5a: 1481 moveb %d1,%a2@
#endif return RTEMS_SUCCESSFUL; }
5ce5c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5ce62: 4e5e unlk %fp 5ce64: 4e75 rts
) { STRING_TO_INPUT_TYPE result; char *end; if ( !n )
5ce66: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
5ce68: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5ce6e: 4e5e unlk %fp 5ce70: 4e75 rts
/* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s )
5ce72: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
5ce74: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5ce7a: 4e5e unlk %fp 5ce7c: 4e75 rts
... 0004d9cc <rtems_string_to_unsigned_long_long>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
4d9cc: 4e56 ffe4 linkw %fp,#-28 4d9d0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d9d4: 242e 0008 movel %fp@(8),%d2 4d9d8: 246e 000c moveal %fp@(12),%a2 4d9dc: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
4d9e0: 4a8a tstl %a2 4d9e2: 676e beqs 4da52 <rtems_string_to_unsigned_long_long+0x86>
return RTEMS_INVALID_ADDRESS; errno = 0;
4d9e4: 49f9 0005 0358 lea 50358 <__errno>,%a4 4d9ea: 4e94 jsr %a4@ 4d9ec: 2040 moveal %d0,%a0
*n = 0;
4d9ee: 4280 clrl %d0 4d9f0: 4281 clrl %d1
char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0;
4d9f2: 4290 clrl %a0@
*n = 0;
4d9f4: 2480 movel %d0,%a2@ 4d9f6: 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 );
4d9fa: 2f2e 0014 movel %fp@(20),%sp@- 4d9fe: 486e fffc pea %fp@(-4) 4da02: 2f02 movel %d2,%sp@- 4da04: 4eb9 0005 3380 jsr 53380 <strtoull>
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
4da0a: 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 );
4da0e: 2600 movel %d0,%d3 4da10: 2801 movel %d1,%d4
#endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
4da12: 4a8b tstl %a3 4da14: 6704 beqs 4da1a <rtems_string_to_unsigned_long_long+0x4e>
*endptr = end;
4da16: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */ if ( end == s )
4da1a: b4ae fffc cmpl %fp@(-4),%d2 4da1e: 673e beqs 4da5e <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))
4da20: 70ff moveq #-1,%d0 4da22: 72ff moveq #-1,%d1 4da24: 9284 subl %d4,%d1 4da26: 9183 subxl %d3,%d0 4da28: 6712 beqs 4da3c <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;
4da2a: 4280 clrl %d0 4da2c: 2483 movel %d3,%a2@ 4da2e: 2544 0004 movel %d4,%a2@(4)
#endif return RTEMS_SUCCESSFUL; }
4da32: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da38: 4e5e unlk %fp 4da3a: 4e75 rts
return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4da3c: 4e94 jsr %a4@ 4da3e: 7222 moveq #34,%d1 4da40: 2040 moveal %d0,%a0 4da42: b290 cmpl %a0@,%d1 4da44: 66e4 bnes 4da2a <rtems_string_to_unsigned_long_long+0x5e> 4da46: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4da48: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da4e: 4e5e unlk %fp 4da50: 4e75 rts
) { STRING_TO_INPUT_TYPE result; char *end; if ( !n )
4da52: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4da54: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da5a: 4e5e unlk %fp 4da5c: 4e75 rts
/* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s )
4da5e: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
4da60: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da66: 4e5e unlk %fp 4da68: 4e75 rts
... 00048588 <rtems_task_get_note>: rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) {
48588: 4e56 fffc linkw %fp,#-4 4858c: 202e 0008 movel %fp@(8),%d0 48590: 2f0a movel %a2,%sp@- 48592: 246e 0010 moveal %fp@(16),%a2 48596: 2f02 movel %d2,%sp@- 48598: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() )
4859c: 4a39 0006 0bf4 tstb 60bf4 <Configuration_RTEMS_API+0x4> 485a2: 6778 beqs 4861c <rtems_task_get_note+0x94>
return RTEMS_NOT_CONFIGURED; if ( !note )
485a4: 4a8a tstl %a2 485a6: 6700 0090 beqw 48638 <rtems_task_get_note+0xb0>
/* * 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 )
485aa: 720f moveq #15,%d1 485ac: b282 cmpl %d2,%d1 485ae: 6542 bcss 485f2 <rtems_task_get_note+0x6a>
/* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
485b0: 4a80 tstl %d0 485b2: 674c beqs 48600 <rtems_task_get_note+0x78>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
485b4: 2079 0006 26fe moveal 626fe <_Thread_Executing>,%a0
/* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
485ba: b0a8 0008 cmpl %a0@(8),%d0 485be: 6746 beqs 48606 <rtems_task_get_note+0x7e>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location );
485c0: 486e fffc pea %fp@(-4) 485c4: 2f00 movel %d0,%sp@- 485c6: 4eb9 0004 a5d0 jsr 4a5d0 <_Thread_Get>
switch ( location ) {
485cc: 508f addql #8,%sp 485ce: 4aae fffc tstl %fp@(-4) 485d2: 6656 bnes 4862a <rtems_task_get_note+0xa2>
case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ];
485d4: 2240 moveal %d0,%a1 485d6: 2069 010a moveal %a1@(266),%a0 485da: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@
_Thread_Enable_dispatch();
485de: 4eb9 0004 a5a8 jsr 4a5a8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
485e4: 242e fff4 movel %fp@(-12),%d2
switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; _Thread_Enable_dispatch();
485e8: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
485ea: 246e fff8 moveal %fp@(-8),%a2 485ee: 4e5e unlk %fp 485f0: 4e75 rts 485f2: 242e fff4 movel %fp@(-12),%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 )
485f6: 700a moveq #10,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
485f8: 246e fff8 moveal %fp@(-8),%a2 485fc: 4e5e unlk %fp 485fe: 4e75 rts
/* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
48600: 2079 0006 26fe moveal 626fe <_Thread_Executing>,%a0
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ];
48606: 2068 010a moveal %a0@(266),%a0 4860a: 4280 clrl %d0 4860c: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
48610: 242e fff4 movel %fp@(-12),%d2 48614: 246e fff8 moveal %fp@(-8),%a2 48618: 4e5e unlk %fp 4861a: 4e75 rts 4861c: 242e fff4 movel %fp@(-12),%d2
{ register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() )
48620: 7016 moveq #22,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
48622: 246e fff8 moveal %fp@(-8),%a2 48626: 4e5e unlk %fp 48628: 4e75 rts 4862a: 242e fff4 movel %fp@(-12),%d2
*note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) {
4862e: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
48630: 246e fff8 moveal %fp@(-8),%a2 48634: 4e5e unlk %fp 48636: 4e75 rts 48638: 242e fff4 movel %fp@(-12),%d2
RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note )
4863c: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
4863e: 246e fff8 moveal %fp@(-8),%a2 48642: 4e5e unlk %fp 48644: 4e75 rts
... 00046100 <rtems_task_ident>: rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) {
46100: 4e56 0000 linkw %fp,#0 46104: 202e 0008 movel %fp@(8),%d0 46108: 206e 0010 moveal %fp@(16),%a0
Objects_Name_or_id_lookup_errors status; if ( !id )
4610c: 4a88 tstl %a0 4610e: 6738 beqs 46148 <rtems_task_ident+0x48>
return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) {
46110: 4a80 tstl %d0 46112: 660e bnes 46122 <rtems_task_ident+0x22>
*id = _Thread_Executing->Object.id;
46114: 2279 0005 efbe moveal 5efbe <_Thread_Executing>,%a1
} status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; }
4611a: 4e5e unlk %fp
if ( !id ) return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id;
4611c: 20a9 0008 movel %a1@(8),%a0@
} status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; }
46120: 4e75 rts
if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
46122: 2f08 movel %a0,%sp@- 46124: 2f2e 000c movel %fp@(12),%sp@- 46128: 2f00 movel %d0,%sp@- 4612a: 4879 0005 ee76 pea 5ee76 <_RTEMS_tasks_Information> 46130: 4eb9 0004 76d8 jsr 476d8 <_Objects_Name_to_id_u32>
return _Status_Object_name_errors_to_status[ status ];
46136: 4fef 0010 lea %sp@(16),%sp 4613a: 41f9 0005 c69c lea 5c69c <_Status_Object_name_errors_to_status>,%a0
}
46140: 4e5e unlk %fp
return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ];
46142: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
}
46146: 4e75 rts
rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id )
46148: 7009 moveq #9,%d0
} status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; }
4614a: 4e5e unlk %fp 4614c: 4e75 rts
... 000585c4 <rtems_task_is_suspended>: */ rtems_status_code rtems_task_is_suspended( rtems_id id ) {
585c4: 4e56 fffc linkw %fp,#-4
register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location );
585c8: 486e fffc pea %fp@(-4) 585cc: 2f2e 0008 movel %fp@(8),%sp@- 585d0: 4eb9 0005 c314 jsr 5c314 <_Thread_Get>
switch ( location ) {
585d6: 508f addql #8,%sp 585d8: 4aae fffc tstl %fp@(-4) 585dc: 6706 beqs 585e4 <rtems_task_is_suspended+0x20> 585de: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
585e0: 4e5e unlk %fp 585e2: 4e75 rts
the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) {
585e4: 7202 moveq #2,%d1 585e6: 2040 moveal %d0,%a0 585e8: c2a8 0010 andl %a0@(16),%d1 585ec: 670c beqs 585fa <rtems_task_is_suspended+0x36>
_Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch();
585ee: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch> 585f4: 700f moveq #15,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
585f6: 4e5e unlk %fp 585f8: 4e75 rts
the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch();
585fa: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch> 58600: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58602: 4e5e unlk %fp 58604: 4e75 rts
... 00046d7c <rtems_task_restart>: rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) {
46d7c: 4e56 fffc linkw %fp,#-4
register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location );
46d80: 486e fffc pea %fp@(-4) 46d84: 2f2e 0008 movel %fp@(8),%sp@- 46d88: 4eb9 0004 89f8 jsr 489f8 <_Thread_Get>
switch ( location ) {
46d8e: 508f addql #8,%sp 46d90: 4aae fffc tstl %fp@(-4) 46d94: 6622 bnes 46db8 <rtems_task_restart+0x3c>
case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) {
46d96: 2f2e 000c movel %fp@(12),%sp@- 46d9a: 42a7 clrl %sp@- 46d9c: 2f00 movel %d0,%sp@- 46d9e: 4eb9 0004 92b4 jsr 492b4 <_Thread_Restart> 46da4: 4fef 000c lea %sp@(12),%sp 46da8: 4a00 tstb %d0 46daa: 6612 bnes 46dbe <rtems_task_restart+0x42>
_Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch();
46dac: 4eb9 0004 89d0 jsr 489d0 <_Thread_Enable_dispatch> 46db2: 700e moveq #14,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
46db4: 4e5e unlk %fp 46db6: 4e75 rts
{ register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) {
46db8: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
46dba: 4e5e unlk %fp 46dbc: 4e75 rts
the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch();
46dbe: 4eb9 0004 89d0 jsr 489d0 <_Thread_Enable_dispatch> 46dc4: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
46dc6: 4e5e unlk %fp 46dc8: 4e75 rts
... 00050ff0 <rtems_task_self>: #include <rtems/system.h> #include <rtems/rtems/tasks.h> rtems_id rtems_task_self(void) {
50ff0: 4e56 0000 linkw %fp,#0 50ff4: 2079 0006 5106 moveal 65106 <_Thread_Executing>,%a0
return _Thread_Executing->Object.id; }
50ffa: 4e5e unlk %fp 50ffc: 2028 0008 movel %a0@(8),%d0 51000: 4e75 rts
... 0006a6f4 <rtems_task_variable_get>: rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) {
6a6f4: 4e56 fffc linkw %fp,#-4 6a6f8: 2f0a movel %a2,%sp@- 6a6fa: 246e 0010 moveal %fp@(16),%a2 6a6fe: 2f02 movel %d2,%sp@- 6a700: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr )
6a704: 6752 beqs 6a758 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS; if ( !result )
6a706: 4a8a tstl %a2 6a708: 674e beqs 6a758 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location);
6a70a: 486e fffc pea %fp@(-4) 6a70e: 2f2e 0008 movel %fp@(8),%sp@- 6a712: 4eb9 0004 cf48 jsr 4cf48 <_Thread_Get>
switch (location) {
6a718: 508f addql #8,%sp 6a71a: 4aae fffc tstl %fp@(-4) 6a71e: 662a bnes 6a74a <rtems_task_variable_get+0x56>
case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables;
6a720: 2240 moveal %d0,%a1 6a722: 2069 011a moveal %a1@(282),%a0
while (tvp) {
6a726: 4a88 tstl %a0 6a728: 670c beqs 6a736 <rtems_task_variable_get+0x42>
if (tvp->ptr == ptr) {
6a72a: b4a8 0004 cmpl %a0@(4),%d2 6a72e: 6736 beqs 6a766 <rtems_task_variable_get+0x72>
*/ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next;
6a730: 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) {
6a732: 4a88 tstl %a0 6a734: 66f4 bnes 6a72a <rtems_task_variable_get+0x36>
_Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch();
6a736: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
6a73c: 242e fff4 movel %fp@(-12),%d2
_Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch();
6a740: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
6a742: 246e fff8 moveal %fp@(-8),%a2 6a746: 4e5e unlk %fp 6a748: 4e75 rts 6a74a: 242e fff4 movel %fp@(-12),%d2
if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) {
6a74e: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
6a750: 246e fff8 moveal %fp@(-8),%a2 6a754: 4e5e unlk %fp 6a756: 4e75 rts 6a758: 242e fff4 movel %fp@(-12),%d2
return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS;
6a75c: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
6a75e: 246e fff8 moveal %fp@(-8),%a2 6a762: 4e5e unlk %fp 6a764: 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;
6a766: 24a8 000c movel %a0@(12),%a2@
_Thread_Enable_dispatch();
6a76a: 4eb9 0004 cf20 jsr 4cf20 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
6a770: 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();
6a774: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
6a776: 246e fff8 moveal %fp@(-8),%a2 6a77a: 4e5e unlk %fp 6a77c: 4e75 rts
... 00046294 <rtems_task_wake_after>: */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) {
46294: 4e56 0000 linkw %fp,#0 46298: 2039 0005 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0 4629e: 5280 addql #1,%d0 462a0: 2f02 movel %d2,%sp@- 462a2: 242e 0008 movel %fp@(8),%d2 462a6: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch(); if ( ticks == 0 ) {
462ac: 4a82 tstl %d2 462ae: 6758 beqs 46308 <rtems_task_wake_after+0x74>
_Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING );
462b0: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 462b4: 2f39 0005 efbe movel 5efbe <_Thread_Executing>,%sp@- 462ba: 4eb9 0004 8710 jsr 48710 <_Thread_Set_state>
_Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id,
462c0: 2079 0005 efbe moveal 5efbe <_Thread_Executing>,%a0
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
462c6: 203c 0004 7c28 movel #293928,%d0 462cc: 2140 0064 movel %d0,%a0@(100)
_Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize(
462d0: 2028 0008 movel %a0@(8),%d0
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
462d4: 2142 0054 movel %d2,%a0@(84)
void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id;
462d8: 2140 0068 movel %d0,%a0@(104)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
462dc: 42a8 0050 clrl %a0@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
462e0: 42a8 006c clrl %a0@(108)
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
462e4: 4868 0048 pea %a0@(72) 462e8: 4879 0005 efdc pea 5efdc <_Watchdog_Ticks_chain> 462ee: 4eb9 0004 8f4c jsr 48f4c <_Watchdog_Insert> 462f4: 4fef 0010 lea %sp@(16),%sp
_Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch();
462f8: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
462fe: 242e fffc movel %fp@(-4),%d2 46302: 4280 clrl %d0 46304: 4e5e unlk %fp 46306: 4e75 rts
rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor();
46308: 4eb9 0004 8b78 jsr 48b78 <_Thread_Yield_processor>
_Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch();
4630e: 4eb9 0004 7dbc jsr 47dbc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
46314: 242e fffc movel %fp@(-4),%d2 46318: 4280 clrl %d0 4631a: 4e5e unlk %fp 4631c: 4e75 rts
... 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>
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> 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
4476e: 4e75 rts
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>
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> 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>
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> 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> 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>
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> 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 434f8: 4e75 rts
... 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 d7a4 movel %a0@,5d7a4 <rtems_termios_cbufsize> <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
43548: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 4354c: 23d0 0005 d7a8 movel %a0@,5d7a8 <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 d7ac movel %a0@,5d7ac <rtems_termios_raw_output_size><== NOT EXECUTED
return RTEMS_SUCCESSFUL; }
4355e: 4e75 rts
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 ede8 movel 5ede8 <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 e5a4 lea 5e5a4 <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>
rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf);
44bf2: 2f2a 0058 movel %a2@(88),%sp@- 44bf6: 47f9 0004 a688 lea 4a688 <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 ede8 movel 5ede8 <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 a688 lea 4a688 <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 6458 jsr 46458 <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 edec movel %a0,5edec <rtems_termios_ttyTail>
if ( rtems_termios_ttyTail != NULL ) {
44c8e: 6748 beqs 44cd8 <rtems_termios_close+0x1a4>
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 edf0 movel %a0,5edf0 <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>
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 edf0 clrl 5edf0 <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>
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>
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 e658 moveal 5e658 <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 6458 jsr 46458 <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 e5a4 lea 5e5a4 <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 ede8 tstl 5ede8 <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 ede8 pea 5ede8 <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>
rtems_fatal_error_occurred (sc);
43530: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43532: 4eb9 0004 6458 jsr 46458 <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>
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> 44780: 6530 bcss 447b2 <rtems_termios_ioctl+0x6c> 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 e5bc addil #386492,%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>
!(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>
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>
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>
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>
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 e5a4 lea 5e5a4 <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>
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>
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>
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>
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 44a20: 4e75 rts
... 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 ede8 movel 5ede8 <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 edf0 moveal 5edf0 <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>
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 a59c jsr 4a59c <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 d7a8 lea 5d7a8 <rtems_termios_raw_input_size>,%a0
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
44d48: 4bf9 0004 ac20 lea 4ac20 <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 d7ac lea 5d7ac <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 d7a4 movel 5d7a4 <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 edf0 moveal 5edf0 <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 edf0 movel %a4,5edf0 <rtems_termios_ttyHead>
if (rtems_termios_ttyTail == NULL)
44dc0: 4ab9 0005 edec tstl 5edec <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 d7b0 moveb 5d7b0 <c.6271>,%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 d7b0 moveb 5d7b0 <c.6271>,%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 d7b0 moveb 5d7b0 <c.6271>,%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 d7b0 moveb 5d7b0 <c.6271>,%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 d7b0 moveb %d5,5d7b0 <c.6271>
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>
c = 'a';
44f40: 7a61 moveq #97,%d5 <== NOT EXECUTED 44f42: 13c5 0005 d7b0 moveb %d5,5d7b0 <c.6271> <== 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>
(rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex);
44f7a: 2f39 0005 ede8 movel 5ede8 <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>
*/ 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 ede8 movel 5ede8 <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 d7b0 moveb 5d7b0 <c.6271>,%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 6458 jsr 46458 <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 d7b0 moveb 5d7b0 <c.6271>,%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 d7b0 moveb 5d7b0 <c.6271>,%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 edec movel %a4,5edec <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 ede8 movel 5ede8 <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 a688 jsr 4a688 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
450ae: 2f39 0005 ede8 movel 5ede8 <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 a688 lea 4a688 <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 ede8 movel 5ede8 <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 a688 lea 4a688 <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 ede8 movel 5ede8 <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
45128: 4e75 rts
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>
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>
(*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 6458 jsr 46458 <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 e5a4 lea 5e5a4 <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 d7a4 movel 5d7a4 <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>
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> 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
4357a: 4e75 rts
00046724 <rtems_termios_set_initial_baud>: int rtems_termios_set_initial_baud( struct rtems_termios_tty *ttyp, int32_t baud ) {
46724: 4e56 0000 linkw %fp,#0 46728: 2f0a movel %a2,%sp@- 4672a: 246e 0008 moveal %fp@(8),%a2 4672e: 2f02 movel %d2,%sp@-
int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud);
46730: 2f2e 000c movel %fp@(12),%sp@- 46734: 4eb9 0004 48e4 jsr 448e4 <rtems_termios_number_to_baud>
if ( cflags_baud == -1 )
4673a: 588f addql #4,%sp 4673c: 72ff moveq #-1,%d1 4673e: b280 cmpl %d0,%d1 46740: 6712 beqs 46754 <rtems_termios_set_initial_baud+0x30>
return -1; ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud;
46742: 242a 0038 movel %a2@(56),%d2 46746: 4281 clrl %d1 46748: 0282 ffff eff0 andil #-4112,%d2 4674e: 8082 orl %d2,%d0 46750: 2540 0038 movel %d0,%a2@(56)
return 0; }
46754: 242e fff8 movel %fp@(-8),%d2 46758: 2001 movel %d1,%d0 4675a: 246e fffc moveal %fp@(-4),%a2 4675e: 4e5e unlk %fp 46760: 4e75 rts
... 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 e5b8 addil #386488,%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>
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 e5b0 addil #386480,%d0 44304: 2240 moveal %d0,%a1 44306: 2051 moveal %a1@,%a0 44308: 4a88 tstl %a0 4430a: 6722 beqs 4432e <rtems_termios_write+0x5e>
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>
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> 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 efec pea 7efec <_Timer_Information> 58b82: 4eb9 0005 b9a0 jsr 5b9a0 <_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>
(void) _Watchdog_Remove( &the_timer->Ticker );
58ba2: 4868 0010 pea %a0@(16) 58ba6: 4eb9 0005 d8d0 jsr 5d8d0 <_Watchdog_Remove> 58bac: 588f addql #4,%sp
_Thread_Enable_dispatch();
58bae: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch> 58bb4: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58bb6: 4e5e unlk %fp 58bb8: 4e75 rts
... 00058c68 <rtems_timer_delete>: */ rtems_status_code rtems_timer_delete( rtems_id id ) {
58c68: 4e56 fffc linkw %fp,#-4 58c6c: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *)
58c6e: 486e fffc pea %fp@(-4) 58c72: 2f2e 0008 movel %fp@(8),%sp@- 58c76: 4879 0007 efec pea 7efec <_Timer_Information> 58c7c: 4eb9 0005 b9a0 jsr 5b9a0 <_Objects_Get>
Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) {
58c82: 4fef 000c lea %sp@(12),%sp 58c86: 2440 moveal %d0,%a2 58c88: 4aae fffc tstl %fp@(-4) 58c8c: 663a bnes 58cc8 <rtems_timer_delete+0x60>
case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object );
58c8e: 2f00 movel %d0,%sp@- 58c90: 4879 0007 efec pea 7efec <_Timer_Information> 58c96: 4eb9 0005 b558 jsr 5b558 <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
58c9c: 486a 0010 pea %a2@(16) 58ca0: 4eb9 0005 d8d0 jsr 5d8d0 <_Watchdog_Remove>
*/ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object );
58ca6: 2f0a movel %a2,%sp@- 58ca8: 4879 0007 efec pea 7efec <_Timer_Information> 58cae: 4eb9 0005 b800 jsr 5b800 <_Objects_Free>
_Timer_Free( the_timer ); _Thread_Enable_dispatch();
58cb4: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58cba: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); _Timer_Free( the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL;
58cbe: 4fef 0014 lea %sp@(20),%sp
case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); _Timer_Free( the_timer ); _Thread_Enable_dispatch();
58cc2: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58cc4: 4e5e unlk %fp 58cc6: 4e75 rts 58cc8: 246e fff8 moveal %fp@(-8),%a2
{ Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) {
58ccc: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58cce: 4e5e unlk %fp 58cd0: 4e75 rts
... 00058dac <rtems_timer_fire_when>: rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) {
58dac: 4e56 ffec linkw %fp,#-20 58db0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 58db4: 242e 000c movel %fp@(12),%d2 58db8: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set )
58dbc: 4a39 0007 e76c tstb 7e76c <_TOD_Is_set> 58dc2: 660c bnes 58dd0 <rtems_timer_fire_when+0x24> 58dc4: 700b moveq #11,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58dc6: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58dcc: 4e5e unlk %fp 58dce: 4e75 rts
rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) )
58dd0: 2f02 movel %d2,%sp@- 58dd2: 4eb9 0005 5d94 jsr 55d94 <_TOD_Validate> 58dd8: 588f addql #4,%sp 58dda: 4a00 tstb %d0 58ddc: 671a beqs 58df8 <rtems_timer_fire_when+0x4c>
return RTEMS_INVALID_CLOCK; if ( !routine )
58dde: 4a83 tstl %d3 58de0: 6700 00a8 beqw 58e8a <rtems_timer_fire_when+0xde>
return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time );
58de4: 2f02 movel %d2,%sp@- 58de6: 4eb9 0005 5c84 jsr 55c84 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
58dec: 588f addql #4,%sp
return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time );
58dee: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
58df0: b0b9 0007 e7ea cmpl 7e7ea <_TOD_Now>,%d0 58df6: 620c bhis 58e04 <rtems_timer_fire_when+0x58>
_Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL;
58df8: 7014 moveq #20,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58dfa: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e00: 4e5e unlk %fp 58e02: 4e75 rts 58e04: 486e fffc pea %fp@(-4) 58e08: 2f2e 0008 movel %fp@(8),%sp@- 58e0c: 4879 0007 efec pea 7efec <_Timer_Information> 58e12: 4eb9 0005 b9a0 jsr 5b9a0 <_Objects_Get>
seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) {
58e18: 4fef 000c lea %sp@(12),%sp 58e1c: 2440 moveal %d0,%a2 58e1e: 4aae fffc tstl %fp@(-4) 58e22: 665a bnes 58e7e <rtems_timer_fire_when+0xd2>
case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker );
58e24: 2800 movel %d0,%d4 58e26: 0684 0000 0010 addil #16,%d4 58e2c: 2f04 movel %d4,%sp@- 58e2e: 4eb9 0005 d8d0 jsr 5d8d0 <_Watchdog_Remove>
void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id;
58e34: 202e 0008 movel %fp@(8),%d0 58e38: 2540 0030 movel %d0,%a2@(48)
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
58e3c: 94b9 0007 e7ea subl 7e7ea <_TOD_Now>,%d2
the_timer->the_class = TIMER_TIME_OF_DAY;
58e42: 7002 moveq #2,%d0
) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
58e44: 256e 0014 0034 movel %fp@(20),%a2@(52) 58e4a: 2540 0038 movel %d0,%a2@(56)
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
58e4e: 2542 001c movel %d2,%a2@(28)
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
58e52: 2543 002c movel %d3,%a2@(44)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
58e56: 42aa 0018 clrl %a2@(24)
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
58e5a: 2f04 movel %d4,%sp@- 58e5c: 4879 0007 e824 pea 7e824 <_Watchdog_Seconds_chain> 58e62: 4eb9 0005 d788 jsr 5d788 <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch();
58e68: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
58e6e: 4fef 000c lea %sp@(12),%sp
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch();
58e72: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58e74: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e7a: 4e5e unlk %fp 58e7c: 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 ) {
58e7e: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58e80: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e86: 4e5e unlk %fp 58e88: 4e75 rts
return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine )
58e8a: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58e8c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e92: 4e5e unlk %fp 58e94: 4e75 rts
... 00058e98 <rtems_timer_get_information>: rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) {
58e98: 4e56 fffc linkw %fp,#-4 58e9c: 2f0a movel %a2,%sp@- 58e9e: 246e 000c moveal %fp@(12),%a2
Timer_Control *the_timer; Objects_Locations location; if ( !the_info )
58ea2: 4a8a tstl %a2 58ea4: 6752 beqs 58ef8 <rtems_timer_get_information+0x60> 58ea6: 486e fffc pea %fp@(-4) 58eaa: 2f2e 0008 movel %fp@(8),%sp@- 58eae: 4879 0007 efec pea 7efec <_Timer_Information> 58eb4: 4eb9 0005 b9a0 jsr 5b9a0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) {
58eba: 4fef 000c lea %sp@(12),%sp 58ebe: 4aae fffc tstl %fp@(-4) 58ec2: 662a bnes 58eee <rtems_timer_get_information+0x56>
case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class;
58ec4: 2040 moveal %d0,%a0 58ec6: 24a8 0038 movel %a0@(56),%a2@
the_info->initial = the_timer->Ticker.initial;
58eca: 41e8 001c lea %a0@(28),%a0 58ece: 2550 0004 movel %a0@,%a2@(4)
the_info->start_time = the_timer->Ticker.start_time;
58ed2: 5088 addql #8,%a0 58ed4: 2550 0008 movel %a0@,%a2@(8)
the_info->stop_time = the_timer->Ticker.stop_time;
58ed8: 5888 addql #4,%a0 58eda: 2550 000c movel %a0@,%a2@(12)
_Thread_Enable_dispatch();
58ede: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58ee4: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; the_info->stop_time = the_timer->Ticker.stop_time; _Thread_Enable_dispatch();
58ee8: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58eea: 4e5e unlk %fp 58eec: 4e75 rts 58eee: 246e fff8 moveal %fp@(-8),%a2
if ( !the_info ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) {
58ef2: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58ef4: 4e5e unlk %fp 58ef6: 4e75 rts 58ef8: 246e fff8 moveal %fp@(-8),%a2
) { Timer_Control *the_timer; Objects_Locations location; if ( !the_info )
58efc: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58efe: 4e5e unlk %fp 58f00: 4e75 rts
... 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 efec pea 7efec <_Timer_Information> 58f46: 4eb9 0005 b9a0 jsr 5b9a0 <_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 c2bc jsr 5c2bc <_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 d8d0 jsr 5d8d0 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
58f94: 2f0a movel %a2,%sp@- 58f96: 4879 0007 e830 pea 7e830 <_Watchdog_Ticks_chain> 58f9c: 4eb9 0005 d788 jsr 5d788 <_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 c2bc jsr 5c2bc <_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 f026 moveal 7f026 <_Timer_server>,%a3
if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker );
58fba: 4eb9 0005 d8d0 jsr 5d8d0 <_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 c2bc jsr 5c2bc <_Thread_Enable_dispatch> 58fd4: 60a4 bras 58f7a <rtems_timer_reset+0x4a>
... 00058fd8 <rtems_timer_server_fire_after>: rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) {
58fd8: 4e56 ffe8 linkw %fp,#-24 58fdc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 58fe0: 282e 0008 movel %fp@(8),%d4 58fe4: 262e 000c movel %fp@(12),%d3 58fe8: 242e 0010 movel %fp@(16),%d2
Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server;
58fec: 2479 0007 f026 moveal 7f026 <_Timer_server>,%a2
if ( !timer_server )
58ff2: 4a8a tstl %a2 58ff4: 6700 009c beqw 59092 <rtems_timer_server_fire_after+0xba>
return RTEMS_INCORRECT_STATE; if ( !routine )
58ff8: 4a82 tstl %d2 58ffa: 6700 00a2 beqw 5909e <rtems_timer_server_fire_after+0xc6>
return RTEMS_INVALID_ADDRESS; if ( ticks == 0 )
58ffe: 4a83 tstl %d3 59000: 660c bnes 5900e <rtems_timer_server_fire_after+0x36> 59002: 700a moveq #10,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
59004: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5900a: 4e5e unlk %fp 5900c: 4e75 rts 5900e: 486e fffc pea %fp@(-4) 59012: 2f04 movel %d4,%sp@- 59014: 4879 0007 efec pea 7efec <_Timer_Information> 5901a: 4eb9 0005 b9a0 jsr 5b9a0 <_Objects_Get>
if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) {
59020: 4fef 000c lea %sp@(12),%sp 59024: 2640 moveal %d0,%a3 59026: 4aae fffc tstl %fp@(-4) 5902a: 665a bnes 59086 <rtems_timer_server_fire_after+0xae>
case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker );
5902c: 486b 0010 pea %a3@(16) 59030: 4eb9 0005 d8d0 jsr 5d8d0 <_Watchdog_Remove>
_ISR_Disable( level );
59036: 203c 0000 0700 movel #1792,%d0 5903c: 40c1 movew %sr,%d1 5903e: 8081 orl %d1,%d0 59040: 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 ) {
59042: 588f addql #4,%sp 59044: 4aab 0018 tstl %a3@(24) 59048: 6660 bnes 590aa <rtems_timer_server_fire_after+0xd2>
/* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK;
5904a: 7001 moveq #1,%d0
) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
5904c: 276e 0014 0034 movel %fp@(20),%a3@(52)
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
59052: 2742 002c movel %d2,%a3@(44)
the_watchdog->id = id;
59056: 2744 0030 movel %d4,%a3@(48)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks;
5905a: 2743 001c movel %d3,%a3@(28)
/* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK;
5905e: 2740 0038 movel %d0,%a3@(56)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
59062: 42ab 0018 clrl %a3@(24)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level );
59066: 46c1 movew %d1,%sr
(*timer_server->schedule_operation)( timer_server, the_timer );
59068: 2f0b movel %a3,%sp@- 5906a: 2f0a movel %a2,%sp@- 5906c: 206a 0004 moveal %a2@(4),%a0 59070: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59072: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59078: 508f addql #8,%sp
the_timer->Ticker.initial = ticks; _ISR_Enable( level ); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch();
5907a: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
5907c: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 59082: 4e5e unlk %fp 59084: 4e75 rts
if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) {
59086: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
59088: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5908e: 4e5e unlk %fp 59090: 4e75 rts
Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server )
59092: 700e moveq #14,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
59094: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5909a: 4e5e unlk %fp 5909c: 4e75 rts
Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !routine )
5909e: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
590a0: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 590a6: 4e5e unlk %fp 590a8: 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 );
590aa: 46c1 movew %d1,%sr
_Thread_Enable_dispatch();
590ac: 4eb9 0005 c2bc jsr 5c2bc <_Thread_Enable_dispatch> 590b2: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
590b4: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 590ba: 4e5e unlk %fp 590bc: 4e75 rts
... 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 f026 moveal 7f026 <_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 e76c tstb 7e76c <_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 e7ea cmpl 7e7ea <_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 efec pea 7efec <_Timer_Information> 59128: 4eb9 0005 b9a0 jsr 5b9a0 <_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 d8d0 jsr 5d8d0 <_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 e7ea subl 7e7ea <_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 c2bc jsr 5c2bc <_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 591b8: 4e75 rts
... 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 eda0 movel 5eda0 <rtems_panic_in_progress>,%d1 <== NOT EXECUTED 4234c: 2001 movel %d1,%d0 <== NOT EXECUTED 4234e: 5280 addql #1,%d0 <== NOT EXECUTED 42350: 23c0 0005 eda0 movel %d0,5eda0 <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 ef04 movel 5ef04 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 42360: 5280 addql #1,%d0 <== NOT EXECUTED 42362: 23c0 0005 ef04 movel %d0,5ef04 <_Thread_Dispatch_disable_level><== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
42368: 2039 0005 eda0 movel 5eda0 <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 d880 moveal 5d880 <_impure_ptr>,%a0 <== NOT EXECUTED 4237c: 45f9 0004 eee8 lea 4eee8 <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 f274 lea 4f274 <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 d880 moveal 5d880 <_impure_ptr>,%a0 <== NOT EXECUTED 423b0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 423b4: 4eb9 0005 5414 jsr 55414 <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 fb28 lea 4fb28 <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 c1a4 pea 5c1a4 <IntUartPollCallbacks.6601+0x42> <== NOT EXECUTED 423ea: 2079 0005 d880 moveal 5d880 <_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 c988 pea 5c988 <IMFS_link_handlers+0xb4> <== NOT EXECUTED 42402: 2079 0005 d880 moveal 5d880 <_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 d880 moveal 5d880 <_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 c1b8 pea 5c1b8 <IntUartPollCallbacks.6601+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 c189 pea 5c189 <IntUartPollCallbacks.6601+0x27> <== NOT EXECUTED 4246e: 2079 0005 d880 moveal 5d880 <_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 c1cd pea 5c1cd <IntUartPollCallbacks.6601+0x6b> <== NOT EXECUTED 42490: 42a7 clrl %sp@- <== NOT EXECUTED 42492: 4eb9 0004 2544 jsr 42544 <rtems_error> <== NOT EXECUTED
abort();
42498: 4eb9 0004 eb5c jsr 4eb5c <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 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 424a4: 47f9 0004 f274 lea 4f274 <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 d880 moveal 5d880 <_impure_ptr>,%a0 <== NOT EXECUTED 424bc: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 424c0: 4eb9 0005 5414 jsr 55414 <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 c197 pea 5c197 <IntUartPollCallbacks.6601+0x35> <== NOT EXECUTED 424e6: 2079 0005 d880 moveal 5d880 <_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 c988 pea 5c988 <IMFS_link_handlers+0xb4> <== NOT EXECUTED 424fe: 2079 0005 d880 moveal 5d880 <_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 d880 moveal 5d880 <_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
00067364 <scanInt>: /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) {
67364: 4e56 ffe4 linkw %fp,#-28 67368: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 6736c: 246e 0008 moveal %fp@(8),%a2 67370: 4284 clrl %d4 67372: 263c 7fff ffff movel #2147483647,%d3 67378: 4282 clrl %d2
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
6737a: 47f9 0008 5d20 lea 85d20 <__srget_r>,%a3 67380: 202a 0004 movel %a2@(4),%d0 67384: 5380 subql #1,%d0 67386: 2540 0004 movel %d0,%a2@(4) 6738a: 6d62 blts 673ee <scanInt+0x8a> 6738c: 2052 moveal %a2@,%a0 6738e: 4280 clrl %d0 67390: 1010 moveb %a0@,%d0 67392: 5288 addql #1,%a0
if (c == ':')
67394: 723a moveq #58,%d1
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
67396: 2488 movel %a0,%a2@
if (c == ':')
67398: b280 cmpl %d0,%d1 6739a: 6764 beqs 67400 <scanInt+0x9c>
break; if (sign == 0) {
6739c: 4a84 tstl %d4 6739e: 660a bnes 673aa <scanInt+0x46>
if (c == '-') {
673a0: 7c2d moveq #45,%d6 673a2: bc80 cmpl %d0,%d6 673a4: 6700 0084 beqw 6742a <scanInt+0xc6>
sign = -1; limit++; continue;
673a8: 7801 moveq #1,%d4
} sign = 1; } if (!isdigit(c))
673aa: 2079 000a 27a8 moveal a27a8 <__ctype_ptr__>,%a0 673b0: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 673b4: 49c1 extbl %d1 673b6: 44c1 movew %d1,%ccr 673b8: 6664 bnes 6741e <scanInt+0xba>
return 0; d = c - '0'; if ((i > (limit / 10))
673ba: 2203 movel %d3,%d1 673bc: 7c0a moveq #10,%d6 673be: 4c46 1005 remul %d6,%d5,%d1 673c2: 4c46 1001 remul %d6,%d1,%d1 673c6: b282 cmpl %d2,%d1 673c8: 6554 bcss 6741e <scanInt+0xba>
} sign = 1; } if (!isdigit(c)) return 0; d = c - '0';
673ca: 0680 ffff ffd0 addil #-48,%d0
if ((i > (limit / 10))
673d0: b282 cmpl %d2,%d1 673d2: 6746 beqs 6741a <scanInt+0xb6>
|| ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d;
673d4: 2202 movel %d2,%d1 673d6: e789 lsll #3,%d1 673d8: 2241 moveal %d1,%a1 673da: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 673de: 2400 movel %d0,%d2
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
673e0: 202a 0004 movel %a2@(4),%d0 673e4: 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;
673e6: d488 addl %a0,%d2
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
673e8: 2540 0004 movel %d0,%a2@(4) 673ec: 6c9e bges 6738c <scanInt+0x28>
673ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 673f0: 2f39 000a 27b4 movel a27b4 <_impure_ptr>,%sp@- <== NOT EXECUTED 673f6: 4e93 jsr %a3@ <== NOT EXECUTED 673f8: 508f addql #8,%sp <== NOT EXECUTED
if (c == ':')
673fa: 723a moveq #58,%d1 <== NOT EXECUTED 673fc: b280 cmpl %d0,%d1 <== NOT EXECUTED 673fe: 669c bnes 6739c <scanInt+0x38> <== NOT EXECUTED
if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0)
67400: 4a84 tstl %d4 67402: 671a beqs 6741e <scanInt+0xba>
return 0; *val = i * sign;
67404: 4c02 4800 mulsl %d2,%d4 67408: 7001 moveq #1,%d0 6740a: 206e 000c moveal %fp@(12),%a0 6740e: 2084 movel %d4,%a0@
return 1; }
67410: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 67416: 4e5e unlk %fp 67418: 4e75 rts
sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10))
6741a: ba80 cmpl %d0,%d5 <== NOT EXECUTED 6741c: 64b6 bccs 673d4 <scanInt+0x70> <== NOT EXECUTED
i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1;
6741e: 4280 clrl %d0 <== NOT EXECUTED
}
67420: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 67426: 4e5e unlk %fp <== NOT EXECUTED 67428: 4e75 rts <== NOT EXECUTED
if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++;
6742a: 5283 addql #1,%d3 <== NOT EXECUTED 6742c: 78ff moveq #-1,%d4 <== NOT EXECUTED
continue;
6742e: 6000 ff50 braw 67380 <scanInt+0x1c> <== NOT EXECUTED
00067432 <scanString>: /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) {
67432: 4e56 ffec linkw %fp,#-20
int c; *name = *bufp;
67436: 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) {
6743a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 6743e: 246e 0008 moveal %fp@(8),%a2
int c; *name = *bufp; for (;;) { c = getc(fp);
67442: 4bf9 0008 5d20 lea 85d20 <__srget_r>,%a5 67448: 202a 0004 movel %a2@(4),%d0 6744c: 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) {
6744e: 266e 0010 moveal %fp@(16),%a3 67452: 242e 0018 movel %fp@(24),%d2 67456: 286e 0014 moveal %fp@(20),%a4
int c; *name = *bufp;
6745a: 2093 movel %a3@,%a0@
for (;;) { c = getc(fp);
6745c: 2540 0004 movel %d0,%a2@(4) 67460: 6d36 blts 67498 <scanString+0x66> 67462: 2052 moveal %a2@,%a0 67464: 4280 clrl %d0 67466: 1010 moveb %a0@,%d0 67468: 5288 addql #1,%a0
if (c == ':') {
6746a: 723a moveq #58,%d1
{ int c; *name = *bufp; for (;;) { c = getc(fp);
6746c: 2488 movel %a0,%a2@
if (c == ':') {
6746e: b280 cmpl %d0,%d1 67470: 6738 beqs 674aa <scanString+0x78>
if (nlFlag) return 0; break; } if (c == '\n') {
67472: 720a moveq #10,%d1 67474: b280 cmpl %d0,%d1 67476: 674a beqs 674c2 <scanString+0x90>
if (!nlFlag) return 0; break; } if (c == EOF)
67478: 72ff moveq #-1,%d1 6747a: b280 cmpl %d0,%d1 6747c: 6748 beqs 674c6 <scanString+0x94>
return 0; if (*nleft < 2)
6747e: 7201 moveq #1,%d1 67480: b294 cmpl %a4@,%d1 67482: 6442 bccs 674c6 <scanString+0x94>
return 0; **bufp = c;
67484: 2053 moveal %a3@,%a0 67486: 1080 moveb %d0,%a0@
{ int c; *name = *bufp; for (;;) { c = getc(fp);
67488: 202a 0004 movel %a2@(4),%d0 6748c: 5380 subql #1,%d0
if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp);
6748e: 5293 addql #1,%a3@
--(*nleft);
67490: 5394 subql #1,%a4@
{ int c; *name = *bufp; for (;;) { c = getc(fp);
67492: 2540 0004 movel %d0,%a2@(4) 67496: 6cca bges 67462 <scanString+0x30> 67498: 2f0a movel %a2,%sp@- 6749a: 2f39 000a 27b4 movel a27b4 <_impure_ptr>,%sp@- 674a0: 4e95 jsr %a5@ 674a2: 508f addql #8,%sp
if (c == ':') {
674a4: 723a moveq #58,%d1 674a6: b280 cmpl %d0,%d1 674a8: 66c8 bnes 67472 <scanString+0x40>
if (nlFlag)
674aa: 4a82 tstl %d2 674ac: 6618 bnes 674c6 <scanString+0x94>
return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0';
674ae: 2053 moveal %a3@,%a0
++(*bufp); --(*nleft);
674b0: 7001 moveq #1,%d0
return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0';
674b2: 4210 clrb %a0@
++(*bufp);
674b4: 5293 addql #1,%a3@
--(*nleft);
674b6: 5394 subql #1,%a4@
return 1; }
674b8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 674be: 4e5e unlk %fp 674c0: 4e75 rts
if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag)
674c2: 4a82 tstl %d2 674c4: 66e8 bnes 674ae <scanString+0x7c>
--(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1;
674c6: 4280 clrl %d0 <== NOT EXECUTED
}
674c8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 <== NOT EXECUTED 674ce: 4e5e unlk %fp <== NOT EXECUTED
674d0: 4e75 rts
000674d2 <scangr>: FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
674d2: 4e56 ffe4 linkw %fp,#-28 674d6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
674da: 42a7 clrl %sp@- 674dc: 280e movel %fp,%d4 674de: 0684 0000 0014 addil #20,%d4 674e4: 260e movel %fp,%d3 674e6: 0683 0000 0010 addil #16,%d3 674ec: 47fa ff44 lea %pc@(67432 <scanString>),%a3 674f0: 2f04 movel %d4,%sp@- 674f2: 2f03 movel %d3,%sp@-
FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
674f4: 246e 000c moveal %fp@(12),%a2
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
674f8: 2f0a movel %a2,%sp@-
FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
674fa: 242e 0008 movel %fp@(8),%d2
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
674fe: 2f02 movel %d2,%sp@- 67500: 4e93 jsr %a3@ 67502: 4fef 0014 lea %sp@(20),%sp 67506: 4a80 tstl %d0 67508: 660c bnes 67516 <scangr+0x44>
*cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1;
6750a: 4280 clrl %d0 <== NOT EXECUTED
}
6750c: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 <== NOT EXECUTED 67512: 4e5e unlk %fp <== NOT EXECUTED 67514: 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)
67516: 42a7 clrl %sp@- 67518: 2f04 movel %d4,%sp@- 6751a: 2f03 movel %d3,%sp@- 6751c: 486a 0004 pea %a2@(4) 67520: 2f02 movel %d2,%sp@- 67522: 4e93 jsr %a3@
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
67524: 4fef 0014 lea %sp@(20),%sp 67528: 4a80 tstl %d0 6752a: 67de beqs 6750a <scangr+0x38>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid)
6752c: 486e fffc pea %fp@(-4) 67530: 2f02 movel %d2,%sp@- 67532: 4eba fe30 jsr %pc@(67364 <scanInt>)
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
67536: 508f addql #8,%sp 67538: 4a80 tstl %d0 6753a: 67ce beqs 6750a <scangr+0x38>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1))
6753c: 4878 0001 pea 1 <ADD> 67540: 2f04 movel %d4,%sp@- 67542: 2f03 movel %d3,%sp@- 67544: 486e fff8 pea %fp@(-8) 67548: 2f02 movel %d2,%sp@- 6754a: 4e93 jsr %a3@
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
6754c: 4fef 0014 lea %sp@(20),%sp 67550: 4a80 tstl %d0 67552: 67b6 beqs 6750a <scangr+0x38>
grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
67554: 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;
67558: 356e fffe 0008 movew %fp@(-2),%a2@(8)
/* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
6755e: 1011 moveb %a1@,%d0 67560: 677a beqs 675dc <scangr+0x10a> 67562: 2049 moveal %a1,%a0 67564: 7201 moveq #1,%d1 67566: 5288 addql #1,%a0
if(*cp == ',')
67568: 49c0 extbl %d0 6756a: 742c moveq #44,%d2 6756c: b480 cmpl %d0,%d2 6756e: 6756 beqs 675c6 <scangr+0xf4>
grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
67570: 1010 moveb %a0@,%d0 67572: 66f2 bnes 67566 <scangr+0x94> 67574: e589 lsll #2,%d1 67576: 0681 0000 0013 addil #19,%d1
} /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
6757c: b2ae 0014 cmpl %fp@(20),%d1 67580: 6288 bhis 6750a <scangr+0x38>
return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
67582: 202e 0010 movel %fp@(16),%d0 67586: 72f0 moveq #-16,%d1 67588: 0680 0000 000f addil #15,%d0 6758e: c081 andl %d1,%d0
/* * Fill in pointer array */ grp->gr_mem[0] = grmem;
67590: 2040 moveal %d0,%a0 67592: 2089 movel %a1,%a0@
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
67594: 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);
67598: 2540 000a movel %d0,%a2@(10)
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
6759c: 1010 moveb %a0@,%d0 6759e: 6740 beqs 675e0 <scangr+0x10e> 675a0: 5288 addql #1,%a0 675a2: 7201 moveq #1,%d1
if(*cp == ',') {
675a4: 49c0 extbl %d0 675a6: 742c moveq #44,%d2 675a8: b480 cmpl %d0,%d2 675aa: 671e beqs 675ca <scangr+0xf8>
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
675ac: 1018 moveb %a0@+,%d0 675ae: 66f4 bnes 675a4 <scangr+0xd2>
if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL;
675b0: 206a 000a moveal %a2@(10),%a0 675b4: 7001 moveq #1,%d0
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
675b6: e589 lsll #2,%d1
if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL;
675b8: 42b0 1800 clrl %a0@(00000000,%d1:l)
return 1; }
675bc: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 675c2: 4e5e unlk %fp 675c4: 4e75 rts
/* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') memcount++;
675c6: 5281 addql #1,%d1 <== NOT EXECUTED 675c8: 60a6 bras 67570 <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';
675ca: 4200 clrb %d0 <== NOT EXECUTED 675cc: 1140 ffff moveb %d0,%a0@(-1) <== NOT EXECUTED
grp->gr_mem[memcount++] = cp + 1;
675d0: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 675d4: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 675d8: 5281 addql #1,%d1 <== NOT EXECUTED 675da: 60d0 bras 675ac <scangr+0xda> <== NOT EXECUTED
grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
675dc: 7217 moveq #23,%d1 <== NOT EXECUTED 675de: 609c bras 6757c <scangr+0xaa> <== NOT EXECUTED
if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL;
675e0: 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++) {
675e4: 7204 moveq #4,%d1 <== NOT EXECUTED
if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL;
675e6: 7001 moveq #1,%d0 <== NOT EXECUTED 675e8: 42b0 1800 clrl %a0@(00000000,%d1:l) <== NOT EXECUTED 675ec: 60ce bras 675bc <scangr+0xea> <== NOT EXECUTED
0006762c <scanpw>: FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
6762c: 4e56 ffe0 linkw %fp,#-32 67630: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
67634: 42a7 clrl %sp@- 67636: 280e movel %fp,%d4 67638: 0684 0000 0014 addil #20,%d4 6763e: 260e movel %fp,%d3 67640: 0683 0000 0010 addil #16,%d3 67646: 47fa fdea lea %pc@(67432 <scanString>),%a3 6764a: 2f04 movel %d4,%sp@- 6764c: 2f03 movel %d3,%sp@-
FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
6764e: 246e 000c moveal %fp@(12),%a2
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
67652: 2f0a movel %a2,%sp@-
FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
67654: 242e 0008 movel %fp@(8),%d2
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
67658: 2f02 movel %d2,%sp@- 6765a: 4e93 jsr %a3@ 6765c: 4fef 0014 lea %sp@(20),%sp 67660: 4a80 tstl %d0 67662: 660c bnes 67670 <scanpw+0x44>
|| !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;
67664: 4280 clrl %d0 <== NOT EXECUTED
}
67666: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 6766c: 4e5e unlk %fp <== NOT EXECUTED 6766e: 4e75 rts <== NOT EXECUTED
) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
67670: 42a7 clrl %sp@- 67672: 2f04 movel %d4,%sp@- 67674: 2f03 movel %d3,%sp@- 67676: 486a 0004 pea %a2@(4) 6767a: 2f02 movel %d2,%sp@- 6767c: 4e93 jsr %a3@
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
6767e: 4fef 0014 lea %sp@(20),%sp 67682: 4a80 tstl %d0 67684: 67de beqs 67664 <scanpw+0x38>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid)
67686: 486e fffc pea %fp@(-4) 6768a: 49fa fcd8 lea %pc@(67364 <scanInt>),%a4 6768e: 2f02 movel %d2,%sp@- 67690: 4e94 jsr %a4@
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
67692: 508f addql #8,%sp 67694: 4a80 tstl %d0 67696: 67cc beqs 67664 <scanpw+0x38>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid)
67698: 486e fff8 pea %fp@(-8) 6769c: 2f02 movel %d2,%sp@- 6769e: 4e94 jsr %a4@
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
676a0: 508f addql #8,%sp 676a2: 4a80 tstl %d0 676a4: 67be beqs 67664 <scanpw+0x38>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
676a6: 42a7 clrl %sp@- 676a8: 2f04 movel %d4,%sp@- 676aa: 2f03 movel %d3,%sp@- 676ac: 486a 000c pea %a2@(12) 676b0: 2f02 movel %d2,%sp@- 676b2: 4e93 jsr %a3@
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
676b4: 4fef 0014 lea %sp@(20),%sp 676b8: 4a80 tstl %d0 676ba: 67a8 beqs 67664 <scanpw+0x38>
|| !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)
676bc: 42a7 clrl %sp@- 676be: 2f04 movel %d4,%sp@- 676c0: 2f03 movel %d3,%sp@- 676c2: 486a 0010 pea %a2@(16) 676c6: 2f02 movel %d2,%sp@- 676c8: 4e93 jsr %a3@
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
676ca: 4fef 0014 lea %sp@(20),%sp 676ce: 4a80 tstl %d0 676d0: 6792 beqs 67664 <scanpw+0x38>
|| !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)
676d2: 42a7 clrl %sp@- 676d4: 2f04 movel %d4,%sp@- 676d6: 2f03 movel %d3,%sp@- 676d8: 486a 0014 pea %a2@(20) 676dc: 2f02 movel %d2,%sp@- 676de: 4e93 jsr %a3@
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
676e0: 4fef 0014 lea %sp@(20),%sp 676e4: 4a80 tstl %d0 676e6: 6700 ff7c beqw 67664 <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))
676ea: 4878 0001 pea 1 <ADD> 676ee: 2f04 movel %d4,%sp@- 676f0: 2f03 movel %d3,%sp@- 676f2: 486a 0018 pea %a2@(24) 676f6: 2f02 movel %d2,%sp@- 676f8: 4e93 jsr %a3@
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
676fa: 4fef 0014 lea %sp@(20),%sp 676fe: 4a80 tstl %d0 67700: 6700 ff62 beqw 67664 <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;
67704: 7001 moveq #1,%d0 67706: 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;
6770c: 356e fffe 0008 movew %fp@(-2),%a2@(8)
pwd->pw_gid = pwgid; return 1; }
67712: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 67718: 4e5e unlk %fp 6771a: 4e75 rts
00046804 <sched_get_priority_max>: int sched_get_priority_max( int policy ) { switch ( policy ) {
46804: 7004 moveq #4,%d0
#include <rtems/posix/priority.h> int sched_get_priority_max( int policy ) {
46806: 4e56 0000 linkw %fp,#0 4680a: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
4680e: b081 cmpl %d1,%d0 46810: 6412 bccs 46824 <sched_get_priority_max+0x20>
case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL );
46812: 4eb9 0004 fb0c jsr 4fb0c <__errno> 46818: 7216 moveq #22,%d1 4681a: 2040 moveal %d0,%a0 4681c: 70ff moveq #-1,%d0
} return POSIX_SCHEDULER_MAXIMUM_PRIORITY; }
4681e: 4e5e unlk %fp
case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL );
46820: 2081 movel %d1,%a0@
} return POSIX_SCHEDULER_MAXIMUM_PRIORITY; }
46822: 4e75 rts
int sched_get_priority_max( int policy ) { switch ( policy ) {
46824: 103c 0001 moveb #1,%d0 46828: e3a8 lsll %d1,%d0 4682a: 7217 moveq #23,%d1 4682c: c081 andl %d1,%d0 4682e: 67e2 beqs 46812 <sched_get_priority_max+0xe>
default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
46830: 4280 clrl %d0 46832: 1039 0005 eb86 moveb 5eb86 <rtems_maximum_priority>,%d0
}
46838: 4e5e unlk %fp
default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
4683a: 5380 subql #1,%d0
}
4683c: 4e75 rts
... 00046840 <sched_get_priority_min>: int sched_get_priority_min( int policy ) { switch ( policy ) {
46840: 7004 moveq #4,%d0
#include <rtems/posix/priority.h> int sched_get_priority_min( int policy ) {
46842: 4e56 0000 linkw %fp,#0 46846: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
4684a: b081 cmpl %d1,%d0 4684c: 6412 bccs 46860 <sched_get_priority_min+0x20>
case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL );
4684e: 4eb9 0004 fb0c jsr 4fb0c <__errno> 46854: 7216 moveq #22,%d1 46856: 2040 moveal %d0,%a0 46858: 70ff moveq #-1,%d0
} return POSIX_SCHEDULER_MINIMUM_PRIORITY; }
4685a: 4e5e unlk %fp
case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL );
4685c: 2081 movel %d1,%a0@
} return POSIX_SCHEDULER_MINIMUM_PRIORITY; }
4685e: 4e75 rts
int sched_get_priority_min( int policy ) { switch ( policy ) {
46860: 103c 0001 moveb #1,%d0 46864: e3a8 lsll %d1,%d0 46866: 7217 moveq #23,%d1 46868: c081 andl %d1,%d0 4686a: 67e2 beqs 4684e <sched_get_priority_min+0xe> 4686c: 7001 moveq #1,%d0
default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; }
4686e: 4e5e unlk %fp 46870: 4e75 rts
... 00045d54 <sched_getparam>: int sched_getparam( pid_t pid __attribute__((unused)), struct sched_param *param __attribute__((unused)) ) {
45d54: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45d58: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45d5e: 7258 moveq #88,%d1 45d60: 2040 moveal %d0,%a0
}
45d62: 70ff moveq #-1,%d0 45d64: 4e5e unlk %fp
int sched_getparam( pid_t pid __attribute__((unused)), struct sched_param *param __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45d66: 2081 movel %d1,%a0@
}
45d68: 4e75 rts
... 00045d6c <sched_getscheduler>: #include <rtems/posix/time.h> int sched_getscheduler( pid_t pid __attribute__((unused)) ) {
45d6c: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45d70: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45d76: 7258 moveq #88,%d1 45d78: 2040 moveal %d0,%a0
}
45d7a: 70ff moveq #-1,%d0 45d7c: 4e5e unlk %fp
int sched_getscheduler( pid_t pid __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45d7e: 2081 movel %d1,%a0@
}
45d80: 4e75 rts
... 00045d84 <sched_setparam>: int sched_setparam( pid_t pid __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) {
45d84: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45d88: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45d8e: 7258 moveq #88,%d1 45d90: 2040 moveal %d0,%a0
}
45d92: 70ff moveq #-1,%d0 45d94: 4e5e unlk %fp
int sched_setparam( pid_t pid __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45d96: 2081 movel %d1,%a0@
}
45d98: 4e75 rts
... 00045d9c <sched_setscheduler>: int sched_setscheduler( pid_t pid __attribute__((unused)), int policy __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) {
45d9c: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45da0: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45da6: 7258 moveq #88,%d1 45da8: 2040 moveal %d0,%a0
}
45daa: 70ff moveq #-1,%d0 45dac: 4e5e unlk %fp
pid_t pid __attribute__((unused)), int policy __attribute__((unused)), const struct sched_param *param __attribute__((unused)) ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45dae: 2081 movel %d1,%a0@
}
45db0: 4e75 rts
... 000488cc <sem_close>: */ int sem_close( sem_t *sem ) {
488cc: 4e56 fffc linkw %fp,#-4
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *)
488d0: 486e fffc pea %fp@(-4) 488d4: 206e 0008 moveal %fp@(8),%a0 488d8: 2f10 movel %a0@,%sp@- 488da: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 488e0: 4eb9 0004 ab84 jsr 4ab84 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) {
488e6: 4fef 000c lea %sp@(12),%sp 488ea: 4aae fffc tstl %fp@(-4) 488ee: 6712 beqs 48902 <sem_close+0x36>
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL );
488f0: 4eb9 0005 2bbc jsr 52bbc <__errno> 488f6: 7216 moveq #22,%d1 488f8: 2040 moveal %d0,%a0 488fa: 70ff moveq #-1,%d0
}
488fc: 4e5e unlk %fp
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL );
488fe: 2081 movel %d1,%a0@
}
48900: 4e75 rts
the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1;
48902: 2040 moveal %d0,%a0 48904: 53a8 0016 subql #1,%a0@(22)
_POSIX_Semaphore_Delete( the_semaphore );
48908: 2f00 movel %d0,%sp@- 4890a: 4eb9 0004 f088 jsr 4f088 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
48910: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch>
return 0;
48916: 588f addql #4,%sp
switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1; _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch();
48918: 4280 clrl %d0
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
4891a: 4e5e unlk %fp 4891c: 4e75 rts
... 000489d8 <sem_init>: int sem_init( sem_t *sem, int pshared, unsigned int value ) {
489d8: 4e56 fffc linkw %fp,#-4 489dc: 2f0a movel %a2,%sp@- 489de: 246e 0008 moveal %fp@(8),%a2
int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem )
489e2: 4a8a tstl %a2 489e4: 672e beqs 48a14 <sem_init+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support(
489e6: 486e fffc pea %fp@(-4) 489ea: 2f2e 0010 movel %fp@(16),%sp@- 489ee: 2f2e 000c movel %fp@(12),%sp@- 489f2: 42a7 clrl %sp@- 489f4: 4eb9 0004 ef28 jsr 4ef28 <_POSIX_Semaphore_Create_support>
pshared, value, &the_semaphore ); if ( status != -1 )
489fa: 4fef 0010 lea %sp@(16),%sp 489fe: 72ff moveq #-1,%d1 48a00: b280 cmpl %d0,%d1 48a02: 6708 beqs 48a0c <sem_init+0x34>
*sem = the_semaphore->Object.id;
48a04: 206e fffc moveal %fp@(-4),%a0 48a08: 24a8 0008 movel %a0@(8),%a2@
return status; }
48a0c: 246e fff8 moveal %fp@(-8),%a2 48a10: 4e5e unlk %fp 48a12: 4e75 rts
{ int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL );
48a14: 4eb9 0005 2bbc jsr 52bbc <__errno>
if ( status != -1 ) *sem = the_semaphore->Object.id; return status; }
48a1a: 246e fff8 moveal %fp@(-8),%a2
{ int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL );
48a1e: 2040 moveal %d0,%a0 48a20: 7216 moveq #22,%d1 48a22: 70ff moveq #-1,%d0
if ( status != -1 ) *sem = the_semaphore->Object.id; return status; }
48a24: 4e5e unlk %fp
{ int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL );
48a26: 2081 movel %d1,%a0@
if ( status != -1 ) *sem = the_semaphore->Object.id; return status; }
48a28: 4e75 rts
... 00048a2c <sem_open>: int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) {
48a2c: 4e56 ffe0 linkw %fp,#-32
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
48a30: 2039 0006 3fa0 movel 63fa0 <_Thread_Dispatch_disable_level>,%d0 48a36: 5280 addql #1,%d0 48a38: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48a3c: 23c0 0006 3fa0 movel %d0,63fa0 <_Thread_Dispatch_disable_level> 48a42: 2a2e 0008 movel %fp@(8),%d5 48a46: 262e 000c movel %fp@(12),%d3
POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) {
48a4a: 2803 movel %d3,%d4 48a4c: 0284 0000 0200 andil #512,%d4 48a52: 6600 0086 bnew 48ada <sem_open+0xae> 48a56: 95ca subal %a2,%a2
mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
48a58: 486e fffc pea %fp@(-4) 48a5c: 2f05 movel %d5,%sp@- 48a5e: 4eb9 0004 f0e0 jsr 4f0e0 <_POSIX_Semaphore_Name_to_id>
* and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) {
48a64: 508f addql #8,%sp
mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
48a66: 2400 movel %d0,%d2
* and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) {
48a68: 6726 beqs 48a90 <sem_open+0x64>
/* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
48a6a: 7002 moveq #2,%d0 48a6c: b082 cmpl %d2,%d0 48a6e: 6604 bnes 48a74 <sem_open+0x48> 48a70: 4a84 tstl %d4 48a72: 666e bnes 48ae2 <sem_open+0xb6>
_Thread_Enable_dispatch();
48a74: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
48a7a: 4eb9 0005 2bbc jsr 52bbc <__errno> 48a80: 2040 moveal %d0,%a0 48a82: 70ff moveq #-1,%d0 48a84: 2082 movel %d2,%a0@
id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; }
48a86: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 48a8c: 4e5e unlk %fp 48a8e: 4e75 rts
/* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
48a90: 0283 0000 0a00 andil #2560,%d3 48a96: 0c83 0000 0a00 cmpil #2560,%d3 48a9c: 676e beqs 48b0c <sem_open+0xe0> 48a9e: 486e fff4 pea %fp@(-12)
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch();
48aa2: 45f9 0004 b464 lea 4b464 <_Thread_Enable_dispatch>,%a2 48aa8: 2f2e fffc movel %fp@(-4),%sp@- 48aac: 4879 0006 41fa pea 641fa <_POSIX_Semaphore_Information> 48ab2: 4eb9 0004 ab84 jsr 4ab84 <_Objects_Get>
_Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1;
48ab8: 2040 moveal %d0,%a0 48aba: 52a8 0016 addql #1,%a0@(22)
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
48abe: 2d40 fff8 movel %d0,%fp@(-8)
the_semaphore->open_count += 1; _Thread_Enable_dispatch();
48ac2: 4e92 jsr %a2@
_Thread_Enable_dispatch();
48ac4: 4e92 jsr %a2@
return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id;
48ac6: 202e fff8 movel %fp@(-8),%d0
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); goto return_id;
48aca: 4fef 000c lea %sp@(12),%sp
return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id;
48ace: 5080 addql #8,%d0
#endif return id; }
48ad0: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 48ad6: 4e5e unlk %fp 48ad8: 4e75 rts
_Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int );
48ada: 246e 0014 moveal %fp@(20),%a2 48ade: 6000 ff78 braw 48a58 <sem_open+0x2c>
/* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support(
48ae2: 486e fff8 pea %fp@(-8) 48ae6: 2f0a movel %a2,%sp@- 48ae8: 42a7 clrl %sp@- 48aea: 2f05 movel %d5,%sp@- 48aec: 4eb9 0004 ef28 jsr 4ef28 <_POSIX_Semaphore_Create_support> 48af2: 2400 movel %d0,%d2
/* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch();
48af4: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch>
if ( status == -1 )
48afa: 4fef 0010 lea %sp@(16),%sp 48afe: 70ff moveq #-1,%d0 48b00: b082 cmpl %d2,%d0 48b02: 6782 beqs 48a86 <sem_open+0x5a>
return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id;
48b04: 202e fff8 movel %fp@(-8),%d0 48b08: 5080 addql #8,%d0 48b0a: 60c4 bras 48ad0 <sem_open+0xa4>
/* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch();
48b0c: 4eb9 0004 b464 jsr 4b464 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
48b12: 4eb9 0005 2bbc jsr 52bbc <__errno> 48b18: 7211 moveq #17,%d1 48b1a: 2040 moveal %d0,%a0 48b1c: 70ff moveq #-1,%d0
id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; }
48b1e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2
* Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
48b24: 2081 movel %d1,%a0@
id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; }
48b26: 4e5e unlk %fp 48b28: 4e75 rts
... 00048b84 <sem_timedwait>: int sem_timedwait( sem_t *sem, const struct timespec *abstime ) {
48b84: 4e56 fffc linkw %fp,#-4 48b88: 2f02 movel %d2,%sp@-
* * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
48b8a: 486e fffc pea %fp@(-4) 48b8e: 2f2e 000c movel %fp@(12),%sp@-
int sem_timedwait( sem_t *sem, const struct timespec *abstime ) {
48b92: 242e 0008 movel %fp@(8),%d2
* * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
48b96: 4eb9 0004 e4f4 jsr 4e4f4 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
48b9c: 508f addql #8,%sp 48b9e: 7203 moveq #3,%d1 48ba0: b280 cmpl %d0,%d1 48ba2: 671a beqs 48bbe <sem_timedwait+0x3a>
do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
48ba4: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 48ba8: 42a7 clrl %sp@- <== NOT EXECUTED 48baa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48bac: 4eb9 0004 f158 jsr 4f158 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
break; } } return lock_status; }
48bb2: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
*/ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
48bb6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
break; } } return lock_status; }
48bba: 4e5e unlk %fp <== NOT EXECUTED 48bbc: 4e75 rts <== NOT EXECUTED
*/ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
48bbe: 2f2e fffc movel %fp@(-4),%sp@- 48bc2: 4878 0001 pea 1 <ADD> 48bc6: 2f02 movel %d2,%sp@- 48bc8: 4eb9 0004 f158 jsr 4f158 <_POSIX_Semaphore_Wait_support>
break; } } return lock_status; }
48bce: 242e fff8 movel %fp@(-8),%d2
*/ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
48bd2: 4fef 000c lea %sp@(12),%sp
break; } } return lock_status; }
48bd6: 4e5e unlk %fp 48bd8: 4e75 rts
... 00048bdc <sem_trywait>: */ int sem_trywait( sem_t *sem ) {
48bdc: 4e56 0000 linkw %fp,#0
return _POSIX_Semaphore_Wait_support(sem, false, THREAD_QUEUE_WAIT_FOREVER);
48be0: 42a7 clrl %sp@- 48be2: 42a7 clrl %sp@- 48be4: 2f2e 0008 movel %fp@(8),%sp@- 48be8: 4eb9 0004 f158 jsr 4f158 <_POSIX_Semaphore_Wait_support>
}
48bee: 4e5e unlk %fp 48bf0: 4e75 rts
... 00067306 <setgid>: gid_t gid ) { _POSIX_types_Gid = gid; return 0; }
67306: 4280 clrl %d0 <== NOT EXECUTED
*/ int setgid( gid_t gid ) {
67308: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
_POSIX_types_Gid = gid;
6730c: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED 67312: 316e 000a 0034 movew %fp@(10),%a0@(52) <== NOT EXECUTED
return 0; }
67318: 4e5e unlk %fp <== NOT EXECUTED
6731a: 4e75 rts
00067864 <setgrent>: return NULL; return &grent; } void setgrent(void) {
67864: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
init_etc_passwd_group();
67868: 4eb9 0006 775a jsr 6775a <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
6786e: 2039 000a 60de movel a60de <group_fp>,%d0 <== NOT EXECUTED 67874: 670a beqs 67880 <setgrent+0x1c> <== NOT EXECUTED
fclose(group_fp);
67876: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67878: 4eb9 0008 0fa2 jsr 80fa2 <fclose> <== NOT EXECUTED 6787e: 588f addql #4,%sp <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
67880: 4879 0009 a41b pea 9a41b <rtems_bdpart_shell_usage+0x69f> <== NOT EXECUTED 67886: 4879 0009 8cf5 pea 98cf5 <_rodata_start+0x845> <== NOT EXECUTED 6788c: 4eb9 0008 1808 jsr 81808 <fopen> <== NOT EXECUTED 67892: 508f addql #8,%sp <== NOT EXECUTED
}
67894: 4e5e unlk %fp <== NOT EXECUTED
{ init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r");
67896: 23c0 000a 60de movel %d0,a60de <group_fp> <== NOT EXECUTED
}
6789c: 4e75 rts
00045a8c <setitimer>: int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) {
45a8c: 4e56 0000 linkw %fp,#0
if ( !value )
45a90: 4aae 000c tstl %fp@(12) 45a94: 6732 beqs 45ac8 <setitimer+0x3c>
rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue )
45a96: 4aae 0010 tstl %fp@(16) 45a9a: 672c beqs 45ac8 <setitimer+0x3c>
rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) {
45a9c: 7002 moveq #2,%d0 45a9e: b0ae 0008 cmpl %fp@(8),%d0 45aa2: 6412 bccs 45ab6 <setitimer+0x2a>
case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL );
45aa4: 4eb9 0004 f3dc jsr 4f3dc <__errno>
}
45aaa: 4e5e unlk %fp
case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL );
45aac: 2040 moveal %d0,%a0 45aae: 7016 moveq #22,%d0 45ab0: 2080 movel %d0,%a0@
}
45ab2: 70ff moveq #-1,%d0 45ab4: 4e75 rts
switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS );
45ab6: 4eb9 0004 f3dc jsr 4f3dc <__errno> 45abc: 7258 moveq #88,%d1 45abe: 2040 moveal %d0,%a0
default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
45ac0: 70ff moveq #-1,%d0 45ac2: 4e5e unlk %fp
switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS );
45ac4: 2081 movel %d1,%a0@
default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
45ac6: 4e75 rts
{ if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) rtems_set_errno_and_return_minus_one( EFAULT );
45ac8: 4eb9 0004 f3dc jsr 4f3dc <__errno>
rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
45ace: 4e5e unlk %fp
{ if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) rtems_set_errno_and_return_minus_one( EFAULT );
45ad0: 2040 moveal %d0,%a0 45ad2: 700e moveq #14,%d0 45ad4: 2080 movel %d0,%a0@
rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
45ad6: 70ff moveq #-1,%d0 45ad8: 4e75 rts
... 00067a2e <setpwent>: return NULL; return &pwent; } void setpwent(void) {
67a2e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
init_etc_passwd_group();
67a32: 4eb9 0006 775a jsr 6775a <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
67a38: 2039 000a 5ff6 movel a5ff6 <passwd_fp>,%d0 <== NOT EXECUTED 67a3e: 670a beqs 67a4a <setpwent+0x1c> <== NOT EXECUTED
fclose(passwd_fp);
67a40: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67a42: 4eb9 0008 0fa2 jsr 80fa2 <fclose> <== NOT EXECUTED 67a48: 588f addql #4,%sp <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
67a4a: 4879 0009 a41b pea 9a41b <rtems_bdpart_shell_usage+0x69f> <== NOT EXECUTED 67a50: 4879 0009 8cb0 pea 98cb0 <_rodata_start+0x800> <== NOT EXECUTED 67a56: 4eb9 0008 1808 jsr 81808 <fopen> <== NOT EXECUTED 67a5c: 508f addql #8,%sp <== NOT EXECUTED
}
67a5e: 4e5e unlk %fp <== NOT EXECUTED
{ init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r");
67a60: 23c0 000a 5ff6 movel %d0,a5ff6 <passwd_fp> <== NOT EXECUTED
}
67a66: 4e75 rts
000468d6 <setuid>: uid_t uid ) { _POSIX_types_Uid = uid; return 0; }
468d6: 4280 clrl %d0 <== NOT EXECUTED
*/ int setuid( uid_t uid ) {
468d8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
_POSIX_types_Uid = uid;
468dc: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 <== NOT EXECUTED 468e2: 316e 000a 0032 movew %fp@(10),%a0@(50) <== NOT EXECUTED
return 0; }
468e8: 4e5e unlk %fp <== NOT EXECUTED
468ea: 4e75 rts
0004672c <sigaddset>: int sigaddset( sigset_t *set, int signo ) {
4672c: 4e56 0000 linkw %fp,#0 46730: 206e 0008 moveal %fp@(8),%a0 46734: 202e 000c movel %fp@(12),%d0 46738: 2f02 movel %d2,%sp@-
if ( !set )
4673a: 4a88 tstl %a0 4673c: 671e beqs 4675c <sigaddset+0x30>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo )
4673e: 4a80 tstl %d0 46740: 671a beqs 4675c <sigaddset+0x30> 46742: 2400 movel %d0,%d2 46744: 5382 subql #1,%d2
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) )
46746: 701f moveq #31,%d0 46748: b082 cmpl %d2,%d0 4674a: 6510 bcss 4675c <sigaddset+0x30>
rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo);
4674c: 7201 moveq #1,%d1 4674e: 4280 clrl %d0 46750: e5a9 lsll %d2,%d1
return 0; }
46752: 242e fffc movel %fp@(-4),%d2 46756: 4e5e unlk %fp
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo);
46758: 8390 orl %d1,%a0@
return 0; }
4675a: 4e75 rts
if ( !signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL );
4675c: 4eb9 0004 fbec jsr 4fbec <__errno>
*set |= signo_to_mask(signo); return 0; }
46762: 242e fffc movel %fp@(-4),%d2
if ( !signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL );
46766: 2040 moveal %d0,%a0 46768: 7216 moveq #22,%d1 4676a: 70ff moveq #-1,%d0
*set |= signo_to_mask(signo); return 0; }
4676c: 4e5e unlk %fp
if ( !signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL );
4676e: 2081 movel %d1,%a0@
*set |= signo_to_mask(signo); return 0; }
46770: 4e75 rts
... 0004b474 <sigemptyset>: #include <rtems/seterr.h> int sigemptyset( sigset_t *set ) {
4b474: 4e56 0000 linkw %fp,#0 4b478: 206e 0008 moveal %fp@(8),%a0
if ( !set )
4b47c: 4a88 tstl %a0 4b47e: 6708 beqs 4b488 <sigemptyset+0x14>
rtems_set_errno_and_return_minus_one( EINVAL ); *set = 0;
4b480: 4280 clrl %d0
return 0; }
4b482: 4e5e unlk %fp
) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); *set = 0;
4b484: 4290 clrl %a0@
return 0; }
4b486: 4e75 rts
int sigemptyset( sigset_t *set ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL );
4b488: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4b48e: 7216 moveq #22,%d1 4b490: 2040 moveal %d0,%a0 4b492: 70ff moveq #-1,%d0
*set = 0; return 0; }
4b494: 4e5e unlk %fp
int sigemptyset( sigset_t *set ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL );
4b496: 2081 movel %d1,%a0@
*set = 0; return 0; }
4b498: 4e75 rts
... 00046410 <signal>: sighandler_t signal( int signum, sighandler_t handler ) {
46410: 4e56 ffe8 linkw %fp,#-24
struct sigaction s; struct sigaction old; s.sa_handler = handler ;
46414: 2d6e 000c fffc movel %fp@(12),%fp@(-4)
sigemptyset(&s.sa_mask);
4641a: 486e fff8 pea %fp@(-8) 4641e: 4eb9 0004 63e8 jsr 463e8 <sigemptyset>
s.sa_flags = SA_RESTART; #else s.sa_flags = 0; #endif sigaction( signum, &s, &old );
46424: 486e ffe8 pea %fp@(-24) 46428: 486e fff4 pea %fp@(-12) 4642c: 2f2e 0008 movel %fp@(8),%sp@-
s.sa_flags = SA_RESTART | SA_INTERRUPT | SA_NOMASK; s.sa_restorer= NULL ; #elif defined(signal_like_SVR4) s.sa_flags = SA_RESTART; #else s.sa_flags = 0;
46430: 42ae fff4 clrl %fp@(-12)
#endif sigaction( signum, &s, &old );
46434: 4eb9 0004 62dc jsr 462dc <sigaction>
return (sighandler_t) old.sa_handler; }
4643a: 202e fff0 movel %fp@(-16),%d0 4643e: 4e5e unlk %fp 46440: 4e75 rts
... 0004679c <sigpending>: #include <rtems/seterr.h> int sigpending( sigset_t *set ) {
4679c: 4e56 0000 linkw %fp,#0 467a0: 206e 0008 moveal %fp@(8),%a0
POSIX_API_Control *api; if ( !set )
467a4: 4a88 tstl %a0 467a6: 671c beqs 467c4 <sigpending+0x28>
rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending;
467a8: 2279 0006 0f1e moveal 60f1e <_Thread_Executing>,%a1 467ae: 4280 clrl %d0
return 0; }
467b0: 4e5e unlk %fp
if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending;
467b2: 2239 0006 1506 movel 61506 <_POSIX_signals_Pending>,%d1 467b8: 2269 010e moveal %a1@(270),%a1 467bc: 82a9 00d0 orl %a1@(208),%d1 467c0: 2081 movel %d1,%a0@
return 0; }
467c2: 4e75 rts
) { POSIX_API_Control *api; if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL );
467c4: 4eb9 0004 fbec jsr 4fbec <__errno> 467ca: 7216 moveq #22,%d1 467cc: 2040 moveal %d0,%a0 467ce: 70ff moveq #-1,%d0
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending; return 0; }
467d0: 4e5e unlk %fp
) { POSIX_API_Control *api; if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL );
467d2: 2081 movel %d1,%a0@
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending; return 0; }
467d4: 4e75 rts
... 00048b58 <sigqueue>: int sigqueue( pid_t pid, int signo, const union sigval value ) {
48b58: 4e56 0000 linkw %fp,#0
return killinfo( pid, signo, &value );
48b5c: 486e 0010 pea %fp@(16) 48b60: 2f2e 000c movel %fp@(12),%sp@- 48b64: 2f2e 0008 movel %fp@(8),%sp@- 48b68: 4eb9 0004 e7c8 jsr 4e7c8 <killinfo>
}
48b6e: 4e5e unlk %fp 48b70: 4e75 rts
... 00048b74 <sigsuspend>: #include <rtems/seterr.h> int sigsuspend( const sigset_t *sigmask ) {
48b74: 4e56 ffec linkw %fp,#-20 48b78: 48d7 040c moveml %d2-%d3/%a2,%sp@
int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
48b7c: 240e movel %fp,%d2 48b7e: 5982 subql #4,%d2 48b80: 45f9 0004 8b4c lea 48b4c <sigprocmask>,%a2
(void) sigfillset( &all_signals );
48b86: 260e movel %fp,%d3 48b88: 5183 subql #8,%d3
int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
48b8a: 2f02 movel %d2,%sp@- 48b8c: 2f2e 0008 movel %fp@(8),%sp@- 48b90: 4878 0001 pea 1 <ADD> 48b94: 4e92 jsr %a2@
(void) sigfillset( &all_signals );
48b96: 2f03 movel %d3,%sp@- 48b98: 4eb9 0004 8aa8 jsr 48aa8 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
48b9e: 42a7 clrl %sp@- 48ba0: 42a7 clrl %sp@- 48ba2: 2f03 movel %d3,%sp@- 48ba4: 4eb9 0004 8c30 jsr 48c30 <sigtimedwait> 48baa: 2600 movel %d0,%d3
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
48bac: 42a7 clrl %sp@- 48bae: 2f02 movel %d2,%sp@- 48bb0: 42a7 clrl %sp@- 48bb2: 4e92 jsr %a2@
/* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 )
48bb4: 4fef 0028 lea %sp@(40),%sp 48bb8: 70ff moveq #-1,%d0 48bba: b083 cmpl %d3,%d0 48bbc: 660c bnes 48bca <sigsuspend+0x56>
rtems_set_errno_and_return_minus_one( EINTR ); return status; }
48bbe: 70ff moveq #-1,%d0 <== NOT EXECUTED 48bc0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 48bc6: 4e5e unlk %fp <== NOT EXECUTED 48bc8: 4e75 rts <== NOT EXECUTED
/* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR );
48bca: 4eb9 0005 1e84 jsr 51e84 <__errno> 48bd0: 2040 moveal %d0,%a0 48bd2: 7004 moveq #4,%d0
return status; }
48bd4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
/* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR );
48bda: 2080 movel %d0,%a0@
return status; }
48bdc: 70ff moveq #-1,%d0 48bde: 4e5e unlk %fp 48be0: 4e75 rts
... 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
442ce: 4e75 rts
00047c18 <stat>: int _STAT_NAME( const char *path, struct stat *buf ) {
47c18: 4e56 ffe0 linkw %fp,#-32 47c1c: 48d7 001c moveml %d2-%d4,%sp@ 47c20: 262e 0008 movel %fp@(8),%d3 47c24: 242e 000c movel %fp@(12),%d2
/* * Check to see if we were passed a valid pointer. */ if ( !buf )
47c28: 6700 0088 beqw 47cb2 <stat+0x9a>
rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ),
47c2c: 2f03 movel %d3,%sp@- 47c2e: 280e movel %fp,%d4 47c30: 0684 ffff ffec addil #-20,%d4 47c36: 4eb9 0008 6f0c jsr 86f0c <strlen> 47c3c: 7201 moveq #1,%d1 47c3e: 2e81 movel %d1,%sp@ 47c40: 2f04 movel %d4,%sp@- 47c42: 42a7 clrl %sp@- 47c44: 2f00 movel %d0,%sp@- 47c46: 2f03 movel %d3,%sp@- 47c48: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 )
47c4e: 4fef 0014 lea %sp@(20),%sp 47c52: 4a80 tstl %d0 47c54: 664e bnes 47ca4 <stat+0x8c>
return -1; if ( !loc.handlers->fstat_h ){
47c56: 206e fff4 moveal %fp@(-12),%a0 47c5a: 4aa8 0018 tstl %a0@(24) 47c5e: 676c beqs 47ccc <stat+0xb4>
/* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) );
47c60: 4878 0046 pea 46 <DBL_MANT_DIG+0x11> 47c64: 42a7 clrl %sp@- 47c66: 2f02 movel %d2,%sp@- 47c68: 4eb9 0008 4008 jsr 84008 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
47c6e: 2f02 movel %d2,%sp@- 47c70: 2f04 movel %d4,%sp@- 47c72: 206e fff4 moveal %fp@(-12),%a0 47c76: 2068 0018 moveal %a0@(24),%a0 47c7a: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
47c7c: 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 );
47c80: 2400 movel %d0,%d2
rtems_filesystem_freenode( &loc );
47c82: 4fef 0014 lea %sp@(20),%sp 47c86: 4a88 tstl %a0 47c88: 670e beqs 47c98 <stat+0x80> 47c8a: 2068 001c moveal %a0@(28),%a0 47c8e: 4a88 tstl %a0 47c90: 6706 beqs 47c98 <stat+0x80> 47c92: 2f04 movel %d4,%sp@- 47c94: 4e90 jsr %a0@ 47c96: 588f addql #4,%sp
return status; }
47c98: 2002 movel %d2,%d0 47c9a: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 47ca0: 4e5e unlk %fp 47ca2: 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 )
47ca4: 74ff moveq #-1,%d2
status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; }
47ca6: 2002 movel %d2,%d0 47ca8: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 47cae: 4e5e unlk %fp 47cb0: 4e75 rts
/* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT );
47cb2: 4eb9 0008 0e64 jsr 80e64 <__errno> 47cb8: 74ff moveq #-1,%d2 47cba: 760e moveq #14,%d3 47cbc: 2040 moveal %d0,%a0
status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; }
47cbe: 2002 movel %d2,%d0
/* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT );
47cc0: 2083 movel %d3,%a0@
status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; }
47cc2: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 47cc8: 4e5e unlk %fp 47cca: 4e75 rts
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc );
47ccc: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 47cd0: 4a88 tstl %a0 <== NOT EXECUTED 47cd2: 670e beqs 47ce2 <stat+0xca> <== NOT EXECUTED 47cd4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 47cd8: 4a88 tstl %a0 <== NOT EXECUTED 47cda: 6706 beqs 47ce2 <stat+0xca> <== NOT EXECUTED 47cdc: 2f04 movel %d4,%sp@- <== NOT EXECUTED 47cde: 4e90 jsr %a0@ <== NOT EXECUTED 47ce0: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
47ce2: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 47ce8: 74ff moveq #-1,%d2 <== NOT EXECUTED 47cea: 2040 moveal %d0,%a0 <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; }
47cec: 2002 movel %d2,%d0 <== NOT EXECUTED 47cee: 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 );
47cf4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; }
47cfa: 4e5e unlk %fp <== NOT EXECUTED
47cfc: 4e75 rts
000689d4 <statvfs>: */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) {
689d4: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 689d8: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 689dc: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
* The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
689e0: 260e movel %fp,%d3 <== NOT EXECUTED 689e2: 0683 ffff ffec addil #-20,%d3 <== NOT EXECUTED 689e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
*/ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) {
689ea: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED
* The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
689ee: 4eb9 0008 6f0c jsr 86f0c <strlen> <== NOT EXECUTED 689f4: 7201 moveq #1,%d1 <== NOT EXECUTED 689f6: 2e81 movel %d1,%sp@ <== NOT EXECUTED 689f8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 689fa: 42a7 clrl %sp@- <== NOT EXECUTED 689fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 689fe: 2f02 movel %d2,%sp@- <== NOT EXECUTED 68a00: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path> <== NOT EXECUTED 68a06: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 68a0a: 4a80 tstl %d0 <== NOT EXECUTED 68a0c: 6662 bnes 68a70 <statvfs+0x9c> <== NOT EXECUTED
return -1; mt_entry = loc.mt_entry;
68a0e: 226e fffc moveal %fp@(-4),%a1 <== NOT EXECUTED
fs_mount_root = &mt_entry->mt_fs_root;
68a12: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 68a16: 4aa8 0044 tstl %a0@(68) <== NOT EXECUTED 68a1a: 6762 beqs 68a7e <statvfs+0xaa> <== NOT EXECUTED
if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs));
68a1c: 2044 moveal %d4,%a0 <== NOT EXECUTED 68a1e: 4298 clrl %a0@+ <== NOT EXECUTED 68a20: 4298 clrl %a0@+ <== NOT EXECUTED 68a22: 4298 clrl %a0@+ <== NOT EXECUTED 68a24: 4298 clrl %a0@+ <== NOT EXECUTED 68a26: 4298 clrl %a0@+ <== NOT EXECUTED 68a28: 4298 clrl %a0@+ <== NOT EXECUTED 68a2a: 4298 clrl %a0@+ <== NOT EXECUTED 68a2c: 4298 clrl %a0@+ <== NOT EXECUTED 68a2e: 4298 clrl %a0@+ <== NOT EXECUTED 68a30: 4298 clrl %a0@+ <== NOT EXECUTED 68a32: 4298 clrl %a0@+ <== NOT EXECUTED 68a34: 4298 clrl %a0@+ <== NOT EXECUTED 68a36: 4298 clrl %a0@+ <== NOT EXECUTED 68a38: 4290 clrl %a0@ <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
68a3a: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 68a3e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 68a40: 4869 001c pea %a1@(28) <== NOT EXECUTED 68a44: 2068 0044 moveal %a0@(68),%a0 <== NOT EXECUTED 68a48: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
68a4a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED
if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
68a4e: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
68a50: 508f addql #8,%sp <== NOT EXECUTED 68a52: 4a88 tstl %a0 <== NOT EXECUTED 68a54: 670e beqs 68a64 <statvfs+0x90> <== NOT EXECUTED 68a56: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 68a5a: 4a88 tstl %a0 <== NOT EXECUTED 68a5c: 6706 beqs 68a64 <statvfs+0x90> <== NOT EXECUTED 68a5e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68a60: 4e90 jsr %a0@ <== NOT EXECUTED 68a62: 588f addql #4,%sp <== NOT EXECUTED
return result; }
68a64: 2002 movel %d2,%d0 <== NOT EXECUTED 68a66: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68a6c: 4e5e unlk %fp <== NOT EXECUTED 68a6e: 4e75 rts <== NOT EXECUTED
* The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
68a70: 74ff moveq #-1,%d2 <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; }
68a72: 2002 movel %d2,%d0 <== NOT EXECUTED 68a74: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68a7a: 4e5e unlk %fp <== NOT EXECUTED 68a7c: 4e75 rts <== NOT EXECUTED
mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
68a7e: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 68a84: 74ff moveq #-1,%d2 <== NOT EXECUTED 68a86: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; }
68a88: 2002 movel %d2,%d0 <== NOT EXECUTED 68a8a: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED
mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
68a90: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; }
68a96: 4e5e unlk %fp <== NOT EXECUTED 68a98: 4e75 rts <== NOT EXECUTED
... 00068a9c <symlink>: int symlink( const char *actualpath, const char *sympath ) {
68a9c: 4e56 ffe8 linkw %fp,#-24 68aa0: 226e 000c moveal %fp@(12),%a1 68aa4: 2f0a movel %a2,%sp@- 68aa6: 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 );
68aa8: 742f moveq #47,%d2 68aaa: 1211 moveb %a1@,%d1 68aac: 1001 moveb %d1,%d0 68aae: 49c0 extbl %d0 68ab0: b480 cmpl %d0,%d2 68ab2: 670e beqs 68ac2 <symlink+0x26> 68ab4: 143c 005c moveb #92,%d2 68ab8: b480 cmpl %d0,%d2 68aba: 6706 beqs 68ac2 <symlink+0x26> 68abc: 4a01 tstb %d1 68abe: 6600 0092 bnew 68b52 <symlink+0xb6> 68ac2: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 68ac8: 45ee ffe8 lea %fp@(-24),%a2 68acc: 7001 moveq #1,%d0 68ace: 24a8 0018 movel %a0@(24),%a2@ 68ad2: 2d68 001c ffec movel %a0@(28),%fp@(-20) 68ad8: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 68ade: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 68ae4: 2d68 0028 fff8 movel %a0@(40),%fp@(-8)
if ( !loc.ops->evalformake_h ) {
68aea: 206e fff4 moveal %fp@(-12),%a0 68aee: 2068 0004 moveal %a0@(4),%a0 68af2: 4a88 tstl %a0 68af4: 6700 008a beqw 68b80 <symlink+0xe4>
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
68af8: 486e fffc pea %fp@(-4) 68afc: 2f0a movel %a2,%sp@- 68afe: 4871 0800 pea %a1@(00000000,%d0:l) 68b02: 4e90 jsr %a0@
if ( result != 0 )
68b04: 4fef 000c lea %sp@(12),%sp 68b08: 4a80 tstl %d0 68b0a: 6600 0092 bnew 68b9e <symlink+0x102>
return -1; if ( !loc.ops->symlink_h ) {
68b0e: 226e fff4 moveal %fp@(-12),%a1 68b12: 2069 0038 moveal %a1@(56),%a0 68b16: 4a88 tstl %a0 68b18: 6700 0094 beqw 68bae <symlink+0x112>
rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
68b1c: 2f2e fffc movel %fp@(-4),%sp@- 68b20: 2f2e 0008 movel %fp@(8),%sp@- 68b24: 2f0a movel %a2,%sp@- 68b26: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
68b28: 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);
68b2c: 2400 movel %d0,%d2
rtems_filesystem_freenode( &loc );
68b2e: 4fef 000c lea %sp@(12),%sp 68b32: 4a88 tstl %a0 68b34: 670e beqs 68b44 <symlink+0xa8> 68b36: 2068 001c moveal %a0@(28),%a0 68b3a: 4a88 tstl %a0 68b3c: 6706 beqs 68b44 <symlink+0xa8> 68b3e: 2f0a movel %a2,%sp@- 68b40: 4e90 jsr %a0@ 68b42: 588f addql #4,%sp
return result; }
68b44: 2002 movel %d2,%d0 68b46: 242e ffe0 movel %fp@(-32),%d2 68b4a: 246e ffe4 moveal %fp@(-28),%a2 68b4e: 4e5e unlk %fp 68b50: 4e75 rts
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
68b52: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 68b58: 45ee ffe8 lea %fp@(-24),%a2 68b5c: 5888 addql #4,%a0 68b5e: 4280 clrl %d0 68b60: 2498 movel %a0@+,%a2@ 68b62: 2d58 ffec movel %a0@+,%fp@(-20) 68b66: 2d58 fff0 movel %a0@+,%fp@(-16) 68b6a: 2d58 fff4 movel %a0@+,%fp@(-12) 68b6e: 2d50 fff8 movel %a0@,%fp@(-8)
if ( !loc.ops->evalformake_h ) {
68b72: 206e fff4 moveal %fp@(-12),%a0 68b76: 2068 0004 moveal %a0@(4),%a0 68b7a: 4a88 tstl %a0 68b7c: 6600 ff7a bnew 68af8 <symlink+0x5c>
if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP );
68b80: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 68b86: 74ff moveq #-1,%d2 <== NOT EXECUTED 68b88: 2040 moveal %d0,%a0 <== NOT EXECUTED 68b8a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; }
68b90: 2002 movel %d2,%d0 <== NOT EXECUTED 68b92: 242e ffe0 movel %fp@(-32),%d2 <== NOT EXECUTED 68b96: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED 68b9a: 4e5e unlk %fp <== NOT EXECUTED 68b9c: 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 )
68b9e: 74ff moveq #-1,%d2
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; }
68ba0: 2002 movel %d2,%d0 68ba2: 242e ffe0 movel %fp@(-32),%d2 68ba6: 246e ffe4 moveal %fp@(-28),%a2 68baa: 4e5e unlk %fp 68bac: 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 );
68bae: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 68bb2: 4a88 tstl %a0 <== NOT EXECUTED 68bb4: 67ca beqs 68b80 <symlink+0xe4> <== NOT EXECUTED 68bb6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
68bb8: 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 );
68bba: 4e90 jsr %a0@ <== NOT EXECUTED 68bbc: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
68bbe: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 68bc4: 2040 moveal %d0,%a0 <== NOT EXECUTED 68bc6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 68bcc: 60c2 bras 68b90 <symlink+0xf4> <== NOT EXECUTED
... 00045814 <sysconf>: long sysconf( int name ) { if ( name == _SC_CLK_TCK )
45814: 7002 moveq #2,%d0
*/ long sysconf( int name ) {
45816: 4e56 0000 linkw %fp,#0 4581a: 222e 0008 movel %fp@(8),%d1 4581e: 2f02 movel %d2,%sp@-
if ( name == _SC_CLK_TCK )
45820: b081 cmpl %d1,%d0 45822: 6726 beqs 4584a <sysconf+0x36>
return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX )
45824: 7004 moveq #4,%d0 45826: b081 cmpl %d1,%d0 45828: 6738 beqs 45862 <sysconf+0x4e>
return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX )
4582a: 203c 0000 0400 movel #1024,%d0 45830: 7433 moveq #51,%d2 45832: b481 cmpl %d1,%d2 45834: 670c beqs 45842 <sysconf+0x2e>
return 1024; if ( name == _SC_PAGESIZE )
45836: 143c 0008 moveb #8,%d2 4583a: 303c 1000 movew #4096,%d0 4583e: b481 cmpl %d1,%d2 45840: 662e bnes 45870 <sysconf+0x5c>
if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); }
45842: 242e fffc movel %fp@(-4),%d2 45846: 4e5e unlk %fp 45848: 4e75 rts
long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND /
4584a: 41f9 0005 ddf4 lea 5ddf4 <Configuration+0xc>,%a0 45850: 203c 000f 4240 movel #1000000,%d0
if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); }
45856: 242e fffc movel %fp@(-4),%d2 4585a: 4e5e unlk %fp
long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND /
4585c: 4c50 0000 remul %a0@,%d0,%d0
if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); }
45860: 4e75 rts 45862: 242e fffc movel %fp@(-4),%d2 45866: 4e5e unlk %fp
if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops;
45868: 2039 0005 dd14 movel 5dd14 <rtems_libio_number_iops>,%d0
if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); }
4586e: 4e75 rts
#if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL );
45870: 4eb9 0004 f188 jsr 4f188 <__errno>
}
45876: 242e fffc movel %fp@(-4),%d2
#if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL );
4587a: 2040 moveal %d0,%a0 4587c: 7216 moveq #22,%d1 4587e: 70ff moveq #-1,%d0
}
45880: 4e5e unlk %fp
#if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL );
45882: 2081 movel %d1,%a0@
}
45884: 4e75 rts
... 00052d88 <tcgetattr>: int tcgetattr( int fd, struct termios *tp ) {
52d88: 4e56 0000 linkw %fp,#0
return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp );
52d8c: 2f2e 000c movel %fp@(12),%sp@- 52d90: 4878 0001 pea 1 <ADD> 52d94: 2f2e 0008 movel %fp@(8),%sp@- 52d98: 4eb9 0005 6974 jsr 56974 <ioctl>
}
52d9e: 4e5e unlk %fp 52da0: 4e75 rts
... 00052da4 <tcsetattr>: int tcsetattr( int fd, int opt, struct termios *tp ) {
52da4: 4e56 0000 linkw %fp,#0 52da8: 202e 000c movel %fp@(12),%d0 52dac: 2f03 movel %d3,%sp@- 52dae: 262e 0010 movel %fp@(16),%d3 52db2: 2f02 movel %d2,%sp@- 52db4: 242e 0008 movel %fp@(8),%d2
switch (opt) {
52db8: 4a80 tstl %d0 52dba: 6738 beqs 52df4 <tcsetattr+0x50>
52dbc: 7201 moveq #1,%d1 <== NOT EXECUTED 52dbe: b280 cmpl %d0,%d1 <== NOT EXECUTED 52dc0: 671c beqs 52dde <tcsetattr+0x3a> <== NOT EXECUTED
default: rtems_set_errno_and_return_minus_one( ENOTSUP );
52dc2: 4eb9 0005 8134 jsr 58134 <__errno> <== NOT EXECUTED 52dc8: 2040 moveal %d0,%a0 <== NOT EXECUTED 52dca: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
* Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } }
52dd0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 52dd4: 70ff moveq #-1,%d0 <== NOT EXECUTED 52dd6: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 52dda: 4e5e unlk %fp <== NOT EXECUTED 52ddc: 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)
52dde: 42a7 clrl %sp@- <== NOT EXECUTED 52de0: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 52de4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 52de6: 4eb9 0005 6974 jsr 56974 <ioctl> <== NOT EXECUTED 52dec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52df0: 4a80 tstl %d0 <== NOT EXECUTED 52df2: 6ddc blts 52dd0 <tcsetattr+0x2c> <== NOT EXECUTED
return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
52df4: 2d43 0010 movel %d3,%fp@(16) 52df8: 7002 moveq #2,%d0 52dfa: 2d42 0008 movel %d2,%fp@(8)
} }
52dfe: 242e fff8 movel %fp@(-8),%d2 52e02: 262e fffc movel %fp@(-4),%d3
return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
52e06: 2d40 000c movel %d0,%fp@(12)
} }
52e0a: 4e5e unlk %fp
return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
52e0c: 4ef9 0005 6974 jmp 56974 <ioctl>
... 000458dc <timer_create>: timer_t *timerid ) { POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME )
458dc: 7001 moveq #1,%d0
int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) {
458de: 4e56 0000 linkw %fp,#0 458e2: 2f0b movel %a3,%sp@- 458e4: 266e 0010 moveal %fp@(16),%a3 458e8: 2f0a movel %a2,%sp@- 458ea: 246e 000c moveal %fp@(12),%a2
POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME )
458ee: b0ae 0008 cmpl %fp@(8),%d0 458f2: 6600 00c4 bnew 459b8 <timer_create+0xdc>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid )
458f6: 4a8b tstl %a3 458f8: 6700 00be beqw 459b8 <timer_create+0xdc>
/* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) {
458fc: 4a8a tstl %a2 458fe: 671e beqs 4591e <timer_create+0x42>
/* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) &&
45900: 2012 movel %a2@,%d0 45902: 7201 moveq #1,%d1 45904: 5380 subql #1,%d0 45906: b280 cmpl %d0,%d1 45908: 6500 00ae bcsw 459b8 <timer_create+0xdc>
( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo )
4590c: 202a 0004 movel %a2@(4),%d0 45910: 6700 00a6 beqw 459b8 <timer_create+0xdc>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) )
45914: 5380 subql #1,%d0 45916: 721f moveq #31,%d1 45918: b280 cmpl %d0,%d1 4591a: 6500 009c bcsw 459b8 <timer_create+0xdc>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
4591e: 2039 0005 fc34 movel 5fc34 <_Thread_Dispatch_disable_level>,%d0 45924: 5280 addql #1,%d0 45926: 23c0 0005 fc34 movel %d0,5fc34 <_Thread_Dispatch_disable_level>
* the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
4592c: 4879 0005 fec8 pea 5fec8 <_POSIX_Timer_Information> 45932: 4eb9 0004 79e0 jsr 479e0 <_Objects_Allocate>
/* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) {
45938: 588f addql #4,%sp 4593a: 2040 moveal %d0,%a0 4593c: 4a80 tstl %d0 4593e: 6700 0092 beqw 459d2 <timer_create+0xf6>
rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
45942: 7002 moveq #2,%d0 45944: 1140 003c moveb %d0,%a0@(60)
ptimer->thread_id = _Thread_Executing->Object.id;
45948: 2279 0005 fcee moveal 5fcee <_Thread_Executing>,%a1 4594e: 2169 0008 0038 movel %a1@(8),%a0@(56)
if ( evp != NULL ) {
45954: 4a8a tstl %a2 45956: 6710 beqs 45968 <timer_create+0x8c>
ptimer->inf.sigev_notify = evp->sigev_notify;
45958: 2152 003e movel %a2@,%a0@(62)
ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value;
4595c: 216a 0008 0046 movel %a2@(8),%a0@(70)
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo;
45962: 216a 0004 0042 movel %a2@(4),%a0@(66)
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
45968: 2028 0008 movel %a0@(8),%d0 4596c: 4281 clrl %d1 4596e: 2279 0005 fee0 moveal 5fee0 <_POSIX_Timer_Information+0x18>,%a1 45974: 3200 movew %d0,%d1
ptimer->inf.sigev_value = evp->sigev_value; } ptimer->overrun = 0;
45976: 42a8 0066 clrl %a0@(102) 4597a: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4)
ptimer->timer_data.it_value.tv_sec = 0;
4597e: 42a8 005a clrl %a0@(90)
_Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name;
45982: 42a8 000c clrl %a0@(12)
ptimer->timer_data.it_value.tv_nsec = 0;
45986: 42a8 005e clrl %a0@(94)
ptimer->timer_data.it_interval.tv_sec = 0;
4598a: 42a8 0052 clrl %a0@(82)
ptimer->timer_data.it_interval.tv_nsec = 0;
4598e: 42a8 0056 clrl %a0@(86)
void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id;
45992: 42a8 0030 clrl %a0@(48)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
45996: 42a8 0018 clrl %a0@(24)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id;
4599a: 2680 movel %d0,%a3@
the_watchdog->routine = routine;
4599c: 42a8 002c clrl %a0@(44)
the_watchdog->id = id; the_watchdog->user_data = user_data;
459a0: 42a8 0034 clrl %a0@(52)
_Thread_Enable_dispatch();
459a4: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch>
return 0; }
459aa: 246e fff8 moveal %fp@(-8),%a2
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch();
459ae: 4280 clrl %d0
return 0; }
459b0: 266e fffc moveal %fp@(-4),%a3 459b4: 4e5e unlk %fp 459b6: 4e75 rts
if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL );
459b8: 4eb9 0004 f468 jsr 4f468 <__errno>
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; }
459be: 246e fff8 moveal %fp@(-8),%a2
if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL );
459c2: 2040 moveal %d0,%a0 459c4: 7216 moveq #22,%d1 459c6: 70ff moveq #-1,%d0
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; }
459c8: 266e fffc moveal %fp@(-4),%a3 459cc: 4e5e unlk %fp
if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL );
459ce: 2081 movel %d1,%a0@
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; }
459d0: 4e75 rts
/* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch();
459d2: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
459d8: 4eb9 0004 f468 jsr 4f468 <__errno>
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; }
459de: 246e fff8 moveal %fp@(-8),%a2
* Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN );
459e2: 2040 moveal %d0,%a0 459e4: 720b moveq #11,%d1 459e6: 70ff moveq #-1,%d0
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; }
459e8: 266e fffc moveal %fp@(-4),%a3 459ec: 4e5e unlk %fp
* Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN );
459ee: 2081 movel %d1,%a0@
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; }
459f0: 4e75 rts
... 000472a8 <timer_getoverrun>: * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) {
472a8: 4e56 fffc linkw %fp,#-4 472ac: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *)
472ae: 486e fffc pea %fp@(-4) 472b2: 2f2e 0008 movel %fp@(8),%sp@- 472b6: 4879 0006 2268 pea 62268 <_POSIX_Timer_Information> 472bc: 4eb9 0004 9624 jsr 49624 <_Objects_Get>
int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) {
472c2: 4fef 000c lea %sp@(12),%sp 472c6: 2040 moveal %d0,%a0 472c8: 4aae fffc tstl %fp@(-4) 472cc: 6718 beqs 472e6 <timer_getoverrun+0x3e>
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL );
472ce: 4eb9 0005 0c94 jsr 50c94 <__errno> 472d4: 74ff moveq #-1,%d2 472d6: 2040 moveal %d0,%a0 472d8: 7016 moveq #22,%d0 472da: 2080 movel %d0,%a0@
}
472dc: 2002 movel %d2,%d0 472de: 242e fff8 movel %fp@(-8),%d2 472e2: 4e5e unlk %fp 472e4: 4e75 rts
ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun;
472e6: 2428 0066 movel %a0@(102),%d2
ptimer->overrun = 0;
472ea: 42a8 0066 clrl %a0@(102)
_Thread_Enable_dispatch();
472ee: 4eb9 0004 9e34 jsr 49e34 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
472f4: 2002 movel %d2,%d0 472f6: 242e fff8 movel %fp@(-8),%d2 472fa: 4e5e unlk %fp 472fc: 4e75 rts
... 000459f4 <timer_settime>: timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) {
459f4: 4e56 ffc8 linkw %fp,#-56 459f8: 202e 000c movel %fp@(12),%d0 459fc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 45a00: 266e 0010 moveal %fp@(16),%a3 45a04: 282e 0014 movel %fp@(20),%d4
Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value )
45a08: 4a8b tstl %a3 45a0a: 6700 0194 beqw 45ba0 <timer_settime+0x1ac>
rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) ||
45a0e: 223c 3b9a c9ff movel #999999999,%d1 45a14: b2ab 000c cmpl %a3@(12),%d1 45a18: 6500 0186 bcsw 45ba0 <timer_settime+0x1ac>
( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
45a1c: b2ab 0004 cmpl %a3@(4),%d1 45a20: 6500 017e bcsw 45ba0 <timer_settime+0x1ac>
( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
45a24: 7204 moveq #4,%d1 45a26: b280 cmpl %d0,%d1 45a28: 6700 00fa beqw 45b24 <timer_settime+0x130> 45a2c: 4a80 tstl %d0 45a2e: 6600 0170 bnew 45ba0 <timer_settime+0x1ac>
rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value;
45a32: 260e movel %fp,%d3 45a34: 0683 ffff ffe4 addil #-28,%d3 45a3a: 204b moveal %a3,%a0 45a3c: 2243 moveal %d3,%a1 45a3e: 240e movel %fp,%d2 45a40: 0682 ffff ffe8 addil #-24,%d2 45a46: 49ee ffec lea %fp@(-20),%a4 45a4a: 4bee fff0 lea %fp@(-16),%a5 45a4e: 2298 movel %a0@+,%a1@ 45a50: 2242 moveal %d2,%a1 45a52: 2298 movel %a0@+,%a1@ 45a54: 2898 movel %a0@+,%a4@ 45a56: 2a90 movel %a0@,%a5@
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *)
45a58: 486e fffc pea %fp@(-4) 45a5c: 2f2e 0008 movel %fp@(8),%sp@- 45a60: 4879 0005 fec8 pea 5fec8 <_POSIX_Timer_Information> 45a66: 4eb9 0004 7e7c jsr 47e7c <_Objects_Get>
* something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) {
45a6c: 4fef 000c lea %sp@(12),%sp 45a70: 2440 moveal %d0,%a2 45a72: 4aae fffc tstl %fp@(-4) 45a76: 6600 0128 bnew 45ba0 <timer_settime+0x1ac>
case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
45a7a: 4aae ffec tstl %fp@(-20) 45a7e: 6608 bnes 45a88 <timer_settime+0x94> 45a80: 4aae fff0 tstl %fp@(-16) 45a84: 6700 0132 beqw 45bb8 <timer_settime+0x1c4>
_Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
45a88: 2f0b movel %a3,%sp@- 45a8a: 47f9 0004 95a4 lea 495a4 <_Timespec_To_ticks>,%a3 45a90: 4e93 jsr %a3@ 45a92: 2540 0062 movel %d0,%a2@(98)
initial_period = _Timespec_To_ticks( &normalize.it_value );
45a96: 2f0c movel %a4,%sp@- 45a98: 4e93 jsr %a3@
activated = _POSIX_Timer_Insert_helper(
45a9a: 2f0a movel %a2,%sp@- 45a9c: 4879 0004 5cc0 pea 45cc0 <_POSIX_Timer_TSR> 45aa2: 2f2a 0008 movel %a2@(8),%sp@- 45aa6: 2f00 movel %d0,%sp@- 45aa8: 486a 0010 pea %a2@(16) 45aac: 4eb9 0004 bedc jsr 4bedc <_POSIX_Timer_Insert_helper>
initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) {
45ab2: 4fef 001c lea %sp@(28),%sp 45ab6: 4a00 tstb %d0 45ab8: 6700 0166 beqw 45c20 <timer_settime+0x22c>
/* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue )
45abc: 4a84 tstl %d4 45abe: 6700 0172 beqw 45c32 <timer_settime+0x23e>
*ovalue = ptimer->timer_data;
45ac2: 220a movel %a2,%d1 45ac4: 0681 0000 0052 addil #82,%d1 45aca: 2044 moveal %d4,%a0 45acc: 2241 moveal %d1,%a1 45ace: 200a movel %a2,%d0 45ad0: 0680 0000 0056 addil #86,%d0 45ad6: 47ea 005a lea %a2@(90),%a3 45ada: 280a movel %a2,%d4 45adc: 0684 0000 005e addil #94,%d4 45ae2: 20d1 movel %a1@,%a0@+ 45ae4: 2240 moveal %d0,%a1 45ae6: 20d1 movel %a1@,%a0@+ 45ae8: 2244 moveal %d4,%a1 45aea: 20d3 movel %a3@,%a0@+ 45aec: 2091 movel %a1@,%a0@
ptimer->timer_data = normalize;
45aee: 2041 moveal %d1,%a0 45af0: 2243 moveal %d3,%a1 45af2: 2091 movel %a1@,%a0@ 45af4: 2040 moveal %d0,%a0 45af6: 2242 moveal %d2,%a1 45af8: 2091 movel %a1@,%a0@ 45afa: 2044 moveal %d4,%a0 45afc: 2694 movel %a4@,%a3@ 45afe: 2095 movel %a5@,%a0@
/* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
45b00: 7003 moveq #3,%d0 45b02: 1540 003c moveb %d0,%a2@(60)
_TOD_Get( &ptimer->time );
45b06: 486a 006a pea %a2@(106) 45b0a: 4eb9 0004 7470 jsr 47470 <_TOD_Get>
_Thread_Enable_dispatch();
45b10: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch>
return 0;
45b16: 588f addql #4,%sp
ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch();
45b18: 4280 clrl %d0
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
45b1a: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45b20: 4e5e unlk %fp 45b22: 4e75 rts
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value;
45b24: 260e movel %fp,%d3 45b26: 0683 ffff ffe4 addil #-28,%d3 45b2c: 204b moveal %a3,%a0 45b2e: 2243 moveal %d3,%a1 45b30: 240e movel %fp,%d2 45b32: 0682 ffff ffe8 addil #-24,%d2 45b38: 200e movel %fp,%d0 45b3a: 0680 ffff ffec addil #-20,%d0
/* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
45b40: 2840 moveal %d0,%a4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value;
45b42: 4bee fff0 lea %fp@(-16),%a5
/* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now );
45b46: 45ee fff4 lea %fp@(-12),%a2
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value;
45b4a: 2298 movel %a0@+,%a1@ 45b4c: 2242 moveal %d2,%a1 45b4e: 2298 movel %a0@+,%a1@ 45b50: 2898 movel %a0@+,%a4@ 45b52: 2a90 movel %a0@,%a5@
/* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now );
45b54: 2f0a movel %a2,%sp@- 45b56: 4eb9 0004 7470 jsr 47470 <_TOD_Get>
/* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
45b5c: 2f0c movel %a4,%sp@- 45b5e: 2f0a movel %a2,%sp@- 45b60: 4eb9 0004 951c jsr 4951c <_Timespec_Greater_than> 45b66: 4fef 000c lea %sp@(12),%sp 45b6a: 4a00 tstb %d0 45b6c: 6632 bnes 45ba0 <timer_settime+0x1ac>
rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
45b6e: 2f0c movel %a4,%sp@- 45b70: 2f0c movel %a4,%sp@- 45b72: 2f0a movel %a2,%sp@- 45b74: 4eb9 0004 9550 jsr 49550 <_Timespec_Subtract> 45b7a: 4fef 000c lea %sp@(12),%sp 45b7e: 486e fffc pea %fp@(-4) 45b82: 2f2e 0008 movel %fp@(8),%sp@- 45b86: 4879 0005 fec8 pea 5fec8 <_POSIX_Timer_Information> 45b8c: 4eb9 0004 7e7c jsr 47e7c <_Objects_Get>
* something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) {
45b92: 4fef 000c lea %sp@(12),%sp 45b96: 2440 moveal %d0,%a2 45b98: 4aae fffc tstl %fp@(-4) 45b9c: 6700 fedc beqw 45a7a <timer_settime+0x86>
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL );
45ba0: 4eb9 0004 f468 jsr 4f468 <__errno> 45ba6: 7216 moveq #22,%d1 45ba8: 2040 moveal %d0,%a0 45baa: 70ff moveq #-1,%d0
}
45bac: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5
#endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL );
45bb2: 2081 movel %d1,%a0@
}
45bb4: 4e5e unlk %fp 45bb6: 4e75 rts
case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer );
45bb8: 486a 0010 pea %a2@(16) 45bbc: 4eb9 0004 99f8 jsr 499f8 <_Watchdog_Remove>
/* The old data of the timer are returned */ if ( ovalue )
45bc2: 588f addql #4,%sp 45bc4: 4a84 tstl %d4 45bc6: 6700 00b6 beqw 45c7e <timer_settime+0x28a>
*ovalue = ptimer->timer_data;
45bca: 220a movel %a2,%d1 45bcc: 0681 0000 0052 addil #82,%d1 45bd2: 2244 moveal %d4,%a1 45bd4: 2041 moveal %d1,%a0 45bd6: 200a movel %a2,%d0 45bd8: 0680 0000 0056 addil #86,%d0 45bde: 47ea 005a lea %a2@(90),%a3 45be2: 280a movel %a2,%d4 45be4: 0684 0000 005e addil #94,%d4 45bea: 22d0 movel %a0@,%a1@+ 45bec: 2040 moveal %d0,%a0 45bee: 22d0 movel %a0@,%a1@+ 45bf0: 2044 moveal %d4,%a0 45bf2: 22d3 movel %a3@,%a1@+ 45bf4: 2290 movel %a0@,%a1@
/* The new data are set */ ptimer->timer_data = normalize;
45bf6: 2241 moveal %d1,%a1 45bf8: 2043 moveal %d3,%a0 45bfa: 2290 movel %a0@,%a1@ 45bfc: 2240 moveal %d0,%a1 45bfe: 2042 moveal %d2,%a0 45c00: 2290 movel %a0@,%a1@ 45c02: 2244 moveal %d4,%a1 45c04: 2694 movel %a4@,%a3@ 45c06: 2295 movel %a5@,%a1@
/* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
45c08: 7004 moveq #4,%d0 45c0a: 1540 003c moveb %d0,%a2@(60)
/* Returns with success */ _Thread_Enable_dispatch();
45c0e: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45c14: 4280 clrl %d0
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
45c16: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45c1c: 4e5e unlk %fp 45c1e: 4e75 rts
ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch();
45c20: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45c26: 4280 clrl %d0
case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); }
45c28: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45c2e: 4e5e unlk %fp 45c30: 4e75 rts 45c32: 220a movel %a2,%d1 45c34: 0681 0000 0052 addil #82,%d1
* The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize;
45c3a: 2041 moveal %d1,%a0 45c3c: 2243 moveal %d3,%a1 45c3e: 200a movel %a2,%d0 45c40: 0680 0000 0056 addil #86,%d0 45c46: 47ea 005a lea %a2@(90),%a3 45c4a: 280a movel %a2,%d4 45c4c: 0684 0000 005e addil #94,%d4 45c52: 2091 movel %a1@,%a0@ 45c54: 2040 moveal %d0,%a0 45c56: 2242 moveal %d2,%a1 45c58: 2091 movel %a1@,%a0@ 45c5a: 2044 moveal %d4,%a0 45c5c: 2694 movel %a4@,%a3@ 45c5e: 2095 movel %a5@,%a0@
/* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
45c60: 7003 moveq #3,%d0 45c62: 1540 003c moveb %d0,%a2@(60)
_TOD_Get( &ptimer->time );
45c66: 486a 006a pea %a2@(106) 45c6a: 4eb9 0004 7470 jsr 47470 <_TOD_Get>
_Thread_Enable_dispatch();
45c70: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch>
return 0;
45c76: 588f addql #4,%sp
ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch();
45c78: 4280 clrl %d0 45c7a: 6000 fe9e braw 45b1a <timer_settime+0x126> 45c7e: 220a movel %a2,%d1 45c80: 0681 0000 0052 addil #82,%d1
(void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize;
45c86: 2241 moveal %d1,%a1 45c88: 2043 moveal %d3,%a0 45c8a: 200a movel %a2,%d0 45c8c: 0680 0000 0056 addil #86,%d0 45c92: 47ea 005a lea %a2@(90),%a3 45c96: 280a movel %a2,%d4 45c98: 0684 0000 005e addil #94,%d4 45c9e: 2290 movel %a0@,%a1@ 45ca0: 2240 moveal %d0,%a1 45ca2: 2042 moveal %d2,%a0 45ca4: 2290 movel %a0@,%a1@ 45ca6: 2244 moveal %d4,%a1 45ca8: 2694 movel %a4@,%a3@ 45caa: 2295 movel %a5@,%a1@
/* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
45cac: 7004 moveq #4,%d0 45cae: 1540 003c moveb %d0,%a2@(60)
/* Returns with success */ _Thread_Enable_dispatch();
45cb2: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45cb8: 4280 clrl %d0 45cba: 6000 ff5a braw 45c16 <timer_settime+0x222>
... 00045a7c <ualarm>: useconds_t ualarm( useconds_t useconds, useconds_t interval ) {
45a7c: 4e56 ffe8 linkw %fp,#-24 45a80: 48d7 041c moveml %d2-%d4/%a2,%sp@ 45a84: 242e 0008 movel %fp@(8),%d2
/* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) {
45a88: 4ab9 0006 10f6 tstl 610f6 <_POSIX_signals_Ualarm_timer+0x1c> 45a8e: 6700 0086 beqw 45b16 <ualarm+0x9a>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer );
45a92: 4879 0006 10da pea 610da <_POSIX_signals_Ualarm_timer> 45a98: 4eb9 0004 96ec jsr 496ec <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
45a9e: 588f addql #4,%sp 45aa0: 7201 moveq #1,%d1 45aa2: 5580 subql #2,%d0 45aa4: b280 cmpl %d0,%d1 45aa6: 6400 0098 bccw 45b40 <ualarm+0xc4>
45aaa: 4283 clrl %d3 <== NOT EXECUTED
/* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) {
45aac: 4a82 tstl %d2 <== NOT EXECUTED 45aae: 660c bnes 45abc <ualarm+0x40> <== NOT EXECUTED
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; }
45ab0: 2003 movel %d3,%d0 45ab2: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 45ab8: 4e5e unlk %fp 45aba: 4e75 rts
if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp );
45abc: 280e movel %fp,%d4
* less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
45abe: 223c 000f 4240 movel #1000000,%d1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp );
45ac4: 5184 subql #8,%d4 45ac6: 45f9 0004 9204 lea 49204 <_Timespec_To_ticks>,%a2
* less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
45acc: 4c41 2000 remul %d1,%d0,%d2 45ad0: 4c41 2002 remul %d1,%d2,%d2
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
45ad4: 223c 0000 03e8 movel #1000,%d1
* less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
45ada: 2d42 fff8 movel %d2,%fp@(-8)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
45ade: 4c00 1800 mulsl %d0,%d1
ticks = _Timespec_To_ticks( &tp );
45ae2: 2f04 movel %d4,%sp@-
*/ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
45ae4: 2d41 fffc movel %d1,%fp@(-4)
ticks = _Timespec_To_ticks( &tp );
45ae8: 4e92 jsr %a2@
if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
45aea: 2f04 movel %d4,%sp@- 45aec: 4e92 jsr %a2@
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
45aee: 4879 0006 10da pea 610da <_POSIX_signals_Ualarm_timer> 45af4: 4879 0006 098c pea 6098c <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
45afa: 23c0 0006 10e6 movel %d0,610e6 <_POSIX_signals_Ualarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
45b00: 4eb9 0004 95a4 jsr 495a4 <_Watchdog_Insert> 45b06: 4fef 0010 lea %sp@(16),%sp
} return remaining; }
45b0a: 2003 movel %d3,%d0 45b0c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 45b12: 4e5e unlk %fp 45b14: 4e75 rts
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
45b16: 42b9 0006 10e2 clrl 610e2 <_POSIX_signals_Ualarm_timer+0x8>
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
45b1c: 4283 clrl %d3
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
45b1e: 203c 0004 5b88 movel #285576,%d0
the_watchdog->id = id;
45b24: 42b9 0006 10fa clrl 610fa <_POSIX_signals_Ualarm_timer+0x20>
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
45b2a: 23c0 0006 10f6 movel %d0,610f6 <_POSIX_signals_Ualarm_timer+0x1c>
the_watchdog->id = id; the_watchdog->user_data = user_data;
45b30: 42b9 0006 10fe clrl 610fe <_POSIX_signals_Ualarm_timer+0x24>
/* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) {
45b36: 4a82 tstl %d2 45b38: 6700 ff76 beqw 45ab0 <ualarm+0x34> 45b3c: 6000 ff7e braw 45abc <ualarm+0x40>
* boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time);
45b40: 2039 0006 10ee movel 610ee <_POSIX_signals_Ualarm_timer+0x14>,%d0 45b46: d0b9 0006 10e6 addl 610e6 <_POSIX_signals_Ualarm_timer+0xc>,%d0
/* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp );
45b4c: 486e fff8 pea %fp@(-8) 45b50: 90b9 0006 10f2 subl 610f2 <_POSIX_signals_Ualarm_timer+0x18>,%d0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
45b56: 283c 000f 4240 movel #1000000,%d4
ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp );
45b5c: 2f00 movel %d0,%sp@- 45b5e: 4eb9 0004 9174 jsr 49174 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
45b64: 202e fff8 movel %fp@(-8),%d0 45b68: 4c04 0800 mulsl %d4,%d0
remaining += tp.tv_nsec / 1000;
45b6c: 283c 0000 03e8 movel #1000,%d4 45b72: 508f addql #8,%sp 45b74: 262e fffc movel %fp@(-4),%d3 45b78: 4c44 3803 remsl %d4,%d3,%d3 45b7c: d680 addl %d0,%d3
/* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) {
45b7e: 4a82 tstl %d2 45b80: 6700 ff2e beqw 45ab0 <ualarm+0x34>
45b84: 6000 ff36 braw 45abc <ualarm+0x40> <== NOT EXECUTED
0004e360 <unlink>: #include <rtems/seterr.h> int unlink( const char *path ) {
4e360: 4e56 ffbc linkw %fp,#-68 4e364: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4e368: 282e 0008 movel %fp@(8),%d4
/* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path );
4e36c: 2f04 movel %d4,%sp@- 4e36e: 4eb9 0004 25a4 jsr 425a4 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
4e374: 588f addql #4,%sp
/* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path );
4e376: 2400 movel %d0,%d2
if ( parentpathlen == 0 )
4e378: 6600 01c8 bnew 4e542 <unlink+0x1e2>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
4e37c: 2044 moveal %d4,%a0 4e37e: 762f moveq #47,%d3 4e380: 1210 moveb %a0@,%d1 4e382: 1001 moveb %d1,%d0 4e384: 49c0 extbl %d0 4e386: b680 cmpl %d0,%d3 4e388: 670e beqs 4e398 <unlink+0x38> 4e38a: 163c 005c moveb #92,%d3 4e38e: b680 cmpl %d0,%d3 4e390: 6706 beqs 4e398 <unlink+0x38> 4e392: 4a01 tstb %d1 4e394: 6600 00fc bnew 4e492 <unlink+0x132> 4e398: 2079 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a0 4e39e: 45ee ffec lea %fp@(-20),%a2 4e3a2: 49ee fff0 lea %fp@(-16),%a4 4e3a6: 200e movel %fp,%d0 4e3a8: 0680 ffff fff4 addil #-12,%d0 4e3ae: 2640 moveal %d0,%a3 4e3b0: 4bee fff8 lea %fp@(-8),%a5 4e3b4: 224e moveal %fp,%a1 4e3b6: 24a8 0018 movel %a0@(24),%a2@ 4e3ba: 28a8 001c movel %a0@(28),%a4@ 4e3be: 26a8 0020 movel %a0@(32),%a3@ 4e3c2: 2aa8 0024 movel %a0@(36),%a5@ 4e3c6: 2328 0028 movel %a0@(40),%a1@- 4e3ca: 4203 clrb %d3
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
4e3cc: 2040 moveal %d0,%a0
name = path + parentpathlen;
4e3ce: 2644 moveal %d4,%a3 4e3d0: d7c2 addal %d2,%a3
name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4e3d2: 240e movel %fp,%d2 4e3d4: 0682 ffff ffd8 addil #-40,%d2
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
4e3da: 2d50 ffe0 movel %a0@,%fp@(-32) 4e3de: 2d51 ffe8 movel %a1@,%fp@(-24) 4e3e2: 2d54 ffdc movel %a4@,%fp@(-36)
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4e3e6: 49f9 0004 ff58 lea 4ff58 <strlen>,%a4
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
4e3ec: 2d55 ffe4 movel %a5@,%fp@(-28) 4e3f0: 2d52 ffd8 movel %a2@,%fp@(-40)
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4e3f4: 2f0b movel %a3,%sp@- 4e3f6: 4e94 jsr %a4@ 4e3f8: 2e80 movel %d0,%sp@ 4e3fa: 2f0b movel %a3,%sp@- 4e3fc: 4eb9 0004 255c jsr 4255c <rtems_filesystem_prefix_separators> 4e402: d7c0 addal %d0,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4e404: 2f0b movel %a3,%sp@- 4e406: 4e94 jsr %a4@ 4e408: 4297 clrl %sp@ 4e40a: 2f02 movel %d2,%sp@- 4e40c: 42a7 clrl %sp@- 4e40e: 2f00 movel %d0,%sp@- 4e410: 2f0b movel %a3,%sp@- 4e412: 4eb9 0004 2616 jsr 42616 <rtems_filesystem_evaluate_relative_path>
0, &loc, false ); if ( result != 0 ) {
4e418: 4fef 001c lea %sp@(28),%sp 4e41c: 4a80 tstl %d0 4e41e: 6600 00a2 bnew 4e4c2 <unlink+0x162>
if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) {
4e422: 226e ffe4 moveal %fp@(-28),%a1 4e426: 2069 0010 moveal %a1@(16),%a0 4e42a: 4a88 tstl %a0 4e42c: 6700 00ce beqw 4e4fc <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 ) {
4e430: 2f02 movel %d2,%sp@- 4e432: 4e90 jsr %a0@ 4e434: 588f addql #4,%sp 4e436: 7201 moveq #1,%d1 4e438: b280 cmpl %d0,%d1 4e43a: 6700 0140 beqw 4e57c <unlink+0x21c>
if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) {
4e43e: 226e ffe4 moveal %fp@(-28),%a1 4e442: 2069 000c moveal %a1@(12),%a0 4e446: 4a88 tstl %a0 4e448: 6700 00b2 beqw 4e4fc <unlink+0x19c>
if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc );
4e44c: 2f02 movel %d2,%sp@- 4e44e: 2f0a movel %a2,%sp@- 4e450: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
4e452: 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 );
4e456: 2640 moveal %d0,%a3
rtems_filesystem_freenode( &loc );
4e458: 508f addql #8,%sp 4e45a: 4a88 tstl %a0 4e45c: 670e beqs 4e46c <unlink+0x10c> 4e45e: 2068 001c moveal %a0@(28),%a0 4e462: 4a88 tstl %a0 4e464: 6706 beqs 4e46c <unlink+0x10c> 4e466: 2f02 movel %d2,%sp@- 4e468: 4e90 jsr %a0@ 4e46a: 588f addql #4,%sp
if ( free_parentloc )
4e46c: 4a03 tstb %d3 4e46e: 6716 beqs 4e486 <unlink+0x126>
rtems_filesystem_freenode( &parentloc );
4e470: 206e fff8 moveal %fp@(-8),%a0 4e474: 4a88 tstl %a0 4e476: 670e beqs 4e486 <unlink+0x126> 4e478: 2068 001c moveal %a0@(28),%a0 4e47c: 4a88 tstl %a0 4e47e: 6706 beqs 4e486 <unlink+0x126> 4e480: 2f0a movel %a2,%sp@- 4e482: 4e90 jsr %a0@ 4e484: 588f addql #4,%sp
return result; }
4e486: 200b movel %a3,%d0 4e488: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4e48e: 4e5e unlk %fp 4e490: 4e75 rts
*/ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc );
4e492: 2079 0005 d7b4 moveal 5d7b4 <rtems_current_user_env>,%a0 4e498: 45ee ffec lea %fp@(-20),%a2 4e49c: 5888 addql #4,%a0 4e49e: 49ee fff0 lea %fp@(-16),%a4 4e4a2: 200e movel %fp,%d0 4e4a4: 0680 ffff fff4 addil #-12,%d0 4e4aa: 2640 moveal %d0,%a3 4e4ac: 4bee fff8 lea %fp@(-8),%a5 4e4b0: 224e moveal %fp,%a1 4e4b2: 2498 movel %a0@+,%a2@ 4e4b4: 2898 movel %a0@+,%a4@ 4e4b6: 2698 movel %a0@+,%a3@ 4e4b8: 2a98 movel %a0@+,%a5@ 4e4ba: 2310 movel %a0@,%a1@- 4e4bc: 4203 clrb %d3 4e4be: 6000 ff0c braw 4e3cc <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 )
4e4c2: 4a03 tstb %d3 4e4c4: 6610 bnes 4e4d6 <unlink+0x176>
result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc );
4e4c6: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED
return result; }
4e4ca: 200b movel %a3,%d0 <== NOT EXECUTED 4e4cc: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4e4d2: 4e5e unlk %fp <== NOT EXECUTED 4e4d4: 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 );
4e4d6: 206e fff8 moveal %fp@(-8),%a0 4e4da: 4a88 tstl %a0 4e4dc: 67e8 beqs 4e4c6 <unlink+0x166> 4e4de: 2028 001c movel %a0@(28),%d0 4e4e2: 67e2 beqs 4e4c6 <unlink+0x166> 4e4e4: 2f0a movel %a2,%sp@- 4e4e6: 2040 moveal %d0,%a0 4e4e8: 367c ffff moveaw #-1,%a3 4e4ec: 4e90 jsr %a0@ 4e4ee: 588f addql #4,%sp
rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; }
4e4f0: 200b movel %a3,%d0 4e4f2: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4e4f8: 4e5e unlk %fp 4e4fa: 4e75 rts
rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc );
4e4fc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4e500: 4a88 tstl %a0 <== NOT EXECUTED 4e502: 6706 beqs 4e50a <unlink+0x1aa> <== NOT EXECUTED 4e504: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4e506: 4e90 jsr %a0@ <== NOT EXECUTED 4e508: 588f addql #4,%sp <== NOT EXECUTED
if ( free_parentloc )
4e50a: 4a03 tstb %d3 <== NOT EXECUTED 4e50c: 6716 beqs 4e524 <unlink+0x1c4> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
4e50e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4e512: 4a88 tstl %a0 <== NOT EXECUTED 4e514: 670e beqs 4e524 <unlink+0x1c4> <== NOT EXECUTED 4e516: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4e51a: 4a88 tstl %a0 <== NOT EXECUTED 4e51c: 6706 beqs 4e524 <unlink+0x1c4> <== NOT EXECUTED 4e51e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e520: 4e90 jsr %a0@ <== NOT EXECUTED 4e522: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4e524: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 4e52a: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 4e52e: 2040 moveal %d0,%a0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; }
4e530: 200b movel %a3,%d0 <== NOT EXECUTED 4e532: 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 );
4e538: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; }
4e53e: 4e5e unlk %fp <== NOT EXECUTED 4e540: 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,
4e542: 42a7 clrl %sp@- 4e544: 45ee ffec lea %fp@(-20),%a2 4e548: 2f0a movel %a2,%sp@- 4e54a: 4878 0002 pea 2 <DOUBLE_FLOAT> 4e54e: 2f00 movel %d0,%sp@- 4e550: 2f04 movel %d4,%sp@- 4e552: 4eb9 0004 2720 jsr 42720 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 )
4e558: 4fef 0014 lea %sp@(20),%sp 4e55c: 4a80 tstl %d0 4e55e: 6600 ff66 bnew 4e4c6 <unlink+0x166> 4e562: 200e movel %fp,%d0 4e564: 49ee fff0 lea %fp@(-16),%a4 4e568: 0680 ffff fff4 addil #-12,%d0 4e56e: 4bee fff8 lea %fp@(-8),%a5 4e572: 43ee fffc lea %fp@(-4),%a1 4e576: 7601 moveq #1,%d3 4e578: 6000 fe52 braw 4e3cc <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 );
4e57c: 206e ffe4 moveal %fp@(-28),%a0 4e580: 4a88 tstl %a0 4e582: 670e beqs 4e592 <unlink+0x232> 4e584: 2068 001c moveal %a0@(28),%a0 4e588: 4a88 tstl %a0 4e58a: 6706 beqs 4e592 <unlink+0x232> 4e58c: 2f02 movel %d2,%sp@- 4e58e: 4e90 jsr %a0@ 4e590: 588f addql #4,%sp
if ( free_parentloc )
4e592: 4a03 tstb %d3 4e594: 6716 beqs 4e5ac <unlink+0x24c>
rtems_filesystem_freenode( &parentloc );
4e596: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4e59a: 4a88 tstl %a0 <== NOT EXECUTED 4e59c: 670e beqs 4e5ac <unlink+0x24c> <== NOT EXECUTED 4e59e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4e5a2: 4a88 tstl %a0 <== NOT EXECUTED 4e5a4: 6706 beqs 4e5ac <unlink+0x24c> <== NOT EXECUTED 4e5a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e5a8: 4e90 jsr %a0@ <== NOT EXECUTED 4e5aa: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
4e5ac: 4eb9 0004 eb8c jsr 4eb8c <__errno> 4e5b2: 367c ffff moveaw #-1,%a3 4e5b6: 2040 moveal %d0,%a0 4e5b8: 7015 moveq #21,%d0 4e5ba: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; }
4e5bc: 200b movel %a3,%d0 4e5be: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4e5c4: 4e5e unlk %fp 4e5c6: 4e75 rts
00068ce0 <unmount>: */ int unmount( const char *path ) {
68ce0: 4e56 ffec linkw %fp,#-20 68ce4: 2f0a movel %a2,%sp@- 68ce6: 246e 0008 moveal %fp@(8),%a2 68cea: 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 ) )
68cec: 240e movel %fp,%d2 68cee: 0682 ffff ffec addil #-20,%d2 68cf4: 2f0a movel %a2,%sp@- 68cf6: 4eb9 0008 6f0c jsr 86f0c <strlen> 68cfc: 7201 moveq #1,%d1 68cfe: 2e81 movel %d1,%sp@ 68d00: 2f02 movel %d2,%sp@- 68d02: 42a7 clrl %sp@- 68d04: 2f00 movel %d0,%sp@- 68d06: 2f0a movel %a2,%sp@- 68d08: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path> 68d0e: 4fef 0014 lea %sp@(20),%sp 68d12: 4a80 tstl %d0 68d14: 6600 00b0 bnew 68dc6 <unmount+0xe6>
return -1; mt_entry = loc.mt_entry;
68d18: 246e fffc moveal %fp@(-4),%a2
fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root;
68d1c: 202e ffec movel %fp@(-20),%d0 68d20: b0aa 001c cmpl %a2@(28),%d0 68d24: 6600 00fa bnew 68e20 <unmount+0x140>
/* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc );
68d28: 206e fff8 moveal %fp@(-8),%a0 68d2c: 4a88 tstl %a0 68d2e: 670e beqs 68d3e <unmount+0x5e> 68d30: 2068 001c moveal %a0@(28),%a0 68d34: 4a88 tstl %a0 68d36: 6706 beqs 68d3e <unmount+0x5e> 68d38: 2f02 movel %d2,%sp@- 68d3a: 4e90 jsr %a0@ 68d3c: 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;
68d3e: 206a 0014 moveal %a2@(20),%a0 68d42: 4aa8 0028 tstl %a0@(40) 68d46: 6700 0126 beqw 68e6e <unmount+0x18e>
fs_root_loc = &mt_entry->mt_fs_root;
68d4a: 206a 0028 moveal %a2@(40),%a0 68d4e: 4aa8 002c tstl %a0@(44) 68d52: 6700 011a beqw 68e6e <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 )
68d56: 2079 000a 1fac moveal a1fac <rtems_current_user_env>,%a0 68d5c: b5e8 0014 cmpal %a0@(20),%a2 68d60: 6728 beqs 68d8a <unmount+0xaa>
/* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
68d62: 2079 000a 6990 moveal a6990 <rtems_filesystem_mount_table_control>,%a0 68d68: b1fc 000a 6994 cmpal #682388,%a0 68d6e: 6734 beqs 68da4 <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 ) {
68d70: 202a 002c movel %a2@(44),%d0 68d74: b0a8 0018 cmpl %a0@(24),%d0 68d78: 6710 beqs 68d8a <unmount+0xaa>
* 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 ) {
68d7a: 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;
68d7c: b1fc 000a 6994 cmpal #682388,%a0 68d82: 6720 beqs 68da4 <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 ) {
68d84: b0a8 0018 cmpl %a0@(24),%d0 68d88: 66f0 bnes 68d7a <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 );
68d8a: 4eb9 0008 0e64 jsr 80e64 <__errno>
rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; }
68d90: 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 );
68d94: 2040 moveal %d0,%a0 68d96: 7210 moveq #16,%d1 68d98: 70ff moveq #-1,%d0
rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; }
68d9a: 246e ffe8 moveal %fp@(-24),%a2 68d9e: 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 );
68da0: 2081 movel %d1,%a0@
rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; }
68da2: 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 )
68da4: 2f0a movel %a2,%sp@- 68da6: 4eb9 0004 6ad2 jsr 46ad2 <rtems_libio_is_open_files_in_fs> 68dac: 588f addql #4,%sp 68dae: 7201 moveq #1,%d1 68db0: b280 cmpl %d0,%d1 68db2: 67d6 beqs 68d8a <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 )
68db4: 206a 0014 moveal %a2@(20),%a0 68db8: 2f0a movel %a2,%sp@- 68dba: 2068 0028 moveal %a0@(40),%a0 68dbe: 4e90 jsr %a0@ 68dc0: 588f addql #4,%sp 68dc2: 4a80 tstl %d0 68dc4: 670e beqs 68dd4 <unmount+0xf4>
rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; }
68dc6: 242e ffe4 movel %fp@(-28),%d2
*/ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0;
68dca: 70ff moveq #-1,%d0
}
68dcc: 246e ffe8 moveal %fp@(-24),%a2 68dd0: 4e5e unlk %fp 68dd2: 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){
68dd4: 206a 0028 moveal %a2@(40),%a0 68dd8: 2f0a movel %a2,%sp@- 68dda: 2068 002c moveal %a0@(44),%a0 68dde: 4e90 jsr %a0@ 68de0: 588f addql #4,%sp 68de2: 4a80 tstl %d0 68de4: 666a bnes 68e50 <unmount+0x170>
*/ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
68de6: 2f0a movel %a2,%sp@- 68de8: 4eb9 0004 b624 jsr 4b624 <_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 );
68dee: 206a 0014 moveal %a2@(20),%a0 68df2: 588f addql #4,%sp 68df4: 4a88 tstl %a0 68df6: 6710 beqs 68e08 <unmount+0x128> 68df8: 2068 001c moveal %a0@(28),%a0 68dfc: 4a88 tstl %a0 68dfe: 6708 beqs 68e08 <unmount+0x128> 68e00: 486a 0008 pea %a2@(8) 68e04: 4e90 jsr %a0@ 68e06: 588f addql #4,%sp
free( mt_entry );
68e08: 2f0a movel %a2,%sp@- 68e0a: 4eb9 0004 67a8 jsr 467a8 <free>
return 0; }
68e10: 242e ffe4 movel %fp@(-28),%d2
*/ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0;
68e14: 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 );
68e16: 4280 clrl %d0
return 0; }
68e18: 246e ffe8 moveal %fp@(-24),%a2 68e1c: 4e5e unlk %fp 68e1e: 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 );
68e20: 206e fff8 moveal %fp@(-8),%a0 68e24: 4a88 tstl %a0 68e26: 670e beqs 68e36 <unmount+0x156> 68e28: 2068 001c moveal %a0@(28),%a0 68e2c: 4a88 tstl %a0 68e2e: 6706 beqs 68e36 <unmount+0x156> 68e30: 2f02 movel %d2,%sp@- 68e32: 4e90 jsr %a0@ 68e34: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EACCES );
68e36: 4eb9 0008 0e64 jsr 80e64 <__errno> 68e3c: 740d moveq #13,%d2 68e3e: 2040 moveal %d0,%a0 68e40: 70ff moveq #-1,%d0 68e42: 2082 movel %d2,%a0@
rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; }
68e44: 242e ffe4 movel %fp@(-28),%d2 68e48: 246e ffe8 moveal %fp@(-24),%a2 68e4c: 4e5e unlk %fp 68e4e: 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 )
68e50: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 68e54: 2f0a movel %a2,%sp@- <== NOT EXECUTED 68e56: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED 68e5a: 2040 moveal %d0,%a0 <== NOT EXECUTED 68e5c: 4e90 jsr %a0@ <== NOT EXECUTED 68e5e: 588f addql #4,%sp <== NOT EXECUTED 68e60: 4a80 tstl %d0 <== NOT EXECUTED 68e62: 6700 ff62 beqw 68dc6 <unmount+0xe6> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
68e66: 42a7 clrl %sp@- <== NOT EXECUTED 68e68: 4eb9 0004 b2ac jsr 4b2ac <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 );
68e6e: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; }
68e74: 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 );
68e78: 2040 moveal %d0,%a0 <== NOT EXECUTED 68e7a: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; }
68e7c: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 68e80: 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 );
68e82: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; }
68e88: 4e75 rts <== NOT EXECUTED
... 00068e8c <utime>: int utime( const char *path, const struct utimbuf *times ) {
68e8c: 4e56 ffe0 linkw %fp,#-32 68e90: 48d7 040c moveml %d2-%d3/%a2,%sp@ 68e94: 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 ) )
68e98: 240e movel %fp,%d2 68e9a: 0682 ffff ffec addil #-20,%d2 68ea0: 2f03 movel %d3,%sp@-
int utime( const char *path, const struct utimbuf *times ) {
68ea2: 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 ) )
68ea6: 4eb9 0008 6f0c jsr 86f0c <strlen> 68eac: 7201 moveq #1,%d1 68eae: 2e81 movel %d1,%sp@ 68eb0: 2f02 movel %d2,%sp@- 68eb2: 42a7 clrl %sp@- 68eb4: 2f00 movel %d0,%sp@- 68eb6: 2f03 movel %d3,%sp@- 68eb8: 4eb9 0004 66b4 jsr 466b4 <rtems_filesystem_evaluate_path> 68ebe: 4fef 0014 lea %sp@(20),%sp 68ec2: 4a80 tstl %d0 68ec4: 663e bnes 68f04 <utime+0x78>
return -1; if ( !temp_loc.ops->utime_h ){
68ec6: 226e fff8 moveal %fp@(-8),%a1 68eca: 2069 0030 moveal %a1@(48),%a0 68ece: 4a88 tstl %a0 68ed0: 6740 beqs 68f12 <utime+0x86>
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 );
68ed2: 2f2a 0004 movel %a2@(4),%sp@- 68ed6: 2f12 movel %a2@,%sp@- 68ed8: 2f02 movel %d2,%sp@- 68eda: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
68edc: 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 );
68ee0: 2600 movel %d0,%d3
rtems_filesystem_freenode( &temp_loc );
68ee2: 4fef 000c lea %sp@(12),%sp 68ee6: 4a88 tstl %a0 68ee8: 670e beqs 68ef8 <utime+0x6c> 68eea: 2068 001c moveal %a0@(28),%a0 68eee: 4a88 tstl %a0 68ef0: 6706 beqs 68ef8 <utime+0x6c> 68ef2: 2f02 movel %d2,%sp@- 68ef4: 4e90 jsr %a0@ 68ef6: 588f addql #4,%sp
return result; }
68ef8: 2003 movel %d3,%d0 68efa: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 68f00: 4e5e unlk %fp 68f02: 4e75 rts
) { rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
68f04: 76ff moveq #-1,%d3
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; }
68f06: 2003 movel %d3,%d0 68f08: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 68f0e: 4e5e unlk %fp 68f10: 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 );
68f12: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 68f16: 4a88 tstl %a0 <== NOT EXECUTED 68f18: 6706 beqs 68f20 <utime+0x94> <== NOT EXECUTED 68f1a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 68f1c: 4e90 jsr %a0@ <== NOT EXECUTED 68f1e: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
68f20: 4eb9 0008 0e64 jsr 80e64 <__errno> <== NOT EXECUTED 68f26: 76ff moveq #-1,%d3 <== NOT EXECUTED 68f28: 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; }
68f2a: 2003 movel %d3,%d0 <== NOT EXECUTED 68f2c: 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 );
68f32: 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; }
68f38: 4e5e unlk %fp <== NOT EXECUTED
68f3a: 4e75 rts
00045db4 <vfork>: #include <unistd.h> pid_t vfork(void) { return -1; }
45db4: 70ff moveq #-1,%d0
#include <sys/types.h> #include <unistd.h> pid_t vfork(void) {
45db6: 4e56 0000 linkw %fp,#0
return -1; }
45dba: 4e5e unlk %fp 45dbc: 4e75 rts
... 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 c60f lea 5c60f <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 d79c moveal 5d79c <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>
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 d79c moveal 5d79c <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 d79c moveal 5d79c <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 d79c moveal 5d79c <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 d79c moveal 5d79c <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 d79c moveal 5d79c <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>
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 d79c moveal 5d79c <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>
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 d79c moveal 5d79c <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 d79c moveal 5d79c <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 d79c moveal 5d79c <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 d79c moveal 5d79c <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 d79c moveal 5d79c <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 c60e lea 5c60e <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>
00045dc0 <wait>: #include <rtems/seterr.h> int wait( int *stat_loc ) {
45dc0: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45dc4: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45dca: 7258 moveq #88,%d1 45dcc: 2040 moveal %d0,%a0
}
45dce: 70ff moveq #-1,%d0 45dd0: 4e5e unlk %fp
int wait( int *stat_loc ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45dd2: 2081 movel %d1,%a0@
}
45dd4: 4e75 rts
... 00045dd8 <waitpid>: int waitpid( pid_t pid, int *stat_loc, int options ) {
45dd8: 4e56 0000 linkw %fp,#0
rtems_set_errno_and_return_minus_one( ENOSYS );
45ddc: 4eb9 0004 f6f0 jsr 4f6f0 <__errno> 45de2: 7258 moveq #88,%d1 45de4: 2040 moveal %d0,%a0
}
45de6: 70ff moveq #-1,%d0 45de8: 4e5e unlk %fp
pid_t pid, int *stat_loc, int options ) { rtems_set_errno_and_return_minus_one( ENOSYS );
45dea: 2081 movel %d1,%a0@
}
45dec: 4e75 rts
... 0005b88c <write>: ssize_t write( int fd, const void *buffer, size_t count ) {
5b88c: 4e56 fff4 linkw %fp,#-12 5b890: 202e 0008 movel %fp@(8),%d0 5b894: 222e 000c movel %fp@(12),%d1 5b898: 206e 0010 moveal %fp@(16),%a0 5b89c: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
5b8a0: b0b9 0005 d6a4 cmpl 5d6a4 <rtems_libio_number_iops>,%d0 5b8a6: 6466 bccs 5b90e <write+0x82>
iop = rtems_libio_iop( fd );
5b8a8: 2479 0005 eda4 moveal 5eda4 <rtems_libio_iops>,%a2 5b8ae: ed88 lsll #6,%d0 5b8b0: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5b8b2: 202a 0014 movel %a2@(20),%d0 5b8b6: 0800 0008 btst #8,%d0 5b8ba: 6752 beqs 5b90e <write+0x82>
rtems_libio_check_buffer( buffer );
5b8bc: 4a81 tstl %d1 5b8be: 6766 beqs 5b926 <write+0x9a>
rtems_libio_check_count( count );
5b8c0: 4a88 tstl %a0 5b8c2: 673e beqs 5b902 <write+0x76>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5b8c4: 44c0 movew %d0,%ccr 5b8c6: 665e bnes 5b926 <write+0x9a>
/* * Now process the write() request. */ if ( !iop->handlers->write_h )
5b8c8: 226a 003c moveal %a2@(60),%a1 5b8cc: 2269 000c moveal %a1@(12),%a1 5b8d0: 4a89 tstl %a1 5b8d2: 676a beqs 5b93e <write+0xb2>
rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count );
5b8d4: 2f08 movel %a0,%sp@- 5b8d6: 2f01 movel %d1,%sp@- 5b8d8: 2f0a movel %a2,%sp@- 5b8da: 4e91 jsr %a1@
if ( rc > 0 )
5b8dc: 4fef 000c lea %sp@(12),%sp 5b8e0: 4a80 tstl %d0 5b8e2: 6f14 bles 5b8f8 <write+0x6c>
iop->offset += rc;
5b8e4: 2400 movel %d0,%d2 5b8e6: 5bc1 smi %d1 5b8e8: 49c1 extbl %d1 5b8ea: d5aa 0010 addl %d2,%a2@(16) 5b8ee: 262a 000c movel %a2@(12),%d3 5b8f2: d781 addxl %d1,%d3 5b8f4: 2543 000c movel %d3,%a2@(12)
return rc; }
5b8f8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b8fe: 4e5e unlk %fp 5b900: 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 );
5b902: 4280 clrl %d0
if ( rc > 0 ) iop->offset += rc; return rc; }
5b904: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b90a: 4e5e unlk %fp 5b90c: 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 );
5b90e: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 5b914: 7409 moveq #9,%d2 <== NOT EXECUTED 5b916: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b918: 70ff moveq #-1,%d0 <== NOT EXECUTED 5b91a: 2082 movel %d2,%a0@ <== NOT EXECUTED
if ( rc > 0 ) iop->offset += rc; return rc; }
5b91c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5b922: 4e5e unlk %fp <== NOT EXECUTED 5b924: 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 );
5b926: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 5b92c: 7216 moveq #22,%d1 <== NOT EXECUTED 5b92e: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b930: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 ) iop->offset += rc; return rc; }
5b932: 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 );
5b938: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( rc > 0 ) iop->offset += rc; return rc; }
5b93a: 4e5e unlk %fp <== NOT EXECUTED 5b93c: 4e75 rts <== NOT EXECUTED
/* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
5b93e: 4eb9 0004 eb8c jsr 4eb8c <__errno> <== NOT EXECUTED 5b944: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b946: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 ) iop->offset += rc; return rc; }
5b948: 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 );
5b94e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if ( rc > 0 ) iop->offset += rc; return rc; }
5b954: 4e5e unlk %fp <== NOT EXECUTED
5b956: 4e75 rts
00046f28 <writev>: ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) {
46f28: 4e56 ffe4 linkw %fp,#-28 46f2c: 202e 0008 movel %fp@(8),%d0 46f30: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 46f34: 246e 000c moveal %fp@(12),%a2 46f38: 242e 0010 movel %fp@(16),%d2
int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd );
46f3c: b0b9 0006 1344 cmpl 61344 <rtems_libio_number_iops>,%d0 46f42: 6400 00f0 bccw 47034 <writev+0x10c>
iop = rtems_libio_iop( fd );
46f46: 2679 0006 3218 moveal 63218 <rtems_libio_iops>,%a3 46f4c: ed88 lsll #6,%d0 46f4e: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
46f50: 202b 0014 movel %a3@(20),%d0 46f54: 0800 0008 btst #8,%d0 46f58: 6700 00da beqw 47034 <writev+0x10c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
46f5c: 44c0 movew %d0,%ccr 46f5e: 666e bnes 46fce <writev+0xa6>
/* * Argument validation on IO vector */ if ( !iov )
46f60: 4a8a tstl %a2 46f62: 676a beqs 46fce <writev+0xa6>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 )
46f64: 4a82 tstl %d2 46f66: 6f66 bles 46fce <writev+0xa6>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX )
46f68: 0c82 0000 0400 cmpil #1024,%d2 46f6e: 6e5e bgts 46fce <writev+0xa6>
rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h )
46f70: 206b 003c moveal %a3@(60),%a0 46f74: 4aa8 000c tstl %a0@(12) 46f78: 6700 00d4 beqw 4704e <writev+0x126>
rtems_set_errno_and_return_minus_one( ENOTSUP );
46f7c: 204a moveal %a2,%a0 46f7e: 93c9 subal %a1,%a1 46f80: 4281 clrl %d1 46f82: 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 )
46f84: 4a90 tstl %a0@ 46f86: 6746 beqs 46fce <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 )
46f88: 2028 0004 movel %a0@(4),%d0 46f8c: 57c4 seq %d4
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len;
46f8e: 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++ ) {
46f90: 5289 addql #1,%a1 46f92: 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 )
46f94: c883 andl %d3,%d4 46f96: 1604 moveb %d4,%d3
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
46f98: b081 cmpl %d1,%d0 46f9a: 6d32 blts 46fce <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++ ) {
46f9c: 2200 movel %d0,%d1
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
46f9e: 0c80 0000 7fff cmpil #32767,%d0 46fa4: 6e28 bgts 46fce <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++ ) {
46fa6: b3c2 cmpal %d2,%a1 46fa8: 6dda blts 46f84 <writev+0x5c>
} /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) {
46faa: 4a04 tstb %d4 46fac: 663a bnes 46fe8 <writev+0xc0> 46fae: 588a addql #4,%a2 46fb0: 4283 clrl %d3 46fb2: 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 )
46fb4: 2012 movel %a2@,%d0
} /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
46fb6: 5283 addql #1,%d3
/* all zero lengths has no effect */ if ( iov[v].iov_len == 0 )
46fb8: 4a80 tstl %d0 46fba: 663a bnes 46ff6 <writev+0xce>
} /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
46fbc: 508a addql #8,%a2 <== NOT EXECUTED 46fbe: b682 cmpl %d2,%d3 <== NOT EXECUTED 46fc0: 6df2 blts 46fb4 <writev+0x8c> <== NOT EXECUTED
if (bytes != iov[ v ].iov_len) break; } return total; }
46fc2: 2004 movel %d4,%d0 46fc4: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46fca: 4e5e unlk %fp 46fcc: 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 );
46fce: 4eb9 0005 10f4 jsr 510f4 <__errno> 46fd4: 78ff moveq #-1,%d4 46fd6: 2040 moveal %d0,%a0 46fd8: 7016 moveq #22,%d0 46fda: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len) break; } return total; }
46fdc: 2004 movel %d4,%d0 46fde: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46fe4: 4e5e unlk %fp 46fe6: 4e75 rts
} /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) {
46fe8: 4284 clrl %d4
if (bytes != iov[ v ].iov_len) break; } return total; }
46fea: 2004 movel %d4,%d0 46fec: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46ff2: 4e5e unlk %fp 46ff4: 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 );
46ff6: 206b 003c moveal %a3@(60),%a0 46ffa: 2f00 movel %d0,%sp@- 46ffc: 2f2a fffc movel %a2@(-4),%sp@- 47000: 2f0b movel %a3,%sp@- 47002: 2068 000c moveal %a0@(12),%a0 47006: 4e90 jsr %a0@
if ( bytes < 0 )
47008: 4fef 000c lea %sp@(12),%sp 4700c: 4a80 tstl %d0 4700e: 6d5a blts 4706a <writev+0x142>
return -1; if ( bytes > 0 ) {
47010: 6716 beqs 47028 <writev+0x100>
iop->offset += bytes; total += bytes;
47012: d880 addl %d0,%d4
if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes;
47014: 2c00 movel %d0,%d6 47016: 5bc5 smi %d5 47018: 49c5 extbl %d5 4701a: ddab 0010 addl %d6,%a3@(16) 4701e: 222b 000c movel %a3@(12),%d1 47022: d385 addxl %d5,%d1 47024: 2741 000c movel %d1,%a3@(12)
total += bytes; } if (bytes != iov[ v ].iov_len)
47028: b092 cmpl %a2@,%d0 4702a: 6696 bnes 46fc2 <writev+0x9a>
} /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
4702c: 508a addql #8,%a2 4702e: b682 cmpl %d2,%d3 47030: 6d82 blts 46fb4 <writev+0x8c> 47032: 608e bras 46fc2 <writev+0x9a>
ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop );
47034: 4eb9 0005 10f4 jsr 510f4 <__errno> 4703a: 78ff moveq #-1,%d4 4703c: 7209 moveq #9,%d1 4703e: 2040 moveal %d0,%a0
if (bytes != iov[ v ].iov_len) break; } return total; }
47040: 2004 movel %d4,%d0 47042: 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 );
47048: 2081 movel %d1,%a0@
if (bytes != iov[ v ].iov_len) break; } return total; }
4704a: 4e5e unlk %fp 4704c: 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 );
4704e: 4eb9 0005 10f4 jsr 510f4 <__errno> <== NOT EXECUTED 47054: 78ff moveq #-1,%d4 <== NOT EXECUTED 47056: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len) break; } return total; }
47058: 2004 movel %d4,%d0 <== NOT EXECUTED 4705a: 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 );
47060: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if (bytes != iov[ v ].iov_len) break; } return total; }
47066: 4e5e unlk %fp <== NOT EXECUTED 47068: 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 )
4706a: 78ff moveq #-1,%d4 <== 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 47074: 4e5e unlk %fp <== NOT EXECUTED
47076: 4e75 rts