RTEMS 4.11Annotated Report
Sat Nov 27 20:30:50 2010
0010f0b8 <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
10f0b8: 55 push %ebp
10f0b9: 89 e5 mov %esp,%ebp
10f0bb: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
10f0be: 8b 50 10 mov 0x10(%eax),%edx
10f0c1: 8b 4a 34 mov 0x34(%edx),%ecx
switch( node->type ) {
10f0c4: 8b 10 mov (%eax),%edx
10f0c6: 83 7a 4c 07 cmpl $0x7,0x4c(%edx)
10f0ca: 77 12 ja 10f0de <IMFS_Set_handlers+0x26><== NEVER TAKEN
10f0cc: 8b 52 4c mov 0x4c(%edx),%edx
10f0cf: ff 24 95 d0 0f 12 00 jmp *0x120fd0(,%edx,4)
10f0d6: 66 90 xchg %ax,%ax
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
10f0d8: 8b 51 0c mov 0xc(%ecx),%edx
10f0db: 89 50 08 mov %edx,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f0de: 31 c0 xor %eax,%eax
10f0e0: c9 leave
10f0e1: c3 ret
10f0e2: 66 90 xchg %ax,%ax
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
10f0e4: 8b 51 08 mov 0x8(%ecx),%edx
10f0e7: 89 50 08 mov %edx,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f0ea: 31 c0 xor %eax,%eax
10f0ec: c9 leave
10f0ed: c3 ret
10f0ee: 66 90 xchg %ax,%ax
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
10f0f0: c7 40 08 80 10 12 00 movl $0x121080,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f0f7: 31 c0 xor %eax,%eax
10f0f9: c9 leave
10f0fa: c3 ret
10f0fb: 90 nop
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
10f0fc: 8b 51 10 mov 0x10(%ecx),%edx
10f0ff: 89 50 08 mov %edx,0x8(%eax)
break;
}
return 0;
}
10f102: 31 c0 xor %eax,%eax
10f104: c9 leave
10f105: c3 ret
10f106: 66 90 xchg %ax,%ax
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
10f108: c7 40 08 00 10 12 00 movl $0x121000,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f10f: 31 c0 xor %eax,%eax
10f111: c9 leave
10f112: c3 ret
0010fa30 <IMFS_check_node_remove>:
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
10fa30: 55 push %ebp
10fa31: 89 e5 mov %esp,%ebp
10fa33: 53 push %ebx
10fa34: 83 ec 10 sub $0x10,%esp
10fa37: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
10fa3a: 53 push %ebx
10fa3b: e8 f8 04 00 00 call 10ff38 <rtems_libio_is_file_open>
10fa40: 83 c4 10 add $0x10,%esp
10fa43: 85 c0 test %eax,%eax
10fa45: 75 2d jne 10fa74 <IMFS_check_node_remove+0x44>
10fa47: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
10fa4c: 75 26 jne 10fa74 <IMFS_check_node_remove+0x44>
if ( rtems_filesystem_current.node_access == jnode )
10fa4e: a1 b0 51 12 00 mov 0x1251b0,%eax
10fa53: 39 58 04 cmp %ebx,0x4(%eax)
10fa56: 74 58 je 10fab0 <IMFS_check_node_remove+0x80>
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
10fa58: 8b 43 4c mov 0x4c(%ebx),%eax
10fa5b: 83 f8 04 cmp $0x4,%eax
10fa5e: 74 34 je 10fa94 <IMFS_check_node_remove+0x64>
10fa60: 83 f8 05 cmp $0x5,%eax
10fa63: 74 17 je 10fa7c <IMFS_check_node_remove+0x4c>
break;
default:
break;
}
free( jnode );
10fa65: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10fa68: 8b 5d fc mov -0x4(%ebp),%ebx
10fa6b: c9 leave
break;
default:
break;
}
free( jnode );
10fa6c: e9 43 86 ff ff jmp 1080b4 <free>
10fa71: 8d 76 00 lea 0x0(%esi),%esi
}
}
10fa74: 8b 5d fc mov -0x4(%ebp),%ebx
10fa77: c9 leave
10fa78: c3 ret
10fa79: 8d 76 00 lea 0x0(%esi),%esi
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
10fa7c: 83 ec 0c sub $0xc,%esp
10fa7f: 53 push %ebx
10fa80: e8 a7 24 00 00 call 111f2c <IMFS_memfile_remove>
break;
10fa85: 83 c4 10 add $0x10,%esp
break;
default:
break;
}
free( jnode );
10fa88: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10fa8b: 8b 5d fc mov -0x4(%ebp),%ebx
10fa8e: c9 leave
break;
default:
break;
}
free( jnode );
10fa8f: e9 20 86 ff ff jmp 1080b4 <free>
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
break;
case IMFS_SYM_LINK:
free( jnode->info.sym_link.name );
10fa94: 83 ec 0c sub $0xc,%esp
10fa97: ff 73 50 pushl 0x50(%ebx)
10fa9a: e8 15 86 ff ff call 1080b4 <free>
break;
10fa9f: 83 c4 10 add $0x10,%esp
default:
break;
}
free( jnode );
10faa2: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10faa5: 8b 5d fc mov -0x4(%ebp),%ebx
10faa8: c9 leave
break;
default:
break;
}
free( jnode );
10faa9: e9 06 86 ff ff jmp 1080b4 <free>
10faae: 66 90 xchg %ax,%ax
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
10fab0: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
10fab7: eb 9f jmp 10fa58 <IMFS_check_node_remove+0x28>
0010ee78 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
10ee78: 55 push %ebp
10ee79: 89 e5 mov %esp,%ebp
10ee7b: 57 push %edi
10ee7c: 56 push %esi
10ee7d: 53 push %ebx
10ee7e: 83 ec 1c sub $0x1c,%esp
10ee81: 8b 7d 0c mov 0xc(%ebp),%edi
10ee84: 8b 75 10 mov 0x10(%ebp),%esi
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
10ee87: 8b 45 08 mov 0x8(%ebp),%eax
10ee8a: 8b 18 mov (%eax),%ebx
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10ee8c: e8 bb 0e 00 00 call 10fd4c <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
10ee91: 66 39 43 3c cmp %ax,0x3c(%ebx)
10ee95: 74 05 je 10ee9c <IMFS_chown+0x24>
10ee97: 66 85 c0 test %ax,%ax
10ee9a: 75 2c jne 10eec8 <IMFS_chown+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
10ee9c: 66 89 7b 3c mov %di,0x3c(%ebx)
jnode->st_gid = group;
10eea0: 66 89 73 3e mov %si,0x3e(%ebx)
IMFS_update_ctime( jnode );
10eea4: 83 ec 08 sub $0x8,%esp
10eea7: 6a 00 push $0x0
10eea9: 8d 45 e0 lea -0x20(%ebp),%eax
10eeac: 50 push %eax
10eead: e8 7e 92 ff ff call 108130 <gettimeofday>
10eeb2: 8b 45 e0 mov -0x20(%ebp),%eax
10eeb5: 89 43 48 mov %eax,0x48(%ebx)
return 0;
10eeb8: 83 c4 10 add $0x10,%esp
10eebb: 31 c0 xor %eax,%eax
}
10eebd: 8d 65 f4 lea -0xc(%ebp),%esp
10eec0: 5b pop %ebx
10eec1: 5e pop %esi
10eec2: 5f pop %edi
10eec3: c9 leave
10eec4: c3 ret
10eec5: 8d 76 00 lea 0x0(%esi),%esi
#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 );
10eec8: e8 67 44 00 00 call 113334 <__errno>
10eecd: c7 00 01 00 00 00 movl $0x1,(%eax)
10eed3: b8 ff ff ff ff mov $0xffffffff,%eax
10eed8: eb e3 jmp 10eebd <IMFS_chown+0x45>
0010ef4c <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
10ef4c: 55 push %ebp
10ef4d: 89 e5 mov %esp,%ebp
10ef4f: 57 push %edi
10ef50: 56 push %esi
10ef51: 53 push %ebx
10ef52: 83 ec 1c sub $0x1c,%esp
10ef55: 8b 45 08 mov 0x8(%ebp),%eax
10ef58: 8b 5d 0c mov 0xc(%ebp),%ebx
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
10ef5b: 85 c0 test %eax,%eax
10ef5d: 0f 84 ba 00 00 00 je 10f01d <IMFS_create_node+0xd1> <== NEVER TAKEN
return NULL;
parent = parent_loc->node_access;
10ef63: 8b 38 mov (%eax),%edi
fs_info = parent_loc->mt_entry->fs_info;
10ef65: 8b 40 10 mov 0x10(%eax),%eax
10ef68: 8b 70 34 mov 0x34(%eax),%esi
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
10ef6b: 83 fb 07 cmp $0x7,%ebx
10ef6e: 0f 84 9c 00 00 00 je 10f010 <IMFS_create_node+0xc4>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
10ef74: 50 push %eax
10ef75: a1 b0 51 12 00 mov 0x1251b0,%eax
10ef7a: 8b 40 2c mov 0x2c(%eax),%eax
10ef7d: f7 d0 not %eax
10ef7f: 23 45 14 and 0x14(%ebp),%eax
10ef82: 50 push %eax
10ef83: ff 75 10 pushl 0x10(%ebp)
10ef86: 53 push %ebx
10ef87: e8 50 ff ff ff call 10eedc <IMFS_allocate_node>
if ( !node )
10ef8c: 83 c4 10 add $0x10,%esp
10ef8f: 85 c0 test %eax,%eax
10ef91: 74 73 je 10f006 <IMFS_create_node+0xba>
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
10ef93: 83 fb 01 cmp $0x1,%ebx
10ef96: 74 38 je 10efd0 <IMFS_create_node+0x84>
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
10ef98: 83 fb 03 cmp $0x3,%ebx
10ef9b: 0f 84 97 00 00 00 je 10f038 <IMFS_create_node+0xec>
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
10efa1: 83 fb 04 cmp $0x4,%ebx
10efa4: 0f 84 8e 00 00 00 je 10f038 <IMFS_create_node+0xec>
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
10efaa: 83 fb 02 cmp $0x2,%ebx
10efad: 74 79 je 10f028 <IMFS_create_node+0xdc>
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
10efaf: 83 fb 06 cmp $0x6,%ebx
10efb2: 0f 84 8c 00 00 00 je 10f044 <IMFS_create_node+0xf8>
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
10efb8: 83 fb 05 cmp $0x5,%ebx
10efbb: 0f 84 9b 00 00 00 je 10f05c <IMFS_create_node+0x110>
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
} else if ( type == IMFS_FIFO ) {
10efc1: 83 fb 07 cmp $0x7,%ebx
10efc4: 75 1d jne 10efe3 <IMFS_create_node+0x97> <== NEVER TAKEN
node->info.fifo.pipe = NULL;
10efc6: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10efcd: eb 14 jmp 10efe3 <IMFS_create_node+0x97>
10efcf: 90 nop
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10efd0: 8d 50 54 lea 0x54(%eax),%edx
10efd3: 89 50 50 mov %edx,0x50(%eax)
head->next = tail;
head->previous = NULL;
10efd6: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10efdd: 8d 50 50 lea 0x50(%eax),%edx
10efe0: 89 50 58 mov %edx,0x58(%eax)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
10efe3: 89 78 08 mov %edi,0x8(%eax)
node->st_ino = ++fs_info->ino_count;
10efe6: 8b 56 04 mov 0x4(%esi),%edx
10efe9: 42 inc %edx
10efea: 89 56 04 mov %edx,0x4(%esi)
10efed: 89 50 38 mov %edx,0x38(%eax)
10eff0: 83 ec 08 sub $0x8,%esp
10eff3: 50 push %eax
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
10eff4: 83 c7 50 add $0x50,%edi
10eff7: 57 push %edi
10eff8: 89 45 e4 mov %eax,-0x1c(%ebp)
10effb: e8 dc cf ff ff call 10bfdc <_Chain_Append>
return node;
10f000: 83 c4 10 add $0x10,%esp
10f003: 8b 45 e4 mov -0x1c(%ebp),%eax
}
10f006: 8d 65 f4 lea -0xc(%ebp),%esp
10f009: 5b pop %ebx
10f00a: 5e pop %esi
10f00b: 5f pop %edi
10f00c: c9 leave
10f00d: c3 ret
10f00e: 66 90 xchg %ax,%ax
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
10f010: 81 7e 10 60 0f 12 00 cmpl $0x120f60,0x10(%esi)
10f017: 0f 85 57 ff ff ff jne 10ef74 <IMFS_create_node+0x28>
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
10f01d: 31 c0 xor %eax,%eax
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
10f01f: 8d 65 f4 lea -0xc(%ebp),%esp
10f022: 5b pop %ebx
10f023: 5e pop %esi
10f024: 5f pop %edi
10f025: c9 leave
10f026: c3 ret
10f027: 90 nop
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
10f028: 8b 4d 18 mov 0x18(%ebp),%ecx
10f02b: 8b 11 mov (%ecx),%edx
10f02d: 89 50 50 mov %edx,0x50(%eax)
node->info.device.minor = info->device.minor;
10f030: 8b 51 04 mov 0x4(%ecx),%edx
10f033: 89 50 54 mov %edx,0x54(%eax)
10f036: eb ab jmp 10efe3 <IMFS_create_node+0x97>
if ( type == IMFS_DIRECTORY ) {
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
10f038: 8b 4d 18 mov 0x18(%ebp),%ecx
10f03b: 8b 11 mov (%ecx),%edx
10f03d: 89 50 50 mov %edx,0x50(%eax)
10f040: eb a1 jmp 10efe3 <IMFS_create_node+0x97>
10f042: 66 90 xchg %ax,%ax
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
10f044: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10f04b: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = 0;
10f052: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
10f059: eb 88 jmp 10efe3 <IMFS_create_node+0x97>
10f05b: 90 nop
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
10f05c: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10f063: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.file.indirect = 0;
10f06a: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
node->info.file.doubly_indirect = 0;
10f071: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
node->info.file.triply_indirect = 0;
10f078: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
10f07f: e9 5f ff ff ff jmp 10efe3 <IMFS_create_node+0x97>
0010a4d8 <IMFS_dump_directory>:
*/
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
10a4d8: 55 push %ebp
10a4d9: 89 e5 mov %esp,%ebp
10a4db: 57 push %edi
10a4dc: 56 push %esi
10a4dd: 53 push %ebx
10a4de: 83 ec 1c sub $0x1c,%esp
10a4e1: 8b 45 08 mov 0x8(%ebp),%eax
10a4e4: 8b 75 0c mov 0xc(%ebp),%esi
*
*/
int IMFS_memfile_maximum_size( void )
{
return IMFS_MEMFILE_MAXIMUM_SIZE;
}
10a4e7: 8b 78 50 mov 0x50(%eax),%edi
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
10a4ea: 83 c0 54 add $0x54,%eax
10a4ed: 89 45 e4 mov %eax,-0x1c(%ebp)
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
10a4f0: 39 c7 cmp %eax,%edi
10a4f2: 74 47 je 10a53b <IMFS_dump_directory+0x63>
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 );
10a4f4: 8d 46 01 lea 0x1(%esi),%eax
10a4f7: 89 45 e0 mov %eax,-0x20(%ebp)
10a4fa: 66 90 xchg %ax,%ax
!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++ )
10a4fc: 85 f6 test %esi,%esi
10a4fe: 78 22 js 10a522 <IMFS_dump_directory+0x4a><== NEVER TAKEN
10a500: 31 db xor %ebx,%ebx
10a502: 66 90 xchg %ax,%ax
fprintf(stdout, "...." );
10a504: a1 40 b2 12 00 mov 0x12b240,%eax
10a509: ff 70 08 pushl 0x8(%eax)
10a50c: 6a 04 push $0x4
10a50e: 6a 01 push $0x1
10a510: 68 92 69 12 00 push $0x126992
10a515: e8 56 e1 00 00 call 118670 <fwrite>
!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++ )
10a51a: 43 inc %ebx
10a51b: 83 c4 10 add $0x10,%esp
10a51e: 39 de cmp %ebx,%esi
10a520: 7d e2 jge 10a504 <IMFS_dump_directory+0x2c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
10a522: 83 ec 0c sub $0xc,%esp
10a525: 57 push %edi
10a526: e8 75 fe ff ff call 10a3a0 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
10a52b: 83 c4 10 add $0x10,%esp
10a52e: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10a532: 74 10 je 10a544 <IMFS_dump_directory+0x6c>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
10a534: 8b 3f mov (%edi),%edi
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
10a536: 3b 7d e4 cmp -0x1c(%ebp),%edi
10a539: 75 c1 jne 10a4fc <IMFS_dump_directory+0x24>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
10a53b: 8d 65 f4 lea -0xc(%ebp),%esp
10a53e: 5b pop %ebx
10a53f: 5e pop %esi
10a540: 5f pop %edi
10a541: c9 leave
10a542: c3 ret
10a543: 90 nop
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 );
10a544: 83 ec 08 sub $0x8,%esp
10a547: ff 75 e0 pushl -0x20(%ebp)
10a54a: 57 push %edi
10a54b: e8 88 ff ff ff call 10a4d8 <IMFS_dump_directory>
10a550: 83 c4 10 add $0x10,%esp
10a553: eb df jmp 10a534 <IMFS_dump_directory+0x5c>
0010f1c4 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
10f1c4: 55 push %ebp
10f1c5: 89 e5 mov %esp,%ebp
10f1c7: 57 push %edi
10f1c8: 56 push %esi
10f1c9: 53 push %ebx
10f1ca: 83 ec 5c sub $0x5c,%esp
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
10f1cd: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp)
10f1d4: 0f 85 ee 01 00 00 jne 10f3c8 <IMFS_eval_path+0x204> <== NEVER TAKEN
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10f1da: 8b 45 14 mov 0x14(%ebp),%eax
10f1dd: 8b 38 mov (%eax),%edi
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
10f1df: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
10f1e6: 8d 75 af lea -0x51(%ebp),%esi
* 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 );
10f1e9: 8d 55 e4 lea -0x1c(%ebp),%edx
10f1ec: 52 push %edx
10f1ed: 56 push %esi
10f1ee: ff 75 0c pushl 0xc(%ebp)
10f1f1: 8b 45 08 mov 0x8(%ebp),%eax
10f1f4: 03 45 a4 add -0x5c(%ebp),%eax
10f1f7: 50 push %eax
10f1f8: e8 17 07 00 00 call 10f914 <IMFS_get_token>
10f1fd: 89 c3 mov %eax,%ebx
pathnamelen -= len;
10f1ff: 8b 55 e4 mov -0x1c(%ebp),%edx
i += len;
if ( !pathloc->node_access )
10f202: 8b 4d 14 mov 0x14(%ebp),%ecx
10f205: 8b 01 mov (%ecx),%eax
10f207: 83 c4 10 add $0x10,%esp
10f20a: 85 c0 test %eax,%eax
10f20c: 0f 84 e6 00 00 00 je 10f2f8 <IMFS_eval_path+0x134> <== NEVER TAKEN
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
10f212: 29 55 0c sub %edx,0xc(%ebp)
i += len;
10f215: 01 55 a4 add %edx,-0x5c(%ebp)
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10f218: 85 db test %ebx,%ebx
10f21a: 75 44 jne 10f260 <IMFS_eval_path+0x9c>
* 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 ) {
10f21c: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10f220: 0f 84 26 01 00 00 je 10f34c <IMFS_eval_path+0x188>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
10f226: 83 ec 0c sub $0xc,%esp
10f229: ff 75 14 pushl 0x14(%ebp)
10f22c: e8 87 fe ff ff call 10f0b8 <IMFS_Set_handlers>
10f231: 89 c3 mov %eax,%ebx
10f233: 5a pop %edx
10f234: 59 pop %ecx
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
10f235: ff 75 10 pushl 0x10(%ebp)
10f238: ff 75 14 pushl 0x14(%ebp)
10f23b: e8 d4 fe ff ff call 10f114 <IMFS_evaluate_permission>
10f240: 83 c4 10 add $0x10,%esp
10f243: 85 c0 test %eax,%eax
10f245: 0f 85 d1 00 00 00 jne 10f31c <IMFS_eval_path+0x158>
rtems_set_errno_and_return_minus_one( EACCES );
10f24b: e8 e4 40 00 00 call 113334 <__errno>
10f250: c7 00 0d 00 00 00 movl $0xd,(%eax)
10f256: bb ff ff ff ff mov $0xffffffff,%ebx
10f25b: e9 bc 00 00 00 jmp 10f31c <IMFS_eval_path+0x158>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
10f260: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10f264: 0f 84 be 00 00 00 je 10f328 <IMFS_eval_path+0x164>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
10f26a: 89 c7 mov %eax,%edi
switch( type ) {
10f26c: 83 fb 03 cmp $0x3,%ebx
10f26f: 74 1b je 10f28c <IMFS_eval_path+0xc8>
10f271: 83 fb 04 cmp $0x4,%ebx
10f274: 0f 84 92 00 00 00 je 10f30c <IMFS_eval_path+0x148>
10f27a: 83 fb 02 cmp $0x2,%ebx
10f27d: 74 51 je 10f2d0 <IMFS_eval_path+0x10c>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
10f27f: 83 fb 04 cmp $0x4,%ebx
10f282: 0f 85 61 ff ff ff jne 10f1e9 <IMFS_eval_path+0x25> <== ALWAYS TAKEN
10f288: eb 92 jmp 10f21c <IMFS_eval_path+0x58> <== NOT EXECUTED
10f28a: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
10f28c: 8b 40 4c mov 0x4c(%eax),%eax
10f28f: 83 f8 03 cmp $0x3,%eax
10f292: 0f 84 08 01 00 00 je 10f3a0 <IMFS_eval_path+0x1dc>
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
10f298: 83 f8 04 cmp $0x4,%eax
10f29b: 0f 84 51 01 00 00 je 10f3f2 <IMFS_eval_path+0x22e>
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10f2a1: 48 dec %eax
10f2a2: 0f 85 35 01 00 00 jne 10f3dd <IMFS_eval_path+0x219>
/*
* 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 ) {
10f2a8: 8b 47 5c mov 0x5c(%edi),%eax
10f2ab: 85 c0 test %eax,%eax
10f2ad: 0f 85 a4 00 00 00 jne 10f357 <IMFS_eval_path+0x193>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10f2b3: 83 ec 08 sub $0x8,%esp
10f2b6: 56 push %esi
10f2b7: 57 push %edi
10f2b8: e8 eb 05 00 00 call 10f8a8 <IMFS_find_match_in_dir>
10f2bd: 89 c7 mov %eax,%edi
if ( !node )
10f2bf: 83 c4 10 add $0x10,%esp
10f2c2: 85 c0 test %eax,%eax
10f2c4: 74 32 je 10f2f8 <IMFS_eval_path+0x134>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
10f2c6: 8b 45 14 mov 0x14(%ebp),%eax
10f2c9: 89 38 mov %edi,(%eax)
10f2cb: e9 19 ff ff ff jmp 10f1e9 <IMFS_eval_path+0x25>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10f2d0: 8b 15 b0 51 12 00 mov 0x1251b0,%edx
10f2d6: 39 42 18 cmp %eax,0x18(%edx)
10f2d9: 0f 84 0a ff ff ff je 10f1e9 <IMFS_eval_path+0x25>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
10f2df: 8b 4d 14 mov 0x14(%ebp),%ecx
10f2e2: 8b 51 10 mov 0x10(%ecx),%edx
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
10f2e5: 39 42 1c cmp %eax,0x1c(%edx)
10f2e8: 0f 84 d2 00 00 00 je 10f3c0 <IMFS_eval_path+0x1fc>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
10f2ee: 8b 78 08 mov 0x8(%eax),%edi
10f2f1: 85 ff test %edi,%edi
10f2f3: 75 d1 jne 10f2c6 <IMFS_eval_path+0x102>
10f2f5: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
10f2f8: e8 37 40 00 00 call 113334 <__errno>
10f2fd: c7 00 02 00 00 00 movl $0x2,(%eax)
10f303: bb ff ff ff ff mov $0xffffffff,%ebx
10f308: eb 12 jmp 10f31c <IMFS_eval_path+0x158>
10f30a: 66 90 xchg %ax,%ax
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10f30c: e8 23 40 00 00 call 113334 <__errno>
10f311: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10f317: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f31c: 89 d8 mov %ebx,%eax
10f31e: 8d 65 f4 lea -0xc(%ebp),%esp
10f321: 5b pop %ebx
10f322: 5e pop %esi
10f323: 5f pop %edi
10f324: c9 leave
10f325: c3 ret
10f326: 66 90 xchg %ax,%ax
/*
* 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 ) )
10f328: 83 ec 08 sub $0x8,%esp
10f32b: 6a 01 push $0x1
10f32d: ff 75 14 pushl 0x14(%ebp)
10f330: e8 df fd ff ff call 10f114 <IMFS_evaluate_permission>
10f335: 83 c4 10 add $0x10,%esp
10f338: 85 c0 test %eax,%eax
10f33a: 0f 84 0b ff ff ff je 10f24b <IMFS_eval_path+0x87>
10f340: 8b 55 14 mov 0x14(%ebp),%edx
10f343: 8b 02 mov (%edx),%eax
10f345: e9 20 ff ff ff jmp 10f26a <IMFS_eval_path+0xa6>
10f34a: 66 90 xchg %ax,%ax
*
* 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 ) {
10f34c: 8b 40 5c mov 0x5c(%eax),%eax
10f34f: 85 c0 test %eax,%eax
10f351: 0f 84 cf fe ff ff je 10f226 <IMFS_eval_path+0x62>
newloc = node->info.directory.mt_fs->mt_fs_root;
10f357: 8d 7d d0 lea -0x30(%ebp),%edi
10f35a: 8d 70 1c lea 0x1c(%eax),%esi
10f35d: b9 05 00 00 00 mov $0x5,%ecx
10f362: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10f364: 8d 75 d0 lea -0x30(%ebp),%esi
10f367: b1 05 mov $0x5,%cl
10f369: 8b 7d 14 mov 0x14(%ebp),%edi
10f36c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
10f36e: 8b 55 e4 mov -0x1c(%ebp),%edx
10f371: 8b 4d 14 mov 0x14(%ebp),%ecx
10f374: 8b 41 0c mov 0xc(%ecx),%eax
10f377: 51 push %ecx
10f378: ff 75 10 pushl 0x10(%ebp)
10f37b: 8b 4d 0c mov 0xc(%ebp),%ecx
10f37e: 01 d1 add %edx,%ecx
10f380: 51 push %ecx
10f381: 8b 4d a4 mov -0x5c(%ebp),%ecx
10f384: 29 d1 sub %edx,%ecx
10f386: 8b 55 08 mov 0x8(%ebp),%edx
10f389: 01 ca add %ecx,%edx
10f38b: 52 push %edx
10f38c: ff 10 call *(%eax)
10f38e: 89 c3 mov %eax,%ebx
10f390: 83 c4 10 add $0x10,%esp
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f393: 89 d8 mov %ebx,%eax
10f395: 8d 65 f4 lea -0xc(%ebp),%esp
10f398: 5b pop %ebx
10f399: 5e pop %esi
10f39a: 5f pop %edi
10f39b: c9 leave
10f39c: c3 ret
10f39d: 8d 76 00 lea 0x0(%esi),%esi
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
10f3a0: 83 ec 08 sub $0x8,%esp
10f3a3: 6a 00 push $0x0
10f3a5: ff 75 14 pushl 0x14(%ebp)
10f3a8: e8 d3 fd ff ff call 10f180 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
10f3ad: 8b 55 14 mov 0x14(%ebp),%edx
10f3b0: 8b 3a mov (%edx),%edi
10f3b2: 8b 47 4c mov 0x4c(%edi),%eax
10f3b5: 83 c4 10 add $0x10,%esp
10f3b8: e9 e4 fe ff ff jmp 10f2a1 <IMFS_eval_path+0xdd>
10f3bd: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
10f3c0: 8d 7d d0 lea -0x30(%ebp),%edi
10f3c3: 8d 72 08 lea 0x8(%edx),%esi
10f3c6: eb 95 jmp 10f35d <IMFS_eval_path+0x199>
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
10f3c8: e8 67 3f 00 00 call 113334 <__errno> <== NOT EXECUTED
10f3cd: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
10f3d3: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
10f3d8: e9 3f ff ff ff jmp 10f31c <IMFS_eval_path+0x158> <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
10f3dd: e8 52 3f 00 00 call 113334 <__errno>
10f3e2: c7 00 14 00 00 00 movl $0x14,(%eax)
10f3e8: bb ff ff ff ff mov $0xffffffff,%ebx
10f3ed: e9 2a ff ff ff jmp 10f31c <IMFS_eval_path+0x158>
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
10f3f2: 83 ec 08 sub $0x8,%esp
10f3f5: 6a 00 push $0x0
10f3f7: ff 75 14 pushl 0x14(%ebp)
10f3fa: e8 1d 00 00 00 call 10f41c <IMFS_evaluate_sym_link>
10f3ff: 89 c3 mov %eax,%ebx
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
10f401: 8b 4d 14 mov 0x14(%ebp),%ecx
10f404: 8b 39 mov (%ecx),%edi
if ( result == -1 )
10f406: 83 c4 10 add $0x10,%esp
10f409: 83 f8 ff cmp $0xffffffff,%eax
10f40c: 0f 84 0a ff ff ff je 10f31c <IMFS_eval_path+0x158> <== NEVER TAKEN
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
10f412: 8b 47 4c mov 0x4c(%edi),%eax
10f415: e9 87 fe ff ff jmp 10f2a1 <IMFS_eval_path+0xdd>
0010f544 <IMFS_evaluate_for_make>:
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
10f544: 55 push %ebp
10f545: 89 e5 mov %esp,%ebp
10f547: 57 push %edi
10f548: 56 push %esi
10f549: 53 push %ebx
10f54a: 83 ec 5c sub $0x5c,%esp
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10f54d: 8b 45 0c mov 0xc(%ebp),%eax
10f550: 8b 18 mov (%eax),%ebx
/*
* Get the path length.
*/
pathlen = strlen( path );
10f552: 31 c0 xor %eax,%eax
10f554: b9 ff ff ff ff mov $0xffffffff,%ecx
10f559: 8b 7d 08 mov 0x8(%ebp),%edi
10f55c: f2 ae repnz scas %es:(%edi),%al
10f55e: f7 d1 not %ecx
10f560: 8d 71 ff lea -0x1(%ecx),%esi
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
10f563: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
10f56a: 8d 55 e4 lea -0x1c(%ebp),%edx
10f56d: 52 push %edx
10f56e: 8d 4d af lea -0x51(%ebp),%ecx
10f571: 51 push %ecx
10f572: 56 push %esi
10f573: 8b 45 08 mov 0x8(%ebp),%eax
10f576: 03 45 a4 add -0x5c(%ebp),%eax
10f579: 50 push %eax
10f57a: e8 95 03 00 00 call 10f914 <IMFS_get_token>
10f57f: 89 c7 mov %eax,%edi
pathlen -= len;
10f581: 8b 55 e4 mov -0x1c(%ebp),%edx
10f584: 29 d6 sub %edx,%esi
i += len;
if ( !pathloc->node_access )
10f586: 8b 4d 0c mov 0xc(%ebp),%ecx
10f589: 8b 01 mov (%ecx),%eax
10f58b: 83 c4 10 add $0x10,%esp
10f58e: 85 c0 test %eax,%eax
10f590: 0f 84 55 01 00 00 je 10f6eb <IMFS_evaluate_for_make+0x1a7><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10f596: 85 ff test %edi,%edi
10f598: 75 1a jne 10f5b4 <IMFS_evaluate_for_make+0x70>
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
10f59a: e8 95 3d 00 00 call 113334 <__errno>
10f59f: c7 00 11 00 00 00 movl $0x11,(%eax)
10f5a5: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f5aa: 89 d8 mov %ebx,%eax
10f5ac: 8d 65 f4 lea -0xc(%ebp),%esp
10f5af: 5b pop %ebx
10f5b0: 5e pop %esi
10f5b1: 5f pop %edi
10f5b2: c9 leave
10f5b3: c3 ret
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
10f5b4: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f5b8: 0f 84 c6 00 00 00 je 10f684 <IMFS_evaluate_for_make+0x140>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
10f5be: 01 55 a4 add %edx,-0x5c(%ebp)
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
10f5c1: 89 c3 mov %eax,%ebx
switch( type ) {
10f5c3: 83 ff 02 cmp $0x2,%edi
10f5c6: 0f 84 88 00 00 00 je 10f654 <IMFS_evaluate_for_make+0x110>
10f5cc: 76 26 jbe 10f5f4 <IMFS_evaluate_for_make+0xb0>
10f5ce: 83 ff 03 cmp $0x3,%edi
10f5d1: 74 2d je 10f600 <IMFS_evaluate_for_make+0xbc>
10f5d3: 83 ff 04 cmp $0x4,%edi
10f5d6: 75 92 jne 10f56a <IMFS_evaluate_for_make+0x26><== NEVER TAKEN
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10f5d8: e8 57 3d 00 00 call 113334 <__errno>
10f5dd: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10f5e3: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f5e8: 89 d8 mov %ebx,%eax
10f5ea: 8d 65 f4 lea -0xc(%ebp),%esp
10f5ed: 5b pop %ebx
10f5ee: 5e pop %esi
10f5ef: 5f pop %edi
10f5f0: c9 leave
10f5f1: c3 ret
10f5f2: 66 90 xchg %ax,%ax
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
10f5f4: 85 ff test %edi,%edi
10f5f6: 74 a2 je 10f59a <IMFS_evaluate_for_make+0x56><== NEVER TAKEN
10f5f8: e9 6d ff ff ff jmp 10f56a <IMFS_evaluate_for_make+0x26>
10f5fd: 8d 76 00 lea 0x0(%esi),%esi
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
10f600: 8b 40 4c mov 0x4c(%eax),%eax
10f603: 83 f8 03 cmp $0x3,%eax
10f606: 0f 84 b4 01 00 00 je 10f7c0 <IMFS_evaluate_for_make+0x27c>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
10f60c: 83 f8 04 cmp $0x4,%eax
10f60f: 0f 84 ca 01 00 00 je 10f7df <IMFS_evaluate_for_make+0x29b>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
10f615: 85 db test %ebx,%ebx
10f617: 0f 84 67 01 00 00 je 10f784 <IMFS_evaluate_for_make+0x240><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10f61d: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f621: 0f 85 5d 01 00 00 jne 10f784 <IMFS_evaluate_for_make+0x240>
/*
* 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 ) {
10f627: 8b 43 5c mov 0x5c(%ebx),%eax
10f62a: 85 c0 test %eax,%eax
10f62c: 0f 85 67 01 00 00 jne 10f799 <IMFS_evaluate_for_make+0x255>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10f632: 83 ec 08 sub $0x8,%esp
10f635: 8d 45 af lea -0x51(%ebp),%eax
10f638: 50 push %eax
10f639: 53 push %ebx
10f63a: e8 69 02 00 00 call 10f8a8 <IMFS_find_match_in_dir>
10f63f: 89 c3 mov %eax,%ebx
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
10f641: 83 c4 10 add $0x10,%esp
10f644: 85 c0 test %eax,%eax
10f646: 74 64 je 10f6ac <IMFS_evaluate_for_make+0x168>
done = true;
else
pathloc->node_access = node;
10f648: 8b 55 0c mov 0xc(%ebp),%edx
10f64b: 89 02 mov %eax,(%edx)
10f64d: e9 18 ff ff ff jmp 10f56a <IMFS_evaluate_for_make+0x26>
10f652: 66 90 xchg %ax,%ax
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10f654: 8b 15 b0 51 12 00 mov 0x1251b0,%edx
10f65a: 3b 42 18 cmp 0x18(%edx),%eax
10f65d: 0f 84 07 ff ff ff je 10f56a <IMFS_evaluate_for_make+0x26>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
10f663: 8b 4d 0c mov 0xc(%ebp),%ecx
10f666: 8b 51 10 mov 0x10(%ecx),%edx
10f669: 3b 42 1c cmp 0x1c(%edx),%eax
10f66c: 0f 84 8e 00 00 00 je 10f700 <IMFS_evaluate_for_make+0x1bc>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
10f672: 8b 58 08 mov 0x8(%eax),%ebx
10f675: 85 db test %ebx,%ebx
10f677: 74 72 je 10f6eb <IMFS_evaluate_for_make+0x1a7>
rtems_set_errno_and_return_minus_one( ENOENT );
node = node->Parent;
}
pathloc->node_access = node;
10f679: 8b 4d 0c mov 0xc(%ebp),%ecx
10f67c: 89 19 mov %ebx,(%ecx)
break;
10f67e: e9 e7 fe ff ff jmp 10f56a <IMFS_evaluate_for_make+0x26>
10f683: 90 nop
* 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 ) )
10f684: 83 ec 08 sub $0x8,%esp
10f687: 6a 01 push $0x1
10f689: ff 75 0c pushl 0xc(%ebp)
10f68c: 89 55 a0 mov %edx,-0x60(%ebp)
10f68f: e8 80 fa ff ff call 10f114 <IMFS_evaluate_permission>
10f694: 83 c4 10 add $0x10,%esp
10f697: 85 c0 test %eax,%eax
10f699: 8b 55 a0 mov -0x60(%ebp),%edx
10f69c: 0f 84 cd 00 00 00 je 10f76f <IMFS_evaluate_for_make+0x22b>
10f6a2: 8b 4d 0c mov 0xc(%ebp),%ecx
10f6a5: 8b 01 mov (%ecx),%eax
10f6a7: e9 12 ff ff ff jmp 10f5be <IMFS_evaluate_for_make+0x7a>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
10f6ac: 8b 45 a4 mov -0x5c(%ebp),%eax
10f6af: 2b 45 e4 sub -0x1c(%ebp),%eax
10f6b2: 03 45 08 add 0x8(%ebp),%eax
10f6b5: 8b 4d 10 mov 0x10(%ebp),%ecx
10f6b8: 89 01 mov %eax,(%ecx)
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
10f6ba: 8b 4d 08 mov 0x8(%ebp),%ecx
10f6bd: 8b 55 a4 mov -0x5c(%ebp),%edx
10f6c0: 8a 04 11 mov (%ecx,%edx,1),%al
10f6c3: 84 c0 test %al,%al
10f6c5: 74 75 je 10f73c <IMFS_evaluate_for_make+0x1f8>
10f6c7: 89 d3 mov %edx,%ebx
10f6c9: 89 ce mov %ecx,%esi
10f6cb: eb 0b jmp 10f6d8 <IMFS_evaluate_for_make+0x194>
10f6cd: 8d 76 00 lea 0x0(%esi),%esi
10f6d0: 43 inc %ebx
10f6d1: 8a 04 1e mov (%esi,%ebx,1),%al
10f6d4: 84 c0 test %al,%al
10f6d6: 74 64 je 10f73c <IMFS_evaluate_for_make+0x1f8>
if ( !IMFS_is_separator( path[ i ] ) )
10f6d8: 83 ec 0c sub $0xc,%esp
10f6db: 0f be c0 movsbl %al,%eax
10f6de: 50 push %eax
10f6df: e8 34 98 ff ff call 108f18 <rtems_filesystem_is_separator>
10f6e4: 83 c4 10 add $0x10,%esp
10f6e7: 85 c0 test %eax,%eax
10f6e9: 75 e5 jne 10f6d0 <IMFS_evaluate_for_make+0x18c>
rtems_set_errno_and_return_minus_one( ENOENT );
10f6eb: e8 44 3c 00 00 call 113334 <__errno>
10f6f0: c7 00 02 00 00 00 movl $0x2,(%eax)
10f6f6: bb ff ff ff ff mov $0xffffffff,%ebx
10f6fb: e9 aa fe ff ff jmp 10f5aa <IMFS_evaluate_for_make+0x66>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
10f700: 8d 7d d0 lea -0x30(%ebp),%edi
10f703: 8d 72 08 lea 0x8(%edx),%esi
10f706: b9 05 00 00 00 mov $0x5,%ecx
10f70b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10f70d: 8d 75 d0 lea -0x30(%ebp),%esi
10f710: b1 05 mov $0x5,%cl
10f712: 8b 7d 0c mov 0xc(%ebp),%edi
10f715: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10f717: 53 push %ebx
10f718: 8b 55 0c mov 0xc(%ebp),%edx
10f71b: 8b 42 0c mov 0xc(%edx),%eax
10f71e: ff 75 10 pushl 0x10(%ebp)
10f721: 52 push %edx
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10f722: 8b 55 a4 mov -0x5c(%ebp),%edx
10f725: 2b 55 e4 sub -0x1c(%ebp),%edx
10f728: 03 55 08 add 0x8(%ebp),%edx
10f72b: 52 push %edx
10f72c: ff 50 04 call *0x4(%eax)
10f72f: 89 c3 mov %eax,%ebx
10f731: 83 c4 10 add $0x10,%esp
10f734: e9 71 fe ff ff jmp 10f5aa <IMFS_evaluate_for_make+0x66>
10f739: 8d 76 00 lea 0x0(%esi),%esi
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
10f73c: 83 ec 0c sub $0xc,%esp
10f73f: ff 75 0c pushl 0xc(%ebp)
10f742: e8 71 f9 ff ff call 10f0b8 <IMFS_Set_handlers>
10f747: 89 c3 mov %eax,%ebx
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
10f749: 8b 55 0c mov 0xc(%ebp),%edx
10f74c: 8b 02 mov (%edx),%eax
10f74e: 83 c4 10 add $0x10,%esp
10f751: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10f755: 75 2d jne 10f784 <IMFS_evaluate_for_make+0x240><== NEVER TAKEN
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
10f757: 83 ec 08 sub $0x8,%esp
10f75a: 6a 03 push $0x3
10f75c: ff 75 0c pushl 0xc(%ebp)
10f75f: e8 b0 f9 ff ff call 10f114 <IMFS_evaluate_permission>
10f764: 83 c4 10 add $0x10,%esp
10f767: 85 c0 test %eax,%eax
10f769: 0f 85 3b fe ff ff jne 10f5aa <IMFS_evaluate_for_make+0x66>
rtems_set_errno_and_return_minus_one( EACCES );
10f76f: e8 c0 3b 00 00 call 113334 <__errno>
10f774: c7 00 0d 00 00 00 movl $0xd,(%eax)
10f77a: bb ff ff ff ff mov $0xffffffff,%ebx
10f77f: e9 26 fe ff ff jmp 10f5aa <IMFS_evaluate_for_make+0x66>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
10f784: e8 ab 3b 00 00 call 113334 <__errno>
10f789: c7 00 14 00 00 00 movl $0x14,(%eax)
10f78f: bb ff ff ff ff mov $0xffffffff,%ebx
10f794: e9 11 fe ff ff jmp 10f5aa <IMFS_evaluate_for_make+0x66>
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
10f799: 8d 7d d0 lea -0x30(%ebp),%edi
10f79c: 8d 70 1c lea 0x1c(%eax),%esi
10f79f: b9 05 00 00 00 mov $0x5,%ecx
10f7a4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10f7a6: 8d 75 d0 lea -0x30(%ebp),%esi
10f7a9: b1 05 mov $0x5,%cl
10f7ab: 8b 7d 0c mov 0xc(%ebp),%edi
10f7ae: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10f7b0: 51 push %ecx
10f7b1: 8b 4d 0c mov 0xc(%ebp),%ecx
10f7b4: 8b 41 0c mov 0xc(%ecx),%eax
10f7b7: ff 75 10 pushl 0x10(%ebp)
10f7ba: 51 push %ecx
10f7bb: e9 62 ff ff ff jmp 10f722 <IMFS_evaluate_for_make+0x1de>
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
10f7c0: 83 ec 08 sub $0x8,%esp
10f7c3: 6a 00 push $0x0
10f7c5: ff 75 0c pushl 0xc(%ebp)
10f7c8: e8 cb fc ff ff call 10f498 <IMFS_evaluate_link>
if ( result == -1 )
10f7cd: 83 c4 10 add $0x10,%esp
10f7d0: 83 f8 ff cmp $0xffffffff,%eax
10f7d3: 74 29 je 10f7fe <IMFS_evaluate_for_make+0x2ba><== NEVER TAKEN
10f7d5: 8b 45 0c mov 0xc(%ebp),%eax
10f7d8: 8b 18 mov (%eax),%ebx
10f7da: e9 36 fe ff ff jmp 10f615 <IMFS_evaluate_for_make+0xd1>
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
10f7df: 83 ec 08 sub $0x8,%esp
10f7e2: 6a 00 push $0x0
10f7e4: ff 75 0c pushl 0xc(%ebp)
10f7e7: e8 ac fc ff ff call 10f498 <IMFS_evaluate_link>
if ( result == -1 )
10f7ec: 83 c4 10 add $0x10,%esp
10f7ef: 83 f8 ff cmp $0xffffffff,%eax
10f7f2: 74 0a je 10f7fe <IMFS_evaluate_for_make+0x2ba><== NEVER TAKEN
10f7f4: 8b 55 0c mov 0xc(%ebp),%edx
10f7f7: 8b 1a mov (%edx),%ebx
10f7f9: e9 17 fe ff ff jmp 10f615 <IMFS_evaluate_for_make+0xd1>
10f7fe: 89 c3 mov %eax,%ebx <== NOT EXECUTED
10f800: e9 a5 fd ff ff jmp 10f5aa <IMFS_evaluate_for_make+0x66><== NOT EXECUTED
0010f498 <IMFS_evaluate_link>:
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10f498: 55 push %ebp
10f499: 89 e5 mov %esp,%ebp
10f49b: 57 push %edi
10f49c: 56 push %esi
10f49d: 53 push %ebx
10f49e: 83 ec 0c sub $0xc,%esp
10f4a1: 8b 75 08 mov 0x8(%ebp),%esi
10f4a4: 8b 7d 0c mov 0xc(%ebp),%edi
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
10f4a7: 8b 15 b0 51 12 00 mov 0x1251b0,%edx
10f4ad: eb 0e jmp 10f4bd <IMFS_evaluate_link+0x25>
10f4af: 90 nop
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
10f4b0: 83 f8 04 cmp $0x4,%eax
10f4b3: 74 53 je 10f508 <IMFS_evaluate_link+0x70>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
10f4b5: 83 e8 03 sub $0x3,%eax
10f4b8: 83 f8 01 cmp $0x1,%eax
10f4bb: 77 3a ja 10f4f7 <IMFS_evaluate_link+0x5f><== ALWAYS TAKEN
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
10f4bd: 8b 1e mov (%esi),%ebx
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
10f4bf: 8b 42 30 mov 0x30(%edx),%eax
10f4c2: 40 inc %eax
10f4c3: 66 89 42 30 mov %ax,0x30(%edx)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
10f4c7: 66 83 f8 05 cmp $0x5,%ax
10f4cb: 77 57 ja 10f524 <IMFS_evaluate_link+0x8c><== NEVER TAKEN
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
10f4cd: 8b 43 4c mov 0x4c(%ebx),%eax
10f4d0: 83 f8 03 cmp $0x3,%eax
10f4d3: 75 db jne 10f4b0 <IMFS_evaluate_link+0x18>
result = IMFS_evaluate_hard_link( node, flags );
10f4d5: 83 ec 08 sub $0x8,%esp
10f4d8: 57 push %edi
10f4d9: 56 push %esi
10f4da: e8 a1 fc ff ff call 10f180 <IMFS_evaluate_hard_link>
10f4df: 83 c4 10 add $0x10,%esp
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 ) ) );
10f4e2: 85 c0 test %eax,%eax
10f4e4: 75 33 jne 10f519 <IMFS_evaluate_link+0x81>
10f4e6: 8b 43 4c mov 0x4c(%ebx),%eax
10f4e9: 8b 15 b0 51 12 00 mov 0x1251b0,%edx
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
10f4ef: 83 e8 03 sub $0x3,%eax
10f4f2: 83 f8 01 cmp $0x1,%eax
10f4f5: 76 c6 jbe 10f4bd <IMFS_evaluate_link+0x25><== ALWAYS TAKEN
10f4f7: 31 c0 xor %eax,%eax
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
10f4f9: 66 c7 42 30 00 00 movw $0x0,0x30(%edx)
return result;
}
10f4ff: 8d 65 f4 lea -0xc(%ebp),%esp
10f502: 5b pop %ebx
10f503: 5e pop %esi
10f504: 5f pop %edi
10f505: c9 leave
10f506: c3 ret
10f507: 90 nop
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 );
10f508: 83 ec 08 sub $0x8,%esp
10f50b: 57 push %edi
10f50c: 56 push %esi
10f50d: e8 0a ff ff ff call 10f41c <IMFS_evaluate_sym_link>
10f512: 83 c4 10 add $0x10,%esp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
10f515: 85 c0 test %eax,%eax
10f517: 74 cd je 10f4e6 <IMFS_evaluate_link+0x4e>
10f519: 8b 15 b0 51 12 00 mov 0x1251b0,%edx
10f51f: eb d8 jmp 10f4f9 <IMFS_evaluate_link+0x61>
10f521: 8d 76 00 lea 0x0(%esi),%esi
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
10f524: 66 c7 42 30 00 00 movw $0x0,0x30(%edx)
rtems_set_errno_and_return_minus_one( ELOOP );
10f52a: e8 05 3e 00 00 call 113334 <__errno>
10f52f: c7 00 5c 00 00 00 movl $0x5c,(%eax)
10f535: b8 ff ff ff ff mov $0xffffffff,%eax
*/
rtems_filesystem_link_counts = 0;
return result;
}
10f53a: 8d 65 f4 lea -0xc(%ebp),%esp
10f53d: 5b pop %ebx
10f53e: 5e pop %esi
10f53f: 5f pop %edi
10f540: c9 leave
10f541: c3 ret
0010f114 <IMFS_evaluate_permission>:
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
10f114: 55 push %ebp
10f115: 89 e5 mov %esp,%ebp
10f117: 57 push %edi
10f118: 56 push %esi
10f119: 53 push %ebx
10f11a: 83 ec 0c sub $0xc,%esp
10f11d: 8b 75 0c mov 0xc(%ebp),%esi
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
10f120: f7 c6 f8 ff ff ff test $0xfffffff8,%esi
10f126: 75 44 jne 10f16c <IMFS_evaluate_permission+0x58><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
10f128: 8b 45 08 mov 0x8(%ebp),%eax
10f12b: 8b 18 mov (%eax),%ebx
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10f12d: e8 1a 0c 00 00 call 10fd4c <geteuid>
10f132: 89 c7 mov %eax,%edi
st_gid = getegid();
10f134: e8 03 0c 00 00 call 10fd3c <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
10f139: 66 39 7b 3c cmp %di,0x3c(%ebx)
10f13d: 74 1d je 10f15c <IMFS_evaluate_permission+0x48>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
10f13f: 66 39 43 3e cmp %ax,0x3e(%ebx)
10f143: 74 1f je 10f164 <IMFS_evaluate_permission+0x50><== ALWAYS TAKEN
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
10f145: 8b 43 30 mov 0x30(%ebx),%eax
10f148: 21 f0 and %esi,%eax
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
10f14a: 39 c6 cmp %eax,%esi
10f14c: 0f 94 c0 sete %al
10f14f: 0f b6 c0 movzbl %al,%eax
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
10f152: 83 c4 0c add $0xc,%esp
10f155: 5b pop %ebx
10f156: 5e pop %esi
10f157: 5f pop %edi
10f158: c9 leave
10f159: c3 ret
10f15a: 66 90 xchg %ax,%ax
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
10f15c: c1 e6 06 shl $0x6,%esi
10f15f: eb e4 jmp 10f145 <IMFS_evaluate_permission+0x31>
10f161: 8d 76 00 lea 0x0(%esi),%esi
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
10f164: c1 e6 03 shl $0x3,%esi
10f167: eb dc jmp 10f145 <IMFS_evaluate_permission+0x31>
10f169: 8d 76 00 lea 0x0(%esi),%esi
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
10f16c: e8 c3 41 00 00 call 113334 <__errno> <== NOT EXECUTED
10f171: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10f177: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10f17c: eb d4 jmp 10f152 <IMFS_evaluate_permission+0x3e><== NOT EXECUTED
0010f41c <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10f41c: 55 push %ebp
10f41d: 89 e5 mov %esp,%ebp
10f41f: 57 push %edi
10f420: 56 push %esi
10f421: 53 push %ebx
10f422: 83 ec 20 sub $0x20,%esp
10f425: 8b 5d 08 mov 0x8(%ebp),%ebx
10f428: 8b 75 0c mov 0xc(%ebp),%esi
IMFS_jnode_t *jnode = node->node_access;
10f42b: 8b 3b mov (%ebx),%edi
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
10f42d: 8b 47 08 mov 0x8(%edi),%eax
10f430: 89 03 mov %eax,(%ebx)
rtems_filesystem_get_sym_start_loc(
10f432: 53 push %ebx
10f433: 8d 45 e4 lea -0x1c(%ebp),%eax
10f436: 50 push %eax
10f437: ff 77 50 pushl 0x50(%edi)
10f43a: e8 f9 0d 00 00 call 110238 <rtems_filesystem_get_sym_start_loc>
);
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
10f43f: 8b 57 50 mov 0x50(%edi),%edx
10f442: 03 55 e4 add -0x1c(%ebp),%edx
10f445: 31 c0 xor %eax,%eax
10f447: b9 ff ff ff ff mov $0xffffffff,%ecx
10f44c: 89 d7 mov %edx,%edi
10f44e: f2 ae repnz scas %es:(%edi),%al
10f450: f7 d1 not %ecx
10f452: 49 dec %ecx
10f453: 53 push %ebx
10f454: 56 push %esi
10f455: 51 push %ecx
10f456: 52 push %edx
10f457: e8 68 fd ff ff call 10f1c4 <IMFS_eval_path>
10f45c: 89 c7 mov %eax,%edi
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
10f45e: 83 c4 14 add $0x14,%esp
10f461: 53 push %ebx
10f462: e8 51 fc ff ff call 10f0b8 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
10f467: 58 pop %eax
10f468: 5a pop %edx
10f469: 56 push %esi
10f46a: 53 push %ebx
10f46b: e8 a4 fc ff ff call 10f114 <IMFS_evaluate_permission>
10f470: 83 c4 10 add $0x10,%esp
10f473: 85 c0 test %eax,%eax
10f475: 74 0d je 10f484 <IMFS_evaluate_sym_link+0x68>
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f477: 89 f8 mov %edi,%eax
10f479: 8d 65 f4 lea -0xc(%ebp),%esp
10f47c: 5b pop %ebx
10f47d: 5e pop %esi
10f47e: 5f pop %edi
10f47f: c9 leave
10f480: c3 ret
10f481: 8d 76 00 lea 0x0(%esi),%esi
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
10f484: e8 ab 3e 00 00 call 113334 <__errno>
10f489: c7 00 0d 00 00 00 movl $0xd,(%eax)
10f48f: bf ff ff ff ff mov $0xffffffff,%edi
10f494: eb e1 jmp 10f477 <IMFS_evaluate_sym_link+0x5b>
00112ab4 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
112ab4: 55 push %ebp
112ab5: 89 e5 mov %esp,%ebp
112ab7: 53 push %ebx
112ab8: 83 ec 14 sub $0x14,%esp
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
112abb: 8b 45 08 mov 0x8(%ebp),%eax
112abe: 8b 18 mov (%eax),%ebx
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
112ac0: e8 87 d2 ff ff call 10fd4c <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
112ac5: 66 39 43 3c cmp %ax,0x3c(%ebx)
112ac9: 74 05 je 112ad0 <IMFS_fchmod+0x1c>
112acb: 66 85 c0 test %ax,%ax
112ace: 75 34 jne 112b04 <IMFS_fchmod+0x50> <== ALWAYS TAKEN
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
112ad0: 8b 45 0c mov 0xc(%ebp),%eax
112ad3: 25 ff 0f 00 00 and $0xfff,%eax
/*
* 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);
112ad8: 8b 53 30 mov 0x30(%ebx),%edx
112adb: 81 e2 00 f0 ff ff and $0xfffff000,%edx
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
112ae1: 09 d0 or %edx,%eax
112ae3: 89 43 30 mov %eax,0x30(%ebx)
IMFS_update_ctime( jnode );
112ae6: 83 ec 08 sub $0x8,%esp
112ae9: 6a 00 push $0x0
112aeb: 8d 45 f0 lea -0x10(%ebp),%eax
112aee: 50 push %eax
112aef: e8 3c 56 ff ff call 108130 <gettimeofday>
112af4: 8b 45 f0 mov -0x10(%ebp),%eax
112af7: 89 43 48 mov %eax,0x48(%ebx)
return 0;
112afa: 83 c4 10 add $0x10,%esp
112afd: 31 c0 xor %eax,%eax
}
112aff: 8b 5d fc mov -0x4(%ebp),%ebx
112b02: c9 leave
112b03: c3 ret
*/
#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 );
112b04: e8 2b 08 00 00 call 113334 <__errno>
112b09: c7 00 01 00 00 00 movl $0x1,(%eax)
112b0f: b8 ff ff ff ff mov $0xffffffff,%eax
112b14: eb e9 jmp 112aff <IMFS_fchmod+0x4b>
00108a74 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
108a74: 55 push %ebp
108a75: 89 e5 mov %esp,%ebp
108a77: 53 push %ebx
108a78: 83 ec 04 sub $0x4,%esp
108a7b: 8b 45 08 mov 0x8(%ebp),%eax
108a7e: 8b 55 0c mov 0xc(%ebp),%edx
108a81: 8b 4d 10 mov 0x10(%ebp),%ecx
int err;
if (command == FIONBIO) {
108a84: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx
108a8a: 74 1c je 108aa8 <IMFS_fifo_ioctl+0x34>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
108a8c: 50 push %eax
108a8d: 51 push %ecx
108a8e: 52 push %edx
108a8f: 8b 40 18 mov 0x18(%eax),%eax
108a92: ff 70 50 pushl 0x50(%eax)
108a95: e8 fa 97 00 00 call 112294 <pipe_ioctl>
IMFS_FIFO_RETURN(err);
108a9a: 83 c4 10 add $0x10,%esp
108a9d: 85 c0 test %eax,%eax
108a9f: 78 3e js 108adf <IMFS_fifo_ioctl+0x6b>
}
108aa1: 8b 5d fc mov -0x4(%ebp),%ebx
108aa4: c9 leave
108aa5: c3 ret
108aa6: 66 90 xchg %ax,%ax
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
108aa8: 85 c9 test %ecx,%ecx
108aaa: 74 20 je 108acc <IMFS_fifo_ioctl+0x58>
err = -EFAULT;
else {
if (*(int *)buffer)
108aac: 8b 11 mov (%ecx),%edx
108aae: 85 d2 test %edx,%edx
108ab0: 74 0e je 108ac0 <IMFS_fifo_ioctl+0x4c>
iop->flags |= LIBIO_FLAGS_NO_DELAY;
108ab2: 83 48 14 01 orl $0x1,0x14(%eax)
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
108ab6: 31 c0 xor %eax,%eax
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
108ab8: 8b 5d fc mov -0x4(%ebp),%ebx
108abb: c9 leave
108abc: c3 ret
108abd: 8d 76 00 lea 0x0(%esi),%esi
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
108ac0: 83 60 14 fe andl $0xfffffffe,0x14(%eax)
return 0;
108ac4: 31 c0 xor %eax,%eax
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
108ac6: 8b 5d fc mov -0x4(%ebp),%ebx
108ac9: c9 leave
108aca: c3 ret
108acb: 90 nop
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
108acc: bb 0e 00 00 00 mov $0xe,%ebx
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
108ad1: e8 3e ca 00 00 call 115514 <__errno>
108ad6: 89 18 mov %ebx,(%eax)
108ad8: b8 ff ff ff ff mov $0xffffffff,%eax
108add: eb c2 jmp 108aa1 <IMFS_fifo_ioctl+0x2d>
108adf: 89 c3 mov %eax,%ebx
108ae1: f7 db neg %ebx
108ae3: eb ec jmp 108ad1 <IMFS_fifo_ioctl+0x5d>
00108a30 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
108a30: 55 push %ebp
108a31: 89 e5 mov %esp,%ebp
108a33: 53 push %ebx
108a34: 83 ec 10 sub $0x10,%esp
108a37: 8b 45 08 mov 0x8(%ebp),%eax
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
108a3a: 50 push %eax
108a3b: ff 75 14 pushl 0x14(%ebp)
108a3e: ff 75 10 pushl 0x10(%ebp)
108a41: ff 75 0c pushl 0xc(%ebp)
108a44: 8b 40 18 mov 0x18(%eax),%eax
108a47: ff 70 50 pushl 0x50(%eax)
108a4a: e8 a5 98 00 00 call 1122f4 <pipe_lseek>
108a4f: 89 c3 mov %eax,%ebx
108a51: 99 cltd
IMFS_FIFO_RETURN(err);
108a52: 83 c4 20 add $0x20,%esp
108a55: 85 d2 test %edx,%edx
108a57: 78 05 js 108a5e <IMFS_fifo_lseek+0x2e> <== ALWAYS TAKEN
}
108a59: 8b 5d fc mov -0x4(%ebp),%ebx
108a5c: c9 leave
108a5d: c3 ret
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
108a5e: e8 b1 ca 00 00 call 115514 <__errno>
108a63: f7 db neg %ebx
108a65: 89 18 mov %ebx,(%eax)
108a67: b8 ff ff ff ff mov $0xffffffff,%eax
108a6c: ba ff ff ff ff mov $0xffffffff,%edx
108a71: eb e6 jmp 108a59 <IMFS_fifo_lseek+0x29>
00108ae8 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
108ae8: 55 push %ebp
108ae9: 89 e5 mov %esp,%ebp
108aeb: 56 push %esi
108aec: 53 push %ebx
108aed: 83 ec 10 sub $0x10,%esp
108af0: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
108af3: 8b 58 18 mov 0x18(%eax),%ebx
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
108af6: 50 push %eax
108af7: ff 75 10 pushl 0x10(%ebp)
108afa: ff 75 0c pushl 0xc(%ebp)
108afd: ff 73 50 pushl 0x50(%ebx)
108b00: e8 8f 95 00 00 call 112094 <pipe_write>
108b05: 89 c6 mov %eax,%esi
if (err > 0) {
108b07: 83 c4 10 add $0x10,%esp
108b0a: 83 f8 00 cmp $0x0,%eax
108b0d: 7e 25 jle 108b34 <IMFS_fifo_write+0x4c>
IMFS_mtime_ctime_update(jnode);
108b0f: 83 ec 08 sub $0x8,%esp
108b12: 6a 00 push $0x0
108b14: 8d 45 f0 lea -0x10(%ebp),%eax
108b17: 50 push %eax
108b18: e8 2f 0f 00 00 call 109a4c <gettimeofday>
108b1d: 8b 45 f0 mov -0x10(%ebp),%eax
108b20: 89 43 44 mov %eax,0x44(%ebx)
108b23: 89 43 48 mov %eax,0x48(%ebx)
108b26: 83 c4 10 add $0x10,%esp
}
IMFS_FIFO_RETURN(err);
}
108b29: 89 f0 mov %esi,%eax
108b2b: 8d 65 f8 lea -0x8(%ebp),%esp
108b2e: 5b pop %ebx
108b2f: 5e pop %esi
108b30: c9 leave
108b31: c3 ret
108b32: 66 90 xchg %ax,%ax
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
108b34: 74 f3 je 108b29 <IMFS_fifo_write+0x41> <== NEVER TAKEN
108b36: e8 d9 c9 00 00 call 115514 <__errno>
108b3b: f7 de neg %esi
108b3d: 89 30 mov %esi,(%eax)
108b3f: be ff ff ff ff mov $0xffffffff,%esi
108b44: eb e3 jmp 108b29 <IMFS_fifo_write+0x41>
0010f8a8 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
10f8a8: 55 push %ebp
10f8a9: 89 e5 mov %esp,%ebp
10f8ab: 57 push %edi
10f8ac: 56 push %esi
10f8ad: 53 push %ebx
10f8ae: 83 ec 0c sub $0xc,%esp
10f8b1: 8b 45 08 mov 0x8(%ebp),%eax
10f8b4: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
10f8b7: bf f0 0f 12 00 mov $0x120ff0,%edi
10f8bc: b9 02 00 00 00 mov $0x2,%ecx
10f8c1: 89 de mov %ebx,%esi
10f8c3: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10f8c5: 74 13 je 10f8da <IMFS_find_match_in_dir+0x32><== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
10f8c7: bf f2 0f 12 00 mov $0x120ff2,%edi
10f8cc: b9 03 00 00 00 mov $0x3,%ecx
10f8d1: 89 de mov %ebx,%esi
10f8d3: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10f8d5: 75 0d jne 10f8e4 <IMFS_find_match_in_dir+0x3c><== ALWAYS TAKEN
return directory->Parent;
10f8d7: 8b 40 08 mov 0x8(%eax),%eax
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
10f8da: 8d 65 f4 lea -0xc(%ebp),%esp
10f8dd: 5b pop %ebx
10f8de: 5e pop %esi
10f8df: 5f pop %edi
10f8e0: c9 leave
10f8e1: c3 ret
10f8e2: 66 90 xchg %ax,%ax
10f8e4: 8b 70 50 mov 0x50(%eax),%esi
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
10f8e7: 8d 78 54 lea 0x54(%eax),%edi
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
10f8ea: 39 fe cmp %edi,%esi
10f8ec: 75 08 jne 10f8f6 <IMFS_find_match_in_dir+0x4e>
10f8ee: eb 20 jmp 10f910 <IMFS_find_match_in_dir+0x68>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
10f8f0: 8b 36 mov (%esi),%esi
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
10f8f2: 39 fe cmp %edi,%esi
10f8f4: 74 1a je 10f910 <IMFS_find_match_in_dir+0x68>
!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 ) )
10f8f6: 8d 46 0c lea 0xc(%esi),%eax
10f8f9: 83 ec 08 sub $0x8,%esp
10f8fc: 50 push %eax
10f8fd: 53 push %ebx
10f8fe: e8 a9 46 00 00 call 113fac <strcmp>
10f903: 83 c4 10 add $0x10,%esp
10f906: 85 c0 test %eax,%eax
10f908: 75 e6 jne 10f8f0 <IMFS_find_match_in_dir+0x48>
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
10f90a: 89 f0 mov %esi,%eax
10f90c: eb cc jmp 10f8da <IMFS_find_match_in_dir+0x32>
10f90e: 66 90 xchg %ax,%ax
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
10f910: 31 c0 xor %eax,%eax
10f912: eb c6 jmp 10f8da <IMFS_find_match_in_dir+0x32>
0010f808 <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
)
{
10f808: 55 push %ebp
10f809: 89 e5 mov %esp,%ebp
10f80b: 57 push %edi
10f80c: 56 push %esi
10f80d: 53 push %ebx
10f80e: 83 ec 3c sub $0x3c,%esp
10f811: 8b 45 08 mov 0x8(%ebp),%eax
/*
* 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;
10f814: 8b 58 1c mov 0x1c(%eax),%ebx
loc = temp_mt_entry->mt_fs_root;
10f817: 8d 55 d4 lea -0x2c(%ebp),%edx
10f81a: 89 55 c4 mov %edx,-0x3c(%ebp)
10f81d: 8d 70 1c lea 0x1c(%eax),%esi
10f820: b9 05 00 00 00 mov $0x5,%ecx
10f825: 89 d7 mov %edx,%edi
10f827: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
10f829: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
do {
next = jnode->Parent;
10f830: 8b 73 08 mov 0x8(%ebx),%esi
loc.node_access = (void *)jnode;
10f833: 89 5d d4 mov %ebx,-0x2c(%ebp)
IMFS_Set_handlers( &loc );
10f836: 83 ec 0c sub $0xc,%esp
10f839: 8d 45 d4 lea -0x2c(%ebp),%eax
10f83c: 50 push %eax
10f83d: e8 76 f8 ff ff call 10f0b8 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
10f842: 83 c4 10 add $0x10,%esp
10f845: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f849: 75 31 jne 10f87c <IMFS_fsunmount+0x74>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10f84b: 8d 43 54 lea 0x54(%ebx),%eax
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
10f84e: 39 43 50 cmp %eax,0x50(%ebx)
10f851: 74 42 je 10f895 <IMFS_fsunmount+0x8d>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
10f853: 85 db test %ebx,%ebx
10f855: 74 19 je 10f870 <IMFS_fsunmount+0x68>
if ( jnode->type == IMFS_DIRECTORY ) {
10f857: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f85b: 75 d3 jne 10f830 <IMFS_fsunmount+0x28> <== NEVER TAKEN
}
}
} while (jnode != NULL);
return 0;
}
10f85d: 8b 43 50 mov 0x50(%ebx),%eax
10f860: 8d 53 54 lea 0x54(%ebx),%edx
return -1;
jnode = next;
}
if ( jnode != NULL ) {
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
10f863: 39 d0 cmp %edx,%eax
10f865: 74 c9 je 10f830 <IMFS_fsunmount+0x28>
jnode = jnode_get_first_child( jnode );
10f867: 89 c3 mov %eax,%ebx
}
}
} while (jnode != NULL);
10f869: 85 c0 test %eax,%eax
10f86b: 75 c3 jne 10f830 <IMFS_fsunmount+0x28> <== ALWAYS TAKEN
10f86d: 8d 76 00 lea 0x0(%esi),%esi
return 0;
10f870: 31 c0 xor %eax,%eax
}
10f872: 8d 65 f4 lea -0xc(%ebp),%esp
10f875: 5b pop %ebx
10f876: 5e pop %esi
10f877: 5f pop %edi
10f878: c9 leave
10f879: c3 ret
10f87a: 66 90 xchg %ax,%ax
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
10f87c: 83 ec 08 sub $0x8,%esp
10f87f: 8d 55 d4 lea -0x2c(%ebp),%edx
10f882: 52 push %edx
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
10f883: 6a 00 push $0x0
10f885: e8 72 83 ff ff call 107bfc <IMFS_unlink>
if (result != 0)
10f88a: 83 c4 10 add $0x10,%esp
10f88d: 85 c0 test %eax,%eax
10f88f: 75 0d jne 10f89e <IMFS_fsunmount+0x96> <== NEVER TAKEN
return -1;
jnode = next;
10f891: 89 f3 mov %esi,%ebx
10f893: eb be jmp 10f853 <IMFS_fsunmount+0x4b>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
10f895: 83 ec 08 sub $0x8,%esp
10f898: 8d 45 d4 lea -0x2c(%ebp),%eax
10f89b: 50 push %eax
10f89c: eb e5 jmp 10f883 <IMFS_fsunmount+0x7b>
if (result != 0)
return -1;
10f89e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10f8a3: eb cd jmp 10f872 <IMFS_fsunmount+0x6a> <== NOT EXECUTED
0010f914 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
10f914: 55 push %ebp
10f915: 89 e5 mov %esp,%ebp
10f917: 57 push %edi
10f918: 56 push %esi
10f919: 53 push %ebx
10f91a: 83 ec 1c sub $0x1c,%esp
10f91d: 8b 7d 08 mov 0x8(%ebp),%edi
10f920: 8b 5d 10 mov 0x10(%ebp),%ebx
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
10f923: 8a 17 mov (%edi),%dl
int pathlen,
char *token,
int *token_len
)
{
register int i = 0;
10f925: 31 f6 xor %esi,%esi
10f927: 89 7d e4 mov %edi,-0x1c(%ebp)
10f92a: 89 df mov %ebx,%edi
10f92c: 88 d3 mov %dl,%bl
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
10f92e: eb 07 jmp 10f937 <IMFS_get_token+0x23>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
10f930: 46 inc %esi
10f931: 8b 45 e4 mov -0x1c(%ebp),%eax
10f934: 8a 1c 30 mov (%eax,%esi,1),%bl
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
10f937: 83 ec 0c sub $0xc,%esp
10f93a: 0f be c3 movsbl %bl,%eax
10f93d: 50 push %eax
10f93e: e8 d5 95 ff ff call 108f18 <rtems_filesystem_is_separator>
10f943: 83 c4 10 add $0x10,%esp
10f946: 85 c0 test %eax,%eax
10f948: 75 1a jne 10f964 <IMFS_get_token+0x50>
10f94a: 3b 75 0c cmp 0xc(%ebp),%esi
10f94d: 7d 15 jge 10f964 <IMFS_get_token+0x50>
token[i] = c;
10f94f: 88 1c 37 mov %bl,(%edi,%esi,1)
if ( i == IMFS_NAME_MAX )
10f952: 83 fe 20 cmp $0x20,%esi
10f955: 75 d9 jne 10f930 <IMFS_get_token+0x1c>
return IMFS_INVALID_TOKEN;
10f957: b8 04 00 00 00 mov $0x4,%eax
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
10f95c: 8d 65 f4 lea -0xc(%ebp),%esp
10f95f: 5b pop %ebx
10f960: 5e pop %esi
10f961: 5f pop %edi
10f962: c9 leave
10f963: c3 ret
10f964: 88 da mov %bl,%dl
10f966: 89 fb mov %edi,%ebx
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
10f968: 85 f6 test %esi,%esi
10f96a: 75 25 jne 10f991 <IMFS_get_token+0x7d>
token[i] = c;
10f96c: 88 17 mov %dl,(%edi)
if ( (token[i] != '\0') && pathlen ) {
10f96e: 84 d2 test %dl,%dl
10f970: 74 16 je 10f988 <IMFS_get_token+0x74>
10f972: 8b 45 0c mov 0xc(%ebp),%eax
10f975: 85 c0 test %eax,%eax
10f977: 74 0f je 10f988 <IMFS_get_token+0x74>
i++;
type = IMFS_CURRENT_DIR;
10f979: b8 01 00 00 00 mov $0x1,%eax
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
10f97e: be 01 00 00 00 mov $0x1,%esi
10f983: eb 05 jmp 10f98a <IMFS_get_token+0x76>
10f985: 8d 76 00 lea 0x0(%esi),%esi
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
10f988: 31 c0 xor %eax,%eax
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10f98a: 8b 55 14 mov 0x14(%ebp),%edx
10f98d: 89 32 mov %esi,(%edx)
10f98f: eb cb jmp 10f95c <IMFS_get_token+0x48>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
10f991: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1)
10f996: 74 04 je 10f99c <IMFS_get_token+0x88> <== NEVER TAKEN
token[i] = '\0';
10f998: c6 04 37 00 movb $0x0,(%edi,%esi,1)
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10f99c: 8b 45 14 mov 0x14(%ebp),%eax
10f99f: 89 30 mov %esi,(%eax)
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
10f9a1: bf f5 0f 12 00 mov $0x120ff5,%edi
10f9a6: b9 03 00 00 00 mov $0x3,%ecx
10f9ab: 89 de mov %ebx,%esi
10f9ad: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10f9af: 75 0f jne 10f9c0 <IMFS_get_token+0xac>
type = IMFS_UP_DIR;
10f9b1: b8 02 00 00 00 mov $0x2,%eax
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
10f9b6: 8d 65 f4 lea -0xc(%ebp),%esp
10f9b9: 5b pop %ebx
10f9ba: 5e pop %esi
10f9bb: 5f pop %edi
10f9bc: c9 leave
10f9bd: c3 ret
10f9be: 66 90 xchg %ax,%ax
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
10f9c0: bf f6 0f 12 00 mov $0x120ff6,%edi
10f9c5: b9 02 00 00 00 mov $0x2,%ecx
10f9ca: 89 de mov %ebx,%esi
10f9cc: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10f9ce: 0f 97 c0 seta %al
10f9d1: 0f 92 c2 setb %dl
10f9d4: 28 d0 sub %dl,%al
10f9d6: 0f be c0 movsbl %al,%eax
10f9d9: 83 f8 01 cmp $0x1,%eax
10f9dc: 19 c0 sbb %eax,%eax
10f9de: 83 e0 fe and $0xfffffffe,%eax
10f9e1: 83 c0 03 add $0x3,%eax
type = IMFS_CURRENT_DIR;
}
return type;
}
10f9e4: 8d 65 f4 lea -0xc(%ebp),%esp
10f9e7: 5b pop %ebx
10f9e8: 5e pop %esi
10f9e9: 5f pop %edi
10f9ea: c9 leave
10f9eb: c3 ret
00107844 <IMFS_initialize_support>:
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
107844: 55 push %ebp
107845: 89 e5 mov %esp,%ebp
107847: 57 push %edi
107848: 56 push %esi
107849: 53 push %ebx
10784a: 83 ec 1c sub $0x1c,%esp
10784d: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
107850: 8b 0d b0 31 12 00 mov 0x1231b0,%ecx
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
107856: 83 f9 10 cmp $0x10,%ecx
107859: 74 1f je 10787a <IMFS_initialize_support+0x36>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
10785b: 83 f9 0f cmp $0xf,%ecx
10785e: 7e 15 jle 107875 <IMFS_initialize_support+0x31>
107860: ba 05 00 00 00 mov $0x5,%edx
107865: b8 20 00 00 00 mov $0x20,%eax
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
10786a: 39 c1 cmp %eax,%ecx
10786c: 74 0c je 10787a <IMFS_initialize_support+0x36>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
10786e: 7c 05 jl 107875 <IMFS_initialize_support+0x31><== NEVER TAKEN
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
107870: d1 e0 shl %eax
107872: 4a dec %edx
107873: 75 f5 jne 10786a <IMFS_initialize_support+0x26><== ALWAYS TAKEN
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
107875: b9 80 00 00 00 mov $0x80,%ecx
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
10787a: 89 0d a0 70 12 00 mov %ecx,0x1270a0
/*
* 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();
107880: e8 ff 77 00 00 call 10f084 <IMFS_create_root_node>
107885: 89 c2 mov %eax,%edx
107887: 89 43 1c mov %eax,0x1c(%ebx)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
10788a: 8b 45 14 mov 0x14(%ebp),%eax
10788d: 89 43 24 mov %eax,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = op_table;
107890: 8b 45 0c mov 0xc(%ebp),%eax
107893: 89 43 28 mov %eax,0x28(%ebx)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
107896: 8d 7b 38 lea 0x38(%ebx),%edi
107899: be a0 0f 12 00 mov $0x120fa0,%esi
10789e: b9 0c 00 00 00 mov $0xc,%ecx
1078a3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
1078a5: 83 ec 08 sub $0x8,%esp
1078a8: 6a 14 push $0x14
1078aa: 6a 01 push $0x1
1078ac: 89 55 e4 mov %edx,-0x1c(%ebp)
1078af: e8 70 06 00 00 call 107f24 <calloc>
if ( !fs_info ) {
1078b4: 83 c4 10 add $0x10,%esp
1078b7: 85 c0 test %eax,%eax
1078b9: 8b 55 e4 mov -0x1c(%ebp),%edx
1078bc: 74 3c je 1078fa <IMFS_initialize_support+0xb6>
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
1078be: 89 43 34 mov %eax,0x34(%ebx)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
1078c1: 8b 0d a4 70 12 00 mov 0x1270a4,%ecx
1078c7: 89 08 mov %ecx,(%eax)
1078c9: 41 inc %ecx
1078ca: 89 0d a4 70 12 00 mov %ecx,0x1270a4
fs_info->ino_count = 1;
1078d0: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
fs_info->memfile_handlers = memfile_handlers;
1078d7: 8b 4d 10 mov 0x10(%ebp),%ecx
1078da: 89 48 08 mov %ecx,0x8(%eax)
fs_info->directory_handlers = directory_handlers;
1078dd: 8b 4d 14 mov 0x14(%ebp),%ecx
1078e0: 89 48 0c mov %ecx,0xc(%eax)
fs_info->fifo_handlers = fifo_handlers;
1078e3: 8b 4d 18 mov 0x18(%ebp),%ecx
1078e6: 89 48 10 mov %ecx,0x10(%eax)
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
1078e9: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx)
return 0;
1078f0: 31 c0 xor %eax,%eax
}
1078f2: 8d 65 f4 lea -0xc(%ebp),%esp
1078f5: 5b pop %ebx
1078f6: 5e pop %esi
1078f7: 5f pop %edi
1078f8: c9 leave
1078f9: c3 ret
/*
* 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);
1078fa: 83 ec 0c sub $0xc,%esp
1078fd: 52 push %edx
1078fe: e8 b1 07 00 00 call 1080b4 <free>
rtems_set_errno_and_return_minus_one(ENOMEM);
107903: e8 2c ba 00 00 call 113334 <__errno>
107908: c7 00 0c 00 00 00 movl $0xc,(%eax)
10790e: 83 c4 10 add $0x10,%esp
107911: 83 c8 ff or $0xffffffff,%eax
107914: eb dc jmp 1078f2 <IMFS_initialize_support+0xae>
00107918 <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
107918: 55 push %ebp
107919: 89 e5 mov %esp,%ebp
10791b: 57 push %edi
10791c: 53 push %ebx
10791d: 83 ec 50 sub $0x50,%esp
107920: 8b 55 10 mov 0x10(%ebp),%edx
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
107923: 8b 45 08 mov 0x8(%ebp),%eax
107926: 8b 00 mov (%eax),%eax
107928: 89 45 d8 mov %eax,-0x28(%ebp)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
10792b: 66 83 78 34 07 cmpw $0x7,0x34(%eax)
107930: 77 66 ja 107998 <IMFS_link+0x80>
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 );
107932: 31 c0 xor %eax,%eax
107934: b9 ff ff ff ff mov $0xffffffff,%ecx
107939: 89 d7 mov %edx,%edi
10793b: f2 ae repnz scas %es:(%edi),%al
10793d: f7 d1 not %ecx
10793f: 49 dec %ecx
107940: 8d 45 f4 lea -0xc(%ebp),%eax
107943: 50 push %eax
107944: 8d 5d b7 lea -0x49(%ebp),%ebx
107947: 53 push %ebx
107948: 51 push %ecx
107949: 52 push %edx
10794a: e8 c5 7f 00 00 call 10f914 <IMFS_get_token>
new_node = IMFS_create_node(
parent_loc,
IMFS_HARD_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
10794f: 8d 45 d8 lea -0x28(%ebp),%eax
* 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(
107952: 89 04 24 mov %eax,(%esp)
107955: 68 ff a1 00 00 push $0xa1ff
10795a: 53 push %ebx
10795b: 6a 03 push $0x3
10795d: ff 75 0c pushl 0xc(%ebp)
107960: e8 e7 75 00 00 call 10ef4c <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
107965: 83 c4 20 add $0x20,%esp
107968: 85 c0 test %eax,%eax
10796a: 74 3e je 1079aa <IMFS_link+0x92>
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++;
10796c: 8b 45 d8 mov -0x28(%ebp),%eax
10796f: 66 ff 40 34 incw 0x34(%eax)
IMFS_update_ctime( info.hard_link.link_node );
107973: 83 ec 08 sub $0x8,%esp
107976: 6a 00 push $0x0
107978: 8d 45 ec lea -0x14(%ebp),%eax
10797b: 50 push %eax
10797c: e8 af 07 00 00 call 108130 <gettimeofday>
107981: 8b 55 ec mov -0x14(%ebp),%edx
107984: 8b 45 d8 mov -0x28(%ebp),%eax
107987: 89 50 48 mov %edx,0x48(%eax)
return 0;
10798a: 83 c4 10 add $0x10,%esp
10798d: 31 c0 xor %eax,%eax
}
10798f: 8d 65 f8 lea -0x8(%ebp),%esp
107992: 5b pop %ebx
107993: 5f pop %edi
107994: c9 leave
107995: c3 ret
107996: 66 90 xchg %ax,%ax
/*
* 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 );
107998: e8 97 b9 00 00 call 113334 <__errno>
10799d: c7 00 1f 00 00 00 movl $0x1f,(%eax)
1079a3: b8 ff ff ff ff mov $0xffffffff,%eax
1079a8: eb e5 jmp 10798f <IMFS_link+0x77>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
1079aa: e8 85 b9 00 00 call 113334 <__errno>
1079af: c7 00 0c 00 00 00 movl $0xc,(%eax)
1079b5: b8 ff ff ff ff mov $0xffffffff,%eax
1079ba: eb d3 jmp 10798f <IMFS_link+0x77>
00111e74 <IMFS_memfile_addblock>:
*/
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
111e74: 55 push %ebp
111e75: 89 e5 mov %esp,%ebp
111e77: 53 push %ebx
111e78: 83 ec 08 sub $0x8,%esp
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
111e7b: 6a 01 push $0x1
111e7d: ff 75 0c pushl 0xc(%ebp)
111e80: ff 75 08 pushl 0x8(%ebp)
111e83: e8 28 fc ff ff call 111ab0 <IMFS_memfile_get_block_pointer>
111e88: 89 c3 mov %eax,%ebx
if ( *block_entry_ptr )
111e8a: 83 c4 10 add $0x10,%esp
111e8d: 8b 00 mov (%eax),%eax
111e8f: 85 c0 test %eax,%eax
111e91: 74 09 je 111e9c <IMFS_memfile_addblock+0x28>
return 0;
111e93: 31 c0 xor %eax,%eax
if ( !memory )
return 1;
*block_entry_ptr = memory;
return 0;
}
111e95: 8b 5d fc mov -0x4(%ebp),%ebx
111e98: c9 leave
111e99: c3 ret
111e9a: 66 90 xchg %ax,%ax
return 0;
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
111e9c: e8 eb fb ff ff call 111a8c <memfile_alloc_block>
if ( !memory )
111ea1: 85 c0 test %eax,%eax
111ea3: 74 07 je 111eac <IMFS_memfile_addblock+0x38>
return 1;
*block_entry_ptr = memory;
111ea5: 89 03 mov %eax,(%ebx)
return 0;
111ea7: 31 c0 xor %eax,%eax
111ea9: eb ea jmp 111e95 <IMFS_memfile_addblock+0x21>
111eab: 90 nop
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
if ( !memory )
return 1;
111eac: b8 01 00 00 00 mov $0x1,%eax
111eb1: eb e2 jmp 111e95 <IMFS_memfile_addblock+0x21>
001120b4 <IMFS_memfile_extend>:
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
1120b4: 55 push %ebp
1120b5: 89 e5 mov %esp,%ebp
1120b7: 57 push %edi
1120b8: 56 push %esi
1120b9: 53 push %ebx
1120ba: 83 ec 2c sub $0x2c,%esp
1120bd: 8b 5d 08 mov 0x8(%ebp),%ebx
1120c0: 8b 45 0c mov 0xc(%ebp),%eax
1120c3: 8b 55 10 mov 0x10(%ebp),%edx
1120c6: 89 45 d8 mov %eax,-0x28(%ebp)
1120c9: 89 55 dc mov %edx,-0x24(%ebp)
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
1120cc: a1 a0 70 12 00 mov 0x1270a0,%eax
1120d1: 89 c1 mov %eax,%ecx
1120d3: c1 e9 02 shr $0x2,%ecx
1120d6: 8d 51 01 lea 0x1(%ecx),%edx
1120d9: 0f af d1 imul %ecx,%edx
1120dc: 42 inc %edx
1120dd: 0f af d1 imul %ecx,%edx
1120e0: 4a dec %edx
1120e1: 0f af d0 imul %eax,%edx
1120e4: 31 c9 xor %ecx,%ecx
1120e6: 3b 4d dc cmp -0x24(%ebp),%ecx
1120e9: 7f 1a jg 112105 <IMFS_memfile_extend+0x51><== NEVER TAKEN
1120eb: 7d 13 jge 112100 <IMFS_memfile_extend+0x4c><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
1120ed: e8 42 12 00 00 call 113334 <__errno>
1120f2: c7 00 16 00 00 00 movl $0x16,(%eax)
1120f8: b8 ff ff ff ff mov $0xffffffff,%eax
1120fd: eb 19 jmp 112118 <IMFS_memfile_extend+0x64>
1120ff: 90 nop
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
112100: 3b 55 d8 cmp -0x28(%ebp),%edx
112103: 76 e8 jbe 1120ed <IMFS_memfile_extend+0x39>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
112105: 8b 53 50 mov 0x50(%ebx),%edx
112108: 8b 4b 54 mov 0x54(%ebx),%ecx
11210b: 89 55 e0 mov %edx,-0x20(%ebp)
11210e: 89 4d e4 mov %ecx,-0x1c(%ebp)
112111: 39 4d dc cmp %ecx,-0x24(%ebp)
112114: 7d 0a jge 112120 <IMFS_memfile_extend+0x6c><== ALWAYS TAKEN
return 0;
112116: 31 c0 xor %eax,%eax
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
112118: 8d 65 f4 lea -0xc(%ebp),%esp
11211b: 5b pop %ebx
11211c: 5e pop %esi
11211d: 5f pop %edi
11211e: c9 leave
11211f: c3 ret
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
112120: 7f 05 jg 112127 <IMFS_memfile_extend+0x73><== NEVER TAKEN
112122: 39 55 d8 cmp %edx,-0x28(%ebp)
112125: 76 ef jbe 112116 <IMFS_memfile_extend+0x62>
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
112127: 89 45 d0 mov %eax,-0x30(%ebp)
11212a: 89 c1 mov %eax,%ecx
11212c: c1 f9 1f sar $0x1f,%ecx
11212f: 89 4d d4 mov %ecx,-0x2c(%ebp)
112132: ff 75 d4 pushl -0x2c(%ebp)
112135: ff 75 d0 pushl -0x30(%ebp)
112138: ff 75 dc pushl -0x24(%ebp)
11213b: ff 75 d8 pushl -0x28(%ebp)
11213e: e8 2d c1 00 00 call 11e270 <__divdi3>
112143: 83 c4 10 add $0x10,%esp
112146: 89 c6 mov %eax,%esi
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
112148: ff 75 d4 pushl -0x2c(%ebp)
11214b: ff 75 d0 pushl -0x30(%ebp)
11214e: ff 75 e4 pushl -0x1c(%ebp)
112151: ff 75 e0 pushl -0x20(%ebp)
112154: e8 17 c1 00 00 call 11e270 <__divdi3>
112159: 83 c4 10 add $0x10,%esp
11215c: 89 45 e0 mov %eax,-0x20(%ebp)
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
11215f: 39 c6 cmp %eax,%esi
112161: 72 51 jb 1121b4 <IMFS_memfile_extend+0x100><== NEVER TAKEN
112163: 89 c7 mov %eax,%edi
112165: eb 06 jmp 11216d <IMFS_memfile_extend+0xb9>
112167: 90 nop
112168: 47 inc %edi
112169: 39 fe cmp %edi,%esi
11216b: 72 47 jb 1121b4 <IMFS_memfile_extend+0x100>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
11216d: 83 ec 08 sub $0x8,%esp
112170: 57 push %edi
112171: 53 push %ebx
112172: e8 fd fc ff ff call 111e74 <IMFS_memfile_addblock>
112177: 83 c4 10 add $0x10,%esp
11217a: 85 c0 test %eax,%eax
11217c: 74 ea je 112168 <IMFS_memfile_extend+0xb4>
for ( ; block>=old_blocks ; block-- ) {
11217e: 39 7d e0 cmp %edi,-0x20(%ebp)
112181: 77 17 ja 11219a <IMFS_memfile_extend+0xe6><== NEVER TAKEN
112183: 8b 75 e0 mov -0x20(%ebp),%esi
112186: 66 90 xchg %ax,%ax
IMFS_memfile_remove_block( the_jnode, block );
112188: 83 ec 08 sub $0x8,%esp
11218b: 57 push %edi
11218c: 53 push %ebx
11218d: e8 f6 fe ff ff call 112088 <IMFS_memfile_remove_block>
/*
* 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-- ) {
112192: 4f dec %edi
112193: 83 c4 10 add $0x10,%esp
112196: 39 fe cmp %edi,%esi
112198: 76 ee jbe 112188 <IMFS_memfile_extend+0xd4>
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
11219a: e8 95 11 00 00 call 113334 <__errno>
11219f: c7 00 1c 00 00 00 movl $0x1c,(%eax)
1121a5: b8 ff ff ff ff mov $0xffffffff,%eax
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
1121aa: 8d 65 f4 lea -0xc(%ebp),%esp
1121ad: 5b pop %ebx
1121ae: 5e pop %esi
1121af: 5f pop %edi
1121b0: c9 leave
1121b1: c3 ret
1121b2: 66 90 xchg %ax,%ax
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
1121b4: 8b 45 d8 mov -0x28(%ebp),%eax
1121b7: 8b 55 dc mov -0x24(%ebp),%edx
1121ba: 89 43 50 mov %eax,0x50(%ebx)
1121bd: 89 53 54 mov %edx,0x54(%ebx)
return 0;
1121c0: 31 c0 xor %eax,%eax
}
1121c2: 8d 65 f4 lea -0xc(%ebp),%esp
1121c5: 5b pop %ebx
1121c6: 5e pop %esi
1121c7: 5f pop %edi
1121c8: c9 leave
1121c9: c3 ret
00111ab0 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
111ab0: 55 push %ebp
111ab1: 89 e5 mov %esp,%ebp
111ab3: 57 push %edi
111ab4: 56 push %esi
111ab5: 53 push %ebx
111ab6: 83 ec 1c sub $0x1c,%esp
111ab9: 8b 5d 08 mov 0x8(%ebp),%ebx
111abc: 8b 75 0c mov 0xc(%ebp),%esi
111abf: 8b 7d 10 mov 0x10(%ebp),%edi
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
111ac2: 8b 0d a0 70 12 00 mov 0x1270a0,%ecx
111ac8: c1 e9 02 shr $0x2,%ecx
111acb: 8d 41 ff lea -0x1(%ecx),%eax
111ace: 39 c6 cmp %eax,%esi
111ad0: 77 1a ja 111aec <IMFS_memfile_get_block_pointer+0x3c>
p = info->indirect;
111ad2: 8b 43 58 mov 0x58(%ebx),%eax
if ( malloc_it ) {
111ad5: 85 ff test %edi,%edi
111ad7: 74 53 je 111b2c <IMFS_memfile_get_block_pointer+0x7c>
if ( !p ) {
111ad9: 85 c0 test %eax,%eax
111adb: 0f 84 b6 00 00 00 je 111b97 <IMFS_memfile_get_block_pointer+0xe7>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
111ae1: 8d 04 b0 lea (%eax,%esi,4),%eax
/*
* This means the requested block number is out of range.
*/
return 0;
}
111ae4: 83 c4 1c add $0x1c,%esp
111ae7: 5b pop %ebx
111ae8: 5e pop %esi
111ae9: 5f pop %edi
111aea: c9 leave
111aeb: c3 ret
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
111aec: 8d 41 01 lea 0x1(%ecx),%eax
111aef: 0f af c1 imul %ecx,%eax
111af2: 8d 50 ff lea -0x1(%eax),%edx
111af5: 39 d6 cmp %edx,%esi
111af7: 77 3b ja 111b34 <IMFS_memfile_get_block_pointer+0x84>
my_block -= FIRST_DOUBLY_INDIRECT;
111af9: 29 ce sub %ecx,%esi
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
111afb: 89 f0 mov %esi,%eax
111afd: 31 d2 xor %edx,%edx
111aff: f7 f1 div %ecx
111b01: 89 c6 mov %eax,%esi
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
111b03: 8b 43 5c mov 0x5c(%ebx),%eax
if ( malloc_it ) {
111b06: 85 ff test %edi,%edi
111b08: 74 7e je 111b88 <IMFS_memfile_get_block_pointer+0xd8>
if ( !p ) {
111b0a: 85 c0 test %eax,%eax
111b0c: 0f 84 96 00 00 00 je 111ba8 <IMFS_memfile_get_block_pointer+0xf8>
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
111b12: 8d 1c b0 lea (%eax,%esi,4),%ebx
111b15: 8b 03 mov (%ebx),%eax
if ( !p1 ) {
111b17: 85 c0 test %eax,%eax
111b19: 0f 84 a4 00 00 00 je 111bc3 <IMFS_memfile_get_block_pointer+0x113>
p = (block_p *)p[ doubly ];
if ( !p )
return 0;
return (block_p *)&p[ singly ];
111b1f: 8d 04 90 lea (%eax,%edx,4),%eax
/*
* This means the requested block number is out of range.
*/
return 0;
}
111b22: 83 c4 1c add $0x1c,%esp
111b25: 5b pop %ebx
111b26: 5e pop %esi
111b27: 5f pop %edi
111b28: c9 leave
111b29: c3 ret
111b2a: 66 90 xchg %ax,%ax
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
111b2c: 85 c0 test %eax,%eax
111b2e: 75 b1 jne 111ae1 <IMFS_memfile_get_block_pointer+0x31><== ALWAYS TAKEN
if ( !p )
return 0;
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
111b30: 31 c0 xor %eax,%eax
111b32: eb ee jmp 111b22 <IMFS_memfile_get_block_pointer+0x72><== NOT EXECUTED
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
111b34: 8d 50 01 lea 0x1(%eax),%edx
111b37: 0f af d1 imul %ecx,%edx
111b3a: 4a dec %edx
111b3b: 39 d6 cmp %edx,%esi
111b3d: 77 f1 ja 111b30 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
111b3f: 29 c6 sub %eax,%esi
111b41: 89 f0 mov %esi,%eax
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
111b43: 31 d2 xor %edx,%edx
111b45: f7 f1 div %ecx
111b47: 89 55 e4 mov %edx,-0x1c(%ebp)
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
111b4a: 31 d2 xor %edx,%edx
111b4c: f7 f1 div %ecx
111b4e: 89 c6 mov %eax,%esi
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
111b50: 8b 4b 60 mov 0x60(%ebx),%ecx
if ( malloc_it ) {
111b53: 85 ff test %edi,%edi
111b55: 0f 84 82 00 00 00 je 111bdd <IMFS_memfile_get_block_pointer+0x12d>
if ( !p ) {
111b5b: 85 c9 test %ecx,%ecx
111b5d: 0f 84 9b 00 00 00 je 111bfe <IMFS_memfile_get_block_pointer+0x14e>
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
111b63: 8d 1c b1 lea (%ecx,%esi,4),%ebx
111b66: 8b 0b mov (%ebx),%ecx
if ( !p1 ) {
111b68: 85 c9 test %ecx,%ecx
111b6a: 0f 84 c5 00 00 00 je 111c35 <IMFS_memfile_get_block_pointer+0x185>
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
111b70: 8d 1c 91 lea (%ecx,%edx,4),%ebx
111b73: 8b 13 mov (%ebx),%edx
if ( !p2 ) {
111b75: 85 d2 test %edx,%edx
111b77: 0f 84 a0 00 00 00 je 111c1d <IMFS_memfile_get_block_pointer+0x16d>
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
111b7d: 8b 4d e4 mov -0x1c(%ebp),%ecx
111b80: 8d 04 8a lea (%edx,%ecx,4),%eax
111b83: eb 9d jmp 111b22 <IMFS_memfile_get_block_pointer+0x72>
111b85: 8d 76 00 lea 0x0(%esi),%esi
}
return (block_p *)&p1[ singly ];
}
if ( !p )
111b88: 85 c0 test %eax,%eax
111b8a: 74 a4 je 111b30 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
111b8c: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !p )
111b8f: 85 c0 test %eax,%eax
111b91: 75 8c jne 111b1f <IMFS_memfile_get_block_pointer+0x6f><== ALWAYS TAKEN
if ( !p )
return 0;
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
111b93: 31 c0 xor %eax,%eax
111b95: eb 8b jmp 111b22 <IMFS_memfile_get_block_pointer+0x72><== NOT EXECUTED
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
111b97: e8 f0 fe ff ff call 111a8c <memfile_alloc_block>
if ( !p )
111b9c: 85 c0 test %eax,%eax
111b9e: 74 90 je 111b30 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
info->indirect = p;
111ba0: 89 43 58 mov %eax,0x58(%ebx)
111ba3: e9 39 ff ff ff jmp 111ae1 <IMFS_memfile_get_block_pointer+0x31>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
111ba8: 89 55 e0 mov %edx,-0x20(%ebp)
111bab: e8 dc fe ff ff call 111a8c <memfile_alloc_block>
if ( !p )
111bb0: 85 c0 test %eax,%eax
111bb2: 8b 55 e0 mov -0x20(%ebp),%edx
111bb5: 0f 84 75 ff ff ff je 111b30 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
111bbb: 89 43 5c mov %eax,0x5c(%ebx)
111bbe: e9 4f ff ff ff jmp 111b12 <IMFS_memfile_get_block_pointer+0x62>
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
111bc3: 89 55 e0 mov %edx,-0x20(%ebp)
111bc6: e8 c1 fe ff ff call 111a8c <memfile_alloc_block>
if ( !p1 )
111bcb: 85 c0 test %eax,%eax
111bcd: 8b 55 e0 mov -0x20(%ebp),%edx
111bd0: 0f 84 5a ff ff ff je 111b30 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
p[ doubly ] = (block_p) p1;
111bd6: 89 03 mov %eax,(%ebx)
111bd8: e9 42 ff ff ff jmp 111b1f <IMFS_memfile_get_block_pointer+0x6f>
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
111bdd: 85 c9 test %ecx,%ecx
111bdf: 0f 84 4b ff ff ff je 111b30 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
p1 = (block_p *) p[ triply ];
111be5: 8b 04 81 mov (%ecx,%eax,4),%eax
if ( !p1 )
111be8: 85 c0 test %eax,%eax
111bea: 0f 84 40 ff ff ff je 111b30 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
p2 = (block_p *)p1[ doubly ];
111bf0: 8b 14 90 mov (%eax,%edx,4),%edx
if ( !p2 )
return 0;
111bf3: 31 c0 xor %eax,%eax
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
111bf5: 85 d2 test %edx,%edx
111bf7: 75 84 jne 111b7d <IMFS_memfile_get_block_pointer+0xcd><== ALWAYS TAKEN
111bf9: e9 24 ff ff ff jmp 111b22 <IMFS_memfile_get_block_pointer+0x72><== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
111bfe: 89 55 e0 mov %edx,-0x20(%ebp)
111c01: e8 86 fe ff ff call 111a8c <memfile_alloc_block>
111c06: 89 c1 mov %eax,%ecx
if ( !p )
return 0;
111c08: 31 c0 xor %eax,%eax
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
111c0a: 85 c9 test %ecx,%ecx
111c0c: 8b 55 e0 mov -0x20(%ebp),%edx
111c0f: 0f 84 0d ff ff ff je 111b22 <IMFS_memfile_get_block_pointer+0x72><== NEVER TAKEN
return 0;
info->triply_indirect = p;
111c15: 89 4b 60 mov %ecx,0x60(%ebx)
111c18: e9 46 ff ff ff jmp 111b63 <IMFS_memfile_get_block_pointer+0xb3>
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
111c1d: e8 6a fe ff ff call 111a8c <memfile_alloc_block>
111c22: 89 c2 mov %eax,%edx
if ( !p2 )
return 0;
111c24: 31 c0 xor %eax,%eax
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
111c26: 85 d2 test %edx,%edx
111c28: 0f 84 f4 fe ff ff je 111b22 <IMFS_memfile_get_block_pointer+0x72><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
111c2e: 89 13 mov %edx,(%ebx)
111c30: e9 48 ff ff ff jmp 111b7d <IMFS_memfile_get_block_pointer+0xcd>
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
111c35: 89 55 e0 mov %edx,-0x20(%ebp)
111c38: e8 4f fe ff ff call 111a8c <memfile_alloc_block>
111c3d: 89 c1 mov %eax,%ecx
if ( !p1 )
return 0;
111c3f: 31 c0 xor %eax,%eax
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
111c41: 85 c9 test %ecx,%ecx
111c43: 8b 55 e0 mov -0x20(%ebp),%edx
111c46: 0f 84 d6 fe ff ff je 111b22 <IMFS_memfile_get_block_pointer+0x72><== NEVER TAKEN
return 0;
p[ triply ] = (block_p) p1;
111c4c: 89 0b mov %ecx,(%ebx)
111c4e: e9 1d ff ff ff jmp 111b70 <IMFS_memfile_get_block_pointer+0xc0>
00111c54 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
111c54: 55 push %ebp
111c55: 89 e5 mov %esp,%ebp
111c57: 57 push %edi
111c58: 56 push %esi
111c59: 53 push %ebx
111c5a: 83 ec 3c sub $0x3c,%esp
111c5d: 8b 75 0c mov 0xc(%ebp),%esi
111c60: 8b 7d 10 mov 0x10(%ebp),%edi
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
111c63: 8b 45 08 mov 0x8(%ebp),%eax
111c66: 83 78 4c 06 cmpl $0x6,0x4c(%eax)
111c6a: 0f 84 60 01 00 00 je 111dd0 <IMFS_memfile_read+0x17c>
/*
* 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;
111c70: 89 f0 mov %esi,%eax
if ( last_byte > the_jnode->info.file.size )
111c72: 8b 55 08 mov 0x8(%ebp),%edx
111c75: 8b 4a 50 mov 0x50(%edx),%ecx
/*
* 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;
111c78: 8b 5d 18 mov 0x18(%ebp),%ebx
111c7b: 01 f3 add %esi,%ebx
111c7d: 89 5d d0 mov %ebx,-0x30(%ebp)
if ( last_byte > the_jnode->info.file.size )
111c80: 31 d2 xor %edx,%edx
111c82: 8b 5d 08 mov 0x8(%ebp),%ebx
111c85: 3b 53 54 cmp 0x54(%ebx),%edx
111c88: 0f 8d d2 00 00 00 jge 111d60 <IMFS_memfile_read+0x10c><== ALWAYS TAKEN
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
111c8e: 8b 45 18 mov 0x18(%ebp),%eax
111c91: 89 45 cc mov %eax,-0x34(%ebp)
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
111c94: 8b 15 a0 70 12 00 mov 0x1270a0,%edx
111c9a: 89 55 d0 mov %edx,-0x30(%ebp)
111c9d: 89 d0 mov %edx,%eax
111c9f: 99 cltd
111ca0: 89 d3 mov %edx,%ebx
111ca2: 52 push %edx
111ca3: 50 push %eax
111ca4: 57 push %edi
111ca5: 56 push %esi
111ca6: 89 45 c0 mov %eax,-0x40(%ebp)
111ca9: e8 0e c7 00 00 call 11e3bc <__moddi3>
111cae: 83 c4 10 add $0x10,%esp
111cb1: 89 45 c8 mov %eax,-0x38(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
111cb4: 8b 4d c0 mov -0x40(%ebp),%ecx
111cb7: 53 push %ebx
111cb8: 51 push %ecx
111cb9: 57 push %edi
111cba: 56 push %esi
111cbb: e8 b0 c5 00 00 call 11e270 <__divdi3>
111cc0: 83 c4 10 add $0x10,%esp
111cc3: 89 c3 mov %eax,%ebx
if ( start_offset ) {
111cc5: 8b 7d c8 mov -0x38(%ebp),%edi
111cc8: 85 ff test %edi,%edi
111cca: 0f 84 a0 00 00 00 je 111d70 <IMFS_memfile_read+0x11c>
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 );
111cd0: 56 push %esi
111cd1: 6a 00 push $0x0
111cd3: 50 push %eax
111cd4: ff 75 08 pushl 0x8(%ebp)
111cd7: e8 d4 fd ff ff call 111ab0 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
111cdc: 83 c4 10 add $0x10,%esp
111cdf: 85 c0 test %eax,%eax
111ce1: 0f 84 65 01 00 00 je 111e4c <IMFS_memfile_read+0x1f8><== NEVER TAKEN
* 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
111ce7: 8b 4d d0 mov -0x30(%ebp),%ecx
111cea: 2b 4d c8 sub -0x38(%ebp),%ecx
111ced: 8b 55 cc mov -0x34(%ebp),%edx
111cf0: 39 ca cmp %ecx,%edx
111cf2: 0f 87 3c 01 00 00 ja 111e34 <IMFS_memfile_read+0x1e0>
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
111cf8: 8b 75 c8 mov -0x38(%ebp),%esi
111cfb: 03 30 add (%eax),%esi
dest += to_copy;
111cfd: 8b 7d 14 mov 0x14(%ebp),%edi
111d00: 89 d1 mov %edx,%ecx
111d02: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
111d04: 89 7d c8 mov %edi,-0x38(%ebp)
block++;
111d07: 43 inc %ebx
my_length -= to_copy;
111d08: 29 55 cc sub %edx,-0x34(%ebp)
111d0b: a1 a0 70 12 00 mov 0x1270a0,%eax
111d10: 89 45 d0 mov %eax,-0x30(%ebp)
copied += to_copy;
111d13: 89 55 c4 mov %edx,-0x3c(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
111d16: 8b 4d d0 mov -0x30(%ebp),%ecx
111d19: 39 4d cc cmp %ecx,-0x34(%ebp)
111d1c: 73 24 jae 111d42 <IMFS_memfile_read+0xee>
111d1e: eb 60 jmp 111d80 <IMFS_memfile_read+0x12c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
111d20: 8b 30 mov (%eax),%esi
111d22: 8b 7d c8 mov -0x38(%ebp),%edi
111d25: 8b 4d d0 mov -0x30(%ebp),%ecx
111d28: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
dest += to_copy;
111d2a: 89 7d c8 mov %edi,-0x38(%ebp)
block++;
111d2d: 43 inc %ebx
my_length -= to_copy;
111d2e: 8b 7d d0 mov -0x30(%ebp),%edi
111d31: 29 7d cc sub %edi,-0x34(%ebp)
copied += to_copy;
111d34: 01 7d c4 add %edi,-0x3c(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
111d37: 8b 45 cc mov -0x34(%ebp),%eax
111d3a: 39 05 a0 70 12 00 cmp %eax,0x1270a0
111d40: 77 3e ja 111d80 <IMFS_memfile_read+0x12c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
111d42: 51 push %ecx
111d43: 6a 00 push $0x0
111d45: 53 push %ebx
111d46: ff 75 08 pushl 0x8(%ebp)
111d49: e8 62 fd ff ff call 111ab0 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
111d4e: 83 c4 10 add $0x10,%esp
111d51: 85 c0 test %eax,%eax
111d53: 75 cb jne 111d20 <IMFS_memfile_read+0xcc><== ALWAYS TAKEN
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
111d55: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
111d58: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111d5b: 5b pop %ebx <== NOT EXECUTED
111d5c: 5e pop %esi <== NOT EXECUTED
111d5d: 5f pop %edi <== NOT EXECUTED
111d5e: c9 leave <== NOT EXECUTED
111d5f: c3 ret <== NOT EXECUTED
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
111d60: 0f 8e be 00 00 00 jle 111e24 <IMFS_memfile_read+0x1d0><== ALWAYS TAKEN
my_length = the_jnode->info.file.size - start;
111d66: 29 c1 sub %eax,%ecx
111d68: 89 4d cc mov %ecx,-0x34(%ebp)
111d6b: e9 24 ff ff ff jmp 111c94 <IMFS_memfile_read+0x40>
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
111d70: 8b 55 14 mov 0x14(%ebp),%edx
111d73: 89 55 c8 mov %edx,-0x38(%ebp)
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
111d76: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
111d7d: eb 97 jmp 111d16 <IMFS_memfile_read+0xc2>
111d7f: 90 nop
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
111d80: 8b 55 cc mov -0x34(%ebp),%edx
111d83: 85 d2 test %edx,%edx
111d85: 74 23 je 111daa <IMFS_memfile_read+0x156>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
111d87: 50 push %eax
111d88: 6a 00 push $0x0
111d8a: 53 push %ebx
111d8b: ff 75 08 pushl 0x8(%ebp)
111d8e: e8 1d fd ff ff call 111ab0 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
111d93: 83 c4 10 add $0x10,%esp
111d96: 85 c0 test %eax,%eax
111d98: 74 bb je 111d55 <IMFS_memfile_read+0x101><== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
111d9a: 8b 30 mov (%eax),%esi
111d9c: 8b 7d c8 mov -0x38(%ebp),%edi
111d9f: 8b 4d cc mov -0x34(%ebp),%ecx
111da2: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
copied += my_length;
111da4: 8b 55 cc mov -0x34(%ebp),%edx
111da7: 01 55 c4 add %edx,-0x3c(%ebp)
}
IMFS_update_atime( the_jnode );
111daa: 83 ec 08 sub $0x8,%esp
111dad: 6a 00 push $0x0
111daf: 8d 45 e0 lea -0x20(%ebp),%eax
111db2: 50 push %eax
111db3: e8 78 63 ff ff call 108130 <gettimeofday>
111db8: 8b 45 e0 mov -0x20(%ebp),%eax
111dbb: 8b 4d 08 mov 0x8(%ebp),%ecx
111dbe: 89 41 40 mov %eax,0x40(%ecx)
return copied;
111dc1: 8b 45 c4 mov -0x3c(%ebp),%eax
111dc4: 83 c4 10 add $0x10,%esp
}
111dc7: 8d 65 f4 lea -0xc(%ebp),%esp
111dca: 5b pop %ebx
111dcb: 5e pop %esi
111dcc: 5f pop %edi
111dcd: c9 leave
111dce: c3 ret
111dcf: 90 nop
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
111dd0: 8b 50 58 mov 0x58(%eax),%edx
111dd3: 89 55 cc mov %edx,-0x34(%ebp)
if (my_length > (the_jnode->info.linearfile.size - start))
111dd6: 89 c1 mov %eax,%ecx
111dd8: 8b 40 50 mov 0x50(%eax),%eax
111ddb: 8b 51 54 mov 0x54(%ecx),%edx
111dde: 89 c1 mov %eax,%ecx
111de0: 89 d3 mov %edx,%ebx
111de2: 29 f1 sub %esi,%ecx
111de4: 19 fb sbb %edi,%ebx
111de6: 89 4d d0 mov %ecx,-0x30(%ebp)
111de9: 89 5d d4 mov %ebx,-0x2c(%ebp)
111dec: 31 c9 xor %ecx,%ecx
111dee: 39 d9 cmp %ebx,%ecx
111df0: 7d 4a jge 111e3c <IMFS_memfile_read+0x1e8><== ALWAYS TAKEN
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
111df2: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
111df5: 03 75 cc add -0x34(%ebp),%esi
111df8: 8b 7d 14 mov 0x14(%ebp),%edi
111dfb: 89 d9 mov %ebx,%ecx
111dfd: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
IMFS_update_atime( the_jnode );
111dff: 83 ec 08 sub $0x8,%esp
111e02: 6a 00 push $0x0
111e04: 8d 45 e0 lea -0x20(%ebp),%eax
111e07: 50 push %eax
111e08: e8 23 63 ff ff call 108130 <gettimeofday>
111e0d: 8b 45 e0 mov -0x20(%ebp),%eax
111e10: 8b 7d 08 mov 0x8(%ebp),%edi
111e13: 89 47 40 mov %eax,0x40(%edi)
return my_length;
111e16: 89 d8 mov %ebx,%eax
111e18: 83 c4 10 add $0x10,%esp
}
IMFS_update_atime( the_jnode );
return copied;
}
111e1b: 8d 65 f4 lea -0xc(%ebp),%esp
111e1e: 5b pop %ebx
111e1f: 5e pop %esi
111e20: 5f pop %edi
111e21: c9 leave
111e22: c3 ret
111e23: 90 nop
/*
* 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 )
111e24: 39 4d d0 cmp %ecx,-0x30(%ebp)
111e27: 0f 86 61 fe ff ff jbe 111c8e <IMFS_memfile_read+0x3a>
111e2d: e9 34 ff ff ff jmp 111d66 <IMFS_memfile_read+0x112>
111e32: 66 90 xchg %ax,%ax
* 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
111e34: 89 ca mov %ecx,%edx
111e36: e9 bd fe ff ff jmp 111cf8 <IMFS_memfile_read+0xa4>
111e3b: 90 nop
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))
111e3c: 7f 08 jg 111e46 <IMFS_memfile_read+0x1f2><== NEVER TAKEN
111e3e: 8b 5d d0 mov -0x30(%ebp),%ebx
111e41: 39 5d 18 cmp %ebx,0x18(%ebp)
111e44: 76 ac jbe 111df2 <IMFS_memfile_read+0x19e><== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
111e46: 89 c3 mov %eax,%ebx
111e48: 29 f3 sub %esi,%ebx
111e4a: eb a9 jmp 111df5 <IMFS_memfile_read+0x1a1>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
111e4c: 31 c0 xor %eax,%eax
111e4e: e9 05 ff ff ff jmp 111d58 <IMFS_memfile_read+0x104><== NOT EXECUTED
00111f2c <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
111f2c: 55 push %ebp
111f2d: 89 e5 mov %esp,%ebp
111f2f: 57 push %edi
111f30: 56 push %esi
111f31: 53 push %ebx
111f32: 83 ec 1c sub $0x1c,%esp
/*
* 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;
111f35: 8b 3d a0 70 12 00 mov 0x1270a0,%edi
111f3b: c1 ef 02 shr $0x2,%edi
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
111f3e: 8b 45 08 mov 0x8(%ebp),%eax
111f41: 8b 50 58 mov 0x58(%eax),%edx
111f44: 85 d2 test %edx,%edx
111f46: 74 10 je 111f58 <IMFS_memfile_remove+0x2c>
memfile_free_blocks_in_table( &info->indirect, to_free );
111f48: 83 ec 08 sub $0x8,%esp
111f4b: 57 push %edi
111f4c: 83 c0 58 add $0x58,%eax
111f4f: 50 push %eax
111f50: e8 7b ff ff ff call 111ed0 <memfile_free_blocks_in_table>
111f55: 83 c4 10 add $0x10,%esp
}
if ( info->doubly_indirect ) {
111f58: 8b 4d 08 mov 0x8(%ebp),%ecx
111f5b: 8b 51 5c mov 0x5c(%ecx),%edx
111f5e: 85 d2 test %edx,%edx
111f60: 74 55 je 111fb7 <IMFS_memfile_remove+0x8b>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111f62: a1 a0 70 12 00 mov 0x1270a0,%eax
111f67: 89 c1 mov %eax,%ecx
111f69: c1 e9 02 shr $0x2,%ecx
111f6c: 74 36 je 111fa4 <IMFS_memfile_remove+0x78><== NEVER TAKEN
111f6e: 31 c9 xor %ecx,%ecx
111f70: 31 db xor %ebx,%ebx
111f72: 8b 75 08 mov 0x8(%ebp),%esi
111f75: eb 04 jmp 111f7b <IMFS_memfile_remove+0x4f>
111f77: 90 nop
111f78: 8b 56 5c mov 0x5c(%esi),%edx
if ( info->doubly_indirect[i] ) {
111f7b: c1 e1 02 shl $0x2,%ecx
111f7e: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1)
111f82: 74 14 je 111f98 <IMFS_memfile_remove+0x6c><== NEVER TAKEN
memfile_free_blocks_in_table(
111f84: 83 ec 08 sub $0x8,%esp
111f87: 57 push %edi
111f88: 01 ca add %ecx,%edx
111f8a: 52 push %edx
111f8b: e8 40 ff ff ff call 111ed0 <memfile_free_blocks_in_table>
111f90: 83 c4 10 add $0x10,%esp
111f93: a1 a0 70 12 00 mov 0x1270a0,%eax
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111f98: 43 inc %ebx
111f99: 89 d9 mov %ebx,%ecx
111f9b: 89 c2 mov %eax,%edx
111f9d: c1 ea 02 shr $0x2,%edx
111fa0: 39 da cmp %ebx,%edx
111fa2: 77 d4 ja 111f78 <IMFS_memfile_remove+0x4c>
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 );
111fa4: 83 ec 08 sub $0x8,%esp
111fa7: 57 push %edi
111fa8: 8b 45 08 mov 0x8(%ebp),%eax
111fab: 83 c0 5c add $0x5c,%eax
111fae: 50 push %eax
111faf: e8 1c ff ff ff call 111ed0 <memfile_free_blocks_in_table>
111fb4: 83 c4 10 add $0x10,%esp
}
if ( info->triply_indirect ) {
111fb7: 8b 45 08 mov 0x8(%ebp),%eax
111fba: 8b 50 60 mov 0x60(%eax),%edx
111fbd: 85 d2 test %edx,%edx
111fbf: 0f 84 b6 00 00 00 je 11207b <IMFS_memfile_remove+0x14f>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111fc5: a1 a0 70 12 00 mov 0x1270a0,%eax
111fca: 89 c1 mov %eax,%ecx
111fcc: c1 e9 02 shr $0x2,%ecx
111fcf: 0f 84 93 00 00 00 je 112068 <IMFS_memfile_remove+0x13c><== NEVER TAKEN
p = (block_p *) info->triply_indirect[i];
111fd5: 8b 32 mov (%edx),%esi
if ( !p ) /* ensure we have a valid pointer */
111fd7: 85 f6 test %esi,%esi
111fd9: 0f 84 89 00 00 00 je 112068 <IMFS_memfile_remove+0x13c><== NEVER TAKEN
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
111fdf: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
if ( !p ) /* ensure we have a valid pointer */
111fe6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
111fed: 8d 76 00 lea 0x0(%esi),%esi
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
111ff0: 89 c2 mov %eax,%edx
111ff2: c1 ea 02 shr $0x2,%edx
111ff5: 74 30 je 112027 <IMFS_memfile_remove+0xfb><== NEVER TAKEN
111ff7: 31 d2 xor %edx,%edx
111ff9: 31 db xor %ebx,%ebx
111ffb: 90 nop
if ( p[j] ) {
111ffc: c1 e2 02 shl $0x2,%edx
111fff: 8b 0c 16 mov (%esi,%edx,1),%ecx
112002: 85 c9 test %ecx,%ecx
112004: 74 15 je 11201b <IMFS_memfile_remove+0xef><== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
112006: 83 ec 08 sub $0x8,%esp
112009: 57 push %edi
11200a: 8d 14 16 lea (%esi,%edx,1),%edx
11200d: 52 push %edx
11200e: e8 bd fe ff ff call 111ed0 <memfile_free_blocks_in_table>
112013: 83 c4 10 add $0x10,%esp
112016: a1 a0 70 12 00 mov 0x1270a0,%eax
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++ ) {
11201b: 43 inc %ebx
11201c: 89 da mov %ebx,%edx
11201e: 89 c1 mov %eax,%ecx
112020: c1 e9 02 shr $0x2,%ecx
112023: 39 cb cmp %ecx,%ebx
112025: 72 d5 jb 111ffc <IMFS_memfile_remove+0xd0>
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
112027: 83 ec 08 sub $0x8,%esp
11202a: 57 push %edi
11202b: 8b 45 e0 mov -0x20(%ebp),%eax
11202e: 8b 4d 08 mov 0x8(%ebp),%ecx
112031: 03 41 60 add 0x60(%ecx),%eax
112034: 50 push %eax
112035: e8 96 fe ff ff call 111ed0 <memfile_free_blocks_in_table>
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
11203a: ff 45 e4 incl -0x1c(%ebp)
11203d: a1 a0 70 12 00 mov 0x1270a0,%eax
112042: 89 c2 mov %eax,%edx
112044: c1 ea 02 shr $0x2,%edx
112047: 83 c4 10 add $0x10,%esp
11204a: 3b 55 e4 cmp -0x1c(%ebp),%edx
11204d: 76 19 jbe 112068 <IMFS_memfile_remove+0x13c>
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
11204f: 8b 55 e4 mov -0x1c(%ebp),%edx
112052: c1 e2 02 shl $0x2,%edx
112055: 89 55 e0 mov %edx,-0x20(%ebp)
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
112058: 8b 4d 08 mov 0x8(%ebp),%ecx
11205b: 8b 51 60 mov 0x60(%ecx),%edx
11205e: 8b 4d e0 mov -0x20(%ebp),%ecx
112061: 8b 34 0a mov (%edx,%ecx,1),%esi
if ( !p ) /* ensure we have a valid pointer */
112064: 85 f6 test %esi,%esi
112066: 75 88 jne 111ff0 <IMFS_memfile_remove+0xc4><== ALWAYS TAKEN
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
112068: 83 ec 08 sub $0x8,%esp
11206b: 57 push %edi
(block_p **)&info->triply_indirect, to_free );
11206c: 8b 45 08 mov 0x8(%ebp),%eax
11206f: 83 c0 60 add $0x60,%eax
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
112072: 50 push %eax
112073: e8 58 fe ff ff call 111ed0 <memfile_free_blocks_in_table>
112078: 83 c4 10 add $0x10,%esp
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
11207b: 31 c0 xor %eax,%eax
11207d: 8d 65 f4 lea -0xc(%ebp),%esp
112080: 5b pop %ebx
112081: 5e pop %esi
112082: 5f pop %edi
112083: c9 leave
112084: c3 ret
001121cc <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
1121cc: 55 push %ebp
1121cd: 89 e5 mov %esp,%ebp
1121cf: 57 push %edi
1121d0: 56 push %esi
1121d1: 53 push %ebx
1121d2: 83 ec 3c sub $0x3c,%esp
1121d5: 8b 5d 0c mov 0xc(%ebp),%ebx
1121d8: 8b 75 10 mov 0x10(%ebp),%esi
/*
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
1121db: 8b 4d 18 mov 0x18(%ebp),%ecx
1121de: 01 d9 add %ebx,%ecx
if ( last_byte > the_jnode->info.file.size ) {
1121e0: 89 c8 mov %ecx,%eax
1121e2: 31 d2 xor %edx,%edx
1121e4: 8b 7d 08 mov 0x8(%ebp),%edi
1121e7: 3b 57 54 cmp 0x54(%edi),%edx
1121ea: 7c 1c jl 112208 <IMFS_memfile_write+0x3c><== NEVER TAKEN
1121ec: 0f 8e f2 00 00 00 jle 1122e4 <IMFS_memfile_write+0x118><== ALWAYS TAKEN
status = IMFS_memfile_extend( the_jnode, last_byte );
1121f2: 51 push %ecx
1121f3: 52 push %edx
1121f4: 50 push %eax
1121f5: ff 75 08 pushl 0x8(%ebp)
1121f8: e8 b7 fe ff ff call 1120b4 <IMFS_memfile_extend>
if ( status )
1121fd: 83 c4 10 add $0x10,%esp
112200: 85 c0 test %eax,%eax
112202: 0f 85 5a 01 00 00 jne 112362 <IMFS_memfile_write+0x196>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
112208: a1 a0 70 12 00 mov 0x1270a0,%eax
11220d: 89 45 d4 mov %eax,-0x2c(%ebp)
112210: 99 cltd
112211: 89 45 c8 mov %eax,-0x38(%ebp)
112214: 89 55 cc mov %edx,-0x34(%ebp)
112217: 52 push %edx
112218: 50 push %eax
112219: 56 push %esi
11221a: 53 push %ebx
11221b: e8 9c c1 00 00 call 11e3bc <__moddi3>
112220: 83 c4 10 add $0x10,%esp
112223: 89 c7 mov %eax,%edi
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
112225: ff 75 cc pushl -0x34(%ebp)
112228: ff 75 c8 pushl -0x38(%ebp)
11222b: 56 push %esi
11222c: 53 push %ebx
11222d: e8 3e c0 00 00 call 11e270 <__divdi3>
112232: 83 c4 10 add $0x10,%esp
112235: 89 c3 mov %eax,%ebx
if ( start_offset ) {
112237: 85 ff test %edi,%edi
112239: 75 5d jne 112298 <IMFS_memfile_write+0xcc>
unsigned int last_byte;
unsigned int start_offset;
int copied;
const unsigned char *src;
src = source;
11223b: 8b 75 14 mov 0x14(%ebp),%esi
/*
* 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 ) {
11223e: 8b 55 18 mov 0x18(%ebp),%edx
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
112241: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
112248: 3b 55 d4 cmp -0x2c(%ebp),%edx
11224b: 73 26 jae 112273 <IMFS_memfile_write+0xa7>
11224d: e9 a2 00 00 00 jmp 1122f4 <IMFS_memfile_write+0x128>
112252: 66 90 xchg %ax,%ax
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 );
112254: 8b 00 mov (%eax),%eax
src += to_copy;
112256: 89 c7 mov %eax,%edi
112258: 8b 4d d4 mov -0x2c(%ebp),%ecx
11225b: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
11225d: 43 inc %ebx
my_length -= to_copy;
11225e: 2b 55 d4 sub -0x2c(%ebp),%edx
* IMFS_memfile_write
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
112261: 8b 45 d4 mov -0x2c(%ebp),%eax
112264: 01 45 c8 add %eax,-0x38(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
112267: 39 15 a0 70 12 00 cmp %edx,0x1270a0
11226d: 0f 87 81 00 00 00 ja 1122f4 <IMFS_memfile_write+0x128>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
112273: 57 push %edi
112274: 6a 00 push $0x0
112276: 53 push %ebx
112277: ff 75 08 pushl 0x8(%ebp)
11227a: 89 55 c4 mov %edx,-0x3c(%ebp)
11227d: e8 2e f8 ff ff call 111ab0 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
112282: 83 c4 10 add $0x10,%esp
112285: 85 c0 test %eax,%eax
112287: 8b 55 c4 mov -0x3c(%ebp),%edx
11228a: 75 c8 jne 112254 <IMFS_memfile_write+0x88><== ALWAYS TAKEN
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
11228c: 8b 45 c8 mov -0x38(%ebp),%eax
11228f: 8d 65 f4 lea -0xc(%ebp),%esp
112292: 5b pop %ebx
112293: 5e pop %esi
112294: 5f pop %edi
112295: c9 leave
112296: c3 ret
112297: 90 nop
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
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 );
112298: 50 push %eax
112299: 6a 00 push $0x0
11229b: 53 push %ebx
11229c: ff 75 08 pushl 0x8(%ebp)
11229f: e8 0c f8 ff ff call 111ab0 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
1122a4: 83 c4 10 add $0x10,%esp
1122a7: 85 c0 test %eax,%eax
1122a9: 0f 84 a1 00 00 00 je 112350 <IMFS_memfile_write+0x184><== NEVER TAKEN
* 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
1122af: 8b 55 d4 mov -0x2c(%ebp),%edx
1122b2: 29 fa sub %edi,%edx
1122b4: 89 55 c8 mov %edx,-0x38(%ebp)
1122b7: 8b 55 18 mov 0x18(%ebp),%edx
1122ba: 39 55 c8 cmp %edx,-0x38(%ebp)
1122bd: 0f 87 85 00 00 00 ja 112348 <IMFS_memfile_write+0x17c>
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
1122c3: 03 38 add (%eax),%edi
src += to_copy;
1122c5: 8b 75 14 mov 0x14(%ebp),%esi
1122c8: 8b 4d c8 mov -0x38(%ebp),%ecx
1122cb: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
1122cd: 43 inc %ebx
my_length -= to_copy;
1122ce: 8b 55 18 mov 0x18(%ebp),%edx
1122d1: 2b 55 c8 sub -0x38(%ebp),%edx
copied += to_copy;
1122d4: 8b 3d a0 70 12 00 mov 0x1270a0,%edi
1122da: 89 7d d4 mov %edi,-0x2c(%ebp)
1122dd: e9 66 ff ff ff jmp 112248 <IMFS_memfile_write+0x7c>
1122e2: 66 90 xchg %ax,%ax
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
1122e4: 3b 4f 50 cmp 0x50(%edi),%ecx
1122e7: 0f 86 1b ff ff ff jbe 112208 <IMFS_memfile_write+0x3c><== NEVER TAKEN
1122ed: e9 00 ff ff ff jmp 1121f2 <IMFS_memfile_write+0x26>
1122f2: 66 90 xchg %ax,%ax
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
1122f4: 85 d2 test %edx,%edx
1122f6: 74 28 je 112320 <IMFS_memfile_write+0x154>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
1122f8: 51 push %ecx
1122f9: 6a 00 push $0x0
1122fb: 53 push %ebx
1122fc: ff 75 08 pushl 0x8(%ebp)
1122ff: 89 55 c4 mov %edx,-0x3c(%ebp)
112302: e8 a9 f7 ff ff call 111ab0 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
112307: 83 c4 10 add $0x10,%esp
11230a: 85 c0 test %eax,%eax
11230c: 8b 55 c4 mov -0x3c(%ebp),%edx
11230f: 0f 84 77 ff ff ff je 11228c <IMFS_memfile_write+0xc0><== NEVER TAKEN
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 );
112315: 8b 00 mov (%eax),%eax
112317: 89 c7 mov %eax,%edi
112319: 89 d1 mov %edx,%ecx
11231b: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
my_length = 0;
copied += to_copy;
11231d: 01 55 c8 add %edx,-0x38(%ebp)
}
IMFS_mtime_ctime_update( the_jnode );
112320: 83 ec 08 sub $0x8,%esp
112323: 6a 00 push $0x0
112325: 8d 45 e0 lea -0x20(%ebp),%eax
112328: 50 push %eax
112329: e8 02 5e ff ff call 108130 <gettimeofday>
11232e: 8b 45 e0 mov -0x20(%ebp),%eax
112331: 8b 55 08 mov 0x8(%ebp),%edx
112334: 89 42 44 mov %eax,0x44(%edx)
112337: 89 42 48 mov %eax,0x48(%edx)
return copied;
11233a: 83 c4 10 add $0x10,%esp
}
11233d: 8b 45 c8 mov -0x38(%ebp),%eax
112340: 8d 65 f4 lea -0xc(%ebp),%esp
112343: 5b pop %ebx
112344: 5e pop %esi
112345: 5f pop %edi
112346: c9 leave
112347: c3 ret
* 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
112348: 89 55 c8 mov %edx,-0x38(%ebp)
11234b: e9 73 ff ff ff jmp 1122c3 <IMFS_memfile_write+0xf7>
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
112350: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
112357: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
11235a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11235d: 5b pop %ebx <== NOT EXECUTED
11235e: 5e pop %esi <== NOT EXECUTED
11235f: 5f pop %edi <== NOT EXECUTED
112360: c9 leave <== NOT EXECUTED
112361: c3 ret <== NOT EXECUTED
last_byte = start + my_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 );
112362: e8 cd 0f 00 00 call 113334 <__errno>
112367: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11236d: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp)
112374: e9 13 ff ff ff jmp 11228c <IMFS_memfile_write+0xc0>
001079bc <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
1079bc: 55 push %ebp
1079bd: 89 e5 mov %esp,%ebp
1079bf: 57 push %edi
1079c0: 56 push %esi
1079c1: 53 push %ebx
1079c2: 83 ec 5c sub $0x5c,%esp
1079c5: 8b 55 08 mov 0x8(%ebp),%edx
1079c8: 8b 5d 0c mov 0xc(%ebp),%ebx
1079cb: 8b 75 10 mov 0x10(%ebp),%esi
1079ce: 8b 45 14 mov 0x14(%ebp),%eax
1079d1: 89 45 a4 mov %eax,-0x5c(%ebp)
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 );
1079d4: 31 c0 xor %eax,%eax
1079d6: b9 ff ff ff ff mov $0xffffffff,%ecx
1079db: 89 d7 mov %edx,%edi
1079dd: f2 ae repnz scas %es:(%edi),%al
1079df: f7 d1 not %ecx
1079e1: 49 dec %ecx
1079e2: 8d 45 e4 lea -0x1c(%ebp),%eax
1079e5: 50 push %eax
1079e6: 8d 7d af lea -0x51(%ebp),%edi
1079e9: 57 push %edi
1079ea: 51 push %ecx
1079eb: 52 push %edx
1079ec: e8 23 7f 00 00 call 10f914 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
1079f1: 89 d8 mov %ebx,%eax
1079f3: 25 00 f0 00 00 and $0xf000,%eax
1079f8: 83 c4 10 add $0x10,%esp
1079fb: 3d 00 40 00 00 cmp $0x4000,%eax
107a00: 74 56 je 107a58 <IMFS_mknod+0x9c>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
107a02: 3d 00 80 00 00 cmp $0x8000,%eax
107a07: 74 57 je 107a60 <IMFS_mknod+0xa4>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
107a09: 3d 00 60 00 00 cmp $0x6000,%eax
107a0e: 74 14 je 107a24 <IMFS_mknod+0x68>
107a10: 3d 00 20 00 00 cmp $0x2000,%eax
107a15: 74 0d je 107a24 <IMFS_mknod+0x68>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else if (S_ISFIFO(mode))
107a17: 3d 00 10 00 00 cmp $0x1000,%eax
107a1c: 74 4a je 107a68 <IMFS_mknod+0xac> <== ALWAYS TAKEN
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
IMFS_token_types type = 0;
107a1e: 31 d2 xor %edx,%edx <== NOT EXECUTED
107a20: eb 10 jmp 107a32 <IMFS_mknod+0x76> <== NOT EXECUTED
107a22: 66 90 xchg %ax,%ax <== NOT EXECUTED
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 );
107a24: 89 75 d0 mov %esi,-0x30(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
107a27: 8b 45 a4 mov -0x5c(%ebp),%eax
107a2a: 89 45 d4 mov %eax,-0x2c(%ebp)
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
107a2d: ba 02 00 00 00 mov $0x2,%edx
* 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( pathloc, type, new_name, mode, &info );
107a32: 83 ec 0c sub $0xc,%esp
107a35: 8d 45 d0 lea -0x30(%ebp),%eax
107a38: 50 push %eax
107a39: 53 push %ebx
107a3a: 57 push %edi
107a3b: 52 push %edx
107a3c: ff 75 18 pushl 0x18(%ebp)
107a3f: e8 08 75 00 00 call 10ef4c <IMFS_create_node>
if ( !new_node )
107a44: 83 c4 20 add $0x20,%esp
107a47: 85 c0 test %eax,%eax
107a49: 74 24 je 107a6f <IMFS_mknod+0xb3>
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
107a4b: 31 c0 xor %eax,%eax
}
107a4d: 8d 65 f4 lea -0xc(%ebp),%esp
107a50: 5b pop %ebx
107a51: 5e pop %esi
107a52: 5f pop %edi
107a53: c9 leave
107a54: c3 ret
107a55: 8d 76 00 lea 0x0(%esi),%esi
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
107a58: ba 01 00 00 00 mov $0x1,%edx
107a5d: eb d3 jmp 107a32 <IMFS_mknod+0x76>
107a5f: 90 nop
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
107a60: ba 05 00 00 00 mov $0x5,%edx
107a65: eb cb jmp 107a32 <IMFS_mknod+0x76>
107a67: 90 nop
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else if (S_ISFIFO(mode))
type = IMFS_FIFO;
107a68: ba 07 00 00 00 mov $0x7,%edx
107a6d: eb c3 jmp 107a32 <IMFS_mknod+0x76>
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
107a6f: e8 c0 b8 00 00 call 113334 <__errno>
107a74: c7 00 0c 00 00 00 movl $0xc,(%eax)
107a7a: b8 ff ff ff ff mov $0xffffffff,%eax
107a7f: eb cc jmp 107a4d <IMFS_mknod+0x91>
00107a84 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107a84: 55 push %ebp
107a85: 89 e5 mov %esp,%ebp
107a87: 83 ec 08 sub $0x8,%esp
107a8a: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
107a8d: 8b 42 08 mov 0x8(%edx),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107a90: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
107a94: 75 0a jne 107aa0 <IMFS_mount+0x1c> <== NEVER TAKEN
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
107a96: 89 50 5c mov %edx,0x5c(%eax)
return 0;
107a99: 31 c0 xor %eax,%eax
}
107a9b: c9 leave
107a9c: c3 ret
107a9d: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
107aa0: e8 8f b8 00 00 call 113334 <__errno> <== NOT EXECUTED
107aa5: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
107aab: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
107ab0: c9 leave <== NOT EXECUTED
107ab1: c3 ret <== NOT EXECUTED
0010a3a0 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
10a3a0: 55 push %ebp
10a3a1: 89 e5 mov %esp,%ebp
10a3a3: 53 push %ebx
10a3a4: 83 ec 0c sub $0xc,%esp
10a3a7: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
10a3aa: a1 40 b2 12 00 mov 0x12b240,%eax
10a3af: ff 70 08 pushl 0x8(%eax)
10a3b2: 8d 43 0c lea 0xc(%ebx),%eax
10a3b5: 50 push %eax
10a3b6: e8 95 d6 00 00 call 117a50 <fputs>
switch( the_jnode->type ) {
10a3bb: 8b 43 4c mov 0x4c(%ebx),%eax
10a3be: 83 c4 10 add $0x10,%esp
10a3c1: 83 f8 07 cmp $0x7,%eax
10a3c4: 76 1e jbe 10a3e4 <IMFS_print_jnode+0x44> <== ALWAYS TAKEN
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
10a3c6: 52 push %edx <== NOT EXECUTED
10a3c7: 50 push %eax <== NOT EXECUTED
10a3c8: 68 84 69 12 00 push $0x126984 <== NOT EXECUTED
10a3cd: a1 40 b2 12 00 mov 0x12b240,%eax <== NOT EXECUTED
10a3d2: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10a3d5: e8 6a d5 00 00 call 117944 <fprintf> <== NOT EXECUTED
return;
10a3da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
puts("");
}
10a3dd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10a3e0: c9 leave <== NOT EXECUTED
10a3e1: c3 ret <== NOT EXECUTED
10a3e2: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
10a3e4: ff 24 85 9c 69 12 00 jmp *0x12699c(,%eax,4)
10a3eb: 90 nop
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
10a3ec: a1 40 b2 12 00 mov 0x12b240,%eax
10a3f1: ff 70 08 pushl 0x8(%eax)
10a3f4: 6a 13 push $0x13
10a3f6: 6a 01 push $0x1
10a3f8: 68 5d 69 12 00 push $0x12695d
10a3fd: e8 6e e2 00 00 call 118670 <fwrite>
return;
10a402: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
10a405: 8b 5d fc mov -0x4(%ebp),%ebx
10a408: c9 leave
10a409: c3 ret
10a40a: 66 90 xchg %ax,%ax
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
10a40c: a1 40 b2 12 00 mov 0x12b240,%eax
10a411: ff 70 08 pushl 0x8(%eax)
10a414: 6a 12 push $0x12
10a416: 6a 01 push $0x1
10a418: 68 71 69 12 00 push $0x126971
10a41d: e8 4e e2 00 00 call 118670 <fwrite>
return;
10a422: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
10a425: 8b 5d fc mov -0x4(%ebp),%ebx
10a428: c9 leave
10a429: c3 ret
10a42a: 66 90 xchg %ax,%ax
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
10a42c: 51 push %ecx
10a42d: ff 73 50 pushl 0x50(%ebx)
10a430: 68 51 69 12 00 push $0x126951
10a435: a1 40 b2 12 00 mov 0x12b240,%eax
10a43a: ff 70 08 pushl 0x8(%eax)
10a43d: e8 02 d5 00 00 call 117944 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
10a442: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a445: c7 45 08 89 6c 12 00 movl $0x126c89,0x8(%ebp)
}
10a44c: 8b 5d fc mov -0x4(%ebp),%ebx
10a44f: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a450: e9 13 ee 00 00 jmp 119268 <puts>
10a455: 8d 76 00 lea 0x0(%esi),%esi
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)",
10a458: ff 73 58 pushl 0x58(%ebx)
10a45b: ff 73 50 pushl 0x50(%ebx)
10a45e: 68 42 69 12 00 push $0x126942
10a463: a1 40 b2 12 00 mov 0x12b240,%eax
10a468: ff 70 08 pushl 0x8(%eax)
10a46b: e8 d4 d4 00 00 call 117944 <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
10a470: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a473: c7 45 08 89 6c 12 00 movl $0x126c89,0x8(%ebp)
}
10a47a: 8b 5d fc mov -0x4(%ebp),%ebx
10a47d: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a47e: e9 e5 ed 00 00 jmp 119268 <puts>
10a483: 90 nop
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
10a484: 83 ec 08 sub $0x8,%esp
10a487: a1 40 b2 12 00 mov 0x12b240,%eax
10a48c: ff 70 08 pushl 0x8(%eax)
10a48f: 6a 2f push $0x2f
10a491: e8 0e d5 00 00 call 1179a4 <fputc>
break;
10a496: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a499: c7 45 08 89 6c 12 00 movl $0x126c89,0x8(%ebp)
}
10a4a0: 8b 5d fc mov -0x4(%ebp),%ebx
10a4a3: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a4a4: e9 bf ed 00 00 jmp 119268 <puts>
10a4a9: 8d 76 00 lea 0x0(%esi),%esi
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
10a4ac: ff 73 54 pushl 0x54(%ebx)
10a4af: ff 73 50 pushl 0x50(%ebx)
10a4b2: 68 2f 69 12 00 push $0x12692f
10a4b7: a1 40 b2 12 00 mov 0x12b240,%eax
10a4bc: ff 70 08 pushl 0x8(%eax)
10a4bf: e8 80 d4 00 00 call 117944 <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
10a4c4: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a4c7: c7 45 08 89 6c 12 00 movl $0x126c89,0x8(%ebp)
}
10a4ce: 8b 5d fc mov -0x4(%ebp),%ebx
10a4d1: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a4d2: e9 91 ed 00 00 jmp 119268 <puts>
00107ac4 <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
107ac4: 55 push %ebp
107ac5: 89 e5 mov %esp,%ebp
107ac7: 57 push %edi
107ac8: 56 push %esi
107ac9: 53 push %ebx
107aca: 8b 7d 0c mov 0xc(%ebp),%edi
107acd: 8b 5d 10 mov 0x10(%ebp),%ebx
IMFS_jnode_t *node;
int i;
node = loc->node_access;
107ad0: 8b 45 08 mov 0x8(%ebp),%eax
107ad3: 8b 30 mov (%eax),%esi
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
107ad5: 85 db test %ebx,%ebx
107ad7: 74 28 je 107b01 <IMFS_readlink+0x3d> <== NEVER TAKEN
107ad9: 8b 46 50 mov 0x50(%esi),%eax
107adc: 8a 10 mov (%eax),%dl
107ade: 84 d2 test %dl,%dl
107ae0: 74 1f je 107b01 <IMFS_readlink+0x3d> <== NEVER TAKEN
107ae2: 31 c9 xor %ecx,%ecx
107ae4: 31 c0 xor %eax,%eax
107ae6: eb 0a jmp 107af2 <IMFS_readlink+0x2e>
107ae8: 8b 56 50 mov 0x50(%esi),%edx
107aeb: 8a 14 02 mov (%edx,%eax,1),%dl
107aee: 84 d2 test %dl,%dl
107af0: 74 0a je 107afc <IMFS_readlink+0x38>
buf[i] = node->info.sym_link.name[i];
107af2: 88 14 0f mov %dl,(%edi,%ecx,1)
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
107af5: 40 inc %eax
107af6: 89 c1 mov %eax,%ecx
107af8: 39 d8 cmp %ebx,%eax
107afa: 72 ec jb 107ae8 <IMFS_readlink+0x24>
buf[i] = node->info.sym_link.name[i];
return i;
}
107afc: 5b pop %ebx
107afd: 5e pop %esi
107afe: 5f pop %edi
107aff: c9 leave
107b00: c3 ret
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
107b01: 31 c0 xor %eax,%eax
107b03: eb f7 jmp 107afc <IMFS_readlink+0x38> <== NOT EXECUTED
00107b08 <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 */
)
{
107b08: 55 push %ebp
107b09: 89 e5 mov %esp,%ebp
107b0b: 53 push %ebx
107b0c: 83 ec 18 sub $0x18,%esp
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
107b0f: 8b 45 0c mov 0xc(%ebp),%eax
107b12: 8b 18 mov (%eax),%ebx
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
107b14: 6a 20 push $0x20
107b16: ff 75 14 pushl 0x14(%ebp)
107b19: 8d 43 0c lea 0xc(%ebx),%eax
107b1c: 50 push %eax
107b1d: e8 0a c6 00 00 call 11412c <strncpy>
if ( the_jnode->Parent != NULL )
107b22: 83 c4 10 add $0x10,%esp
107b25: 8b 4b 08 mov 0x8(%ebx),%ecx
107b28: 85 c9 test %ecx,%ecx
107b2a: 74 0c je 107b38 <IMFS_rename+0x30> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
107b2c: 83 ec 0c sub $0xc,%esp
107b2f: 53 push %ebx
107b30: e8 cb 44 00 00 call 10c000 <_Chain_Extract>
107b35: 83 c4 10 add $0x10,%esp
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
107b38: 8b 45 10 mov 0x10(%ebp),%eax
107b3b: 8b 00 mov (%eax),%eax
the_jnode->Parent = new_parent;
107b3d: 89 43 08 mov %eax,0x8(%ebx)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
107b40: 83 ec 08 sub $0x8,%esp
107b43: 53 push %ebx
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
107b44: 83 c0 50 add $0x50,%eax
107b47: 50 push %eax
107b48: e8 8f 44 00 00 call 10bfdc <_Chain_Append>
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
107b4d: 58 pop %eax
107b4e: 5a pop %edx
107b4f: 6a 00 push $0x0
107b51: 8d 45 f0 lea -0x10(%ebp),%eax
107b54: 50 push %eax
107b55: e8 d6 05 00 00 call 108130 <gettimeofday>
107b5a: 8b 45 f0 mov -0x10(%ebp),%eax
107b5d: 89 43 48 mov %eax,0x48(%ebx)
return 0;
}
107b60: 31 c0 xor %eax,%eax
107b62: 8b 5d fc mov -0x4(%ebp),%ebx
107b65: c9 leave
107b66: c3 ret
0010fae0 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
10fae0: 55 push %ebp
10fae1: 89 e5 mov %esp,%ebp
10fae3: 56 push %esi
10fae4: 53 push %ebx
10fae5: 8b 4d 08 mov 0x8(%ebp),%ecx
10fae8: 8b 45 0c mov 0xc(%ebp),%eax
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
10faeb: 8b 11 mov (%ecx),%edx
switch ( the_jnode->type ) {
10faed: 83 7a 4c 07 cmpl $0x7,0x4c(%edx)
10faf1: 76 15 jbe 10fb08 <IMFS_stat+0x28> <== ALWAYS TAKEN
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10faf3: e8 3c 38 00 00 call 113334 <__errno>
10faf8: c7 00 86 00 00 00 movl $0x86,(%eax)
10fafe: b8 ff ff ff ff mov $0xffffffff,%eax
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
10fb03: 5b pop %ebx
10fb04: 5e pop %esi
10fb05: c9 leave
10fb06: c3 ret
10fb07: 90 nop
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
10fb08: 8b 5a 4c mov 0x4c(%edx),%ebx
10fb0b: ff 24 9d f8 10 12 00 jmp *0x1210f8(,%ebx,4)
10fb12: 66 90 xchg %ax,%ax
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
10fb14: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
10fb1b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
10fb22: 8b 49 10 mov 0x10(%ecx),%ecx
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
10fb25: 8b 49 34 mov 0x34(%ecx),%ecx
10fb28: 8b 09 mov (%ecx),%ecx
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
10fb2a: c7 00 fe ff 00 00 movl $0xfffe,(%eax)
10fb30: 89 48 04 mov %ecx,0x4(%eax)
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
10fb33: 8b 4a 30 mov 0x30(%edx),%ecx
10fb36: 89 48 0c mov %ecx,0xc(%eax)
buf->st_nlink = the_jnode->st_nlink;
10fb39: 8b 4a 34 mov 0x34(%edx),%ecx
10fb3c: 66 89 48 10 mov %cx,0x10(%eax)
buf->st_ino = the_jnode->st_ino;
10fb40: 8b 4a 38 mov 0x38(%edx),%ecx
10fb43: 89 48 08 mov %ecx,0x8(%eax)
buf->st_uid = the_jnode->st_uid;
10fb46: 8b 4a 3c mov 0x3c(%edx),%ecx
10fb49: 66 89 48 12 mov %cx,0x12(%eax)
buf->st_gid = the_jnode->st_gid;
10fb4d: 66 8b 4a 3e mov 0x3e(%edx),%cx
10fb51: 66 89 48 14 mov %cx,0x14(%eax)
buf->st_atime = the_jnode->stat_atime;
10fb55: 8b 4a 40 mov 0x40(%edx),%ecx
10fb58: 89 48 28 mov %ecx,0x28(%eax)
buf->st_mtime = the_jnode->stat_mtime;
10fb5b: 8b 4a 44 mov 0x44(%edx),%ecx
10fb5e: 89 48 30 mov %ecx,0x30(%eax)
buf->st_ctime = the_jnode->stat_ctime;
10fb61: 8b 52 48 mov 0x48(%edx),%edx
10fb64: 89 50 38 mov %edx,0x38(%eax)
return 0;
10fb67: 31 c0 xor %eax,%eax
}
10fb69: 5b pop %ebx
10fb6a: 5e pop %esi
10fb6b: c9 leave
10fb6c: c3 ret
10fb6d: 8d 76 00 lea 0x0(%esi),%esi
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
10fb70: 8b 5a 54 mov 0x54(%edx),%ebx
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
10fb73: 8b 72 50 mov 0x50(%edx),%esi
10fb76: 89 70 18 mov %esi,0x18(%eax)
10fb79: 89 58 1c mov %ebx,0x1c(%eax)
break;
10fb7c: eb a4 jmp 10fb22 <IMFS_stat+0x42>
10fb7e: 66 90 xchg %ax,%ax
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
10fb80: 8b 5a 50 mov 0x50(%edx),%ebx
10fb83: 8b 72 54 mov 0x54(%edx),%esi
10fb86: 89 58 20 mov %ebx,0x20(%eax)
10fb89: 89 70 24 mov %esi,0x24(%eax)
break;
10fb8c: eb 94 jmp 10fb22 <IMFS_stat+0x42>
00107bfc <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
107bfc: 55 push %ebp
107bfd: 89 e5 mov %esp,%ebp
107bff: 57 push %edi
107c00: 56 push %esi
107c01: 53 push %ebx
107c02: 83 ec 3c sub $0x3c,%esp
107c05: 8b 5d 0c mov 0xc(%ebp),%ebx
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
107c08: 8b 13 mov (%ebx),%edx
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
107c0a: 83 7a 4c 03 cmpl $0x3,0x4c(%edx)
107c0e: 74 18 je 107c28 <IMFS_unlink+0x2c>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
107c10: 83 ec 08 sub $0x8,%esp
107c13: 8b 43 08 mov 0x8(%ebx),%eax
107c16: 53 push %ebx
107c17: ff 75 08 pushl 0x8(%ebp)
107c1a: ff 50 34 call *0x34(%eax)
return result;
107c1d: 83 c4 10 add $0x10,%esp
}
107c20: 8d 65 f4 lea -0xc(%ebp),%esp
107c23: 5b pop %ebx
107c24: 5e pop %esi
107c25: 5f pop %edi
107c26: c9 leave
107c27: c3 ret
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
107c28: 8b 42 50 mov 0x50(%edx),%eax
107c2b: 85 c0 test %eax,%eax
107c2d: 74 79 je 107ca8 <IMFS_unlink+0xac> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
107c2f: 8d 7d cc lea -0x34(%ebp),%edi
107c32: b9 05 00 00 00 mov $0x5,%ecx
107c37: 89 de mov %ebx,%esi
107c39: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_link.node_access = node->info.hard_link.link_node;
107c3b: 89 45 cc mov %eax,-0x34(%ebp)
IMFS_Set_handlers( &the_link );
107c3e: 83 ec 0c sub $0xc,%esp
107c41: 8d 75 cc lea -0x34(%ebp),%esi
107c44: 56 push %esi
107c45: 89 55 c4 mov %edx,-0x3c(%ebp)
107c48: e8 6b 74 00 00 call 10f0b8 <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)
107c4d: 8b 55 c4 mov -0x3c(%ebp),%edx
107c50: 8b 42 50 mov 0x50(%edx),%eax
107c53: 8b 48 34 mov 0x34(%eax),%ecx
107c56: 83 c4 10 add $0x10,%esp
107c59: 66 83 f9 01 cmp $0x1,%cx
107c5d: 74 27 je 107c86 <IMFS_unlink+0x8a>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
107c5f: 49 dec %ecx
107c60: 66 89 48 34 mov %cx,0x34(%eax)
IMFS_update_ctime( node->info.hard_link.link_node );
107c64: 83 ec 08 sub $0x8,%esp
107c67: 6a 00 push $0x0
107c69: 8d 45 e0 lea -0x20(%ebp),%eax
107c6c: 50 push %eax
107c6d: 89 55 c4 mov %edx,-0x3c(%ebp)
107c70: e8 bb 04 00 00 call 108130 <gettimeofday>
107c75: 8b 55 c4 mov -0x3c(%ebp),%edx
107c78: 8b 42 50 mov 0x50(%edx),%eax
107c7b: 8b 55 e0 mov -0x20(%ebp),%edx
107c7e: 89 50 48 mov %edx,0x48(%eax)
107c81: 83 c4 10 add $0x10,%esp
107c84: eb 8a jmp 107c10 <IMFS_unlink+0x14>
* 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 );
107c86: 83 ec 08 sub $0x8,%esp
107c89: 56 push %esi
107c8a: ff 75 08 pushl 0x8(%ebp)
107c8d: 8b 45 d4 mov -0x2c(%ebp),%eax
107c90: ff 50 34 call *0x34(%eax)
if ( result != 0 )
107c93: 83 c4 10 add $0x10,%esp
107c96: 85 c0 test %eax,%eax
107c98: 0f 84 72 ff ff ff je 107c10 <IMFS_unlink+0x14>
return -1;
107c9e: b8 ff ff ff ff mov $0xffffffff,%eax
107ca3: e9 78 ff ff ff jmp 107c20 <IMFS_unlink+0x24>
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
107ca8: e8 87 b6 00 00 call 113334 <__errno> <== NOT EXECUTED
107cad: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107cb3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107cb8: e9 63 ff ff ff jmp 107c20 <IMFS_unlink+0x24> <== NOT EXECUTED
00107cc0 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107cc0: 55 push %ebp
107cc1: 89 e5 mov %esp,%ebp
107cc3: 83 ec 08 sub $0x8,%esp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
107cc6: 8b 45 08 mov 0x8(%ebp),%eax
107cc9: 8b 40 08 mov 0x8(%eax),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107ccc: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
107cd0: 75 12 jne 107ce4 <IMFS_unmount+0x24> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
107cd2: 8b 50 5c mov 0x5c(%eax),%edx
107cd5: 85 d2 test %edx,%edx
107cd7: 74 1d je 107cf6 <IMFS_unmount+0x36> <== NEVER TAKEN
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
107cd9: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
return 0;
107ce0: 31 c0 xor %eax,%eax
}
107ce2: c9 leave
107ce3: c3 ret
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
107ce4: e8 4b b6 00 00 call 113334 <__errno> <== NOT EXECUTED
107ce9: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
107cef: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
107cf4: c9 leave <== NOT EXECUTED
107cf5: c3 ret <== 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 */
107cf6: e8 39 b6 00 00 call 113334 <__errno> <== NOT EXECUTED
107cfb: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107d01: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
107d06: c9 leave <== NOT EXECUTED
107d07: c3 ret <== NOT EXECUTED
001082dc <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
1082dc: 55 push %ebp
1082dd: 89 e5 mov %esp,%ebp
1082df: 57 push %edi
1082e0: 56 push %esi
1082e1: 53 push %ebx
1082e2: 83 ec 0c sub $0xc,%esp
1082e5: 8b 5d 08 mov 0x8(%ebp),%ebx
1082e8: 8b 75 0c mov 0xc(%ebp),%esi
1082eb: 8b 7d 10 mov 0x10(%ebp),%edi
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
1082ee: a1 a8 57 12 00 mov 0x1257a8,%eax
1082f3: 85 c0 test %eax,%eax
1082f5: 74 02 je 1082f9 <RTEMS_Malloc_Initialize+0x1d>
(*rtems_malloc_statistics_helpers->initialize)();
1082f7: ff 10 call *(%eax)
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
1082f9: e8 76 ff ff ff call 108274 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
1082fe: a1 ac 57 12 00 mov 0x1257ac,%eax
108303: 85 c0 test %eax,%eax
108305: 74 0e je 108315 <RTEMS_Malloc_Initialize+0x39>
heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
108307: 83 ec 08 sub $0x8,%esp
10830a: 57 push %edi
10830b: 53 push %ebx
10830c: ff 10 call *(%eax)
10830e: 89 c3 mov %eax,%ebx
108310: 83 c4 10 add $0x10,%esp
heap_begin,
sbrk_amount
);
heap_size = (uintptr_t) sbrk_amount;
108313: 89 fe mov %edi,%esi
* 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 (
108315: 80 3d a4 57 12 00 00 cmpb $0x0,0x1257a4
10831c: 75 1f jne 10833d <RTEMS_Malloc_Initialize+0x61>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
10831e: 80 3d ac 32 12 00 00 cmpb $0x0,0x1232ac
108325: 75 41 jne 108368 <RTEMS_Malloc_Initialize+0x8c>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
108327: 6a 04 push $0x4
108329: 56 push %esi
10832a: 53 push %ebx
10832b: ff 35 b8 31 12 00 pushl 0x1231b8
108331: e8 c2 43 00 00 call 10c6f8 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
108336: 83 c4 10 add $0x10,%esp
108339: 85 c0 test %eax,%eax
10833b: 74 3e je 10837b <RTEMS_Malloc_Initialize+0x9f>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
10833d: 8b 1d 00 74 12 00 mov 0x127400,%ebx
108343: 83 ec 0c sub $0xc,%esp
108346: ff 35 b8 31 12 00 pushl 0x1231b8
10834c: e8 2b 4e 00 00 call 10d17c <_Protected_heap_Get_size>
108351: 8d 1c 18 lea (%eax,%ebx,1),%ebx
108354: 89 1d 00 74 12 00 mov %ebx,0x127400
10835a: 83 c4 10 add $0x10,%esp
}
10835d: 8d 65 f4 lea -0xc(%ebp),%esp
108360: 5b pop %ebx
108361: 5e pop %esi
108362: 5f pop %edi
108363: c9 leave
108364: c3 ret
108365: 8d 76 00 lea 0x0(%esi),%esi
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
108368: 31 c0 xor %eax,%eax
10836a: 89 df mov %ebx,%edi
10836c: 89 f1 mov %esi,%ecx
10836e: f3 aa rep stos %al,%es:(%edi)
* 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 ) {
108370: 80 3d a4 57 12 00 00 cmpb $0x0,0x1257a4
108377: 74 ae je 108327 <RTEMS_Malloc_Initialize+0x4b><== ALWAYS TAKEN
108379: eb c2 jmp 10833d <RTEMS_Malloc_Initialize+0x61><== NOT EXECUTED
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
10837b: 83 ec 0c sub $0xc,%esp
10837e: 6a 1a push $0x1a
108380: e8 7b 39 00 00 call 10bd00 <rtems_fatal_error_occurred>
00107de0 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
107de0: 55 push %ebp <== NOT EXECUTED
107de1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107de3: 57 push %edi <== NOT EXECUTED
107de4: 56 push %esi <== NOT EXECUTED
107de5: 53 push %ebx <== NOT EXECUTED
107de6: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
107de9: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
107dec: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
107def: 0f 84 37 01 00 00 je 107f2c <Stack_check_Dump_threads_usage+0x14c><== NOT EXECUTED
the_thread = 0;
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
107df5: 8d b3 b8 00 00 00 lea 0xb8(%ebx),%esi <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
107dfb: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
107e01: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
107e04: 8b 8b bc 00 00 00 mov 0xbc(%ebx),%ecx <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
107e0a: 8d 51 10 lea 0x10(%ecx),%edx <== NOT EXECUTED
107e0d: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
107e10: 8b 3e mov (%esi),%edi <== NOT EXECUTED
107e12: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
107e15: 8d 41 20 lea 0x20(%ecx),%eax <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
107e18: 89 fa mov %edi,%edx <== NOT EXECUTED
107e1a: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED
107e1d: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED
107e20: 39 d0 cmp %edx,%eax <== NOT EXECUTED
107e22: 73 23 jae 107e47 <Stack_check_Dump_threads_usage+0x67><== NOT EXECUTED
if (*base != U32_PATTERN)
107e24: 81 79 20 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x20(%ecx) <== NOT EXECUTED
107e2b: 74 13 je 107e40 <Stack_check_Dump_threads_usage+0x60><== NOT EXECUTED
107e2d: e9 a2 00 00 00 jmp 107ed4 <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
107e32: 66 90 xchg %ax,%ax <== NOT EXECUTED
107e34: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED
107e3a: 0f 85 94 00 00 00 jne 107ed4 <Stack_check_Dump_threads_usage+0xf4><== 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++)
107e40: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
107e43: 39 c2 cmp %eax,%edx <== NOT EXECUTED
107e45: 77 ed ja 107e34 <Stack_check_Dump_threads_usage+0x54><== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
107e47: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
107e4e: 85 db test %ebx,%ebx <== NOT EXECUTED
107e50: 0f 84 98 00 00 00 je 107eee <Stack_check_Dump_threads_usage+0x10e><== NOT EXECUTED
#endif
{
(*print_handler)(
107e56: a1 24 9d 12 00 mov 0x129d24,%eax <== NOT EXECUTED
107e5b: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
107e5e: 50 push %eax <== NOT EXECUTED
107e5f: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED
107e62: 50 push %eax <== NOT EXECUTED
107e63: 6a 05 push $0x5 <== NOT EXECUTED
107e65: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
107e68: e8 cf 5e 00 00 call 10dd3c <rtems_object_get_name> <== NOT EXECUTED
107e6d: 50 push %eax <== NOT EXECUTED
107e6e: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
107e71: 68 13 35 12 00 push $0x123513 <== NOT EXECUTED
107e76: ff 35 20 9d 12 00 pushl 0x129d20 <== NOT EXECUTED
107e7c: ff 55 cc call *-0x34(%ebp) <== NOT EXECUTED
107e7f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
107e82: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
107e85: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107e88: 57 push %edi <== NOT EXECUTED
107e89: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
107e8c: 8b 16 mov (%esi),%edx <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
107e8e: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
107e92: 52 push %edx <== NOT EXECUTED
107e93: 50 push %eax <== NOT EXECUTED
107e94: 68 2e 35 12 00 push $0x12352e <== NOT EXECUTED
107e99: ff 35 20 9d 12 00 pushl 0x129d20 <== NOT EXECUTED
107e9f: ff 15 24 9d 12 00 call *0x129d24 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
107ea5: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
107ea8: 8b 15 28 9d 12 00 mov 0x129d28,%edx <== NOT EXECUTED
107eae: 85 d2 test %edx,%edx <== NOT EXECUTED
107eb0: 74 5a je 107f0c <Stack_check_Dump_threads_usage+0x12c><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
107eb2: 50 push %eax <== NOT EXECUTED
107eb3: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
107eb6: 68 59 35 12 00 push $0x123559 <== NOT EXECUTED
107ebb: ff 35 20 9d 12 00 pushl 0x129d20 <== NOT EXECUTED
107ec1: ff 15 24 9d 12 00 call *0x129d24 <== NOT EXECUTED
107ec7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
107eca: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107ecd: 5b pop %ebx <== NOT EXECUTED
107ece: 5e pop %esi <== NOT EXECUTED
107ecf: 5f pop %edi <== NOT EXECUTED
107ed0: c9 leave <== NOT EXECUTED
107ed1: c3 ret <== NOT EXECUTED
107ed2: 66 90 xchg %ax,%ax <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
107ed4: 85 c0 test %eax,%eax <== NOT EXECUTED
107ed6: 0f 84 6b ff ff ff je 107e47 <Stack_check_Dump_threads_usage+0x67><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
107edc: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
107edf: 01 fa add %edi,%edx <== NOT EXECUTED
107ee1: 29 c2 sub %eax,%edx <== NOT EXECUTED
107ee3: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
107ee6: 85 db test %ebx,%ebx <== NOT EXECUTED
107ee8: 0f 85 68 ff ff ff jne 107e56 <Stack_check_Dump_threads_usage+0x76><== NOT EXECUTED
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
107eee: 51 push %ecx <== NOT EXECUTED
107eef: 6a ff push $0xffffffff <== NOT EXECUTED
107ef1: 68 20 35 12 00 push $0x123520 <== NOT EXECUTED
107ef6: ff 35 20 9d 12 00 pushl 0x129d20 <== NOT EXECUTED
107efc: ff 15 24 9d 12 00 call *0x129d24 <== NOT EXECUTED
107f02: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107f05: e9 78 ff ff ff jmp 107e82 <Stack_check_Dump_threads_usage+0xa2><== NOT EXECUTED
107f0a: 66 90 xchg %ax,%ax <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
107f0c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107f0f: 68 4c 35 12 00 push $0x12354c <== NOT EXECUTED
107f14: ff 35 20 9d 12 00 pushl 0x129d20 <== NOT EXECUTED
107f1a: ff 15 24 9d 12 00 call *0x129d24 <== NOT EXECUTED
107f20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
107f23: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107f26: 5b pop %ebx <== NOT EXECUTED
107f27: 5e pop %esi <== NOT EXECUTED
107f28: 5f pop %edi <== NOT EXECUTED
107f29: c9 leave <== NOT EXECUTED
107f2a: c3 ret <== NOT EXECUTED
107f2b: 90 nop <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
107f2c: 8b 0d 94 a0 12 00 mov 0x12a094,%ecx <== NOT EXECUTED
107f32: 85 c9 test %ecx,%ecx <== NOT EXECUTED
107f34: 74 94 je 107eca <Stack_check_Dump_threads_usage+0xea><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
107f36: be 90 a0 12 00 mov $0x12a090,%esi <== NOT EXECUTED
the_thread = 0;
current = 0;
107f3b: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
107f42: 31 db xor %ebx,%ebx <== NOT EXECUTED
107f44: e9 c1 fe ff ff jmp 107e0a <Stack_check_Dump_threads_usage+0x2a><== NOT EXECUTED
00107f4c <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
107f4c: 55 push %ebp
107f4d: 89 e5 mov %esp,%ebp
107f4f: 57 push %edi
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
107f50: 8b 15 28 9d 12 00 mov 0x129d28,%edx
107f56: 85 d2 test %edx,%edx
107f58: 75 5a jne 107fb4 <Stack_check_Initialize+0x68>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
107f5a: c7 05 80 a0 12 00 0d movl $0xfeedf00d,0x12a080
107f61: f0 ed fe
107f64: c7 05 84 a0 12 00 06 movl $0xbad0d06,0x12a084
107f6b: 0d ad 0b
107f6e: c7 05 88 a0 12 00 0d movl $0xdeadf00d,0x12a088
107f75: f0 ad de
107f78: c7 05 8c a0 12 00 06 movl $0x600d0d06,0x12a08c
107f7f: 0d 0d 60
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
107f82: 8b 15 6c a8 12 00 mov 0x12a86c,%edx
107f88: 85 d2 test %edx,%edx
107f8a: 74 1e je 107faa <Stack_check_Initialize+0x5e><== NEVER TAKEN
107f8c: 8b 0d 70 a8 12 00 mov 0x12a870,%ecx
107f92: 85 c9 test %ecx,%ecx
107f94: 74 14 je 107faa <Stack_check_Initialize+0x5e><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
107f96: 89 15 94 a0 12 00 mov %edx,0x12a094
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
107f9c: 29 d1 sub %edx,%ecx
107f9e: 89 0d 90 a0 12 00 mov %ecx,0x12a090
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
107fa4: b0 a5 mov $0xa5,%al
107fa6: 89 d7 mov %edx,%edi
107fa8: f3 aa rep stos %al,%es:(%edi)
}
#endif
Stack_check_Initialized = 1;
107faa: c7 05 28 9d 12 00 01 movl $0x1,0x129d28
107fb1: 00 00 00
}
107fb4: 5f pop %edi
107fb5: c9 leave
107fb6: c3 ret
00108008 <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
108008: 55 push %ebp <== NOT EXECUTED
108009: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10800b: 56 push %esi <== NOT EXECUTED
10800c: 53 push %ebx <== NOT EXECUTED
10800d: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
108010: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
108013: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
108016: 8b b3 bc 00 00 00 mov 0xbc(%ebx),%esi <== NOT EXECUTED
char name[32];
printk("BLOWN STACK!!!\n");
10801c: 68 5f 35 12 00 push $0x12355f <== NOT EXECUTED
108021: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
108024: e8 cb 1b 00 00 call 109bf4 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
108029: 5a pop %edx <== NOT EXECUTED
10802a: 59 pop %ecx <== NOT EXECUTED
10802b: 53 push %ebx <== NOT EXECUTED
10802c: 68 6f 35 12 00 push $0x12356f <== NOT EXECUTED
108031: e8 be 1b 00 00 call 109bf4 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
108036: 59 pop %ecx <== NOT EXECUTED
108037: 58 pop %eax <== NOT EXECUTED
108038: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10803b: 68 8c 35 12 00 push $0x12358c <== NOT EXECUTED
108040: e8 af 1b 00 00 call 109bf4 <printk> <== NOT EXECUTED
printk(
108045: 58 pop %eax <== NOT EXECUTED
108046: 5a pop %edx <== NOT EXECUTED
108047: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
10804a: 68 9e 35 12 00 push $0x12359e <== NOT EXECUTED
10804f: e8 a0 1b 00 00 call 109bf4 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
108054: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
108057: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
10805a: 50 push %eax <== NOT EXECUTED
10805b: 6a 20 push $0x20 <== NOT EXECUTED
10805d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
108060: e8 d7 5c 00 00 call 10dd3c <rtems_object_get_name> <== NOT EXECUTED
108065: 5a pop %edx <== NOT EXECUTED
108066: 59 pop %ecx <== NOT EXECUTED
108067: 50 push %eax <== NOT EXECUTED
108068: 68 b2 35 12 00 push $0x1235b2 <== NOT EXECUTED
10806d: e8 82 1b 00 00 call 109bf4 <printk> <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
108072: 8b 8b bc 00 00 00 mov 0xbc(%ebx),%ecx <== NOT EXECUTED
108078: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
10807e: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED
108081: 53 push %ebx <== NOT EXECUTED
108082: 51 push %ecx <== NOT EXECUTED
108083: 50 push %eax <== NOT EXECUTED
108084: 68 e0 35 12 00 push $0x1235e0 <== NOT EXECUTED
108089: e8 66 1b 00 00 call 109bf4 <printk> <== 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) {
10808e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
108091: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED
108094: 84 d2 test %dl,%dl <== NOT EXECUTED
108096: 74 10 je 1080a8 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
108098: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10809b: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
1080a0: e8 b3 64 00 00 call 10e558 <rtems_fatal_error_occurred><== NOT EXECUTED
1080a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
1080a8: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
1080ab: 83 c6 18 add $0x18,%esi <== NOT EXECUTED
1080ae: 56 push %esi <== NOT EXECUTED
1080af: 50 push %eax <== NOT EXECUTED
1080b0: 6a 10 push $0x10 <== NOT EXECUTED
1080b2: 68 14 36 12 00 push $0x123614 <== NOT EXECUTED
1080b7: e8 38 1b 00 00 call 109bf4 <printk> <== NOT EXECUTED
1080bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1080bf: eb d7 jmp 108098 <Stack_check_report_blown_task+0x90><== NOT EXECUTED
0010bea8 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10bea8: 55 push %ebp
10bea9: 89 e5 mov %esp,%ebp
10beab: 53 push %ebx
10beac: 83 ec 04 sub $0x4,%esp
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10beaf: 8b 1d b8 77 12 00 mov 0x1277b8,%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10beb5: 81 fb bc 77 12 00 cmp $0x1277bc,%ebx
10bebb: 74 10 je 10becd <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN
10bebd: 8d 76 00 lea 0x0(%esi),%esi
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
10bec0: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10bec3: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10bec5: 81 fb bc 77 12 00 cmp $0x1277bc,%ebx
10becb: 75 f3 jne 10bec0 <_API_extensions_Run_postdriver+0x18>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
10becd: 58 pop %eax
10bece: 5b pop %ebx
10becf: c9 leave
10bed0: c3 ret
0010bed4 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10bed4: 55 push %ebp
10bed5: 89 e5 mov %esp,%ebp
10bed7: 53 push %ebx
10bed8: 83 ec 04 sub $0x4,%esp
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10bedb: 8b 1d b8 77 12 00 mov 0x1277b8,%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10bee1: 81 fb bc 77 12 00 cmp $0x1277bc,%ebx
10bee7: 74 1c je 10bf05 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN
10bee9: 8d 76 00 lea 0x0(%esi),%esi
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
10beec: 83 ec 0c sub $0xc,%esp
10beef: ff 35 38 7b 12 00 pushl 0x127b38
10bef5: ff 53 0c call *0xc(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10bef8: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10befa: 83 c4 10 add $0x10,%esp
10befd: 81 fb bc 77 12 00 cmp $0x1277bc,%ebx
10bf03: 75 e7 jne 10beec <_API_extensions_Run_postswitch+0x18>
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10bf05: 8b 5d fc mov -0x4(%ebp),%ebx
10bf08: c9 leave
10bf09: c3 ret
0010e3d4 <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10e3d4: 55 push %ebp
10e3d5: 89 e5 mov %esp,%ebp
10e3d7: 57 push %edi
10e3d8: 56 push %esi
10e3d9: 53 push %ebx
10e3da: 83 ec 1c sub $0x1c,%esp
10e3dd: 8b 5d 08 mov 0x8(%ebp),%ebx
10e3e0: 8b 7d 0c mov 0xc(%ebp),%edi
10e3e3: 8b 4d 14 mov 0x14(%ebp),%ecx
10e3e6: 8a 55 10 mov 0x10(%ebp),%dl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e3e9: 8b 35 b8 b4 12 00 mov 0x12b4b8,%esi
* If unlocked, then OK to read.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
10e3ef: 9c pushf
10e3f0: fa cli
10e3f1: 8f 45 e4 popl -0x1c(%ebp)
switch ( the_rwlock->current_state ) {
10e3f4: 8b 43 44 mov 0x44(%ebx),%eax
10e3f7: 85 c0 test %eax,%eax
10e3f9: 75 1d jne 10e418 <_CORE_RWLock_Obtain_for_reading+0x44>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10e3fb: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
the_rwlock->number_of_readers += 1;
10e402: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10e405: ff 75 e4 pushl -0x1c(%ebp)
10e408: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e409: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e410: 8d 65 f4 lea -0xc(%ebp),%esp
10e413: 5b pop %ebx
10e414: 5e pop %esi
10e415: 5f pop %edi
10e416: c9 leave
10e417: c3 ret
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
10e418: 48 dec %eax
10e419: 74 51 je 10e46c <_CORE_RWLock_Obtain_for_reading+0x98>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10e41b: 84 d2 test %dl,%dl
10e41d: 75 15 jne 10e434 <_CORE_RWLock_Obtain_for_reading+0x60>
_ISR_Enable( level );
10e41f: ff 75 e4 pushl -0x1c(%ebp)
10e422: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e423: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e42a: 8d 65 f4 lea -0xc(%ebp),%esp
10e42d: 5b pop %ebx
10e42e: 5e pop %esi
10e42f: 5f pop %edi
10e430: c9 leave
10e431: c3 ret
10e432: 66 90 xchg %ax,%ax
10e434: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
/*
* 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;
10e43b: 89 5e 44 mov %ebx,0x44(%esi)
executing->Wait.id = id;
10e43e: 89 7e 20 mov %edi,0x20(%esi)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
10e441: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e448: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
_ISR_Enable( level );
10e44f: ff 75 e4 pushl -0x1c(%ebp)
10e452: 9d popf
_Thread_queue_Enqueue_with_handler(
10e453: c7 45 10 d8 e5 10 00 movl $0x10e5d8,0x10(%ebp)
10e45a: 89 4d 0c mov %ecx,0xc(%ebp)
10e45d: 89 5d 08 mov %ebx,0x8(%ebp)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e460: 8d 65 f4 lea -0xc(%ebp),%esp
10e463: 5b pop %ebx
10e464: 5e pop %esi
10e465: 5f pop %edi
10e466: c9 leave
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
10e467: e9 9c 1b 00 00 jmp 110008 <_Thread_queue_Enqueue_with_handler>
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
return;
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
10e46c: 83 ec 0c sub $0xc,%esp
10e46f: 53 push %ebx
10e470: 88 55 e0 mov %dl,-0x20(%ebp)
10e473: 89 4d dc mov %ecx,-0x24(%ebp)
10e476: e8 b5 1e 00 00 call 110330 <_Thread_queue_First>
if ( !waiter ) {
10e47b: 83 c4 10 add $0x10,%esp
10e47e: 85 c0 test %eax,%eax
10e480: 8a 55 e0 mov -0x20(%ebp),%dl
10e483: 8b 4d dc mov -0x24(%ebp),%ecx
10e486: 75 93 jne 10e41b <_CORE_RWLock_Obtain_for_reading+0x47>
the_rwlock->number_of_readers += 1;
10e488: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10e48b: ff 75 e4 pushl -0x1c(%ebp)
10e48e: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e48f: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
return;
10e496: e9 75 ff ff ff jmp 10e410 <_CORE_RWLock_Obtain_for_reading+0x3c>
0010e49c <_CORE_RWLock_Obtain_for_writing>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10e49c: 55 push %ebp
10e49d: 89 e5 mov %esp,%ebp
10e49f: 57 push %edi
10e4a0: 56 push %esi
10e4a1: 53 push %ebx
10e4a2: 83 ec 0c sub $0xc,%esp
10e4a5: 8b 45 08 mov 0x8(%ebp),%eax
10e4a8: 8b 7d 0c mov 0xc(%ebp),%edi
10e4ab: 8b 75 14 mov 0x14(%ebp),%esi
10e4ae: 8a 5d 10 mov 0x10(%ebp),%bl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e4b1: 8b 15 b8 b4 12 00 mov 0x12b4b8,%edx
* 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 );
10e4b7: 9c pushf
10e4b8: fa cli
10e4b9: 59 pop %ecx
switch ( the_rwlock->current_state ) {
10e4ba: 83 78 44 00 cmpl $0x0,0x44(%eax)
10e4be: 75 18 jne 10e4d8 <_CORE_RWLock_Obtain_for_writing+0x3c>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10e4c0: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax)
_ISR_Enable( level );
10e4c7: 51 push %ecx
10e4c8: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e4c9: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e4d0: 83 c4 0c add $0xc,%esp
10e4d3: 5b pop %ebx
10e4d4: 5e pop %esi
10e4d5: 5f pop %edi
10e4d6: c9 leave
10e4d7: c3 ret
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10e4d8: 84 db test %bl,%bl
10e4da: 75 14 jne 10e4f0 <_CORE_RWLock_Obtain_for_writing+0x54>
_ISR_Enable( level );
10e4dc: 51 push %ecx
10e4dd: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e4de: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e4e5: 83 c4 0c add $0xc,%esp
10e4e8: 5b pop %ebx
10e4e9: 5e pop %esi
10e4ea: 5f pop %edi
10e4eb: c9 leave
10e4ec: c3 ret
10e4ed: 8d 76 00 lea 0x0(%esi),%esi
10e4f0: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
/*
* 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;
10e4f7: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10e4fa: 89 7a 20 mov %edi,0x20(%edx)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
10e4fd: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e504: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Enable( level );
10e50b: 51 push %ecx
10e50c: 9d popf
_Thread_queue_Enqueue_with_handler(
10e50d: c7 45 10 d8 e5 10 00 movl $0x10e5d8,0x10(%ebp)
10e514: 89 75 0c mov %esi,0xc(%ebp)
10e517: 89 45 08 mov %eax,0x8(%ebp)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e51a: 83 c4 0c add $0xc,%esp
10e51d: 5b pop %ebx
10e51e: 5e pop %esi
10e51f: 5f pop %edi
10e520: c9 leave
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(
10e521: e9 e2 1a 00 00 jmp 110008 <_Thread_queue_Enqueue_with_handler>
0010e528 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10e528: 55 push %ebp
10e529: 89 e5 mov %esp,%ebp
10e52b: 53 push %ebx
10e52c: 83 ec 04 sub $0x4,%esp
10e52f: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e532: 8b 0d b8 b4 12 00 mov 0x12b4b8,%ecx
* 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 );
10e538: 9c pushf
10e539: fa cli
10e53a: 5a pop %edx
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10e53b: 8b 43 44 mov 0x44(%ebx),%eax
10e53e: 85 c0 test %eax,%eax
10e540: 74 7a je 10e5bc <_CORE_RWLock_Release+0x94>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10e542: 48 dec %eax
10e543: 74 63 je 10e5a8 <_CORE_RWLock_Release+0x80>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e545: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
10e54c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10e553: 52 push %edx
10e554: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10e555: 83 ec 0c sub $0xc,%esp
10e558: 53 push %ebx
10e559: e8 82 19 00 00 call 10fee0 <_Thread_queue_Dequeue>
if ( next ) {
10e55e: 83 c4 10 add $0x10,%esp
10e561: 85 c0 test %eax,%eax
10e563: 74 39 je 10e59e <_CORE_RWLock_Release+0x76>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10e565: 83 78 30 01 cmpl $0x1,0x30(%eax)
10e569: 74 61 je 10e5cc <_CORE_RWLock_Release+0xa4>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10e56b: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10e56e: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
10e575: eb 17 jmp 10e58e <_CORE_RWLock_Release+0x66>
10e577: 90 nop
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
10e578: 83 78 30 01 cmpl $0x1,0x30(%eax)
10e57c: 74 20 je 10e59e <_CORE_RWLock_Release+0x76><== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
10e57e: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10e581: 83 ec 08 sub $0x8,%esp
10e584: 50 push %eax
10e585: 53 push %ebx
10e586: e8 8d 1c 00 00 call 110218 <_Thread_queue_Extract>
}
10e58b: 83 c4 10 add $0x10,%esp
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
10e58e: 83 ec 0c sub $0xc,%esp
10e591: 53 push %ebx
10e592: e8 99 1d 00 00 call 110330 <_Thread_queue_First>
if ( !next ||
10e597: 83 c4 10 add $0x10,%esp
10e59a: 85 c0 test %eax,%eax
10e59c: 75 da jne 10e578 <_CORE_RWLock_Release+0x50>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e59e: 31 c0 xor %eax,%eax
10e5a0: 8b 5d fc mov -0x4(%ebp),%ebx
10e5a3: c9 leave
10e5a4: c3 ret
10e5a5: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
10e5a8: 8b 43 48 mov 0x48(%ebx),%eax
10e5ab: 48 dec %eax
10e5ac: 89 43 48 mov %eax,0x48(%ebx)
if ( the_rwlock->number_of_readers != 0 ) {
10e5af: 85 c0 test %eax,%eax
10e5b1: 74 92 je 10e545 <_CORE_RWLock_Release+0x1d>
/* must be unlocked again */
_ISR_Enable( level );
10e5b3: 52 push %edx
10e5b4: 9d popf
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e5b5: 31 c0 xor %eax,%eax
10e5b7: 8b 5d fc mov -0x4(%ebp),%ebx
10e5ba: c9 leave
10e5bb: c3 ret
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
10e5bc: 52 push %edx
10e5bd: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e5be: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e5c5: 31 c0 xor %eax,%eax
10e5c7: 8b 5d fc mov -0x4(%ebp),%ebx
10e5ca: c9 leave
10e5cb: c3 ret
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10e5cc: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10e5d3: eb c9 jmp 10e59e <_CORE_RWLock_Release+0x76>
0010e5d8 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10e5d8: 55 push %ebp
10e5d9: 89 e5 mov %esp,%ebp
10e5db: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e5de: 8d 45 f4 lea -0xc(%ebp),%eax
10e5e1: 50 push %eax
10e5e2: ff 75 08 pushl 0x8(%ebp)
10e5e5: e8 66 15 00 00 call 10fb50 <_Thread_Get>
switch ( location ) {
10e5ea: 83 c4 10 add $0x10,%esp
10e5ed: 8b 55 f4 mov -0xc(%ebp),%edx
10e5f0: 85 d2 test %edx,%edx
10e5f2: 75 17 jne 10e60b <_CORE_RWLock_Timeout+0x33><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10e5f4: 83 ec 0c sub $0xc,%esp
10e5f7: 50 push %eax
10e5f8: e8 13 1e 00 00 call 110410 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e5fd: a1 d0 ae 12 00 mov 0x12aed0,%eax
10e602: 48 dec %eax
10e603: a3 d0 ae 12 00 mov %eax,0x12aed0
10e608: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10e60b: c9 leave
10e60c: c3 ret
001198cc <_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
)
{
1198cc: 55 push %ebp
1198cd: 89 e5 mov %esp,%ebp
1198cf: 57 push %edi
1198d0: 56 push %esi
1198d1: 53 push %ebx
1198d2: 83 ec 1c sub $0x1c,%esp
1198d5: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
1198d8: 8b 45 10 mov 0x10(%ebp),%eax
1198db: 39 43 4c cmp %eax,0x4c(%ebx)
1198de: 72 60 jb 119940 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
1198e0: 8b 43 48 mov 0x48(%ebx),%eax
1198e3: 85 c0 test %eax,%eax
1198e5: 75 45 jne 11992c <_CORE_message_queue_Broadcast+0x60>
1198e7: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
1198ee: eb 18 jmp 119908 <_CORE_message_queue_Broadcast+0x3c>
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
1198f0: ff 45 e4 incl -0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
1198f3: 8b 42 2c mov 0x2c(%edx),%eax
1198f6: 89 c7 mov %eax,%edi
1198f8: 8b 75 0c mov 0xc(%ebp),%esi
1198fb: 8b 4d 10 mov 0x10(%ebp),%ecx
1198fe: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
119900: 8b 42 28 mov 0x28(%edx),%eax
119903: 8b 55 10 mov 0x10(%ebp),%edx
119906: 89 10 mov %edx,(%eax)
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
119908: 83 ec 0c sub $0xc,%esp
11990b: 53 push %ebx
11990c: e8 1f 28 00 00 call 11c130 <_Thread_queue_Dequeue>
119911: 89 c2 mov %eax,%edx
119913: 83 c4 10 add $0x10,%esp
119916: 85 c0 test %eax,%eax
119918: 75 d6 jne 1198f0 <_CORE_message_queue_Broadcast+0x24>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
11991a: 8b 55 e4 mov -0x1c(%ebp),%edx
11991d: 8b 45 1c mov 0x1c(%ebp),%eax
119920: 89 10 mov %edx,(%eax)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
119922: 31 c0 xor %eax,%eax
}
119924: 8d 65 f4 lea -0xc(%ebp),%esp
119927: 5b pop %ebx
119928: 5e pop %esi
119929: 5f pop %edi
11992a: c9 leave
11992b: c3 ret
* 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;
11992c: 8b 55 1c mov 0x1c(%ebp),%edx
11992f: c7 02 00 00 00 00 movl $0x0,(%edx)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
119935: 31 c0 xor %eax,%eax
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
119937: 8d 65 f4 lea -0xc(%ebp),%esp
11993a: 5b pop %ebx
11993b: 5e pop %esi
11993c: 5f pop %edi
11993d: c9 leave
11993e: c3 ret
11993f: 90 nop
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
119940: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
119945: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
119948: 5b pop %ebx <== NOT EXECUTED
119949: 5e pop %esi <== NOT EXECUTED
11994a: 5f pop %edi <== NOT EXECUTED
11994b: c9 leave <== NOT EXECUTED
11994c: c3 ret <== NOT EXECUTED
00114a0c <_CORE_message_queue_Initialize>:
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
)
{
114a0c: 55 push %ebp
114a0d: 89 e5 mov %esp,%ebp
114a0f: 57 push %edi
114a10: 56 push %esi
114a11: 53 push %ebx
114a12: 83 ec 0c sub $0xc,%esp
114a15: 8b 5d 08 mov 0x8(%ebp),%ebx
114a18: 8b 75 10 mov 0x10(%ebp),%esi
114a1b: 8b 45 14 mov 0x14(%ebp),%eax
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
114a1e: 89 73 44 mov %esi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
114a21: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
114a28: 89 43 4c mov %eax,0x4c(%ebx)
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
114a2b: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
the_message_queue->notify_argument = the_argument;
114a32: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
/*
* 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)) {
114a39: a8 03 test $0x3,%al
114a3b: 74 17 je 114a54 <_CORE_message_queue_Initialize+0x48>
allocated_message_size += sizeof(uint32_t);
114a3d: 8d 50 04 lea 0x4(%eax),%edx
allocated_message_size &= ~(sizeof(uint32_t) - 1);
114a40: 83 e2 fc and $0xfffffffc,%edx
}
if (allocated_message_size < maximum_message_size)
114a43: 39 d0 cmp %edx,%eax
114a45: 76 0f jbe 114a56 <_CORE_message_queue_Initialize+0x4a><== ALWAYS TAKEN
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
return false;
114a47: 31 c0 xor %eax,%eax
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
114a49: 8d 65 f4 lea -0xc(%ebp),%esp
114a4c: 5b pop %ebx
114a4d: 5e pop %esi
114a4e: 5f pop %edi
114a4f: c9 leave
114a50: c3 ret
114a51: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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)) {
114a54: 89 c2 mov %eax,%edx
/*
* 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));
114a56: 8d 7a 14 lea 0x14(%edx),%edi
/*
* 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 *
114a59: 89 f8 mov %edi,%eax
114a5b: 0f af c6 imul %esi,%eax
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
114a5e: 39 d0 cmp %edx,%eax
114a60: 72 e5 jb 114a47 <_CORE_message_queue_Initialize+0x3b><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
114a62: 83 ec 0c sub $0xc,%esp
114a65: 50 push %eax
114a66: e8 21 2b 00 00 call 11758c <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
114a6b: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
114a6e: 83 c4 10 add $0x10,%esp
114a71: 85 c0 test %eax,%eax
114a73: 74 d2 je 114a47 <_CORE_message_queue_Initialize+0x3b>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
114a75: 57 push %edi
114a76: 56 push %esi
114a77: 50 push %eax
114a78: 8d 43 68 lea 0x68(%ebx),%eax
114a7b: 50 push %eax
114a7c: e8 17 52 00 00 call 119c98 <_Chain_Initialize>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
114a81: 8d 43 54 lea 0x54(%ebx),%eax
114a84: 89 43 50 mov %eax,0x50(%ebx)
head->next = tail;
head->previous = NULL;
114a87: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
114a8e: 8d 43 50 lea 0x50(%ebx),%eax
114a91: 89 43 58 mov %eax,0x58(%ebx)
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
114a94: 6a 06 push $0x6
114a96: 68 80 00 00 00 push $0x80
114a9b: 8b 45 0c mov 0xc(%ebp),%eax
114a9e: 83 38 01 cmpl $0x1,(%eax)
114aa1: 0f 94 c0 sete %al
114aa4: 0f b6 c0 movzbl %al,%eax
114aa7: 50 push %eax
114aa8: 53 push %ebx
114aa9: e8 be 21 00 00 call 116c6c <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
114aae: 83 c4 20 add $0x20,%esp
114ab1: b0 01 mov $0x1,%al
}
114ab3: 8d 65 f4 lea -0xc(%ebp),%esp
114ab6: 5b pop %ebx
114ab7: 5e pop %esi
114ab8: 5f pop %edi
114ab9: c9 leave
114aba: c3 ret
001110b0 <_CORE_message_queue_Insert_message>:
void _CORE_message_queue_Insert_message(
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message,
CORE_message_queue_Submit_types submit_type
)
{
1110b0: 55 push %ebp
1110b1: 89 e5 mov %esp,%ebp
1110b3: 56 push %esi
1110b4: 53 push %ebx
1110b5: 83 ec 10 sub $0x10,%esp
1110b8: 8b 45 08 mov 0x8(%ebp),%eax
1110bb: 8b 55 0c mov 0xc(%ebp),%edx
1110be: 8b 4d 10 mov 0x10(%ebp),%ecx
1110c1: 89 4a 08 mov %ecx,0x8(%edx)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
1110c4: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx
1110ca: 74 70 je 11113c <_CORE_message_queue_Insert_message+0x8c>
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
1110cc: 81 f9 00 00 00 80 cmp $0x80000000,%ecx
1110d2: 0f 84 88 00 00 00 je 111160 <_CORE_message_queue_Insert_message+0xb0>
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
#endif
}
1110d8: 8b 58 50 mov 0x50(%eax),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
1110db: 8d 70 54 lea 0x54(%eax),%esi
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = _Chain_First( the_header );
while ( !_Chain_Is_tail( the_header, the_node ) ) {
1110de: 39 de cmp %ebx,%esi
1110e0: 74 05 je 1110e7 <_CORE_message_queue_Insert_message+0x37>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
1110e2: 3b 4b 08 cmp 0x8(%ebx),%ecx
1110e5: 7d 45 jge 11112c <_CORE_message_queue_Insert_message+0x7c>
the_node = the_node->next;
continue;
}
break;
}
_ISR_Disable( level );
1110e7: 9c pushf
1110e8: fa cli
1110e9: 5e pop %esi
SET_NOTIFY();
1110ea: 8b 48 48 mov 0x48(%eax),%ecx
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
1110ed: 85 c9 test %ecx,%ecx
1110ef: 0f 94 45 f7 sete -0x9(%ebp)
}
break;
}
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
1110f3: 41 inc %ecx
1110f4: 89 48 48 mov %ecx,0x48(%eax)
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
1110f7: 8b 4b 04 mov 0x4(%ebx),%ecx
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
1110fa: 89 4a 04 mov %ecx,0x4(%edx)
before_node = after_node->next;
1110fd: 8b 19 mov (%ecx),%ebx
after_node->next = the_node;
1110ff: 89 11 mov %edx,(%ecx)
the_node->next = before_node;
111101: 89 1a mov %ebx,(%edx)
before_node->previous = the_node;
111103: 89 53 04 mov %edx,0x4(%ebx)
_ISR_Enable( level );
111106: 56 push %esi
111107: 9d popf
/*
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
111108: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
11110c: 74 16 je 111124 <_CORE_message_queue_Insert_message+0x74>
11110e: 8b 50 60 mov 0x60(%eax),%edx
111111: 85 d2 test %edx,%edx
111113: 74 0f je 111124 <_CORE_message_queue_Insert_message+0x74>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
111115: 8b 40 64 mov 0x64(%eax),%eax
111118: 89 45 08 mov %eax,0x8(%ebp)
#endif
}
11111b: 83 c4 10 add $0x10,%esp
11111e: 5b pop %ebx
11111f: 5e pop %esi
111120: c9 leave
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
111121: ff e2 jmp *%edx
111123: 90 nop
#endif
}
111124: 83 c4 10 add $0x10,%esp
111127: 5b pop %ebx
111128: 5e pop %esi
111129: c9 leave
11112a: c3 ret
11112b: 90 nop
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
the_node = the_node->next;
11112c: 8b 1b mov (%ebx),%ebx
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = _Chain_First( the_header );
while ( !_Chain_Is_tail( the_header, the_node ) ) {
11112e: 39 de cmp %ebx,%esi
111130: 74 b5 je 1110e7 <_CORE_message_queue_Insert_message+0x37>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
111132: 3b 4b 08 cmp 0x8(%ebx),%ecx
111135: 7c b0 jl 1110e7 <_CORE_message_queue_Insert_message+0x37>
111137: eb f3 jmp 11112c <_CORE_message_queue_Insert_message+0x7c>
111139: 8d 76 00 lea 0x0(%esi),%esi
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_ISR_Disable( level );
11113c: 9c pushf
11113d: fa cli
11113e: 5b pop %ebx
SET_NOTIFY();
11113f: 8b 48 48 mov 0x48(%eax),%ecx
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
111142: 85 c9 test %ecx,%ecx
111144: 0f 94 45 f7 sete -0x9(%ebp)
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
111148: 41 inc %ecx
111149: 89 48 48 mov %ecx,0x48(%eax)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
11114c: 8b 48 58 mov 0x58(%eax),%ecx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
11114f: 8d 70 54 lea 0x54(%eax),%esi
111152: 89 32 mov %esi,(%edx)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
111154: 89 50 58 mov %edx,0x58(%eax)
old_last->next = the_node;
111157: 89 11 mov %edx,(%ecx)
the_node->previous = old_last;
111159: 89 4a 04 mov %ecx,0x4(%edx)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
11115c: 53 push %ebx
11115d: 9d popf
11115e: eb a8 jmp 111108 <_CORE_message_queue_Insert_message+0x58>
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
_ISR_Disable( level );
111160: 9c pushf
111161: fa cli
111162: 5b pop %ebx
SET_NOTIFY();
111163: 8b 48 48 mov 0x48(%eax),%ecx
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
111166: 85 c9 test %ecx,%ecx
111168: 0f 94 45 f7 sete -0x9(%ebp)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
11116c: 41 inc %ecx
11116d: 89 48 48 mov %ecx,0x48(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
111170: 8d 48 50 lea 0x50(%eax),%ecx
111173: 89 4a 04 mov %ecx,0x4(%edx)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
111176: 8b 48 50 mov 0x50(%eax),%ecx
after_node->next = the_node;
111179: 89 50 50 mov %edx,0x50(%eax)
the_node->next = before_node;
11117c: 89 0a mov %ecx,(%edx)
before_node->previous = the_node;
11117e: 89 51 04 mov %edx,0x4(%ecx)
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
111181: 53 push %ebx
111182: 9d popf
111183: eb 83 jmp 111108 <_CORE_message_queue_Insert_message+0x58>
00114abc <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
114abc: 55 push %ebp
114abd: 89 e5 mov %esp,%ebp
114abf: 57 push %edi
114ac0: 56 push %esi
114ac1: 53 push %ebx
114ac2: 83 ec 2c sub $0x2c,%esp
114ac5: 8b 55 08 mov 0x8(%ebp),%edx
114ac8: 8b 45 0c mov 0xc(%ebp),%eax
114acb: 89 45 dc mov %eax,-0x24(%ebp)
114ace: 8b 4d 10 mov 0x10(%ebp),%ecx
114ad1: 89 4d e0 mov %ecx,-0x20(%ebp)
114ad4: 8b 45 14 mov 0x14(%ebp),%eax
114ad7: 8b 5d 1c mov 0x1c(%ebp),%ebx
114ada: 89 5d d8 mov %ebx,-0x28(%ebp)
114add: 0f b6 7d 18 movzbl 0x18(%ebp),%edi
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
114ae1: 8b 0d d8 11 13 00 mov 0x1311d8,%ecx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
114ae7: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
114aee: 9c pushf
114aef: fa cli
114af0: 8f 45 e4 popl -0x1c(%ebp)
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 );
}
114af3: 8b 5a 50 mov 0x50(%edx),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
114af6: 8d 72 54 lea 0x54(%edx),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
114af9: 39 f3 cmp %esi,%ebx
114afb: 74 7b je 114b78 <_CORE_message_queue_Seize+0xbc>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
114afd: 8b 0b mov (%ebx),%ecx
head->next = new_first;
114aff: 89 4a 50 mov %ecx,0x50(%edx)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
114b02: 8d 72 50 lea 0x50(%edx),%esi
114b05: 89 71 04 mov %esi,0x4(%ecx)
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
114b08: ff 4a 48 decl 0x48(%edx)
_ISR_Enable( level );
114b0b: ff 75 e4 pushl -0x1c(%ebp)
114b0e: 9d popf
*size_p = the_message->Contents.size;
114b0f: 8b 4b 0c mov 0xc(%ebx),%ecx
114b12: 89 08 mov %ecx,(%eax)
_Thread_Executing->Wait.count =
114b14: 8b 73 08 mov 0x8(%ebx),%esi
114b17: 8b 0d d8 11 13 00 mov 0x1311d8,%ecx
114b1d: 89 71 24 mov %esi,0x24(%ecx)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
114b20: 8d 4b 10 lea 0x10(%ebx),%ecx
114b23: 89 4d e4 mov %ecx,-0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
114b26: 8b 08 mov (%eax),%ecx
114b28: 8b 7d e0 mov -0x20(%ebp),%edi
114b2b: 8b 75 e4 mov -0x1c(%ebp),%esi
114b2e: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
* 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 );
114b30: 83 ec 0c sub $0xc,%esp
114b33: 52 push %edx
114b34: 89 55 d4 mov %edx,-0x2c(%ebp)
114b37: e8 a0 1d 00 00 call 1168dc <_Thread_queue_Dequeue>
if ( !the_thread ) {
114b3c: 83 c4 10 add $0x10,%esp
114b3f: 85 c0 test %eax,%eax
114b41: 8b 55 d4 mov -0x2c(%ebp),%edx
114b44: 0f 84 86 00 00 00 je 114bd0 <_CORE_message_queue_Seize+0x114>
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
114b4a: 8b 48 24 mov 0x24(%eax),%ecx
114b4d: 89 4b 08 mov %ecx,0x8(%ebx)
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
114b50: 8b 48 30 mov 0x30(%eax),%ecx
114b53: 89 4b 0c mov %ecx,0xc(%ebx)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
114b56: 8b 70 2c mov 0x2c(%eax),%esi
114b59: 8b 7d e4 mov -0x1c(%ebp),%edi
114b5c: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
114b5e: 8b 43 08 mov 0x8(%ebx),%eax
114b61: 89 45 10 mov %eax,0x10(%ebp)
114b64: 89 5d 0c mov %ebx,0xc(%ebp)
114b67: 89 55 08 mov %edx,0x8(%ebp)
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 );
}
114b6a: 8d 65 f4 lea -0xc(%ebp),%esp
114b6d: 5b pop %ebx
114b6e: 5e pop %esi
114b6f: 5f pop %edi
114b70: c9 leave
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
114b71: e9 7e 51 00 00 jmp 119cf4 <_CORE_message_queue_Insert_message>
114b76: 66 90 xchg %ax,%ax
return;
}
#endif
}
if ( !wait ) {
114b78: 89 fb mov %edi,%ebx
114b7a: 84 db test %bl,%bl
114b7c: 75 16 jne 114b94 <_CORE_message_queue_Seize+0xd8>
_ISR_Enable( level );
114b7e: ff 75 e4 pushl -0x1c(%ebp)
114b81: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
114b82: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx)
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 );
}
114b89: 8d 65 f4 lea -0xc(%ebp),%esp
114b8c: 5b pop %ebx
114b8d: 5e pop %esi
114b8e: 5f pop %edi
114b8f: c9 leave
114b90: c3 ret
114b91: 8d 76 00 lea 0x0(%esi),%esi
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;
114b94: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
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;
114b9b: 89 51 44 mov %edx,0x44(%ecx)
executing->Wait.id = id;
114b9e: 8b 5d dc mov -0x24(%ebp),%ebx
114ba1: 89 59 20 mov %ebx,0x20(%ecx)
executing->Wait.return_argument_second.mutable_object = buffer;
114ba4: 8b 5d e0 mov -0x20(%ebp),%ebx
114ba7: 89 59 2c mov %ebx,0x2c(%ecx)
executing->Wait.return_argument = size_p;
114baa: 89 41 28 mov %eax,0x28(%ecx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
114bad: ff 75 e4 pushl -0x1c(%ebp)
114bb0: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
114bb1: c7 45 10 30 6d 11 00 movl $0x116d30,0x10(%ebp)
114bb8: 8b 45 d8 mov -0x28(%ebp),%eax
114bbb: 89 45 0c mov %eax,0xc(%ebp)
114bbe: 89 55 08 mov %edx,0x8(%ebp)
}
114bc1: 8d 65 f4 lea -0xc(%ebp),%esp
114bc4: 5b pop %ebx
114bc5: 5e pop %esi
114bc6: 5f pop %edi
114bc7: c9 leave
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 );
114bc8: e9 37 1e 00 00 jmp 116a04 <_Thread_queue_Enqueue_with_handler>
114bcd: 8d 76 00 lea 0x0(%esi),%esi
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 );
114bd0: 89 5d 0c mov %ebx,0xc(%ebp)
114bd3: 83 c2 68 add $0x68,%edx
114bd6: 89 55 08 mov %edx,0x8(%ebp)
}
114bd9: 8d 65 f4 lea -0xc(%ebp),%esp
114bdc: 5b pop %ebx
114bdd: 5e pop %esi
114bde: 5f pop %edi
114bdf: c9 leave
114be0: e9 a7 fd ff ff jmp 11498c <_Chain_Append>
0010c03c <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
10c03c: 55 push %ebp
10c03d: 89 e5 mov %esp,%ebp
10c03f: 57 push %edi
10c040: 56 push %esi
10c041: 53 push %ebx
10c042: 83 ec 1c sub $0x1c,%esp
10c045: 8b 5d 08 mov 0x8(%ebp),%ebx
10c048: 8b 75 0c mov 0xc(%ebp),%esi
10c04b: 8a 4d 20 mov 0x20(%ebp),%cl
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10c04e: 8b 45 10 mov 0x10(%ebp),%eax
10c051: 39 43 4c cmp %eax,0x4c(%ebx)
10c054: 72 32 jb 10c088 <_CORE_message_queue_Submit+0x4c>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
10c056: 8b 43 48 mov 0x48(%ebx),%eax
10c059: 85 c0 test %eax,%eax
10c05b: 74 3b je 10c098 <_CORE_message_queue_Submit+0x5c>
/*
* 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 <
10c05d: 39 43 44 cmp %eax,0x44(%ebx)
10c060: 0f 87 ba 00 00 00 ja 10c120 <_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 ) {
10c066: 84 c9 test %cl,%cl
10c068: 0f 84 ee 00 00 00 je 10c15c <_CORE_message_queue_Submit+0x120>
/*
* 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() ) {
10c06e: 8b 15 34 7b 12 00 mov 0x127b34,%edx
10c074: 85 d2 test %edx,%edx
10c076: 74 60 je 10c0d8 <_CORE_message_queue_Submit+0x9c>
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
10c078: b8 03 00 00 00 mov $0x3,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c07d: 8d 65 f4 lea -0xc(%ebp),%esp
10c080: 5b pop %ebx
10c081: 5e pop %esi
10c082: 5f pop %edi
10c083: c9 leave
10c084: c3 ret
10c085: 8d 76 00 lea 0x0(%esi),%esi
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
10c088: b8 01 00 00 00 mov $0x1,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c08d: 8d 65 f4 lea -0xc(%ebp),%esp
10c090: 5b pop %ebx
10c091: 5e pop %esi
10c092: 5f pop %edi
10c093: c9 leave
10c094: c3 ret
10c095: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
10c098: 83 ec 0c sub $0xc,%esp
10c09b: 53 push %ebx
10c09c: 88 4d e4 mov %cl,-0x1c(%ebp)
10c09f: e8 0c 1c 00 00 call 10dcb0 <_Thread_queue_Dequeue>
10c0a4: 89 c2 mov %eax,%edx
if ( the_thread ) {
10c0a6: 83 c4 10 add $0x10,%esp
10c0a9: 85 c0 test %eax,%eax
10c0ab: 8a 4d e4 mov -0x1c(%ebp),%cl
10c0ae: 0f 84 b8 00 00 00 je 10c16c <_CORE_message_queue_Submit+0x130>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c0b4: 8b 40 2c mov 0x2c(%eax),%eax
10c0b7: 89 c7 mov %eax,%edi
10c0b9: 8b 4d 10 mov 0x10(%ebp),%ecx
10c0bc: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
10c0be: 8b 42 28 mov 0x28(%edx),%eax
10c0c1: 8b 4d 10 mov 0x10(%ebp),%ecx
10c0c4: 89 08 mov %ecx,(%eax)
the_thread->Wait.count = (uint32_t) submit_type;
10c0c6: 8b 45 1c mov 0x1c(%ebp),%eax
10c0c9: 89 42 24 mov %eax,0x24(%edx)
#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;
10c0cc: 31 c0 xor %eax,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c0ce: 8d 65 f4 lea -0xc(%ebp),%esp
10c0d1: 5b pop %ebx
10c0d2: 5e pop %esi
10c0d3: 5f pop %edi
10c0d4: c9 leave
10c0d5: c3 ret
10c0d6: 66 90 xchg %ax,%ax
* 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;
10c0d8: a1 38 7b 12 00 mov 0x127b38,%eax
ISR_Level level;
_ISR_Disable( level );
10c0dd: 9c pushf
10c0de: fa cli
10c0df: 59 pop %ecx
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;
10c0e0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
10c0e7: 89 58 44 mov %ebx,0x44(%eax)
executing->Wait.id = id;
10c0ea: 8b 55 14 mov 0x14(%ebp),%edx
10c0ed: 89 50 20 mov %edx,0x20(%eax)
executing->Wait.return_argument_second.immutable_object = buffer;
10c0f0: 89 70 2c mov %esi,0x2c(%eax)
executing->Wait.option = (uint32_t) size;
10c0f3: 8b 55 10 mov 0x10(%ebp),%edx
10c0f6: 89 50 30 mov %edx,0x30(%eax)
executing->Wait.count = submit_type;
10c0f9: 8b 55 1c mov 0x1c(%ebp),%edx
10c0fc: 89 50 24 mov %edx,0x24(%eax)
_ISR_Enable( level );
10c0ff: 51 push %ecx
10c100: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
10c101: 50 push %eax
10c102: 68 04 e1 10 00 push $0x10e104
10c107: ff 75 24 pushl 0x24(%ebp)
10c10a: 53 push %ebx
10c10b: e8 c8 1c 00 00 call 10ddd8 <_Thread_queue_Enqueue_with_handler>
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
10c110: 83 c4 10 add $0x10,%esp
10c113: b8 07 00 00 00 mov $0x7,%eax
#endif
}
10c118: 8d 65 f4 lea -0xc(%ebp),%esp
10c11b: 5b pop %ebx
10c11c: 5e pop %esi
10c11d: 5f pop %edi
10c11e: c9 leave
10c11f: c3 ret
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
10c120: 83 ec 0c sub $0xc,%esp
10c123: 8d 43 68 lea 0x68(%ebx),%eax
10c126: 50 push %eax
10c127: e8 ec fe ff ff call 10c018 <_Chain_Get>
10c12c: 89 c2 mov %eax,%edx
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
#endif
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
10c12e: 8d 40 10 lea 0x10(%eax),%eax
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c131: 89 c7 mov %eax,%edi
10c133: 8b 4d 10 mov 0x10(%ebp),%ecx
10c136: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
size
);
the_message->Contents.size = size;
10c138: 8b 4d 10 mov 0x10(%ebp),%ecx
10c13b: 89 4a 0c mov %ecx,0xc(%edx)
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
10c13e: 8b 45 1c mov 0x1c(%ebp),%eax
10c141: 89 42 08 mov %eax,0x8(%edx)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
10c144: 83 c4 0c add $0xc,%esp
10c147: 50 push %eax
10c148: 52 push %edx
10c149: 53 push %ebx
10c14a: e8 61 4f 00 00 call 1110b0 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10c14f: 83 c4 10 add $0x10,%esp
10c152: 31 c0 xor %eax,%eax
10c154: e9 34 ff ff ff jmp 10c08d <_CORE_message_queue_Submit+0x51>
10c159: 8d 76 00 lea 0x0(%esi),%esi
* 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 ) {
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
10c15c: b8 02 00 00 00 mov $0x2,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c161: 8d 65 f4 lea -0xc(%ebp),%esp
10c164: 5b pop %ebx
10c165: 5e pop %esi
10c166: 5f pop %edi
10c167: c9 leave
10c168: c3 ret
10c169: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 ) {
10c16c: 8b 43 48 mov 0x48(%ebx),%eax
10c16f: e9 e9 fe ff ff jmp 10c05d <_CORE_message_queue_Submit+0x21>
0010c180 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
10c180: 55 push %ebp
10c181: 89 e5 mov %esp,%ebp
10c183: 57 push %edi
10c184: 56 push %esi
10c185: 53 push %ebx
10c186: 83 ec 0c sub $0xc,%esp
10c189: 8b 45 08 mov 0x8(%ebp),%eax
10c18c: 8b 5d 0c mov 0xc(%ebp),%ebx
10c18f: 8b 55 10 mov 0x10(%ebp),%edx
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
10c192: 8d 78 40 lea 0x40(%eax),%edi
10c195: b9 04 00 00 00 mov $0x4,%ecx
10c19a: 89 de mov %ebx,%esi
10c19c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_mutex->lock = initial_lock;
10c19e: 89 50 50 mov %edx,0x50(%eax)
the_mutex->blocked_count = 0;
10c1a1: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
if ( initial_lock == CORE_MUTEX_LOCKED ) {
10c1a8: 85 d2 test %edx,%edx
10c1aa: 75 30 jne 10c1dc <_CORE_mutex_Initialize+0x5c>
the_mutex->nest_count = 1;
10c1ac: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
the_mutex->holder = _Thread_Executing;
10c1b3: 8b 15 38 7b 12 00 mov 0x127b38,%edx
10c1b9: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = _Thread_Executing->Object.id;
10c1bc: 8b 4a 08 mov 0x8(%edx),%ecx
10c1bf: 89 48 60 mov %ecx,0x60(%eax)
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c1c2: 8b 48 48 mov 0x48(%eax),%ecx
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c1c5: 83 f9 02 cmp $0x2,%ecx
10c1c8: 74 05 je 10c1cf <_CORE_mutex_Initialize+0x4f>
10c1ca: 83 f9 03 cmp $0x3,%ecx
10c1cd: 75 22 jne 10c1f1 <_CORE_mutex_Initialize+0x71>
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
10c1cf: 8b 48 4c mov 0x4c(%eax),%ecx
10c1d2: 39 4a 14 cmp %ecx,0x14(%edx)
10c1d5: 72 41 jb 10c218 <_CORE_mutex_Initialize+0x98>
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
10c1d7: ff 42 1c incl 0x1c(%edx)
10c1da: eb 15 jmp 10c1f1 <_CORE_mutex_Initialize+0x71>
}
} else {
the_mutex->nest_count = 0;
10c1dc: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
the_mutex->holder = NULL;
10c1e3: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
the_mutex->holder_id = 0;
10c1ea: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
}
_Thread_queue_Initialize(
10c1f1: 6a 05 push $0x5
10c1f3: 68 00 04 00 00 push $0x400
10c1f8: 31 d2 xor %edx,%edx
10c1fa: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10c1fe: 0f 95 c2 setne %dl
10c201: 52 push %edx
10c202: 50 push %eax
10c203: e8 38 1e 00 00 call 10e040 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c208: 83 c4 10 add $0x10,%esp
10c20b: 31 c0 xor %eax,%eax
}
10c20d: 8d 65 f4 lea -0xc(%ebp),%esp
10c210: 5b pop %ebx
10c211: 5e pop %esi
10c212: 5f pop %edi
10c213: c9 leave
10c214: c3 ret
10c215: 8d 76 00 lea 0x0(%esi),%esi
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
return CORE_MUTEX_STATUS_CEILING_VIOLATED;
10c218: b8 06 00 00 00 mov $0x6,%eax
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c21d: 8d 65 f4 lea -0xc(%ebp),%esp
10c220: 5b pop %ebx
10c221: 5e pop %esi
10c222: 5f pop %edi
10c223: c9 leave
10c224: c3 ret
0010c278 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10c278: 55 push %ebp
10c279: 89 e5 mov %esp,%ebp
10c27b: 53 push %ebx
10c27c: 83 ec 14 sub $0x14,%esp
10c27f: 8b 5d 08 mov 0x8(%ebp),%ebx
10c282: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c285: a1 50 75 12 00 mov 0x127550,%eax
10c28a: 85 c0 test %eax,%eax
10c28c: 74 04 je 10c292 <_CORE_mutex_Seize+0x1a>
10c28e: 84 d2 test %dl,%dl
10c290: 75 36 jne 10c2c8 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN
10c292: 83 ec 08 sub $0x8,%esp
10c295: 8d 45 18 lea 0x18(%ebp),%eax
10c298: 50 push %eax
10c299: 53 push %ebx
10c29a: 88 55 f4 mov %dl,-0xc(%ebp)
10c29d: e8 e6 4e 00 00 call 111188 <_CORE_mutex_Seize_interrupt_trylock>
10c2a2: 83 c4 10 add $0x10,%esp
10c2a5: 85 c0 test %eax,%eax
10c2a7: 8a 55 f4 mov -0xc(%ebp),%dl
10c2aa: 74 14 je 10c2c0 <_CORE_mutex_Seize+0x48>
10c2ac: 84 d2 test %dl,%dl
10c2ae: 75 30 jne 10c2e0 <_CORE_mutex_Seize+0x68>
10c2b0: ff 75 18 pushl 0x18(%ebp)
10c2b3: 9d popf
10c2b4: a1 38 7b 12 00 mov 0x127b38,%eax
10c2b9: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10c2c0: 8b 5d fc mov -0x4(%ebp),%ebx
10c2c3: c9 leave
10c2c4: c3 ret
10c2c5: 8d 76 00 lea 0x0(%esi),%esi
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c2c8: 83 3d 20 77 12 00 01 cmpl $0x1,0x127720
10c2cf: 76 c1 jbe 10c292 <_CORE_mutex_Seize+0x1a>
10c2d1: 53 push %ebx
10c2d2: 6a 12 push $0x12
10c2d4: 6a 00 push $0x0
10c2d6: 6a 00 push $0x0
10c2d8: e8 23 06 00 00 call 10c900 <_Internal_error_Occurred>
10c2dd: 8d 76 00 lea 0x0(%esi),%esi
10c2e0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10c2e7: a1 38 7b 12 00 mov 0x127b38,%eax
10c2ec: 89 58 44 mov %ebx,0x44(%eax)
10c2ef: 8b 55 0c mov 0xc(%ebp),%edx
10c2f2: 89 50 20 mov %edx,0x20(%eax)
10c2f5: a1 50 75 12 00 mov 0x127550,%eax
10c2fa: 40 inc %eax
10c2fb: a3 50 75 12 00 mov %eax,0x127550
10c300: ff 75 18 pushl 0x18(%ebp)
10c303: 9d popf
10c304: 83 ec 08 sub $0x8,%esp
10c307: ff 75 14 pushl 0x14(%ebp)
10c30a: 53 push %ebx
10c30b: e8 18 ff ff ff call 10c228 <_CORE_mutex_Seize_interrupt_blocking>
10c310: 83 c4 10 add $0x10,%esp
}
10c313: 8b 5d fc mov -0x4(%ebp),%ebx
10c316: c9 leave
10c317: c3 ret
00111188 <_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
)
{
111188: 55 push %ebp
111189: 89 e5 mov %esp,%ebp
11118b: 56 push %esi
11118c: 53 push %ebx
11118d: 8b 45 08 mov 0x8(%ebp),%eax
111190: 8b 4d 0c mov 0xc(%ebp),%ecx
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
111193: 8b 15 38 7b 12 00 mov 0x127b38,%edx
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
111199: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
1111a0: 8b 58 50 mov 0x50(%eax),%ebx
1111a3: 85 db test %ebx,%ebx
1111a5: 74 31 je 1111d8 <_CORE_mutex_Seize_interrupt_trylock+0x50>
the_mutex->lock = CORE_MUTEX_LOCKED;
1111a7: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
the_mutex->holder = executing;
1111ae: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = executing->Object.id;
1111b1: 8b 5a 08 mov 0x8(%edx),%ebx
1111b4: 89 58 60 mov %ebx,0x60(%eax)
the_mutex->nest_count = 1;
1111b7: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
1111be: 8b 58 48 mov 0x48(%eax),%ebx
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
1111c1: 83 fb 02 cmp $0x2,%ebx
1111c4: 74 26 je 1111ec <_CORE_mutex_Seize_interrupt_trylock+0x64>
1111c6: 83 fb 03 cmp $0x3,%ebx
1111c9: 74 3d je 111208 <_CORE_mutex_Seize_interrupt_trylock+0x80>
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
1111cb: ff 31 pushl (%ecx)
1111cd: 9d popf
return 0;
1111ce: 31 c0 xor %eax,%eax
1111d0: 8d 65 f8 lea -0x8(%ebp),%esp
1111d3: 5b pop %ebx
1111d4: 5e pop %esi
1111d5: c9 leave
1111d6: c3 ret
1111d7: 90 nop
/*
* 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 ) ) {
1111d8: 3b 50 5c cmp 0x5c(%eax),%edx
1111db: 74 17 je 1111f4 <_CORE_mutex_Seize_interrupt_trylock+0x6c>
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
1111dd: b8 01 00 00 00 mov $0x1,%eax
1111e2: 8d 65 f8 lea -0x8(%ebp),%esp
1111e5: 5b pop %ebx
1111e6: 5e pop %esi
1111e7: c9 leave
1111e8: c3 ret
1111e9: 8d 76 00 lea 0x0(%esi),%esi
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
1111ec: ff 42 1c incl 0x1c(%edx)
1111ef: eb da jmp 1111cb <_CORE_mutex_Seize_interrupt_trylock+0x43>
1111f1: 8d 76 00 lea 0x0(%esi),%esi
* 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 ) {
1111f4: 8b 58 40 mov 0x40(%eax),%ebx
1111f7: 85 db test %ebx,%ebx
1111f9: 75 45 jne 111240 <_CORE_mutex_Seize_interrupt_trylock+0xb8>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
1111fb: ff 40 54 incl 0x54(%eax)
_ISR_Enable( *level_p );
1111fe: ff 31 pushl (%ecx)
111200: 9d popf
return 0;
111201: 31 c0 xor %eax,%eax
111203: eb dd jmp 1111e2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
111205: 8d 76 00 lea 0x0(%esi),%esi
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
111208: 8b 5a 1c mov 0x1c(%edx),%ebx
11120b: 8d 73 01 lea 0x1(%ebx),%esi
11120e: 89 72 1c mov %esi,0x1c(%edx)
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
111211: 8b 72 14 mov 0x14(%edx),%esi
111214: 39 70 4c cmp %esi,0x4c(%eax)
111217: 74 6b je 111284 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
111219: 72 39 jb 111254 <_CORE_mutex_Seize_interrupt_trylock+0xcc>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
11121b: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
111222: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax)
the_mutex->nest_count = 0; /* undo locking above */
111229: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
executing->resource_count--; /* undo locking above */
111230: 89 5a 1c mov %ebx,0x1c(%edx)
_ISR_Enable( *level_p );
111233: ff 31 pushl (%ecx)
111235: 9d popf
return 0;
111236: 31 c0 xor %eax,%eax
111238: 8d 65 f8 lea -0x8(%ebp),%esp
11123b: 5b pop %ebx
11123c: 5e pop %esi
11123d: c9 leave
11123e: c3 ret
11123f: 90 nop
* 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 ) {
111240: 4b dec %ebx
111241: 75 9a jne 1111dd <_CORE_mutex_Seize_interrupt_trylock+0x55>
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;
111243: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
_ISR_Enable( *level_p );
11124a: ff 31 pushl (%ecx)
11124c: 9d popf
return 0;
11124d: 31 c0 xor %eax,%eax
11124f: eb 91 jmp 1111e2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
111251: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
111254: 8b 15 50 75 12 00 mov 0x127550,%edx
11125a: 42 inc %edx
11125b: 89 15 50 75 12 00 mov %edx,0x127550
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
111261: ff 31 pushl (%ecx)
111263: 9d popf
_Thread_Change_priority(
111264: 52 push %edx
111265: 6a 00 push $0x0
111267: ff 70 4c pushl 0x4c(%eax)
11126a: ff 70 5c pushl 0x5c(%eax)
11126d: e8 d6 c1 ff ff call 10d448 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
111272: e8 85 c6 ff ff call 10d8fc <_Thread_Enable_dispatch>
111277: 83 c4 10 add $0x10,%esp
return 0;
11127a: 31 c0 xor %eax,%eax
11127c: e9 61 ff ff ff jmp 1111e2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
111281: 8d 76 00 lea 0x0(%esi),%esi
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
111284: ff 31 pushl (%ecx)
111286: 9d popf
return 0;
111287: 31 c0 xor %eax,%eax
111289: e9 54 ff ff ff jmp 1111e2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
0010c318 <_CORE_mutex_Surrender>:
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
10c318: 55 push %ebp
10c319: 89 e5 mov %esp,%ebp
10c31b: 53 push %ebx
10c31c: 83 ec 04 sub $0x4,%esp
10c31f: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
Thread_Control *holder;
holder = the_mutex->holder;
10c322: 8b 43 5c mov 0x5c(%ebx),%eax
* 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 ) {
10c325: 80 7b 44 00 cmpb $0x0,0x44(%ebx)
10c329: 74 15 je 10c340 <_CORE_mutex_Surrender+0x28>
if ( !_Thread_Is_executing( holder ) )
10c32b: 3b 05 38 7b 12 00 cmp 0x127b38,%eax
10c331: 74 0d je 10c340 <_CORE_mutex_Surrender+0x28>
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
10c333: b8 03 00 00 00 mov $0x3,%eax
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c338: 8b 5d fc mov -0x4(%ebp),%ebx
10c33b: c9 leave
10c33c: c3 ret
10c33d: 8d 76 00 lea 0x0(%esi),%esi
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
10c340: 8b 53 54 mov 0x54(%ebx),%edx
10c343: 85 d2 test %edx,%edx
10c345: 74 51 je 10c398 <_CORE_mutex_Surrender+0x80>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
10c347: 4a dec %edx
10c348: 89 53 54 mov %edx,0x54(%ebx)
if ( the_mutex->nest_count != 0 ) {
10c34b: 85 d2 test %edx,%edx
10c34d: 75 49 jne 10c398 <_CORE_mutex_Surrender+0x80>
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c34f: 8b 53 48 mov 0x48(%ebx),%edx
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c352: 83 fa 02 cmp $0x2,%edx
10c355: 74 69 je 10c3c0 <_CORE_mutex_Surrender+0xa8>
10c357: 83 fa 03 cmp $0x3,%edx
10c35a: 74 64 je 10c3c0 <_CORE_mutex_Surrender+0xa8>
if ( holder->resource_count == 0 &&
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
}
}
the_mutex->holder = NULL;
10c35c: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
the_mutex->holder_id = 0;
10c363: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* 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 ) ) ) {
10c36a: 83 ec 0c sub $0xc,%esp
10c36d: 53 push %ebx
10c36e: e8 3d 19 00 00 call 10dcb0 <_Thread_queue_Dequeue>
10c373: 83 c4 10 add $0x10,%esp
10c376: 85 c0 test %eax,%eax
10c378: 74 7a je 10c3f4 <_CORE_mutex_Surrender+0xdc>
} else
#endif
{
the_mutex->holder = the_thread;
10c37a: 89 43 5c mov %eax,0x5c(%ebx)
the_mutex->holder_id = the_thread->Object.id;
10c37d: 8b 50 08 mov 0x8(%eax),%edx
10c380: 89 53 60 mov %edx,0x60(%ebx)
the_mutex->nest_count = 1;
10c383: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx)
switch ( the_mutex->Attributes.discipline ) {
10c38a: 8b 53 48 mov 0x48(%ebx),%edx
10c38d: 83 fa 02 cmp $0x2,%edx
10c390: 74 56 je 10c3e8 <_CORE_mutex_Surrender+0xd0>
10c392: 83 fa 03 cmp $0x3,%edx
10c395: 74 09 je 10c3a0 <_CORE_mutex_Surrender+0x88>
10c397: 90 nop
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c398: 31 c0 xor %eax,%eax
}
10c39a: 8b 5d fc mov -0x4(%ebp),%ebx
10c39d: c9 leave
10c39e: c3 ret
10c39f: 90 nop
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
10c3a0: ff 40 1c incl 0x1c(%eax)
if (the_mutex->Attributes.priority_ceiling <
10c3a3: 8b 53 4c mov 0x4c(%ebx),%edx
10c3a6: 3b 50 14 cmp 0x14(%eax),%edx
10c3a9: 73 ed jae 10c398 <_CORE_mutex_Surrender+0x80>
the_thread->current_priority){
_Thread_Change_priority(
10c3ab: 51 push %ecx
10c3ac: 6a 00 push $0x0
10c3ae: 52 push %edx
10c3af: 50 push %eax
10c3b0: e8 93 10 00 00 call 10d448 <_Thread_Change_priority>
10c3b5: 83 c4 10 add $0x10,%esp
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c3b8: 31 c0 xor %eax,%eax
10c3ba: e9 79 ff ff ff jmp 10c338 <_CORE_mutex_Surrender+0x20>
10c3bf: 90 nop
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
10c3c0: 8b 50 1c mov 0x1c(%eax),%edx
10c3c3: 4a dec %edx
10c3c4: 89 50 1c mov %edx,0x1c(%eax)
/*
* 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 ( holder->resource_count == 0 &&
10c3c7: 85 d2 test %edx,%edx
10c3c9: 75 91 jne 10c35c <_CORE_mutex_Surrender+0x44>
holder->real_priority != holder->current_priority ) {
10c3cb: 8b 50 18 mov 0x18(%eax),%edx
/*
* 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 ( holder->resource_count == 0 &&
10c3ce: 3b 50 14 cmp 0x14(%eax),%edx
10c3d1: 74 89 je 10c35c <_CORE_mutex_Surrender+0x44>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
10c3d3: 51 push %ecx
10c3d4: 6a 01 push $0x1
10c3d6: 52 push %edx
10c3d7: 50 push %eax
10c3d8: e8 6b 10 00 00 call 10d448 <_Thread_Change_priority>
10c3dd: 83 c4 10 add $0x10,%esp
10c3e0: e9 77 ff ff ff jmp 10c35c <_CORE_mutex_Surrender+0x44>
10c3e5: 8d 76 00 lea 0x0(%esi),%esi
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
10c3e8: ff 40 1c incl 0x1c(%eax)
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c3eb: 31 c0 xor %eax,%eax
case CORE_MUTEX_DISCIPLINES_PRIORITY:
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
break;
10c3ed: e9 46 ff ff ff jmp 10c338 <_CORE_mutex_Surrender+0x20>
10c3f2: 66 90 xchg %ax,%ax
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10c3f4: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx)
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c3fb: 31 c0 xor %eax,%eax
10c3fd: e9 36 ff ff ff jmp 10c338 <_CORE_mutex_Surrender+0x20>
00115288 <_CORE_semaphore_Seize>:
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
bool wait,
Watchdog_Interval timeout
)
{
115288: 55 push %ebp
115289: 89 e5 mov %esp,%ebp
11528b: 57 push %edi
11528c: 56 push %esi
11528d: 53 push %ebx
11528e: 83 ec 1c sub $0x1c,%esp
115291: 8b 45 08 mov 0x8(%ebp),%eax
115294: 8b 7d 0c mov 0xc(%ebp),%edi
115297: 8b 75 14 mov 0x14(%ebp),%esi
11529a: 8a 5d 10 mov 0x10(%ebp),%bl
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
11529d: 8b 15 b8 d8 12 00 mov 0x12d8b8,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
1152a3: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Disable( level );
1152aa: 9c pushf
1152ab: fa cli
1152ac: 8f 45 e4 popl -0x1c(%ebp)
if ( the_semaphore->count != 0 ) {
1152af: 8b 48 48 mov 0x48(%eax),%ecx
1152b2: 85 c9 test %ecx,%ecx
1152b4: 75 46 jne 1152fc <_CORE_semaphore_Seize+0x74>
/*
* 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 ) {
1152b6: 84 db test %bl,%bl
1152b8: 75 16 jne 1152d0 <_CORE_semaphore_Seize+0x48>
_ISR_Enable( level );
1152ba: ff 75 e4 pushl -0x1c(%ebp)
1152bd: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
1152be: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx)
_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 );
}
1152c5: 83 c4 1c add $0x1c,%esp
1152c8: 5b pop %ebx
1152c9: 5e pop %esi
1152ca: 5f pop %edi
1152cb: c9 leave
1152cc: c3 ret
1152cd: 8d 76 00 lea 0x0(%esi),%esi
1152d0: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
/*
* 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;
1152d7: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
1152da: 89 7a 20 mov %edi,0x20(%edx)
_ISR_Enable( level );
1152dd: ff 75 e4 pushl -0x1c(%ebp)
1152e0: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
1152e1: c7 45 10 18 1b 11 00 movl $0x111b18,0x10(%ebp)
1152e8: 89 75 0c mov %esi,0xc(%ebp)
1152eb: 89 45 08 mov %eax,0x8(%ebp)
}
1152ee: 83 c4 1c add $0x1c,%esp
1152f1: 5b pop %ebx
1152f2: 5e pop %esi
1152f3: 5f pop %edi
1152f4: c9 leave
*/
_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 );
1152f5: e9 f2 c4 ff ff jmp 1117ec <_Thread_queue_Enqueue_with_handler>
1152fa: 66 90 xchg %ax,%ax
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
1152fc: 49 dec %ecx
1152fd: 89 48 48 mov %ecx,0x48(%eax)
_ISR_Enable( level );
115300: ff 75 e4 pushl -0x1c(%ebp)
115303: 9d popf
_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 );
}
115304: 83 c4 1c add $0x1c,%esp
115307: 5b pop %ebx
115308: 5e pop %esi
115309: 5f pop %edi
11530a: c9 leave
11530b: c3 ret
0010c450 <_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
)
{
10c450: 55 push %ebp
10c451: 89 e5 mov %esp,%ebp
10c453: 53 push %ebx
10c454: 83 ec 10 sub $0x10,%esp
10c457: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10c45a: 53 push %ebx
10c45b: e8 50 18 00 00 call 10dcb0 <_Thread_queue_Dequeue>
10c460: 83 c4 10 add $0x10,%esp
10c463: 85 c0 test %eax,%eax
10c465: 74 09 je 10c470 <_CORE_semaphore_Surrender+0x20>
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c467: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10c469: 8b 5d fc mov -0x4(%ebp),%ebx
10c46c: c9 leave
10c46d: c3 ret
10c46e: 66 90 xchg %ax,%ax
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10c470: 9c pushf
10c471: fa cli
10c472: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10c473: 8b 43 48 mov 0x48(%ebx),%eax
10c476: 3b 43 40 cmp 0x40(%ebx),%eax
10c479: 72 0d jb 10c488 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10c47b: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
_ISR_Enable( level );
10c480: 52 push %edx
10c481: 9d popf
}
return status;
}
10c482: 8b 5d fc mov -0x4(%ebp),%ebx
10c485: c9 leave
10c486: c3 ret
10c487: 90 nop
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10c488: 40 inc %eax
10c489: 89 43 48 mov %eax,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c48c: 31 c0 xor %eax,%eax
10c48e: eb f0 jmp 10c480 <_CORE_semaphore_Surrender+0x30>
0010c6a0 <_Chain_Get_with_empty_check>:
bool _Chain_Get_with_empty_check(
Chain_Control *chain,
Chain_Node **node
)
{
10c6a0: 55 push %ebp
10c6a1: 89 e5 mov %esp,%ebp
10c6a3: 57 push %edi
10c6a4: 56 push %esi
10c6a5: 53 push %ebx
10c6a6: 8b 45 08 mov 0x8(%ebp),%eax
10c6a9: 8b 7d 0c mov 0xc(%ebp),%edi
ISR_Level level;
bool is_empty_now;
_ISR_Disable( level );
10c6ac: 9c pushf
10c6ad: fa cli
10c6ae: 5e pop %esi
Chain_Node **the_node
)
{
bool is_empty_now = true;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c6af: 8d 58 04 lea 0x4(%eax),%ebx
Chain_Node *old_first = head->next;
10c6b2: 8b 10 mov (%eax),%edx
if ( old_first != tail ) {
10c6b4: 39 d3 cmp %edx,%ebx
10c6b6: 74 18 je 10c6d0 <_Chain_Get_with_empty_check+0x30>
Chain_Node *new_first = old_first->next;
10c6b8: 8b 0a mov (%edx),%ecx
head->next = new_first;
10c6ba: 89 08 mov %ecx,(%eax)
new_first->previous = head;
10c6bc: 89 41 04 mov %eax,0x4(%ecx)
*the_node = old_first;
10c6bf: 89 17 mov %edx,(%edi)
is_empty_now = new_first == tail;
10c6c1: 39 cb cmp %ecx,%ebx
10c6c3: 0f 94 c0 sete %al
is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node );
_ISR_Enable( level );
10c6c6: 56 push %esi
10c6c7: 9d popf
return is_empty_now;
}
10c6c8: 5b pop %ebx
10c6c9: 5e pop %esi
10c6ca: 5f pop %edi
10c6cb: c9 leave
10c6cc: c3 ret
10c6cd: 8d 76 00 lea 0x0(%esi),%esi
} else
*the_node = NULL;
10c6d0: c7 07 00 00 00 00 movl $0x0,(%edi)
RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected(
Chain_Control *the_chain,
Chain_Node **the_node
)
{
bool is_empty_now = true;
10c6d6: b0 01 mov $0x1,%al
10c6d8: eb ec jmp 10c6c6 <_Chain_Get_with_empty_check+0x26>
00111054 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
111054: 55 push %ebp
111055: 89 e5 mov %esp,%ebp
111057: 57 push %edi
111058: 56 push %esi
111059: 53 push %ebx
11105a: 83 ec 08 sub $0x8,%esp
11105d: 8b 7d 08 mov 0x8(%ebp),%edi
111060: 8b 4d 10 mov 0x10(%ebp),%ecx
111063: 8b 75 14 mov 0x14(%ebp),%esi
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
111066: 8d 47 04 lea 0x4(%edi),%eax
111069: 89 45 f0 mov %eax,-0x10(%ebp)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
11106c: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
while ( count-- ) {
111073: 85 c9 test %ecx,%ecx
111075: 74 35 je 1110ac <_Chain_Initialize+0x58><== NEVER TAKEN
111077: 49 dec %ecx
111078: 89 4d ec mov %ecx,-0x14(%ebp)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
11107b: 8b 45 0c mov 0xc(%ebp),%eax
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
11107e: 89 fa mov %edi,%edx
111080: eb 07 jmp 111089 <_Chain_Initialize+0x35>
111082: 66 90 xchg %ax,%ax
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
111084: 89 c2 mov %eax,%edx
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
111086: 89 d8 mov %ebx,%eax
111088: 49 dec %ecx
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
111089: 89 02 mov %eax,(%edx)
next->previous = current;
11108b: 89 50 04 mov %edx,0x4(%eax)
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
11108e: 8d 1c 30 lea (%eax,%esi,1),%ebx
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
111091: 85 c9 test %ecx,%ecx
111093: 75 ef jne 111084 <_Chain_Initialize+0x30>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
111095: 0f af 75 ec imul -0x14(%ebp),%esi
111099: 03 75 0c add 0xc(%ebp),%esi
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
11109c: 8b 45 f0 mov -0x10(%ebp),%eax
11109f: 89 06 mov %eax,(%esi)
tail->previous = current;
1110a1: 89 77 08 mov %esi,0x8(%edi)
}
1110a4: 83 c4 08 add $0x8,%esp
1110a7: 5b pop %ebx
1110a8: 5e pop %esi
1110a9: 5f pop %edi
1110aa: c9 leave
1110ab: c3 ret
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
1110ac: 89 fe mov %edi,%esi <== NOT EXECUTED
1110ae: eb ec jmp 11109c <_Chain_Initialize+0x48><== NOT EXECUTED
0010b070 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
10b070: 55 push %ebp
10b071: 89 e5 mov %esp,%ebp
10b073: 57 push %edi
10b074: 56 push %esi
10b075: 53 push %ebx
10b076: 83 ec 2c sub $0x2c,%esp
10b079: 8b 45 08 mov 0x8(%ebp),%eax
10b07c: 8b 4d 0c mov 0xc(%ebp),%ecx
10b07f: 8b 55 10 mov 0x10(%ebp),%edx
10b082: 89 55 dc mov %edx,-0x24(%ebp)
10b085: 8b 7d 14 mov 0x14(%ebp),%edi
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
10b088: 8b 1d 38 7b 12 00 mov 0x127b38,%ebx
executing->Wait.return_code = RTEMS_SUCCESSFUL;
10b08e: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10b095: 8b b3 e8 00 00 00 mov 0xe8(%ebx),%esi
_ISR_Disable( level );
10b09b: 9c pushf
10b09c: fa cli
10b09d: 8f 45 e0 popl -0x20(%ebp)
pending_events = api->pending_events;
10b0a0: 8b 16 mov (%esi),%edx
10b0a2: 89 55 d4 mov %edx,-0x2c(%ebp)
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
10b0a5: 21 c2 and %eax,%edx
10b0a7: 89 55 e4 mov %edx,-0x1c(%ebp)
10b0aa: 74 0d je 10b0b9 <_Event_Seize+0x49>
10b0ac: 39 d0 cmp %edx,%eax
10b0ae: 0f 84 84 00 00 00 je 10b138 <_Event_Seize+0xc8>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
10b0b4: f6 c1 02 test $0x2,%cl
10b0b7: 75 7f jne 10b138 <_Event_Seize+0xc8>
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
10b0b9: f6 c1 01 test $0x1,%cl
10b0bc: 75 62 jne 10b120 <_Event_Seize+0xb0>
* 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;
10b0be: 89 4b 30 mov %ecx,0x30(%ebx)
executing->Wait.count = (uint32_t) event_in;
10b0c1: 89 43 24 mov %eax,0x24(%ebx)
executing->Wait.return_argument = event_out;
10b0c4: 89 7b 28 mov %edi,0x28(%ebx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10b0c7: c7 05 68 7f 12 00 01 movl $0x1,0x127f68
10b0ce: 00 00 00
_ISR_Enable( level );
10b0d1: ff 75 e0 pushl -0x20(%ebp)
10b0d4: 9d popf
if ( ticks ) {
10b0d5: 8b 45 dc mov -0x24(%ebp),%eax
10b0d8: 85 c0 test %eax,%eax
10b0da: 0f 85 80 00 00 00 jne 10b160 <_Event_Seize+0xf0>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
10b0e0: 83 ec 08 sub $0x8,%esp
10b0e3: 68 00 01 00 00 push $0x100
10b0e8: 53 push %ebx
10b0e9: e8 72 30 00 00 call 10e160 <_Thread_Set_state>
_ISR_Disable( level );
10b0ee: 9c pushf
10b0ef: fa cli
10b0f0: 5a pop %edx
sync_state = _Event_Sync_state;
10b0f1: a1 68 7f 12 00 mov 0x127f68,%eax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10b0f6: c7 05 68 7f 12 00 00 movl $0x0,0x127f68
10b0fd: 00 00 00
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
10b100: 83 c4 10 add $0x10,%esp
10b103: 83 f8 01 cmp $0x1,%eax
10b106: 74 4c je 10b154 <_Event_Seize+0xe4>
* 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 );
10b108: 89 55 10 mov %edx,0x10(%ebp)
10b10b: 89 5d 0c mov %ebx,0xc(%ebp)
10b10e: 89 45 08 mov %eax,0x8(%ebp)
}
10b111: 8d 65 f4 lea -0xc(%ebp),%esp
10b114: 5b pop %ebx
10b115: 5e pop %esi
10b116: 5f pop %edi
10b117: c9 leave
* 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 );
10b118: e9 df 22 00 00 jmp 10d3fc <_Thread_blocking_operation_Cancel>
10b11d: 8d 76 00 lea 0x0(%esi),%esi
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
10b120: ff 75 e0 pushl -0x20(%ebp)
10b123: 9d popf
executing->Wait.return_code = RTEMS_UNSATISFIED;
10b124: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx)
*event_out = seized_events;
10b12b: 8b 55 e4 mov -0x1c(%ebp),%edx
10b12e: 89 17 mov %edx,(%edi)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b130: 8d 65 f4 lea -0xc(%ebp),%esp
10b133: 5b pop %ebx
10b134: 5e pop %esi
10b135: 5f pop %edi
10b136: c9 leave
10b137: c3 ret
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
10b138: 8b 45 e4 mov -0x1c(%ebp),%eax
10b13b: f7 d0 not %eax
10b13d: 23 45 d4 and -0x2c(%ebp),%eax
10b140: 89 06 mov %eax,(%esi)
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
10b142: ff 75 e0 pushl -0x20(%ebp)
10b145: 9d popf
*event_out = seized_events;
10b146: 8b 45 e4 mov -0x1c(%ebp),%eax
10b149: 89 07 mov %eax,(%edi)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b14b: 8d 65 f4 lea -0xc(%ebp),%esp
10b14e: 5b pop %ebx
10b14f: 5e pop %esi
10b150: 5f pop %edi
10b151: c9 leave
10b152: c3 ret
10b153: 90 nop
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
10b154: 52 push %edx
10b155: 9d popf
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b156: 8d 65 f4 lea -0xc(%ebp),%esp
10b159: 5b pop %ebx
10b15a: 5e pop %esi
10b15b: 5f pop %edi
10b15c: c9 leave
10b15d: c3 ret
10b15e: 66 90 xchg %ax,%ax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
10b160: 8b 43 08 mov 0x8(%ebx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b163: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10b16a: c7 43 64 14 b3 10 00 movl $0x10b314,0x64(%ebx)
the_watchdog->id = id;
10b171: 89 43 68 mov %eax,0x68(%ebx)
the_watchdog->user_data = user_data;
10b174: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b17b: 8b 45 dc mov -0x24(%ebp),%eax
10b17e: 89 43 54 mov %eax,0x54(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b181: 83 ec 08 sub $0x8,%esp
&executing->Timer,
_Event_Timeout,
executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
10b184: 8d 43 48 lea 0x48(%ebx),%eax
10b187: 50 push %eax
10b188: 68 5c 76 12 00 push $0x12765c
10b18d: e8 6e 35 00 00 call 10e700 <_Watchdog_Insert>
10b192: 83 c4 10 add $0x10,%esp
10b195: e9 46 ff ff ff jmp 10b0e0 <_Event_Seize+0x70>
0010b1f0 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
10b1f0: 55 push %ebp
10b1f1: 89 e5 mov %esp,%ebp
10b1f3: 57 push %edi
10b1f4: 56 push %esi
10b1f5: 53 push %ebx
10b1f6: 83 ec 2c sub $0x2c,%esp
10b1f9: 8b 5d 08 mov 0x8(%ebp),%ebx
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 ];
10b1fc: 8b 8b e8 00 00 00 mov 0xe8(%ebx),%ecx
option_set = (rtems_option) the_thread->Wait.option;
10b202: 8b 7b 30 mov 0x30(%ebx),%edi
_ISR_Disable( level );
10b205: 9c pushf
10b206: fa cli
10b207: 8f 45 d4 popl -0x2c(%ebp)
pending_events = api->pending_events;
10b20a: 8b 11 mov (%ecx),%edx
event_condition = (rtems_event_set) the_thread->Wait.count;
10b20c: 8b 43 24 mov 0x24(%ebx),%eax
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
10b20f: 89 c6 mov %eax,%esi
10b211: 21 d6 and %edx,%esi
10b213: 89 75 e4 mov %esi,-0x1c(%ebp)
10b216: 74 74 je 10b28c <_Event_Surrender+0x9c>
/*
* 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() &&
10b218: 8b 35 34 7b 12 00 mov 0x127b34,%esi
10b21e: 85 f6 test %esi,%esi
10b220: 74 0c je 10b22e <_Event_Surrender+0x3e>
10b222: 3b 1d 38 7b 12 00 cmp 0x127b38,%ebx
10b228: 0f 84 96 00 00 00 je 10b2c4 <_Event_Surrender+0xd4>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
10b22e: f6 43 11 01 testb $0x1,0x11(%ebx)
10b232: 74 4c je 10b280 <_Event_Surrender+0x90>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
10b234: 3b 45 e4 cmp -0x1c(%ebp),%eax
10b237: 74 05 je 10b23e <_Event_Surrender+0x4e>
10b239: 83 e7 02 and $0x2,%edi
10b23c: 74 42 je 10b280 <_Event_Surrender+0x90> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
10b23e: 8b 45 e4 mov -0x1c(%ebp),%eax
10b241: f7 d0 not %eax
10b243: 21 d0 and %edx,%eax
10b245: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
10b247: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b24e: 8b 43 28 mov 0x28(%ebx),%eax
10b251: 8b 75 e4 mov -0x1c(%ebp),%esi
10b254: 89 30 mov %esi,(%eax)
_ISR_Flash( level );
10b256: ff 75 d4 pushl -0x2c(%ebp)
10b259: 9d popf
10b25a: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10b25b: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10b25f: 74 37 je 10b298 <_Event_Surrender+0xa8>
_ISR_Enable( level );
10b261: ff 75 d4 pushl -0x2c(%ebp)
10b264: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b265: 83 ec 08 sub $0x8,%esp
10b268: 68 f8 ff 03 10 push $0x1003fff8
10b26d: 53 push %ebx
10b26e: e8 09 23 00 00 call 10d57c <_Thread_Clear_state>
10b273: 83 c4 10 add $0x10,%esp
}
return;
}
}
_ISR_Enable( level );
}
10b276: 8d 65 f4 lea -0xc(%ebp),%esp
10b279: 5b pop %ebx
10b27a: 5e pop %esi
10b27b: 5f pop %edi
10b27c: c9 leave
10b27d: c3 ret
10b27e: 66 90 xchg %ax,%ax
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10b280: ff 75 d4 pushl -0x2c(%ebp)
10b283: 9d popf
}
10b284: 8d 65 f4 lea -0xc(%ebp),%esp
10b287: 5b pop %ebx
10b288: 5e pop %esi
10b289: 5f pop %edi
10b28a: c9 leave
10b28b: c3 ret
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
10b28c: ff 75 d4 pushl -0x2c(%ebp)
10b28f: 9d popf
}
return;
}
}
_ISR_Enable( level );
}
10b290: 8d 65 f4 lea -0xc(%ebp),%esp
10b293: 5b pop %ebx
10b294: 5e pop %esi
10b295: 5f pop %edi
10b296: c9 leave
10b297: c3 ret
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10b298: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10b29f: ff 75 d4 pushl -0x2c(%ebp)
10b2a2: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10b2a3: 83 ec 0c sub $0xc,%esp
10b2a6: 8d 43 48 lea 0x48(%ebx),%eax
10b2a9: 50 push %eax
10b2aa: e8 89 35 00 00 call 10e838 <_Watchdog_Remove>
10b2af: 58 pop %eax
10b2b0: 5a pop %edx
10b2b1: 68 f8 ff 03 10 push $0x1003fff8
10b2b6: 53 push %ebx
10b2b7: e8 c0 22 00 00 call 10d57c <_Thread_Clear_state>
10b2bc: 83 c4 10 add $0x10,%esp
10b2bf: eb c3 jmp 10b284 <_Event_Surrender+0x94>
10b2c1: 8d 76 00 lea 0x0(%esi),%esi
* 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) ||
10b2c4: 8b 35 68 7f 12 00 mov 0x127f68,%esi
/*
* 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 ) &&
10b2ca: 83 fe 02 cmp $0x2,%esi
10b2cd: 74 0d je 10b2dc <_Event_Surrender+0xec> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10b2cf: 8b 35 68 7f 12 00 mov 0x127f68,%esi
* 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) ||
10b2d5: 4e dec %esi
10b2d6: 0f 85 52 ff ff ff jne 10b22e <_Event_Surrender+0x3e>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
10b2dc: 3b 45 e4 cmp -0x1c(%ebp),%eax
10b2df: 74 05 je 10b2e6 <_Event_Surrender+0xf6>
10b2e1: 83 e7 02 and $0x2,%edi
10b2e4: 74 22 je 10b308 <_Event_Surrender+0x118><== NEVER TAKEN
10b2e6: 8b 45 e4 mov -0x1c(%ebp),%eax
10b2e9: f7 d0 not %eax
10b2eb: 21 d0 and %edx,%eax
10b2ed: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
10b2ef: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b2f6: 8b 43 28 mov 0x28(%ebx),%eax
10b2f9: 8b 55 e4 mov -0x1c(%ebp),%edx
10b2fc: 89 10 mov %edx,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10b2fe: c7 05 68 7f 12 00 03 movl $0x3,0x127f68
10b305: 00 00 00
}
_ISR_Enable( level );
10b308: ff 75 d4 pushl -0x2c(%ebp)
10b30b: 9d popf
return;
10b30c: e9 73 ff ff ff jmp 10b284 <_Event_Surrender+0x94>
0010b314 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10b314: 55 push %ebp
10b315: 89 e5 mov %esp,%ebp
10b317: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10b31a: 8d 45 f4 lea -0xc(%ebp),%eax
10b31d: 50 push %eax
10b31e: ff 75 08 pushl 0x8(%ebp)
10b321: e8 fa 25 00 00 call 10d920 <_Thread_Get>
switch ( location ) {
10b326: 83 c4 10 add $0x10,%esp
10b329: 8b 55 f4 mov -0xc(%ebp),%edx
10b32c: 85 d2 test %edx,%edx
10b32e: 75 37 jne 10b367 <_Event_Timeout+0x53> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
10b330: 9c pushf
10b331: fa cli
10b332: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
10b333: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
10b33a: 3b 05 38 7b 12 00 cmp 0x127b38,%eax
10b340: 74 2a je 10b36c <_Event_Timeout+0x58>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
10b342: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
10b349: 52 push %edx
10b34a: 9d popf
10b34b: 83 ec 08 sub $0x8,%esp
10b34e: 68 f8 ff 03 10 push $0x1003fff8
10b353: 50 push %eax
10b354: e8 23 22 00 00 call 10d57c <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10b359: a1 50 75 12 00 mov 0x127550,%eax
10b35e: 48 dec %eax
10b35f: a3 50 75 12 00 mov %eax,0x127550
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
10b364: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b367: c9 leave
10b368: c3 ret
10b369: 8d 76 00 lea 0x0(%esi),%esi
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
10b36c: 8b 0d 68 7f 12 00 mov 0x127f68,%ecx
10b372: 49 dec %ecx
10b373: 75 cd jne 10b342 <_Event_Timeout+0x2e>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10b375: c7 05 68 7f 12 00 02 movl $0x2,0x127f68
10b37c: 00 00 00
10b37f: eb c1 jmp 10b342 <_Event_Timeout+0x2e>
001112ec <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
1112ec: 55 push %ebp
1112ed: 89 e5 mov %esp,%ebp
1112ef: 57 push %edi
1112f0: 56 push %esi
1112f1: 53 push %ebx
1112f2: 83 ec 2c sub $0x2c,%esp
1112f5: 8b 7d 0c mov 0xc(%ebp),%edi
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
1112f8: 8d 47 04 lea 0x4(%edi),%eax
1112fb: 89 45 dc mov %eax,-0x24(%ebp)
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
1112fe: 8b 55 08 mov 0x8(%ebp),%edx
111301: 8b 52 10 mov 0x10(%edx),%edx
111304: 89 55 cc mov %edx,-0x34(%ebp)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
111307: 39 c7 cmp %eax,%edi
111309: 0f 87 69 01 00 00 ja 111478 <_Heap_Allocate_aligned_with_boundary+0x18c>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
11130f: 8b 5d 14 mov 0x14(%ebp),%ebx
111312: 85 db test %ebx,%ebx
111314: 0f 85 56 01 00 00 jne 111470 <_Heap_Allocate_aligned_with_boundary+0x184>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
11131a: 8b 45 08 mov 0x8(%ebp),%eax
11131d: 8b 48 08 mov 0x8(%eax),%ecx
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111320: 39 c8 cmp %ecx,%eax
111322: 0f 84 50 01 00 00 je 111478 <_Heap_Allocate_aligned_with_boundary+0x18c>
111328: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
11132f: 8b 55 cc mov -0x34(%ebp),%edx
111332: 83 c2 07 add $0x7,%edx
111335: 89 55 c8 mov %edx,-0x38(%ebp)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
111338: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp)
11133f: 29 7d d0 sub %edi,-0x30(%ebp)
111342: eb 1e jmp 111362 <_Heap_Allocate_aligned_with_boundary+0x76>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
111344: 8d 59 08 lea 0x8(%ecx),%ebx
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
111347: 85 db test %ebx,%ebx
111349: 0f 85 f1 00 00 00 jne 111440 <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN
break;
}
block = block->next;
11134f: 8b 49 08 mov 0x8(%ecx),%ecx
111352: 8b 45 e4 mov -0x1c(%ebp),%eax
111355: 40 inc %eax
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111356: 39 4d 08 cmp %ecx,0x8(%ebp)
111359: 0f 84 25 01 00 00 je 111484 <_Heap_Allocate_aligned_with_boundary+0x198>
11135f: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
* 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 ) {
111362: 8b 59 04 mov 0x4(%ecx),%ebx
111365: 39 5d dc cmp %ebx,-0x24(%ebp)
111368: 73 e5 jae 11134f <_Heap_Allocate_aligned_with_boundary+0x63>
if ( alignment == 0 ) {
11136a: 8b 55 10 mov 0x10(%ebp),%edx
11136d: 85 d2 test %edx,%edx
11136f: 74 d3 je 111344 <_Heap_Allocate_aligned_with_boundary+0x58>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
111371: 8b 45 08 mov 0x8(%ebp),%eax
111374: 8b 40 14 mov 0x14(%eax),%eax
111377: 89 45 d8 mov %eax,-0x28(%ebp)
- 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;
11137a: 83 e3 fe and $0xfffffffe,%ebx
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;
11137d: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
111380: 8d 51 08 lea 0x8(%ecx),%edx
111383: 89 55 d4 mov %edx,-0x2c(%ebp)
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;
111386: 8b 75 c8 mov -0x38(%ebp),%esi
111389: 29 c6 sub %eax,%esi
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
11138b: 01 de add %ebx,%esi
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
11138d: 03 5d d0 add -0x30(%ebp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111390: 89 d8 mov %ebx,%eax
111392: 31 d2 xor %edx,%edx
111394: f7 75 10 divl 0x10(%ebp)
111397: 29 d3 sub %edx,%ebx
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 ) {
111399: 39 de cmp %ebx,%esi
11139b: 73 0b jae 1113a8 <_Heap_Allocate_aligned_with_boundary+0xbc>
11139d: 89 f0 mov %esi,%eax
11139f: 31 d2 xor %edx,%edx
1113a1: f7 75 10 divl 0x10(%ebp)
1113a4: 89 f3 mov %esi,%ebx
1113a6: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
1113a8: 8b 45 14 mov 0x14(%ebp),%eax
1113ab: 85 c0 test %eax,%eax
1113ad: 74 5b je 11140a <_Heap_Allocate_aligned_with_boundary+0x11e>
/* 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;
1113af: 8d 34 3b lea (%ebx,%edi,1),%esi
1113b2: 89 f0 mov %esi,%eax
1113b4: 31 d2 xor %edx,%edx
1113b6: f7 75 14 divl 0x14(%ebp)
1113b9: 89 f0 mov %esi,%eax
1113bb: 29 d0 sub %edx,%eax
/* 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 ) {
1113bd: 39 c3 cmp %eax,%ebx
1113bf: 73 49 jae 11140a <_Heap_Allocate_aligned_with_boundary+0x11e>
1113c1: 39 c6 cmp %eax,%esi
1113c3: 76 45 jbe 11140a <_Heap_Allocate_aligned_with_boundary+0x11e>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
1113c5: 8b 55 d4 mov -0x2c(%ebp),%edx
1113c8: 01 fa add %edi,%edx
1113ca: 89 55 e0 mov %edx,-0x20(%ebp)
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
1113cd: 39 c2 cmp %eax,%edx
1113cf: 0f 87 7a ff ff ff ja 11134f <_Heap_Allocate_aligned_with_boundary+0x63>
1113d5: 89 ce mov %ecx,%esi
1113d7: eb 10 jmp 1113e9 <_Heap_Allocate_aligned_with_boundary+0xfd>
1113d9: 8d 76 00 lea 0x0(%esi),%esi
/* 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 ) {
1113dc: 39 c1 cmp %eax,%ecx
1113de: 76 28 jbe 111408 <_Heap_Allocate_aligned_with_boundary+0x11c>
if ( boundary_line < boundary_floor ) {
1113e0: 39 45 e0 cmp %eax,-0x20(%ebp)
1113e3: 0f 87 9f 00 00 00 ja 111488 <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
1113e9: 89 c3 mov %eax,%ebx
1113eb: 29 fb sub %edi,%ebx
1113ed: 89 d8 mov %ebx,%eax
1113ef: 31 d2 xor %edx,%edx
1113f1: f7 75 10 divl 0x10(%ebp)
1113f4: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
1113f6: 8d 0c 3b lea (%ebx,%edi,1),%ecx
1113f9: 89 c8 mov %ecx,%eax
1113fb: 31 d2 xor %edx,%edx
1113fd: f7 75 14 divl 0x14(%ebp)
111400: 89 c8 mov %ecx,%eax
111402: 29 d0 sub %edx,%eax
/* 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 ) {
111404: 39 c3 cmp %eax,%ebx
111406: 72 d4 jb 1113dc <_Heap_Allocate_aligned_with_boundary+0xf0>
111408: 89 f1 mov %esi,%ecx
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 ) {
11140a: 39 5d d4 cmp %ebx,-0x2c(%ebp)
11140d: 0f 87 3c ff ff ff ja 11134f <_Heap_Allocate_aligned_with_boundary+0x63>
111413: be f8 ff ff ff mov $0xfffffff8,%esi
111418: 29 ce sub %ecx,%esi
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11141a: 01 de add %ebx,%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11141c: 89 d8 mov %ebx,%eax
11141e: 31 d2 xor %edx,%edx
111420: f7 75 cc divl -0x34(%ebp)
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;
111423: 29 d6 sub %edx,%esi
if ( free_size >= min_block_size || free_size == 0 ) {
111425: 39 75 d8 cmp %esi,-0x28(%ebp)
111428: 0f 86 19 ff ff ff jbe 111347 <_Heap_Allocate_aligned_with_boundary+0x5b>
11142e: 85 f6 test %esi,%esi
111430: 0f 85 19 ff ff ff jne 11134f <_Heap_Allocate_aligned_with_boundary+0x63>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
111436: 85 db test %ebx,%ebx
111438: 0f 84 11 ff ff ff je 11134f <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN
11143e: 66 90 xchg %ax,%ax
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
111440: 8b 45 08 mov 0x8(%ebp),%eax
111443: ff 40 48 incl 0x48(%eax)
stats->searches += search_count;
111446: 8b 55 e4 mov -0x1c(%ebp),%edx
111449: 01 50 4c add %edx,0x4c(%eax)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
11144c: 57 push %edi
11144d: 53 push %ebx
11144e: 51 push %ecx
11144f: 50 push %eax
111450: e8 b7 b3 ff ff call 10c80c <_Heap_Block_allocate>
111455: 89 d8 mov %ebx,%eax
111457: 83 c4 10 add $0x10,%esp
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
11145a: 8b 55 e4 mov -0x1c(%ebp),%edx
11145d: 8b 4d 08 mov 0x8(%ebp),%ecx
111460: 39 51 44 cmp %edx,0x44(%ecx)
111463: 73 15 jae 11147a <_Heap_Allocate_aligned_with_boundary+0x18e>
stats->max_search = search_count;
111465: 89 51 44 mov %edx,0x44(%ecx)
}
return (void *) alloc_begin;
}
111468: 8d 65 f4 lea -0xc(%ebp),%esp
11146b: 5b pop %ebx
11146c: 5e pop %esi
11146d: 5f pop %edi
11146e: c9 leave
11146f: c3 ret
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
111470: 3b 7d 14 cmp 0x14(%ebp),%edi
111473: 76 1a jbe 11148f <_Heap_Allocate_aligned_with_boundary+0x1a3>
111475: 8d 76 00 lea 0x0(%esi),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111478: 31 c0 xor %eax,%eax
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
11147a: 8d 65 f4 lea -0xc(%ebp),%esp
11147d: 5b pop %ebx
11147e: 5e pop %esi
11147f: 5f pop %edi
111480: c9 leave
111481: c3 ret
111482: 66 90 xchg %ax,%ax
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111484: 31 c0 xor %eax,%eax
111486: eb d2 jmp 11145a <_Heap_Allocate_aligned_with_boundary+0x16e>
111488: 89 f1 mov %esi,%ecx <== NOT EXECUTED
11148a: e9 c0 fe ff ff jmp 11134f <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
11148f: 8b 4d 10 mov 0x10(%ebp),%ecx
111492: 85 c9 test %ecx,%ecx
111494: 0f 85 80 fe ff ff jne 11131a <_Heap_Allocate_aligned_with_boundary+0x2e>
alignment = page_size;
11149a: 89 55 10 mov %edx,0x10(%ebp)
11149d: e9 78 fe ff ff jmp 11131a <_Heap_Allocate_aligned_with_boundary+0x2e>
00111880 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
111880: 55 push %ebp
111881: 89 e5 mov %esp,%ebp
111883: 57 push %edi
111884: 56 push %esi
111885: 53 push %ebx
111886: 83 ec 4c sub $0x4c,%esp
111889: 8b 5d 08 mov 0x8(%ebp),%ebx
11188c: 8b 4d 10 mov 0x10(%ebp),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
11188f: 8b 43 20 mov 0x20(%ebx),%eax
111892: 89 45 d0 mov %eax,-0x30(%ebp)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
111895: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
Heap_Block *extend_last_block = NULL;
11189c: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uintptr_t const page_size = heap->page_size;
1118a3: 8b 53 10 mov 0x10(%ebx),%edx
1118a6: 89 55 d4 mov %edx,-0x2c(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
1118a9: 8b 43 14 mov 0x14(%ebx),%eax
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
1118ac: 8b 73 30 mov 0x30(%ebx),%esi
1118af: 89 75 c0 mov %esi,-0x40(%ebp)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
1118b2: 8b 55 0c mov 0xc(%ebp),%edx
1118b5: 01 ca add %ecx,%edx
1118b7: 89 55 cc mov %edx,-0x34(%ebp)
1118ba: 73 0c jae 1118c8 <_Heap_Extend+0x48>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
1118bc: 31 c0 xor %eax,%eax
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
1118be: 8d 65 f4 lea -0xc(%ebp),%esp
1118c1: 5b pop %ebx
1118c2: 5e pop %esi
1118c3: 5f pop %edi
1118c4: c9 leave
1118c5: c3 ret
1118c6: 66 90 xchg %ax,%ax
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
1118c8: 83 ec 08 sub $0x8,%esp
1118cb: 8d 55 e0 lea -0x20(%ebp),%edx
1118ce: 52 push %edx
1118cf: 8d 55 e4 lea -0x1c(%ebp),%edx
1118d2: 52 push %edx
1118d3: 50 push %eax
1118d4: ff 75 d4 pushl -0x2c(%ebp)
1118d7: 51 push %ecx
1118d8: ff 75 0c pushl 0xc(%ebp)
1118db: e8 38 b1 ff ff call 10ca18 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
1118e0: 83 c4 20 add $0x20,%esp
1118e3: 84 c0 test %al,%al
1118e5: 74 d5 je 1118bc <_Heap_Extend+0x3c>
1118e7: 8b 7d d0 mov -0x30(%ebp),%edi
1118ea: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp)
1118f1: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp)
1118f8: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
1118ff: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
111906: 8b 75 cc mov -0x34(%ebp),%esi
111909: 89 5d b4 mov %ebx,-0x4c(%ebp)
11190c: eb 30 jmp 11193e <_Heap_Extend+0xbe>
11190e: 66 90 xchg %ax,%ax
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
111910: 39 ce cmp %ecx,%esi
111912: 73 03 jae 111917 <_Heap_Extend+0x97>
111914: 89 7d b8 mov %edi,-0x48(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111917: 8d 59 f8 lea -0x8(%ecx),%ebx
11191a: 89 c8 mov %ecx,%eax
11191c: 31 d2 xor %edx,%edx
11191e: f7 75 d4 divl -0x2c(%ebp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
111921: 29 d3 sub %edx,%ebx
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
111923: 3b 4d 0c cmp 0xc(%ebp),%ecx
111926: 74 3c je 111964 <_Heap_Extend+0xe4>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
111928: 39 4d 0c cmp %ecx,0xc(%ebp)
11192b: 76 03 jbe 111930 <_Heap_Extend+0xb0>
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 )
11192d: 89 5d bc mov %ebx,-0x44(%ebp)
- 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;
111930: 8b 7b 04 mov 0x4(%ebx),%edi
111933: 83 e7 fe and $0xfffffffe,%edi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111936: 8d 3c 3b lea (%ebx,%edi,1),%edi
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
111939: 39 7d d0 cmp %edi,-0x30(%ebp)
11193c: 74 39 je 111977 <_Heap_Extend+0xf7>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
11193e: 3b 7d d0 cmp -0x30(%ebp),%edi
111941: 0f 84 35 01 00 00 je 111a7c <_Heap_Extend+0x1fc>
111947: 89 f8 mov %edi,%eax
uintptr_t const sub_area_end = start_block->prev_size;
111949: 8b 0f mov (%edi),%ecx
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
11194b: 39 4d 0c cmp %ecx,0xc(%ebp)
11194e: 73 08 jae 111958 <_Heap_Extend+0xd8>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
111950: 39 f0 cmp %esi,%eax
111952: 0f 82 64 ff ff ff jb 1118bc <_Heap_Extend+0x3c>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
111958: 39 f0 cmp %esi,%eax
11195a: 75 b4 jne 111910 <_Heap_Extend+0x90>
11195c: 89 7d c4 mov %edi,-0x3c(%ebp)
11195f: eb b6 jmp 111917 <_Heap_Extend+0x97>
111961: 8d 76 00 lea 0x0(%esi),%esi
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
start_block->prev_size = extend_area_end;
111964: 89 37 mov %esi,(%edi)
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 )
111966: 89 5d c8 mov %ebx,-0x38(%ebp)
- 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;
111969: 8b 7b 04 mov 0x4(%ebx),%edi
11196c: 83 e7 fe and $0xfffffffe,%edi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11196f: 8d 3c 3b lea (%ebx,%edi,1),%edi
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
111972: 39 7d d0 cmp %edi,-0x30(%ebp)
111975: 75 c7 jne 11193e <_Heap_Extend+0xbe> <== NEVER TAKEN
111977: 8b 5d b4 mov -0x4c(%ebp),%ebx
if ( extend_area_begin < heap->area_begin ) {
11197a: 8b 75 0c mov 0xc(%ebp),%esi
11197d: 3b 73 18 cmp 0x18(%ebx),%esi
111980: 0f 82 02 01 00 00 jb 111a88 <_Heap_Extend+0x208>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
111986: 8b 45 cc mov -0x34(%ebp),%eax
111989: 3b 43 1c cmp 0x1c(%ebx),%eax
11198c: 76 03 jbe 111991 <_Heap_Extend+0x111> <== NEVER TAKEN
heap->area_end = extend_area_end;
11198e: 89 43 1c mov %eax,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
111991: 8b 55 e0 mov -0x20(%ebp),%edx
111994: 8b 45 e4 mov -0x1c(%ebp),%eax
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
111997: 89 d1 mov %edx,%ecx
111999: 29 c1 sub %eax,%ecx
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
11199b: 8b 75 cc mov -0x34(%ebp),%esi
11199e: 89 30 mov %esi,(%eax)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
1119a0: 89 ce mov %ecx,%esi
1119a2: 83 ce 01 or $0x1,%esi
1119a5: 89 70 04 mov %esi,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
1119a8: 89 0a mov %ecx,(%edx)
extend_last_block->size_and_flag = 0;
1119aa: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
1119b1: 39 43 20 cmp %eax,0x20(%ebx)
1119b4: 0f 86 d6 00 00 00 jbe 111a90 <_Heap_Extend+0x210>
heap->first_block = extend_first_block;
1119ba: 89 43 20 mov %eax,0x20(%ebx)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
1119bd: 8b 75 c4 mov -0x3c(%ebp),%esi
1119c0: 85 f6 test %esi,%esi
1119c2: 0f 84 04 01 00 00 je 111acc <_Heap_Extend+0x24c>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
1119c8: 8b 73 10 mov 0x10(%ebx),%esi
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
1119cb: 8b 4d 0c mov 0xc(%ebp),%ecx
1119ce: 83 c1 08 add $0x8,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
1119d1: 89 c8 mov %ecx,%eax
1119d3: 31 d2 xor %edx,%edx
1119d5: f7 f6 div %esi
if ( remainder != 0 ) {
1119d7: 85 d2 test %edx,%edx
1119d9: 74 04 je 1119df <_Heap_Extend+0x15f> <== ALWAYS TAKEN
return value - remainder + alignment;
1119db: 01 f1 add %esi,%ecx <== NOT EXECUTED
1119dd: 29 d1 sub %edx,%ecx <== NOT EXECUTED
uintptr_t const new_first_block_begin =
1119df: 8d 51 f8 lea -0x8(%ecx),%edx
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
1119e2: 8b 75 c4 mov -0x3c(%ebp),%esi
1119e5: 8b 06 mov (%esi),%eax
1119e7: 89 41 f8 mov %eax,-0x8(%ecx)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
1119ea: 89 f0 mov %esi,%eax
1119ec: 29 d0 sub %edx,%eax
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
1119ee: 83 c8 01 or $0x1,%eax
1119f1: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
1119f4: 89 d8 mov %ebx,%eax
1119f6: e8 69 fe ff ff call 111864 <_Heap_Free_block>
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
1119fb: 8b 45 c8 mov -0x38(%ebp),%eax
1119fe: 85 c0 test %eax,%eax
111a00: 0f 84 9e 00 00 00 je 111aa4 <_Heap_Extend+0x224>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
111a06: 8b 4d cc mov -0x34(%ebp),%ecx
111a09: 83 e9 08 sub $0x8,%ecx
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
111a0c: 2b 4d c8 sub -0x38(%ebp),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111a0f: 89 c8 mov %ecx,%eax
111a11: 31 d2 xor %edx,%edx
111a13: f7 73 10 divl 0x10(%ebx)
111a16: 29 d1 sub %edx,%ecx
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
111a18: 8b 55 c8 mov -0x38(%ebp),%edx
111a1b: 8b 42 04 mov 0x4(%edx),%eax
111a1e: 29 c8 sub %ecx,%eax
| HEAP_PREV_BLOCK_USED;
111a20: 83 c8 01 or $0x1,%eax
111a23: 89 44 11 04 mov %eax,0x4(%ecx,%edx,1)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
111a27: 8b 42 04 mov 0x4(%edx),%eax
111a2a: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
111a2d: 09 c8 or %ecx,%eax
111a2f: 89 42 04 mov %eax,0x4(%edx)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
111a32: 89 d8 mov %ebx,%eax
111a34: e8 2b fe ff ff call 111864 <_Heap_Free_block>
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
111a39: 8b 75 c4 mov -0x3c(%ebp),%esi
111a3c: 85 f6 test %esi,%esi
111a3e: 0f 84 a4 00 00 00 je 111ae8 <_Heap_Extend+0x268>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
111a44: 8b 53 24 mov 0x24(%ebx),%edx
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
111a47: 8b 43 20 mov 0x20(%ebx),%eax
111a4a: 29 d0 sub %edx,%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
111a4c: 8b 4a 04 mov 0x4(%edx),%ecx
111a4f: 83 e1 01 and $0x1,%ecx
block->size_and_flag = size | flag;
111a52: 09 c8 or %ecx,%eax
111a54: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
111a57: 8b 43 30 mov 0x30(%ebx),%eax
111a5a: 2b 45 c0 sub -0x40(%ebp),%eax
/* Statistics */
stats->size += extended_size;
111a5d: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
111a60: 8b 55 14 mov 0x14(%ebp),%edx
111a63: 85 d2 test %edx,%edx
111a65: 0f 84 99 00 00 00 je 111b04 <_Heap_Extend+0x284> <== NEVER TAKEN
*extended_size_ptr = extended_size;
111a6b: 8b 55 14 mov 0x14(%ebp),%edx
111a6e: 89 02 mov %eax,(%edx)
return true;
111a70: b0 01 mov $0x1,%al
}
111a72: 8d 65 f4 lea -0xc(%ebp),%esp
111a75: 5b pop %ebx
111a76: 5e pop %esi
111a77: 5f pop %edi
111a78: c9 leave
111a79: c3 ret
111a7a: 66 90 xchg %ax,%ax
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
111a7c: 8b 55 b4 mov -0x4c(%ebp),%edx
111a7f: 8b 42 18 mov 0x18(%edx),%eax
111a82: e9 c2 fe ff ff jmp 111949 <_Heap_Extend+0xc9>
111a87: 90 nop
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
111a88: 89 73 18 mov %esi,0x18(%ebx)
111a8b: e9 01 ff ff ff jmp 111991 <_Heap_Extend+0x111>
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
111a90: 39 53 24 cmp %edx,0x24(%ebx)
111a93: 0f 83 24 ff ff ff jae 1119bd <_Heap_Extend+0x13d>
heap->last_block = extend_last_block;
111a99: 89 53 24 mov %edx,0x24(%ebx)
111a9c: e9 1c ff ff ff jmp 1119bd <_Heap_Extend+0x13d>
111aa1: 8d 76 00 lea 0x0(%esi),%esi
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
111aa4: 8b 7d bc mov -0x44(%ebp),%edi
111aa7: 85 ff test %edi,%edi
111aa9: 74 8e je 111a39 <_Heap_Extend+0x1b9>
_Heap_Link_above(
111aab: 8b 4d e0 mov -0x20(%ebp),%ecx
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
111aae: 8b 45 e4 mov -0x1c(%ebp),%eax
111ab1: 2b 45 bc sub -0x44(%ebp),%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
111ab4: 8b 75 bc mov -0x44(%ebp),%esi
111ab7: 8b 56 04 mov 0x4(%esi),%edx
111aba: 83 e2 01 and $0x1,%edx
block->size_and_flag = size | flag;
111abd: 09 d0 or %edx,%eax
111abf: 89 46 04 mov %eax,0x4(%esi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
111ac2: 83 49 04 01 orl $0x1,0x4(%ecx)
111ac6: e9 6e ff ff ff jmp 111a39 <_Heap_Extend+0x1b9>
111acb: 90 nop
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
111acc: 8b 4d b8 mov -0x48(%ebp),%ecx
111acf: 85 c9 test %ecx,%ecx
111ad1: 0f 84 24 ff ff ff je 1119fb <_Heap_Extend+0x17b>
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
111ad7: 8b 45 b8 mov -0x48(%ebp),%eax
111ada: 29 d0 sub %edx,%eax
111adc: 83 c8 01 or $0x1,%eax
111adf: 89 42 04 mov %eax,0x4(%edx)
111ae2: e9 14 ff ff ff jmp 1119fb <_Heap_Extend+0x17b>
111ae7: 90 nop
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
111ae8: 8b 4d c8 mov -0x38(%ebp),%ecx
111aeb: 85 c9 test %ecx,%ecx
111aed: 0f 85 51 ff ff ff jne 111a44 <_Heap_Extend+0x1c4>
_Heap_Free_block( heap, extend_first_block );
111af3: 8b 55 e4 mov -0x1c(%ebp),%edx
111af6: 89 d8 mov %ebx,%eax
111af8: e8 67 fd ff ff call 111864 <_Heap_Free_block>
111afd: e9 42 ff ff ff jmp 111a44 <_Heap_Extend+0x1c4>
111b02: 66 90 xchg %ax,%ax
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
111b04: b0 01 mov $0x1,%al <== NOT EXECUTED
111b06: e9 b3 fd ff ff jmp 1118be <_Heap_Extend+0x3e> <== NOT EXECUTED
001114a4 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
1114a4: 55 push %ebp
1114a5: 89 e5 mov %esp,%ebp
1114a7: 57 push %edi
1114a8: 56 push %esi
1114a9: 53 push %ebx
1114aa: 83 ec 10 sub $0x10,%esp
1114ad: 8b 5d 08 mov 0x8(%ebp),%ebx
1114b0: 8b 45 0c mov 0xc(%ebp),%eax
1114b3: 8d 48 f8 lea -0x8(%eax),%ecx
1114b6: 31 d2 xor %edx,%edx
1114b8: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
1114bb: 29 d1 sub %edx,%ecx
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
1114bd: 8b 43 20 mov 0x20(%ebx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
1114c0: 39 c1 cmp %eax,%ecx
1114c2: 72 07 jb 1114cb <_Heap_Free+0x27>
1114c4: 8b 73 24 mov 0x24(%ebx),%esi
1114c7: 39 f1 cmp %esi,%ecx
1114c9: 76 0d jbe 1114d8 <_Heap_Free+0x34>
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( false );
return( false );
1114cb: 31 c0 xor %eax,%eax
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
1114cd: 83 c4 10 add $0x10,%esp
1114d0: 5b pop %ebx
1114d1: 5e pop %esi
1114d2: 5f pop %edi
1114d3: c9 leave
1114d4: c3 ret
1114d5: 8d 76 00 lea 0x0(%esi),%esi
1114d8: 8b 51 04 mov 0x4(%ecx),%edx
1114db: 89 55 f0 mov %edx,-0x10(%ebp)
- 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;
1114de: 83 e2 fe and $0xfffffffe,%edx
1114e1: 89 55 ec mov %edx,-0x14(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
1114e4: 8d 14 11 lea (%ecx,%edx,1),%edx
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;
1114e7: 39 d0 cmp %edx,%eax
1114e9: 77 e0 ja 1114cb <_Heap_Free+0x27> <== NEVER TAKEN
1114eb: 39 d6 cmp %edx,%esi
1114ed: 72 dc jb 1114cb <_Heap_Free+0x27> <== NEVER TAKEN
1114ef: 8b 7a 04 mov 0x4(%edx),%edi
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
1114f2: f7 c7 01 00 00 00 test $0x1,%edi
1114f8: 74 d1 je 1114cb <_Heap_Free+0x27> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
1114fa: 83 e7 fe and $0xfffffffe,%edi
1114fd: 89 7d e4 mov %edi,-0x1c(%ebp)
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
111500: 39 d6 cmp %edx,%esi
111502: 0f 84 c8 00 00 00 je 1115d0 <_Heap_Free+0x12c>
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
111508: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1)
11150d: 0f 94 45 eb sete -0x15(%ebp)
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 ) ) {
111511: f6 45 f0 01 testb $0x1,-0x10(%ebp)
111515: 75 45 jne 11155c <_Heap_Free+0xb8>
uintptr_t const prev_size = block->prev_size;
111517: 8b 39 mov (%ecx),%edi
111519: 89 7d f0 mov %edi,-0x10(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11151c: 29 f9 sub %edi,%ecx
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;
11151e: 39 c8 cmp %ecx,%eax
111520: 77 a9 ja 1114cb <_Heap_Free+0x27> <== NEVER TAKEN
111522: 39 ce cmp %ecx,%esi
111524: 72 a5 jb 1114cb <_Heap_Free+0x27> <== NEVER TAKEN
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
111526: f6 41 04 01 testb $0x1,0x4(%ecx)
11152a: 74 9f je 1114cb <_Heap_Free+0x27> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
11152c: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
111530: 0f 84 a6 00 00 00 je 1115dc <_Heap_Free+0x138>
uintptr_t const size = block_size + prev_size + next_block_size;
111536: 8b 7d e4 mov -0x1c(%ebp),%edi
111539: 03 7d ec add -0x14(%ebp),%edi
11153c: 03 7d f0 add -0x10(%ebp),%edi
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
11153f: 8b 42 08 mov 0x8(%edx),%eax
111542: 8b 52 0c mov 0xc(%edx),%edx
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
111545: 89 42 08 mov %eax,0x8(%edx)
next->prev = prev;
111548: 89 50 0c mov %edx,0xc(%eax)
}
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;
11154b: ff 4b 38 decl 0x38(%ebx)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
11154e: 89 f8 mov %edi,%eax
111550: 83 c8 01 or $0x1,%eax
111553: 89 41 04 mov %eax,0x4(%ecx)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
111556: 89 3c 39 mov %edi,(%ecx,%edi,1)
111559: eb 2a jmp 111585 <_Heap_Free+0xe1>
11155b: 90 nop
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 */
11155c: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
111560: 74 3a je 11159c <_Heap_Free+0xf8>
uintptr_t const size = block_size + next_block_size;
111562: 8b 7d e4 mov -0x1c(%ebp),%edi
111565: 03 7d ec add -0x14(%ebp),%edi
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111568: 8b 42 08 mov 0x8(%edx),%eax
11156b: 8b 52 0c mov 0xc(%edx),%edx
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
11156e: 89 41 08 mov %eax,0x8(%ecx)
new_block->prev = prev;
111571: 89 51 0c mov %edx,0xc(%ecx)
next->prev = new_block;
111574: 89 48 0c mov %ecx,0xc(%eax)
prev->next = new_block;
111577: 89 4a 08 mov %ecx,0x8(%edx)
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;
11157a: 89 f8 mov %edi,%eax
11157c: 83 c8 01 or $0x1,%eax
11157f: 89 41 04 mov %eax,0x4(%ecx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
111582: 89 3c 39 mov %edi,(%ecx,%edi,1)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
111585: ff 4b 40 decl 0x40(%ebx)
++stats->frees;
111588: ff 43 50 incl 0x50(%ebx)
stats->free_size += block_size;
11158b: 8b 55 ec mov -0x14(%ebp),%edx
11158e: 01 53 30 add %edx,0x30(%ebx)
return( true );
111591: b0 01 mov $0x1,%al
}
111593: 83 c4 10 add $0x10,%esp
111596: 5b pop %ebx
111597: 5e pop %esi
111598: 5f pop %edi
111599: c9 leave
11159a: c3 ret
11159b: 90 nop
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
11159c: 8b 43 08 mov 0x8(%ebx),%eax
new_block->next = next;
11159f: 89 41 08 mov %eax,0x8(%ecx)
new_block->prev = block_before;
1115a2: 89 59 0c mov %ebx,0xc(%ecx)
block_before->next = new_block;
1115a5: 89 4b 08 mov %ecx,0x8(%ebx)
next->prev = new_block;
1115a8: 89 48 0c mov %ecx,0xc(%eax)
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;
1115ab: 8b 45 ec mov -0x14(%ebp),%eax
1115ae: 83 c8 01 or $0x1,%eax
1115b1: 89 41 04 mov %eax,0x4(%ecx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
1115b4: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
1115b8: 8b 45 ec mov -0x14(%ebp),%eax
1115bb: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->free_blocks;
1115bd: 8b 43 38 mov 0x38(%ebx),%eax
1115c0: 40 inc %eax
1115c1: 89 43 38 mov %eax,0x38(%ebx)
if ( stats->max_free_blocks < stats->free_blocks ) {
1115c4: 3b 43 3c cmp 0x3c(%ebx),%eax
1115c7: 76 bc jbe 111585 <_Heap_Free+0xe1>
stats->max_free_blocks = stats->free_blocks;
1115c9: 89 43 3c mov %eax,0x3c(%ebx)
1115cc: eb b7 jmp 111585 <_Heap_Free+0xe1>
1115ce: 66 90 xchg %ax,%ax
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
1115d0: c6 45 eb 00 movb $0x0,-0x15(%ebp)
1115d4: e9 38 ff ff ff jmp 111511 <_Heap_Free+0x6d>
1115d9: 8d 76 00 lea 0x0(%esi),%esi
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;
1115dc: 8b 45 ec mov -0x14(%ebp),%eax
1115df: 03 45 f0 add -0x10(%ebp),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
1115e2: 89 c6 mov %eax,%esi
1115e4: 83 ce 01 or $0x1,%esi
1115e7: 89 71 04 mov %esi,0x4(%ecx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
1115ea: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
1115ee: 89 02 mov %eax,(%edx)
1115f0: eb 93 jmp 111585 <_Heap_Free+0xe1>
0010c69c <_Heap_Get_first_and_last_block>:
uintptr_t page_size,
uintptr_t min_block_size,
Heap_Block **first_block_ptr,
Heap_Block **last_block_ptr
)
{
10c69c: 55 push %ebp
10c69d: 89 e5 mov %esp,%ebp
10c69f: 57 push %edi
10c6a0: 56 push %esi
10c6a1: 53 push %ebx
10c6a2: 8b 5d 08 mov 0x8(%ebp),%ebx
10c6a5: 8b 7d 0c mov 0xc(%ebp),%edi
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
10c6a8: 8d 34 1f lea (%edi,%ebx,1),%esi
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
10c6ab: 8d 4b 08 lea 0x8(%ebx),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10c6ae: 89 c8 mov %ecx,%eax
10c6b0: 31 d2 xor %edx,%edx
10c6b2: f7 75 10 divl 0x10(%ebp)
if ( remainder != 0 ) {
10c6b5: 85 d2 test %edx,%edx
10c6b7: 74 05 je 10c6be <_Heap_Get_first_and_last_block+0x22>
return value - remainder + alignment;
10c6b9: 03 4d 10 add 0x10(%ebp),%ecx
10c6bc: 29 d1 sub %edx,%ecx
_Heap_Align_down( heap_area_size - overhead, page_size );
Heap_Block *const first_block = (Heap_Block *) first_block_begin;
Heap_Block *const last_block =
_Heap_Block_at( first_block, first_block_size );
if (
10c6be: 39 f3 cmp %esi,%ebx
10c6c0: 77 2e ja 10c6f0 <_Heap_Get_first_and_last_block+0x54>
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const first_block_begin =
alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const overhead =
HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
10c6c2: 8d 71 f8 lea -0x8(%ecx),%esi
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const first_block_begin =
alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const overhead =
10c6c5: 29 d9 sub %ebx,%ecx
Heap_Block *const last_block =
_Heap_Block_at( first_block, first_block_size );
if (
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
10c6c7: 39 cf cmp %ecx,%edi
10c6c9: 76 25 jbe 10c6f0 <_Heap_Get_first_and_last_block+0x54>
uintptr_t const first_block_begin =
alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const overhead =
HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
uintptr_t const first_block_size =
_Heap_Align_down( heap_area_size - overhead, page_size );
10c6cb: 29 cf sub %ecx,%edi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10c6cd: 89 f8 mov %edi,%eax
10c6cf: 31 d2 xor %edx,%edx
10c6d1: f7 75 10 divl 0x10(%ebp)
10c6d4: 29 d7 sub %edx,%edi
_Heap_Block_at( first_block, first_block_size );
if (
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
|| first_block_size < min_block_size
10c6d6: 39 7d 14 cmp %edi,0x14(%ebp)
10c6d9: 77 15 ja 10c6f0 <_Heap_Get_first_and_last_block+0x54>
) {
/* Invalid area or area too small */
return false;
}
*first_block_ptr = first_block;
10c6db: 8b 45 18 mov 0x18(%ebp),%eax
10c6de: 89 30 mov %esi,(%eax)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10c6e0: 01 f7 add %esi,%edi
10c6e2: 8b 45 1c mov 0x1c(%ebp),%eax
10c6e5: 89 38 mov %edi,(%eax)
*last_block_ptr = last_block;
return true;
10c6e7: b0 01 mov $0x1,%al
}
10c6e9: 5b pop %ebx
10c6ea: 5e pop %esi
10c6eb: 5f pop %edi
10c6ec: c9 leave
10c6ed: c3 ret
10c6ee: 66 90 xchg %ax,%ax
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
|| first_block_size < min_block_size
) {
/* Invalid area or area too small */
return false;
10c6f0: 31 c0 xor %eax,%eax
*first_block_ptr = first_block;
*last_block_ptr = last_block;
return true;
}
10c6f2: 5b pop %ebx
10c6f3: 5e pop %esi
10c6f4: 5f pop %edi
10c6f5: c9 leave
10c6f6: c3 ret
0011517c <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
11517c: 55 push %ebp
11517d: 89 e5 mov %esp,%ebp
11517f: 57 push %edi
115180: 56 push %esi
115181: 53 push %ebx
115182: 8b 7d 0c mov 0xc(%ebp),%edi
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
115185: c7 07 00 00 00 00 movl $0x0,(%edi)
info->largest = 0;
11518b: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
info->total = 0;
115192: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
115199: 8b 45 08 mov 0x8(%ebp),%eax
11519c: 8b 50 08 mov 0x8(%eax),%edx
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
11519f: 39 d0 cmp %edx,%eax
1151a1: 74 31 je 1151d4 <_Heap_Get_free_information+0x58>
1151a3: bb 01 00 00 00 mov $0x1,%ebx
1151a8: 31 f6 xor %esi,%esi
1151aa: 31 c9 xor %ecx,%ecx
1151ac: eb 07 jmp 1151b5 <_Heap_Get_free_information+0x39>
1151ae: 66 90 xchg %ax,%ax
1151b0: 8b 77 04 mov 0x4(%edi),%esi
1151b3: 89 c3 mov %eax,%ebx
- 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;
1151b5: 8b 42 04 mov 0x4(%edx),%eax
1151b8: 83 e0 fe and $0xfffffffe,%eax
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
1151bb: 01 c1 add %eax,%ecx
if ( info->largest < the_size )
1151bd: 39 f0 cmp %esi,%eax
1151bf: 76 03 jbe 1151c4 <_Heap_Get_free_information+0x48>
info->largest = the_size;
1151c1: 89 47 04 mov %eax,0x4(%edi)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
1151c4: 8b 52 08 mov 0x8(%edx),%edx
1151c7: 8d 43 01 lea 0x1(%ebx),%eax
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
1151ca: 39 55 08 cmp %edx,0x8(%ebp)
1151cd: 75 e1 jne 1151b0 <_Heap_Get_free_information+0x34>
1151cf: 89 1f mov %ebx,(%edi)
1151d1: 89 4f 08 mov %ecx,0x8(%edi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
1151d4: 5b pop %ebx
1151d5: 5e pop %esi
1151d6: 5f pop %edi
1151d7: c9 leave
1151d8: c3 ret
0011201c <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
11201c: 55 push %ebp
11201d: 89 e5 mov %esp,%ebp
11201f: 57 push %edi
112020: 56 push %esi
112021: 53 push %ebx
112022: 8b 45 08 mov 0x8(%ebp),%eax
112025: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Block *the_block = the_heap->first_block;
112028: 8b 50 20 mov 0x20(%eax),%edx
Heap_Block *const end = the_heap->last_block;
11202b: 8b 70 24 mov 0x24(%eax),%esi
memset(the_info, 0, sizeof(*the_info));
11202e: b9 18 00 00 00 mov $0x18,%ecx
112033: 31 c0 xor %eax,%eax
112035: 89 df mov %ebx,%edi
112037: f3 aa rep stos %al,%es:(%edi)
while ( the_block != end ) {
112039: 39 f2 cmp %esi,%edx
11203b: 74 33 je 112070 <_Heap_Get_information+0x54><== NEVER TAKEN
11203d: 8b 7a 04 mov 0x4(%edx),%edi
112040: eb 16 jmp 112058 <_Heap_Get_information+0x3c>
112042: 66 90 xchg %ax,%ax
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;
112044: 8d 43 0c lea 0xc(%ebx),%eax
else
info = &the_info->Free;
info->number++;
112047: ff 00 incl (%eax)
info->total += the_size;
112049: 01 48 08 add %ecx,0x8(%eax)
if ( info->largest < the_size )
11204c: 39 48 04 cmp %ecx,0x4(%eax)
11204f: 73 03 jae 112054 <_Heap_Get_information+0x38>
info->largest = the_size;
112051: 89 48 04 mov %ecx,0x4(%eax)
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
112054: 39 d6 cmp %edx,%esi
112056: 74 18 je 112070 <_Heap_Get_information+0x54>
- 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;
112058: 89 f9 mov %edi,%ecx
11205a: 83 e1 fe and $0xfffffffe,%ecx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11205d: 01 ca add %ecx,%edx
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
11205f: 8b 7a 04 mov 0x4(%edx),%edi
while ( the_block != end ) {
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) )
112062: f7 c7 01 00 00 00 test $0x1,%edi
112068: 75 da jne 112044 <_Heap_Get_information+0x28>
info = &the_info->Used;
else
info = &the_info->Free;
11206a: 89 d8 mov %ebx,%eax
11206c: eb d9 jmp 112047 <_Heap_Get_information+0x2b>
11206e: 66 90 xchg %ax,%ax
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
112070: 5b pop %ebx
112071: 5e pop %esi
112072: 5f pop %edi
112073: c9 leave
112074: c3 ret
0011ed24 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
11ed24: 55 push %ebp
11ed25: 89 e5 mov %esp,%ebp
11ed27: 57 push %edi
11ed28: 56 push %esi
11ed29: 53 push %ebx
11ed2a: 83 ec 2c sub $0x2c,%esp
11ed2d: 8b 5d 08 mov 0x8(%ebp),%ebx
11ed30: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11ed33: 8d 4e f8 lea -0x8(%esi),%ecx
11ed36: 89 f0 mov %esi,%eax
11ed38: 31 d2 xor %edx,%edx
11ed3a: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11ed3d: 29 d1 sub %edx,%ecx
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;
11ed3f: 8b 45 14 mov 0x14(%ebp),%eax
11ed42: c7 00 00 00 00 00 movl $0x0,(%eax)
*new_size = 0;
11ed48: 8b 55 18 mov 0x18(%ebp),%edx
11ed4b: c7 02 00 00 00 00 movl $0x0,(%edx)
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;
11ed51: 39 4b 20 cmp %ecx,0x20(%ebx)
11ed54: 77 05 ja 11ed5b <_Heap_Resize_block+0x37>
11ed56: 39 4b 24 cmp %ecx,0x24(%ebx)
11ed59: 73 0d jae 11ed68 <_Heap_Resize_block+0x44>
new_alloc_size,
old_size,
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
11ed5b: b8 02 00 00 00 mov $0x2,%eax
}
}
11ed60: 8d 65 f4 lea -0xc(%ebp),%esp
11ed63: 5b pop %ebx
11ed64: 5e pop %esi
11ed65: 5f pop %edi
11ed66: c9 leave
11ed67: c3 ret
- 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;
11ed68: 8b 41 04 mov 0x4(%ecx),%eax
11ed6b: 83 e0 fe and $0xfffffffe,%eax
{
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;
11ed6e: 8d 3c 01 lea (%ecx,%eax,1),%edi
11ed71: 89 7d d4 mov %edi,-0x2c(%ebp)
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
11ed74: 89 fa mov %edi,%edx
11ed76: 29 f2 sub %esi,%edx
11ed78: 83 c2 04 add $0x4,%edx
11ed7b: 89 55 e0 mov %edx,-0x20(%ebp)
11ed7e: 8b 57 04 mov 0x4(%edi),%edx
11ed81: 83 e2 fe and $0xfffffffe,%edx
11ed84: 89 55 d0 mov %edx,-0x30(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
11ed87: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1)
11ed8c: 0f 94 45 df sete -0x21(%ebp)
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;
11ed90: 8b 55 e0 mov -0x20(%ebp),%edx
11ed93: 8b 7d 14 mov 0x14(%ebp),%edi
11ed96: 89 17 mov %edx,(%edi)
if ( next_block_is_free ) {
11ed98: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
11ed9c: 75 6e jne 11ee0c <_Heap_Resize_block+0xe8>
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
11ed9e: 8b 55 e0 mov -0x20(%ebp),%edx
11eda1: 39 55 10 cmp %edx,0x10(%ebp)
11eda4: 77 79 ja 11ee1f <_Heap_Resize_block+0xfb>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
11eda6: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
11edaa: 74 31 je 11eddd <_Heap_Resize_block+0xb9>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
11edac: 8b 79 04 mov 0x4(%ecx),%edi
11edaf: 83 e7 01 and $0x1,%edi
block->size_and_flag = size | flag;
11edb2: 09 c7 or %eax,%edi
11edb4: 89 79 04 mov %edi,0x4(%ecx)
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
11edb7: 8b 7d d4 mov -0x2c(%ebp),%edi
11edba: 8b 7f 08 mov 0x8(%edi),%edi
11edbd: 89 7d e4 mov %edi,-0x1c(%ebp)
11edc0: 8b 55 d4 mov -0x2c(%ebp),%edx
11edc3: 8b 7a 0c mov 0xc(%edx),%edi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
11edc6: 8b 55 e4 mov -0x1c(%ebp),%edx
11edc9: 89 57 08 mov %edx,0x8(%edi)
next->prev = prev;
11edcc: 89 7a 0c mov %edi,0xc(%edx)
_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;
11edcf: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1)
/* Statistics */
--stats->free_blocks;
11edd4: ff 4b 38 decl 0x38(%ebx)
stats->free_size -= next_block_size;
11edd7: 8b 7d d0 mov -0x30(%ebp),%edi
11edda: 29 7b 30 sub %edi,0x30(%ebx)
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
11eddd: ff 75 10 pushl 0x10(%ebp)
11ede0: 56 push %esi
11ede1: 51 push %ecx
11ede2: 53 push %ebx
11ede3: e8 24 da fe ff call 10c80c <_Heap_Block_allocate>
- 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;
11ede8: 8b 50 04 mov 0x4(%eax),%edx
11edeb: 83 e2 fe and $0xfffffffe,%edx
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
11edee: 29 f0 sub %esi,%eax
11edf0: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax
11edf4: 8b 55 18 mov 0x18(%ebp),%edx
11edf7: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->resizes;
11edf9: ff 43 54 incl 0x54(%ebx)
11edfc: 83 c4 10 add $0x10,%esp
return HEAP_RESIZE_SUCCESSFUL;
11edff: 31 c0 xor %eax,%eax
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
11ee01: 8d 65 f4 lea -0xc(%ebp),%esp
11ee04: 5b pop %ebx
11ee05: 5e pop %esi
11ee06: 5f pop %edi
11ee07: c9 leave
11ee08: c3 ret
11ee09: 8d 76 00 lea 0x0(%esi),%esi
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
11ee0c: 03 45 d0 add -0x30(%ebp),%eax
alloc_size += next_block_size;
11ee0f: 8b 7d d0 mov -0x30(%ebp),%edi
11ee12: 01 fa add %edi,%edx
11ee14: 89 55 e0 mov %edx,-0x20(%ebp)
}
if ( new_alloc_size > alloc_size ) {
11ee17: 8b 55 e0 mov -0x20(%ebp),%edx
11ee1a: 39 55 10 cmp %edx,0x10(%ebp)
11ee1d: 76 87 jbe 11eda6 <_Heap_Resize_block+0x82>
return HEAP_RESIZE_UNSATISFIED;
11ee1f: b8 01 00 00 00 mov $0x1,%eax
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
11ee24: 8d 65 f4 lea -0xc(%ebp),%esp
11ee27: 5b pop %ebx
11ee28: 5e pop %esi
11ee29: 5f pop %edi
11ee2a: c9 leave
11ee2b: c3 ret
0011ee2c <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11ee2c: 55 push %ebp
11ee2d: 89 e5 mov %esp,%ebp
11ee2f: 56 push %esi
11ee30: 53 push %ebx
11ee31: 8b 5d 08 mov 0x8(%ebp),%ebx
11ee34: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11ee37: 8d 4e f8 lea -0x8(%esi),%ecx
11ee3a: 89 f0 mov %esi,%eax
11ee3c: 31 d2 xor %edx,%edx
11ee3e: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11ee41: 29 d1 sub %edx,%ecx
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
11ee43: 8b 43 20 mov 0x20(%ebx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11ee46: 39 c1 cmp %eax,%ecx
11ee48: 72 07 jb 11ee51 <_Heap_Size_of_alloc_area+0x25>
11ee4a: 8b 53 24 mov 0x24(%ebx),%edx
11ee4d: 39 d1 cmp %edx,%ecx
11ee4f: 76 07 jbe 11ee58 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
11ee51: 31 c0 xor %eax,%eax
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
11ee53: 5b pop %ebx
11ee54: 5e pop %esi
11ee55: c9 leave
11ee56: c3 ret
11ee57: 90 nop
- 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;
11ee58: 8b 59 04 mov 0x4(%ecx),%ebx
11ee5b: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11ee5e: 01 d9 add %ebx,%ecx
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;
11ee60: 39 c8 cmp %ecx,%eax
11ee62: 77 ed ja 11ee51 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
11ee64: 39 ca cmp %ecx,%edx
11ee66: 72 e9 jb 11ee51 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
11ee68: f6 41 04 01 testb $0x1,0x4(%ecx)
11ee6c: 74 e3 je 11ee51 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
11ee6e: 29 f1 sub %esi,%ecx
11ee70: 8d 51 04 lea 0x4(%ecx),%edx
11ee73: 8b 45 10 mov 0x10(%ebp),%eax
11ee76: 89 10 mov %edx,(%eax)
return true;
11ee78: b0 01 mov $0x1,%al
}
11ee7a: 5b pop %ebx
11ee7b: 5e pop %esi
11ee7c: c9 leave
11ee7d: c3 ret
0010d330 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10d330: 55 push %ebp
10d331: 89 e5 mov %esp,%ebp
10d333: 57 push %edi
10d334: 56 push %esi
10d335: 53 push %ebx
10d336: 83 ec 4c sub $0x4c,%esp
10d339: 8b 5d 08 mov 0x8(%ebp),%ebx
uintptr_t const page_size = heap->page_size;
10d33c: 8b 43 10 mov 0x10(%ebx),%eax
10d33f: 89 45 e0 mov %eax,-0x20(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10d342: 8b 53 14 mov 0x14(%ebx),%edx
10d345: 89 55 d0 mov %edx,-0x30(%ebp)
Heap_Block *const first_block = heap->first_block;
10d348: 8b 43 20 mov 0x20(%ebx),%eax
10d34b: 89 45 dc mov %eax,-0x24(%ebp)
Heap_Block *const last_block = heap->last_block;
10d34e: 8b 53 24 mov 0x24(%ebx),%edx
10d351: 89 55 cc mov %edx,-0x34(%ebp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d354: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10d358: 74 1a je 10d374 <_Heap_Walk+0x44>
10d35a: c7 45 d8 e8 d2 10 00 movl $0x10d2e8,-0x28(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d361: 83 3d 00 9c 12 00 03 cmpl $0x3,0x129c00
10d368: 74 1a je 10d384 <_Heap_Walk+0x54> <== ALWAYS TAKEN
}
block = next_block;
} while ( block != first_block );
return true;
10d36a: b0 01 mov $0x1,%al
}
10d36c: 8d 65 f4 lea -0xc(%ebp),%esp
10d36f: 5b pop %ebx
10d370: 5e pop %esi
10d371: 5f pop %edi
10d372: c9 leave
10d373: c3 ret
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d374: c7 45 d8 e0 d2 10 00 movl $0x10d2e0,-0x28(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d37b: 83 3d 00 9c 12 00 03 cmpl $0x3,0x129c00
10d382: 75 e6 jne 10d36a <_Heap_Walk+0x3a>
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
10d384: 52 push %edx
10d385: ff 73 0c pushl 0xc(%ebx)
10d388: ff 73 08 pushl 0x8(%ebx)
10d38b: ff 75 cc pushl -0x34(%ebp)
10d38e: ff 75 dc pushl -0x24(%ebp)
10d391: ff 73 1c pushl 0x1c(%ebx)
10d394: ff 73 18 pushl 0x18(%ebx)
10d397: ff 75 d0 pushl -0x30(%ebp)
10d39a: ff 75 e0 pushl -0x20(%ebp)
10d39d: 68 74 1d 12 00 push $0x121d74
10d3a2: 6a 00 push $0x0
10d3a4: ff 75 0c pushl 0xc(%ebp)
10d3a7: ff 55 d8 call *-0x28(%ebp)
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10d3aa: 83 c4 30 add $0x30,%esp
10d3ad: 8b 45 e0 mov -0x20(%ebp),%eax
10d3b0: 85 c0 test %eax,%eax
10d3b2: 74 70 je 10d424 <_Heap_Walk+0xf4>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10d3b4: f6 45 e0 03 testb $0x3,-0x20(%ebp)
10d3b8: 75 72 jne 10d42c <_Heap_Walk+0xfc>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d3ba: 8b 45 d0 mov -0x30(%ebp),%eax
10d3bd: 31 d2 xor %edx,%edx
10d3bf: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10d3c2: 85 d2 test %edx,%edx
10d3c4: 75 72 jne 10d438 <_Heap_Walk+0x108>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d3c6: 8b 45 dc mov -0x24(%ebp),%eax
10d3c9: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d3cc: 31 d2 xor %edx,%edx
10d3ce: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if (
10d3d1: 85 d2 test %edx,%edx
10d3d3: 75 6f jne 10d444 <_Heap_Walk+0x114>
block = next_block;
} while ( block != first_block );
return true;
}
10d3d5: 8b 45 dc mov -0x24(%ebp),%eax
10d3d8: 8b 40 04 mov 0x4(%eax),%eax
10d3db: 89 45 e4 mov %eax,-0x1c(%ebp)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10d3de: a8 01 test $0x1,%al
10d3e0: 0f 84 8e 00 00 00 je 10d474 <_Heap_Walk+0x144>
- 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;
10d3e6: 8b 55 cc mov -0x34(%ebp),%edx
10d3e9: 8b 42 04 mov 0x4(%edx),%eax
10d3ec: 83 e0 fe and $0xfffffffe,%eax
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10d3ef: 01 d0 add %edx,%eax
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10d3f1: f6 40 04 01 testb $0x1,0x4(%eax)
10d3f5: 74 25 je 10d41c <_Heap_Walk+0xec>
);
return false;
}
if (
10d3f7: 39 45 dc cmp %eax,-0x24(%ebp)
10d3fa: 74 54 je 10d450 <_Heap_Walk+0x120> <== ALWAYS TAKEN
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10d3fc: 51 push %ecx <== NOT EXECUTED
10d3fd: 68 90 1e 12 00 push $0x121e90 <== NOT EXECUTED
10d402: 66 90 xchg %ax,%ax <== NOT EXECUTED
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10d404: 6a 01 push $0x1
10d406: ff 75 0c pushl 0xc(%ebp)
10d409: ff 55 d8 call *-0x28(%ebp)
10d40c: 83 c4 10 add $0x10,%esp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
10d40f: 31 c0 xor %eax,%eax
block = next_block;
} while ( block != first_block );
return true;
}
10d411: 8d 65 f4 lea -0xc(%ebp),%esp
10d414: 5b pop %ebx
10d415: 5e pop %esi
10d416: 5f pop %edi
10d417: c9 leave
10d418: c3 ret
10d419: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
10d41c: 53 push %ebx
10d41d: 68 2a 1d 12 00 push $0x121d2a
10d422: eb e0 jmp 10d404 <_Heap_Walk+0xd4>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
10d424: 57 push %edi
10d425: 68 f9 1c 12 00 push $0x121cf9
10d42a: eb d8 jmp 10d404 <_Heap_Walk+0xd4>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
10d42c: ff 75 e0 pushl -0x20(%ebp)
10d42f: 68 0c 1d 12 00 push $0x121d0c
10d434: eb ce jmp 10d404 <_Heap_Walk+0xd4>
10d436: 66 90 xchg %ax,%ax
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
10d438: ff 75 d0 pushl -0x30(%ebp)
10d43b: 68 08 1e 12 00 push $0x121e08
10d440: eb c2 jmp 10d404 <_Heap_Walk+0xd4>
10d442: 66 90 xchg %ax,%ax
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10d444: ff 75 dc pushl -0x24(%ebp)
10d447: 68 2c 1e 12 00 push $0x121e2c
10d44c: eb b6 jmp 10d404 <_Heap_Walk+0xd4>
10d44e: 66 90 xchg %ax,%ax
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10d450: 8b 43 10 mov 0x10(%ebx),%eax
10d453: 89 45 c8 mov %eax,-0x38(%ebp)
block = next_block;
} while ( block != first_block );
return true;
}
10d456: 8b 4b 08 mov 0x8(%ebx),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d459: 39 cb cmp %ecx,%ebx
10d45b: 0f 84 a8 00 00 00 je 10d509 <_Heap_Walk+0x1d9>
block = next_block;
} while ( block != first_block );
return true;
}
10d461: 8b 43 20 mov 0x20(%ebx),%eax
10d464: 89 45 d4 mov %eax,-0x2c(%ebp)
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;
10d467: 39 c8 cmp %ecx,%eax
10d469: 76 11 jbe 10d47c <_Heap_Walk+0x14c> <== ALWAYS TAKEN
10d46b: 90 nop
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
10d46c: 51 push %ecx
10d46d: 68 c0 1e 12 00 push $0x121ec0
10d472: eb 90 jmp 10d404 <_Heap_Walk+0xd4>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
10d474: 56 push %esi
10d475: 68 60 1e 12 00 push $0x121e60
10d47a: eb 88 jmp 10d404 <_Heap_Walk+0xd4>
10d47c: 8b 7b 24 mov 0x24(%ebx),%edi
10d47f: 39 cf cmp %ecx,%edi
10d481: 72 e9 jb 10d46c <_Heap_Walk+0x13c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d483: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d486: 31 d2 xor %edx,%edx
10d488: f7 75 c8 divl -0x38(%ebp)
);
return false;
}
if (
10d48b: 85 d2 test %edx,%edx
10d48d: 0f 85 44 02 00 00 jne 10d6d7 <_Heap_Walk+0x3a7> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10d493: 8b 41 04 mov 0x4(%ecx),%eax
10d496: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d499: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10d49e: 0f 85 3e 02 00 00 jne 10d6e2 <_Heap_Walk+0x3b2> <== NEVER TAKEN
10d4a4: 89 da mov %ebx,%edx
10d4a6: 89 ce mov %ecx,%esi
10d4a8: eb 37 jmp 10d4e1 <_Heap_Walk+0x1b1>
10d4aa: 66 90 xchg %ax,%ax
return false;
}
prev_block = free_block;
free_block = free_block->next;
10d4ac: 8b 49 08 mov 0x8(%ecx),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d4af: 39 cb cmp %ecx,%ebx
10d4b1: 74 5c je 10d50f <_Heap_Walk+0x1df>
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;
10d4b3: 39 4d d4 cmp %ecx,-0x2c(%ebp)
10d4b6: 77 b4 ja 10d46c <_Heap_Walk+0x13c>
10d4b8: 39 f9 cmp %edi,%ecx
10d4ba: 77 b0 ja 10d46c <_Heap_Walk+0x13c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d4bc: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d4bf: 31 d2 xor %edx,%edx
10d4c1: f7 75 c8 divl -0x38(%ebp)
);
return false;
}
if (
10d4c4: 85 d2 test %edx,%edx
10d4c6: 0f 85 0b 02 00 00 jne 10d6d7 <_Heap_Walk+0x3a7>
- 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;
10d4cc: 8b 41 04 mov 0x4(%ecx),%eax
10d4cf: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d4d2: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10d4d7: 0f 85 05 02 00 00 jne 10d6e2 <_Heap_Walk+0x3b2>
10d4dd: 89 f2 mov %esi,%edx
10d4df: 89 ce mov %ecx,%esi
);
return false;
}
if ( free_block->prev != prev_block ) {
10d4e1: 8b 41 0c mov 0xc(%ecx),%eax
10d4e4: 39 d0 cmp %edx,%eax
10d4e6: 74 c4 je 10d4ac <_Heap_Walk+0x17c>
(*printer)(
10d4e8: 83 ec 0c sub $0xc,%esp
10d4eb: 50 push %eax
10d4ec: 51 push %ecx
10d4ed: 68 10 1f 12 00 push $0x121f10
10d4f2: 66 90 xchg %ax,%ax
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10d4f4: 6a 01 push $0x1
10d4f6: ff 75 0c pushl 0xc(%ebp)
10d4f9: ff 55 d8 call *-0x28(%ebp)
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
10d4fc: 83 c4 20 add $0x20,%esp
10d4ff: 31 c0 xor %eax,%eax
block = next_block;
} while ( block != first_block );
return true;
}
10d501: 8d 65 f4 lea -0xc(%ebp),%esp
10d504: 5b pop %ebx
10d505: 5e pop %esi
10d506: 5f pop %edi
10d507: c9 leave
10d508: c3 ret
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d509: 8b 53 20 mov 0x20(%ebx),%edx
10d50c: 89 55 d4 mov %edx,-0x2c(%ebp)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d50f: 8b 7d dc mov -0x24(%ebp),%edi
10d512: 8b 45 d4 mov -0x2c(%ebp),%eax
10d515: 8d 76 00 lea 0x0(%esi),%esi
10d518: 8b 4d e4 mov -0x1c(%ebp),%ecx
10d51b: 83 e1 fe and $0xfffffffe,%ecx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10d51e: 8d 34 39 lea (%ecx,%edi,1),%esi
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;
10d521: 39 f0 cmp %esi,%eax
10d523: 76 0f jbe 10d534 <_Heap_Walk+0x204> <== ALWAYS TAKEN
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10d525: 83 ec 0c sub $0xc,%esp
10d528: 56 push %esi
10d529: 57 push %edi
10d52a: 68 44 1f 12 00 push $0x121f44
10d52f: eb c3 jmp 10d4f4 <_Heap_Walk+0x1c4>
10d531: 8d 76 00 lea 0x0(%esi),%esi
10d534: 39 73 24 cmp %esi,0x24(%ebx)
10d537: 72 ec jb 10d525 <_Heap_Walk+0x1f5>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
10d539: 3b 7d cc cmp -0x34(%ebp),%edi
10d53c: 0f 95 45 d4 setne -0x2c(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d540: 89 c8 mov %ecx,%eax
10d542: 31 d2 xor %edx,%edx
10d544: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10d547: 85 d2 test %edx,%edx
10d549: 74 0a je 10d555 <_Heap_Walk+0x225>
10d54b: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d54f: 0f 85 52 01 00 00 jne 10d6a7 <_Heap_Walk+0x377>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10d555: 39 4d d0 cmp %ecx,-0x30(%ebp)
10d558: 76 0a jbe 10d564 <_Heap_Walk+0x234>
10d55a: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d55e: 0f 85 52 01 00 00 jne 10d6b6 <_Heap_Walk+0x386> <== ALWAYS TAKEN
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10d564: 39 f7 cmp %esi,%edi
10d566: 72 0a jb 10d572 <_Heap_Walk+0x242>
10d568: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d56c: 0f 85 56 01 00 00 jne 10d6c8 <_Heap_Walk+0x398>
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;
10d572: 8b 55 e4 mov -0x1c(%ebp),%edx
10d575: 83 e2 01 and $0x1,%edx
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10d578: f6 46 04 01 testb $0x1,0x4(%esi)
10d57c: 74 4e je 10d5cc <_Heap_Walk+0x29c>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10d57e: 85 d2 test %edx,%edx
10d580: 74 2e je 10d5b0 <_Heap_Walk+0x280>
(*printer)(
10d582: 83 ec 0c sub $0xc,%esp
10d585: 51 push %ecx
10d586: 57 push %edi
10d587: 68 5b 1d 12 00 push $0x121d5b
10d58c: 6a 00 push $0x0
10d58e: ff 75 0c pushl 0xc(%ebp)
10d591: ff 55 d8 call *-0x28(%ebp)
10d594: 83 c4 20 add $0x20,%esp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10d597: 39 75 dc cmp %esi,-0x24(%ebp)
10d59a: 0f 84 ca fd ff ff je 10d36a <_Heap_Walk+0x3a>
10d5a0: 8b 56 04 mov 0x4(%esi),%edx
10d5a3: 89 55 e4 mov %edx,-0x1c(%ebp)
10d5a6: 8b 43 20 mov 0x20(%ebx),%eax
10d5a9: 89 f7 mov %esi,%edi
10d5ab: e9 68 ff ff ff jmp 10d518 <_Heap_Walk+0x1e8>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10d5b0: 83 ec 08 sub $0x8,%esp
10d5b3: ff 37 pushl (%edi)
10d5b5: 51 push %ecx
10d5b6: 57 push %edi
10d5b7: 68 a8 20 12 00 push $0x1220a8
10d5bc: 6a 00 push $0x0
10d5be: ff 75 0c pushl 0xc(%ebp)
10d5c1: ff 55 d8 call *-0x28(%ebp)
10d5c4: 83 c4 20 add $0x20,%esp
10d5c7: eb ce jmp 10d597 <_Heap_Walk+0x267>
10d5c9: 8d 76 00 lea 0x0(%esi),%esi
block = next_block;
} while ( block != first_block );
return true;
}
10d5cc: 8b 43 08 mov 0x8(%ebx),%eax
10d5cf: 89 45 b4 mov %eax,-0x4c(%ebp)
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10d5d2: 8b 47 08 mov 0x8(%edi),%eax
10d5d5: 89 45 e4 mov %eax,-0x1c(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d5d8: 39 43 0c cmp %eax,0xc(%ebx)
10d5db: 0f 84 97 00 00 00 je 10d678 <_Heap_Walk+0x348>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10d5e1: 39 c3 cmp %eax,%ebx
10d5e3: 0f 84 9b 00 00 00 je 10d684 <_Heap_Walk+0x354>
10d5e9: c7 45 c8 e9 1b 12 00 movl $0x121be9,-0x38(%ebp)
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
10d5f0: 8b 47 0c mov 0xc(%edi),%eax
10d5f3: 89 45 d4 mov %eax,-0x2c(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d5f6: 39 45 b4 cmp %eax,-0x4c(%ebp)
10d5f9: 74 75 je 10d670 <_Heap_Walk+0x340>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d5fb: 39 c3 cmp %eax,%ebx
10d5fd: 0f 84 8d 00 00 00 je 10d690 <_Heap_Walk+0x360>
10d603: b8 e9 1b 12 00 mov $0x121be9,%eax
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d608: 83 ec 0c sub $0xc,%esp
10d60b: ff 75 c8 pushl -0x38(%ebp)
10d60e: ff 75 e4 pushl -0x1c(%ebp)
10d611: 50 push %eax
10d612: ff 75 d4 pushl -0x2c(%ebp)
10d615: 51 push %ecx
10d616: 57 push %edi
10d617: 68 04 20 12 00 push $0x122004
10d61c: 6a 00 push $0x0
10d61e: ff 75 0c pushl 0xc(%ebp)
10d621: 89 55 c4 mov %edx,-0x3c(%ebp)
10d624: 89 4d c0 mov %ecx,-0x40(%ebp)
10d627: ff 55 d8 call *-0x28(%ebp)
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10d62a: 8b 06 mov (%esi),%eax
10d62c: 83 c4 30 add $0x30,%esp
10d62f: 8b 4d c0 mov -0x40(%ebp),%ecx
10d632: 39 c1 cmp %eax,%ecx
10d634: 8b 55 c4 mov -0x3c(%ebp),%edx
10d637: 75 27 jne 10d660 <_Heap_Walk+0x330>
);
return false;
}
if ( !prev_used ) {
10d639: 85 d2 test %edx,%edx
10d63b: 74 5f je 10d69c <_Heap_Walk+0x36c>
block = next_block;
} while ( block != first_block );
return true;
}
10d63d: 8b 43 08 mov 0x8(%ebx),%eax
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
10d640: 39 c3 cmp %eax,%ebx
10d642: 74 0f je 10d653 <_Heap_Walk+0x323> <== NEVER TAKEN
if ( free_block == block ) {
10d644: 39 c7 cmp %eax,%edi
10d646: 0f 84 4b ff ff ff je 10d597 <_Heap_Walk+0x267>
return true;
}
free_block = free_block->next;
10d64c: 8b 40 08 mov 0x8(%eax),%eax
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
10d64f: 39 c3 cmp %eax,%ebx
10d651: 75 f1 jne 10d644 <_Heap_Walk+0x314>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10d653: 57 push %edi
10d654: 68 d0 20 12 00 push $0x1220d0
10d659: e9 a6 fd ff ff jmp 10d404 <_Heap_Walk+0xd4>
10d65e: 66 90 xchg %ax,%ax
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
10d660: 52 push %edx
10d661: 56 push %esi
10d662: 50 push %eax
10d663: 51 push %ecx
10d664: 57 push %edi
10d665: 68 3c 20 12 00 push $0x12203c
10d66a: e9 85 fe ff ff jmp 10d4f4 <_Heap_Walk+0x1c4>
10d66f: 90 nop
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d670: b8 df 1c 12 00 mov $0x121cdf,%eax
10d675: eb 91 jmp 10d608 <_Heap_Walk+0x2d8>
10d677: 90 nop
10d678: c7 45 c8 c6 1c 12 00 movl $0x121cc6,-0x38(%ebp)
10d67f: e9 6c ff ff ff jmp 10d5f0 <_Heap_Walk+0x2c0>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10d684: c7 45 c8 d5 1c 12 00 movl $0x121cd5,-0x38(%ebp)
10d68b: e9 60 ff ff ff jmp 10d5f0 <_Heap_Walk+0x2c0>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d690: b8 ef 1c 12 00 mov $0x121cef,%eax
10d695: e9 6e ff ff ff jmp 10d608 <_Heap_Walk+0x2d8>
10d69a: 66 90 xchg %ax,%ax
return false;
}
if ( !prev_used ) {
(*printer)(
10d69c: 57 push %edi
10d69d: 68 78 20 12 00 push $0x122078
10d6a2: e9 5d fd ff ff jmp 10d404 <_Heap_Walk+0xd4>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
10d6a7: 83 ec 0c sub $0xc,%esp
10d6aa: 51 push %ecx
10d6ab: 57 push %edi
10d6ac: 68 74 1f 12 00 push $0x121f74
10d6b1: e9 3e fe ff ff jmp 10d4f4 <_Heap_Walk+0x1c4>
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
10d6b6: 83 ec 08 sub $0x8,%esp
10d6b9: ff 75 d0 pushl -0x30(%ebp)
10d6bc: 51 push %ecx
10d6bd: 57 push %edi
10d6be: 68 a4 1f 12 00 push $0x121fa4
10d6c3: e9 2c fe ff ff jmp 10d4f4 <_Heap_Walk+0x1c4>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
10d6c8: 83 ec 0c sub $0xc,%esp
10d6cb: 56 push %esi
10d6cc: 57 push %edi
10d6cd: 68 d0 1f 12 00 push $0x121fd0
10d6d2: e9 1d fe ff ff jmp 10d4f4 <_Heap_Walk+0x1c4>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10d6d7: 51 push %ecx
10d6d8: 68 e0 1e 12 00 push $0x121ee0
10d6dd: e9 22 fd ff ff jmp 10d404 <_Heap_Walk+0xd4>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
10d6e2: 51 push %ecx
10d6e3: 68 3f 1d 12 00 push $0x121d3f
10d6e8: e9 17 fd ff ff jmp 10d404 <_Heap_Walk+0xd4>
0010bdac <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10bdac: 55 push %ebp
10bdad: 89 e5 mov %esp,%ebp
10bdaf: 53 push %ebx
10bdb0: 83 ec 04 sub $0x4,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10bdb3: 8b 0d 00 80 12 00 mov 0x128000,%ecx
10bdb9: 85 c9 test %ecx,%ecx
10bdbb: 74 1a je 10bdd7 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN
10bdbd: 31 db xor %ebx,%ebx
10bdbf: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10bdc0: 52 push %edx
10bdc1: 6a 00 push $0x0
10bdc3: 6a 00 push $0x0
10bdc5: 53 push %ebx
10bdc6: e8 49 52 00 00 call 111014 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10bdcb: 43 inc %ebx
10bdcc: 83 c4 10 add $0x10,%esp
10bdcf: 39 1d 00 80 12 00 cmp %ebx,0x128000
10bdd5: 77 e9 ja 10bdc0 <_IO_Initialize_all_drivers+0x14>
(void) rtems_io_initialize( major, 0, NULL );
}
10bdd7: 8b 5d fc mov -0x4(%ebp),%ebx
10bdda: c9 leave
10bddb: c3 ret
0010bd14 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
10bd14: 55 push %ebp
10bd15: 89 e5 mov %esp,%ebp
10bd17: 57 push %edi
10bd18: 56 push %esi
10bd19: 53 push %ebx
10bd1a: 83 ec 1c sub $0x1c,%esp
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;
10bd1d: 8b 1d b8 32 12 00 mov 0x1232b8,%ebx
drivers_in_table = Configuration.number_of_device_drivers;
10bd23: a1 b4 32 12 00 mov 0x1232b4,%eax
10bd28: 89 45 e4 mov %eax,-0x1c(%ebp)
number_of_drivers = Configuration.maximum_drivers;
10bd2b: 8b 35 b0 32 12 00 mov 0x1232b0,%esi
/*
* 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 )
10bd31: 39 f0 cmp %esi,%eax
10bd33: 73 5f jae 10bd94 <_IO_Manager_initialization+0x80>
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
10bd35: 8d 0c 76 lea (%esi,%esi,2),%ecx
10bd38: c1 e1 03 shl $0x3,%ecx
10bd3b: 83 ec 0c sub $0xc,%esp
10bd3e: 51 push %ecx
10bd3f: 89 4d dc mov %ecx,-0x24(%ebp)
10bd42: e8 4d 2c 00 00 call 10e994 <_Workspace_Allocate_or_fatal_error>
10bd47: 89 c2 mov %eax,%edx
/*
* 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 *)
10bd49: a3 04 80 12 00 mov %eax,0x128004
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10bd4e: 89 35 00 80 12 00 mov %esi,0x128000
memset(
10bd54: 31 c0 xor %eax,%eax
10bd56: 8b 4d dc mov -0x24(%ebp),%ecx
10bd59: 89 d7 mov %edx,%edi
10bd5b: f3 aa rep stos %al,%es:(%edi)
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10bd5d: 83 c4 10 add $0x10,%esp
10bd60: 8b 45 e4 mov -0x1c(%ebp),%eax
10bd63: 85 c0 test %eax,%eax
10bd65: 74 25 je 10bd8c <_IO_Manager_initialization+0x78><== NEVER TAKEN
10bd67: a1 04 80 12 00 mov 0x128004,%eax
10bd6c: 89 45 e0 mov %eax,-0x20(%ebp)
10bd6f: 31 c0 xor %eax,%eax
10bd71: 31 d2 xor %edx,%edx
10bd73: 90 nop
_IO_Driver_address_table[index] = driver_table[index];
10bd74: 8b 7d e0 mov -0x20(%ebp),%edi
10bd77: 01 c7 add %eax,%edi
10bd79: 8d 34 03 lea (%ebx,%eax,1),%esi
10bd7c: b9 06 00 00 00 mov $0x6,%ecx
10bd81: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10bd83: 42 inc %edx
10bd84: 83 c0 18 add $0x18,%eax
10bd87: 39 55 e4 cmp %edx,-0x1c(%ebp)
10bd8a: 77 e8 ja 10bd74 <_IO_Manager_initialization+0x60>
_IO_Driver_address_table[index] = driver_table[index];
}
10bd8c: 8d 65 f4 lea -0xc(%ebp),%esp
10bd8f: 5b pop %ebx
10bd90: 5e pop %esi
10bd91: 5f pop %edi
10bd92: c9 leave
10bd93: c3 ret
* 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;
10bd94: 89 1d 04 80 12 00 mov %ebx,0x128004
_IO_Number_of_drivers = number_of_drivers;
10bd9a: 8b 45 e4 mov -0x1c(%ebp),%eax
10bd9d: a3 00 80 12 00 mov %eax,0x128000
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
10bda2: 8d 65 f4 lea -0xc(%ebp),%esp
10bda5: 5b pop %ebx
10bda6: 5e pop %esi
10bda7: 5f pop %edi
10bda8: c9 leave
10bda9: c3 ret
0010c900 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10c900: 55 push %ebp
10c901: 89 e5 mov %esp,%ebp
10c903: 53 push %ebx
10c904: 83 ec 08 sub $0x8,%esp
10c907: 8b 45 08 mov 0x8(%ebp),%eax
10c90a: 8b 55 0c mov 0xc(%ebp),%edx
10c90d: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10c910: a3 30 76 12 00 mov %eax,0x127630
_Internal_errors_What_happened.is_internal = is_internal;
10c915: 88 15 34 76 12 00 mov %dl,0x127634
_Internal_errors_What_happened.the_error = the_error;
10c91b: 89 1d 38 76 12 00 mov %ebx,0x127638
_User_extensions_Fatal( the_source, is_internal, the_error );
10c921: 53 push %ebx
10c922: 0f b6 d2 movzbl %dl,%edx
10c925: 52 push %edx
10c926: 50 push %eax
10c927: e8 70 1c 00 00 call 10e59c <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10c92c: c7 05 20 77 12 00 05 movl $0x5,0x127720 <== NOT EXECUTED
10c933: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10c936: fa cli <== NOT EXECUTED
10c937: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10c939: f4 hlt <== NOT EXECUTED
10c93a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c93d: eb fe jmp 10c93d <_Internal_error_Occurred+0x3d><== NOT EXECUTED
001115f4 <_Objects_API_maximum_class>:
#include <rtems/score/object.h>
unsigned int _Objects_API_maximum_class(
uint32_t api
)
{
1115f4: 55 push %ebp
1115f5: 89 e5 mov %esp,%ebp
1115f7: 8b 45 08 mov 0x8(%ebp),%eax
1115fa: 48 dec %eax
1115fb: 83 f8 02 cmp $0x2,%eax
1115fe: 77 0c ja 11160c <_Objects_API_maximum_class+0x18>
111600: 8b 04 85 a0 13 12 00 mov 0x1213a0(,%eax,4),%eax
case OBJECTS_NO_API:
default:
break;
}
return 0;
}
111607: c9 leave
111608: c3 ret
111609: 8d 76 00 lea 0x0(%esi),%esi
#include <rtems/score/object.h>
unsigned int _Objects_API_maximum_class(
uint32_t api
)
{
11160c: 31 c0 xor %eax,%eax
case OBJECTS_NO_API:
default:
break;
}
return 0;
}
11160e: c9 leave
11160f: c3 ret
0010c990 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10c990: 55 push %ebp
10c991: 89 e5 mov %esp,%ebp
10c993: 56 push %esi
10c994: 53 push %ebx
10c995: 8b 5d 08 mov 0x8(%ebp),%ebx
* 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 )
10c998: 8b 43 18 mov 0x18(%ebx),%eax
10c99b: 85 c0 test %eax,%eax
10c99d: 75 0d jne 10c9ac <_Objects_Allocate+0x1c><== ALWAYS TAKEN
return NULL;
10c99f: 31 c9 xor %ecx,%ecx
);
}
#endif
return the_object;
}
10c9a1: 89 c8 mov %ecx,%eax
10c9a3: 8d 65 f8 lea -0x8(%ebp),%esp
10c9a6: 5b pop %ebx
10c9a7: 5e pop %esi
10c9a8: c9 leave
10c9a9: c3 ret
10c9aa: 66 90 xchg %ax,%ax
/*
* 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 );
10c9ac: 8d 73 20 lea 0x20(%ebx),%esi
10c9af: 83 ec 0c sub $0xc,%esp
10c9b2: 56 push %esi
10c9b3: e8 60 f6 ff ff call 10c018 <_Chain_Get>
10c9b8: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10c9ba: 83 c4 10 add $0x10,%esp
10c9bd: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10c9c1: 74 de je 10c9a1 <_Objects_Allocate+0x11>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10c9c3: 85 c0 test %eax,%eax
10c9c5: 74 29 je 10c9f0 <_Objects_Allocate+0x60>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10c9c7: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10c9cb: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10c9cf: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10c9d1: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10c9d5: 31 d2 xor %edx,%edx
10c9d7: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10c9d9: c1 e0 02 shl $0x2,%eax
10c9dc: 03 43 30 add 0x30(%ebx),%eax
10c9df: ff 08 decl (%eax)
information->inactive--;
10c9e1: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10c9e5: 89 c8 mov %ecx,%eax
10c9e7: 8d 65 f8 lea -0x8(%ebp),%esp
10c9ea: 5b pop %ebx
10c9eb: 5e pop %esi
10c9ec: c9 leave
10c9ed: c3 ret
10c9ee: 66 90 xchg %ax,%ax
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10c9f0: 83 ec 0c sub $0xc,%esp
10c9f3: 53 push %ebx
10c9f4: e8 3b 00 00 00 call 10ca34 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10c9f9: 89 34 24 mov %esi,(%esp)
10c9fc: e8 17 f6 ff ff call 10c018 <_Chain_Get>
10ca01: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10ca03: 83 c4 10 add $0x10,%esp
10ca06: 85 c0 test %eax,%eax
10ca08: 74 97 je 10c9a1 <_Objects_Allocate+0x11>
10ca0a: eb bb jmp 10c9c7 <_Objects_Allocate+0x37>
0010ca34 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10ca34: 55 push %ebp
10ca35: 89 e5 mov %esp,%ebp
10ca37: 57 push %edi
10ca38: 56 push %esi
10ca39: 53 push %ebx
10ca3a: 83 ec 4c sub $0x4c,%esp
10ca3d: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10ca40: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10ca44: 89 45 cc mov %eax,-0x34(%ebp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10ca47: 8b 4b 34 mov 0x34(%ebx),%ecx
10ca4a: 85 c9 test %ecx,%ecx
10ca4c: 0f 84 66 02 00 00 je 10ccb8 <_Objects_Extend_information+0x284>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10ca52: 8b 73 10 mov 0x10(%ebx),%esi
10ca55: 66 89 75 d0 mov %si,-0x30(%ebp)
10ca59: 8b 7b 14 mov 0x14(%ebx),%edi
10ca5c: 89 f0 mov %esi,%eax
10ca5e: 31 d2 xor %edx,%edx
10ca60: 66 f7 f7 div %di
10ca63: 0f b7 f0 movzwl %ax,%esi
for ( ; block < block_count; block++ ) {
10ca66: 85 f6 test %esi,%esi
10ca68: 0f 84 63 02 00 00 je 10ccd1 <_Objects_Extend_information+0x29d><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL ) {
10ca6e: 8b 01 mov (%ecx),%eax
10ca70: 85 c0 test %eax,%eax
10ca72: 0f 84 6b 02 00 00 je 10cce3 <_Objects_Extend_information+0x2af><== NEVER TAKEN
10ca78: 0f b7 ff movzwl %di,%edi
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10ca7b: 8b 55 cc mov -0x34(%ebp),%edx
10ca7e: 89 55 d4 mov %edx,-0x2c(%ebp)
index_base = minimum_index;
block = 0;
10ca81: 31 d2 xor %edx,%edx
10ca83: 8b 45 d4 mov -0x2c(%ebp),%eax
10ca86: eb 0a jmp 10ca92 <_Objects_Extend_information+0x5e>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
10ca88: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4)
10ca8c: 0f 84 c6 01 00 00 je 10cc58 <_Objects_Extend_information+0x224>
do_extend = false;
break;
} else
index_base += information->allocation_size;
10ca92: 01 f8 add %edi,%eax
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10ca94: 42 inc %edx
10ca95: 39 d6 cmp %edx,%esi
10ca97: 77 ef ja 10ca88 <_Objects_Extend_information+0x54>
10ca99: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10ca9c: b1 01 mov $0x1,%cl
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10ca9e: 0f b7 45 d0 movzwl -0x30(%ebp),%eax
10caa2: 01 f8 add %edi,%eax
10caa4: 89 45 d0 mov %eax,-0x30(%ebp)
/*
* 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 ) {
10caa7: 3d ff ff 00 00 cmp $0xffff,%eax
10caac: 0f 87 9e 01 00 00 ja 10cc50 <_Objects_Extend_information+0x21c><== NEVER TAKEN
/*
* 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;
10cab2: 0f af 7b 18 imul 0x18(%ebx),%edi
if ( information->auto_extend ) {
10cab6: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10caba: 0f 84 a4 01 00 00 je 10cc64 <_Objects_Extend_information+0x230>
new_object_block = _Workspace_Allocate( block_size );
10cac0: 83 ec 0c sub $0xc,%esp
10cac3: 57 push %edi
10cac4: 89 55 b8 mov %edx,-0x48(%ebp)
10cac7: 88 4d b4 mov %cl,-0x4c(%ebp)
10caca: e8 91 1e 00 00 call 10e960 <_Workspace_Allocate>
10cacf: 89 45 c8 mov %eax,-0x38(%ebp)
if ( !new_object_block )
10cad2: 83 c4 10 add $0x10,%esp
10cad5: 85 c0 test %eax,%eax
10cad7: 8b 55 b8 mov -0x48(%ebp),%edx
10cada: 8a 4d b4 mov -0x4c(%ebp),%cl
10cadd: 0f 84 6d 01 00 00 je 10cc50 <_Objects_Extend_information+0x21c>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
10cae3: 84 c9 test %cl,%cl
10cae5: 0f 84 ea 00 00 00 je 10cbd5 <_Objects_Extend_information+0x1a1>
*/
/*
* Up the block count and maximum
*/
block_count++;
10caeb: 8d 7e 01 lea 0x1(%esi),%edi
* 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 );
10caee: 83 ec 0c sub $0xc,%esp
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10caf1: 8d 04 7f lea (%edi,%edi,2),%eax
((maximum + minimum_index) * sizeof(Objects_Control *));
10caf4: 03 45 d0 add -0x30(%ebp),%eax
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10caf7: 03 45 cc add -0x34(%ebp),%eax
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
10cafa: c1 e0 02 shl $0x2,%eax
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10cafd: 50 push %eax
10cafe: 89 55 b8 mov %edx,-0x48(%ebp)
10cb01: e8 5a 1e 00 00 call 10e960 <_Workspace_Allocate>
10cb06: 89 45 c4 mov %eax,-0x3c(%ebp)
if ( !object_blocks ) {
10cb09: 83 c4 10 add $0x10,%esp
10cb0c: 85 c0 test %eax,%eax
10cb0e: 8b 55 b8 mov -0x48(%ebp),%edx
10cb11: 0f 84 de 01 00 00 je 10ccf5 <_Objects_Extend_information+0x2c1>
10cb17: 8b 45 c4 mov -0x3c(%ebp),%eax
10cb1a: 8d 04 b8 lea (%eax,%edi,4),%eax
10cb1d: 89 45 bc mov %eax,-0x44(%ebp)
10cb20: 8b 4d c4 mov -0x3c(%ebp),%ecx
10cb23: 8d 04 f9 lea (%ecx,%edi,8),%eax
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10cb26: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10cb2a: 39 4d cc cmp %ecx,-0x34(%ebp)
10cb2d: 0f 82 51 01 00 00 jb 10cc84 <_Objects_Extend_information+0x250>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10cb33: 8b 4d cc mov -0x34(%ebp),%ecx
10cb36: 85 c9 test %ecx,%ecx
10cb38: 74 12 je 10cb4c <_Objects_Extend_information+0x118><== NEVER TAKEN
10cb3a: 31 c9 xor %ecx,%ecx
10cb3c: 8b 7d cc mov -0x34(%ebp),%edi
10cb3f: 90 nop
local_table[ index ] = NULL;
10cb40: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10cb47: 41 inc %ecx
10cb48: 39 cf cmp %ecx,%edi
10cb4a: 77 f4 ja 10cb40 <_Objects_Extend_information+0x10c><== NEVER TAKEN
10cb4c: c1 e6 02 shl $0x2,%esi
10cb4f: 89 75 c0 mov %esi,-0x40(%ebp)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10cb52: 8b 4d c4 mov -0x3c(%ebp),%ecx
10cb55: 8b 75 c0 mov -0x40(%ebp),%esi
10cb58: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1)
inactive_per_block[block_count] = 0;
10cb5f: 8b 4d bc mov -0x44(%ebp),%ecx
10cb62: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10cb69: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10cb6d: 03 75 d4 add -0x2c(%ebp),%esi
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10cb70: 39 75 d4 cmp %esi,-0x2c(%ebp)
10cb73: 73 0f jae 10cb84 <_Objects_Extend_information+0x150><== NEVER TAKEN
10cb75: 8b 4d d4 mov -0x2c(%ebp),%ecx
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10cb78: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
10cb7f: 41 inc %ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10cb80: 39 f1 cmp %esi,%ecx
10cb82: 72 f4 jb 10cb78 <_Objects_Extend_information+0x144>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10cb84: 9c pushf
10cb85: fa cli
10cb86: 5f pop %edi
old_tables = information->object_blocks;
10cb87: 8b 4b 34 mov 0x34(%ebx),%ecx
information->object_blocks = object_blocks;
10cb8a: 8b 75 c4 mov -0x3c(%ebp),%esi
10cb8d: 89 73 34 mov %esi,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10cb90: 8b 75 bc mov -0x44(%ebp),%esi
10cb93: 89 73 30 mov %esi,0x30(%ebx)
information->local_table = local_table;
10cb96: 89 43 1c mov %eax,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10cb99: 8b 45 d0 mov -0x30(%ebp),%eax
10cb9c: 66 89 43 10 mov %ax,0x10(%ebx)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cba0: 8b 33 mov (%ebx),%esi
10cba2: c1 e6 18 shl $0x18,%esi
10cba5: 81 ce 00 00 01 00 or $0x10000,%esi
information->maximum_id = _Objects_Build_id(
10cbab: 0f b7 43 04 movzwl 0x4(%ebx),%eax
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cbaf: c1 e0 1b shl $0x1b,%eax
10cbb2: 09 c6 or %eax,%esi
10cbb4: 0f b7 45 d0 movzwl -0x30(%ebp),%eax
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cbb8: 09 c6 or %eax,%esi
10cbba: 89 73 0c mov %esi,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10cbbd: 57 push %edi
10cbbe: 9d popf
if ( old_tables )
10cbbf: 85 c9 test %ecx,%ecx
10cbc1: 74 12 je 10cbd5 <_Objects_Extend_information+0x1a1>
_Workspace_Free( old_tables );
10cbc3: 83 ec 0c sub $0xc,%esp
10cbc6: 51 push %ecx
10cbc7: 89 55 b8 mov %edx,-0x48(%ebp)
10cbca: e8 ad 1d 00 00 call 10e97c <_Workspace_Free>
10cbcf: 83 c4 10 add $0x10,%esp
10cbd2: 8b 55 b8 mov -0x48(%ebp),%edx
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10cbd5: c1 e2 02 shl $0x2,%edx
10cbd8: 89 55 d0 mov %edx,-0x30(%ebp)
10cbdb: 8b 43 34 mov 0x34(%ebx),%eax
10cbde: 8b 4d c8 mov -0x38(%ebp),%ecx
10cbe1: 89 0c 10 mov %ecx,(%eax,%edx,1)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10cbe4: ff 73 18 pushl 0x18(%ebx)
10cbe7: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10cbeb: 50 push %eax
10cbec: 51 push %ecx
10cbed: 8d 7d dc lea -0x24(%ebp),%edi
10cbf0: 57 push %edi
10cbf1: e8 5e 44 00 00 call 111054 <_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 ) {
10cbf6: 83 c4 10 add $0x10,%esp
10cbf9: 8b 75 d4 mov -0x2c(%ebp),%esi
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cbfc: 8d 43 20 lea 0x20(%ebx),%eax
10cbff: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cc02: eb 29 jmp 10cc2d <_Objects_Extend_information+0x1f9>
10cc04: 8b 13 mov (%ebx),%edx
10cc06: c1 e2 18 shl $0x18,%edx
10cc09: 81 ca 00 00 01 00 or $0x10000,%edx
the_object->id = _Objects_Build_id(
10cc0f: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cc13: c1 e1 1b shl $0x1b,%ecx
10cc16: 09 ca or %ecx,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cc18: 09 f2 or %esi,%edx
10cc1a: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cc1d: 83 ec 08 sub $0x8,%esp
10cc20: 50 push %eax
10cc21: ff 75 d4 pushl -0x2c(%ebp)
10cc24: e8 b3 f3 ff ff call 10bfdc <_Chain_Append>
index++;
10cc29: 46 inc %esi
10cc2a: 83 c4 10 add $0x10,%esp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cc2d: 83 ec 0c sub $0xc,%esp
10cc30: 57 push %edi
10cc31: e8 e2 f3 ff ff call 10c018 <_Chain_Get>
10cc36: 83 c4 10 add $0x10,%esp
10cc39: 85 c0 test %eax,%eax
10cc3b: 75 c7 jne 10cc04 <_Objects_Extend_information+0x1d0>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10cc3d: 8b 43 14 mov 0x14(%ebx),%eax
10cc40: 8b 53 30 mov 0x30(%ebx),%edx
10cc43: 0f b7 c8 movzwl %ax,%ecx
10cc46: 8b 75 d0 mov -0x30(%ebp),%esi
10cc49: 89 0c 32 mov %ecx,(%edx,%esi,1)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
10cc4c: 66 01 43 2c add %ax,0x2c(%ebx)
}
10cc50: 8d 65 f4 lea -0xc(%ebp),%esp
10cc53: 5b pop %ebx
10cc54: 5e pop %esi
10cc55: 5f pop %edi
10cc56: c9 leave
10cc57: c3 ret
10cc58: 89 45 d4 mov %eax,-0x2c(%ebp)
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10cc5b: 31 c9 xor %ecx,%ecx
10cc5d: e9 3c fe ff ff jmp 10ca9e <_Objects_Extend_information+0x6a>
10cc62: 66 90 xchg %ax,%ax
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 );
10cc64: 83 ec 0c sub $0xc,%esp
10cc67: 57 push %edi
10cc68: 89 55 b8 mov %edx,-0x48(%ebp)
10cc6b: 88 4d b4 mov %cl,-0x4c(%ebp)
10cc6e: e8 21 1d 00 00 call 10e994 <_Workspace_Allocate_or_fatal_error>
10cc73: 89 45 c8 mov %eax,-0x38(%ebp)
10cc76: 83 c4 10 add $0x10,%esp
10cc79: 8a 4d b4 mov -0x4c(%ebp),%cl
10cc7c: 8b 55 b8 mov -0x48(%ebp),%edx
10cc7f: e9 5f fe ff ff jmp 10cae3 <_Objects_Extend_information+0xaf>
/*
* 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,
10cc84: c1 e6 02 shl $0x2,%esi
10cc87: 89 75 c0 mov %esi,-0x40(%ebp)
10cc8a: 8b 73 34 mov 0x34(%ebx),%esi
10cc8d: 8b 7d c4 mov -0x3c(%ebp),%edi
10cc90: 8b 4d c0 mov -0x40(%ebp),%ecx
10cc93: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10cc95: 8b 73 30 mov 0x30(%ebx),%esi
10cc98: 8b 7d bc mov -0x44(%ebp),%edi
10cc9b: 8b 4d c0 mov -0x40(%ebp),%ecx
10cc9e: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
10cca0: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10cca4: 03 4d cc add -0x34(%ebp),%ecx
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10cca7: c1 e1 02 shl $0x2,%ecx
10ccaa: 8b 73 1c mov 0x1c(%ebx),%esi
10ccad: 89 c7 mov %eax,%edi
10ccaf: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10ccb1: e9 9c fe ff ff jmp 10cb52 <_Objects_Extend_information+0x11e>
10ccb6: 66 90 xchg %ax,%ax
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10ccb8: 8b 53 10 mov 0x10(%ebx),%edx
10ccbb: 66 89 55 d0 mov %dx,-0x30(%ebp)
10ccbf: 0f b7 7b 14 movzwl 0x14(%ebx),%edi
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10ccc3: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10ccc6: b1 01 mov $0x1,%cl
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10ccc8: 31 d2 xor %edx,%edx
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
10ccca: 31 f6 xor %esi,%esi
10cccc: e9 cd fd ff ff jmp 10ca9e <_Objects_Extend_information+0x6a>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10ccd1: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10ccd4: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
10ccd7: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10ccda: b1 01 mov $0x1,%cl <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10ccdc: 31 d2 xor %edx,%edx <== NOT EXECUTED
10ccde: e9 bb fd ff ff jmp 10ca9e <_Objects_Extend_information+0x6a><== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
10cce3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cce6: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
10cce9: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10ccec: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10ccee: 31 d2 xor %edx,%edx <== NOT EXECUTED
10ccf0: e9 a9 fd ff ff jmp 10ca9e <_Objects_Extend_information+0x6a><== 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 );
10ccf5: 83 ec 0c sub $0xc,%esp
10ccf8: ff 75 c8 pushl -0x38(%ebp)
10ccfb: e8 7c 1c 00 00 call 10e97c <_Workspace_Free>
return;
10cd00: 83 c4 10 add $0x10,%esp
10cd03: e9 48 ff ff ff jmp 10cc50 <_Objects_Extend_information+0x21c>
0010cd98 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10cd98: 55 push %ebp
10cd99: 89 e5 mov %esp,%ebp
10cd9b: 56 push %esi
10cd9c: 53 push %ebx
10cd9d: 8b 75 08 mov 0x8(%ebp),%esi
10cda0: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10cda3: 66 85 db test %bx,%bx
10cda6: 75 0c jne 10cdb4 <_Objects_Get_information+0x1c>
the_class_api_maximum = _Objects_API_maximum_class( the_api );
if ( the_class_api_maximum == 0 )
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
10cda8: 31 c0 xor %eax,%eax
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
10cdaa: 8d 65 f8 lea -0x8(%ebp),%esp
10cdad: 5b pop %ebx
10cdae: 5e pop %esi
10cdaf: c9 leave
10cdb0: c3 ret
10cdb1: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
10cdb4: 83 ec 0c sub $0xc,%esp
10cdb7: 56 push %esi
10cdb8: e8 37 48 00 00 call 1115f4 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10cdbd: 83 c4 10 add $0x10,%esp
10cdc0: 85 c0 test %eax,%eax
10cdc2: 74 e4 je 10cda8 <_Objects_Get_information+0x10>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10cdc4: 0f b7 db movzwl %bx,%ebx
10cdc7: 39 d8 cmp %ebx,%eax
10cdc9: 72 dd jb 10cda8 <_Objects_Get_information+0x10>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10cdcb: 8b 14 b5 28 75 12 00 mov 0x127528(,%esi,4),%edx
return NULL;
10cdd2: 31 c0 xor %eax,%eax
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10cdd4: 85 d2 test %edx,%edx
10cdd6: 74 d2 je 10cdaa <_Objects_Get_information+0x12><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10cdd8: 8b 04 9a mov (%edx,%ebx,4),%eax
if ( !info )
10cddb: 85 c0 test %eax,%eax
10cddd: 74 cb je 10cdaa <_Objects_Get_information+0x12><== NEVER TAKEN
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
10cddf: 31 d2 xor %edx,%edx
10cde1: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10cde6: 0f 95 c2 setne %dl
10cde9: f7 da neg %edx
10cdeb: 21 d0 and %edx,%eax
10cded: eb bb jmp 10cdaa <_Objects_Get_information+0x12>
0010cdf0 <_Objects_Get_isr_disable>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
10cdf0: 55 push %ebp
10cdf1: 89 e5 mov %esp,%ebp
10cdf3: 56 push %esi
10cdf4: 53 push %ebx
10cdf5: 8b 55 08 mov 0x8(%ebp),%edx
10cdf8: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
10cdfb: b8 01 00 00 00 mov $0x1,%eax
10ce00: 2b 42 08 sub 0x8(%edx),%eax
10ce03: 03 45 0c add 0xc(%ebp),%eax
_ISR_Disable( level );
10ce06: 9c pushf
10ce07: fa cli
10ce08: 5e pop %esi
if ( information->maximum >= index ) {
10ce09: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
10ce0d: 39 c8 cmp %ecx,%eax
10ce0f: 77 1b ja 10ce2c <_Objects_Get_isr_disable+0x3c>
if ( (the_object = information->local_table[ index ]) != NULL ) {
10ce11: 8b 52 1c mov 0x1c(%edx),%edx
10ce14: 8b 04 82 mov (%edx,%eax,4),%eax
10ce17: 85 c0 test %eax,%eax
10ce19: 74 21 je 10ce3c <_Objects_Get_isr_disable+0x4c>
*location = OBJECTS_LOCAL;
10ce1b: c7 03 00 00 00 00 movl $0x0,(%ebx)
*level_p = level;
10ce21: 8b 55 14 mov 0x14(%ebp),%edx
10ce24: 89 32 mov %esi,(%edx)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10ce26: 5b pop %ebx
10ce27: 5e pop %esi
10ce28: c9 leave
10ce29: c3 ret
10ce2a: 66 90 xchg %ax,%ax
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
return NULL;
}
_ISR_Enable( level );
10ce2c: 56 push %esi
10ce2d: 9d popf
*location = OBJECTS_ERROR;
10ce2e: c7 03 01 00 00 00 movl $0x1,(%ebx)
#if defined(RTEMS_MULTIPROCESSING)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
10ce34: 31 c0 xor %eax,%eax
#endif
}
10ce36: 5b pop %ebx
10ce37: 5e pop %esi
10ce38: c9 leave
10ce39: c3 ret
10ce3a: 66 90 xchg %ax,%ax
if ( (the_object = information->local_table[ index ]) != NULL ) {
*location = OBJECTS_LOCAL;
*level_p = level;
return the_object;
}
_ISR_Enable( level );
10ce3c: 56 push %esi
10ce3d: 9d popf
*location = OBJECTS_ERROR;
10ce3e: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
10ce44: eb e0 jmp 10ce26 <_Objects_Get_isr_disable+0x36>
0010e4bc <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
10e4bc: 55 push %ebp
10e4bd: 89 e5 mov %esp,%ebp
10e4bf: 57 push %edi
10e4c0: 56 push %esi
10e4c1: 53 push %ebx
10e4c2: 83 ec 2c sub $0x2c,%esp
10e4c5: 8b 55 08 mov 0x8(%ebp),%edx
10e4c8: 8b 75 0c mov 0xc(%ebp),%esi
10e4cb: 8b 5d 10 mov 0x10(%ebp),%ebx
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
10e4ce: 85 f6 test %esi,%esi
10e4d0: 75 0e jne 10e4e0 <_Objects_Get_name_as_string+0x24>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
10e4d2: 31 db xor %ebx,%ebx
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
10e4d4: 89 d8 mov %ebx,%eax
10e4d6: 8d 65 f4 lea -0xc(%ebp),%esp
10e4d9: 5b pop %ebx
10e4da: 5e pop %esi
10e4db: 5f pop %edi
10e4dc: c9 leave
10e4dd: c3 ret
10e4de: 66 90 xchg %ax,%ax
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
10e4e0: 85 db test %ebx,%ebx
10e4e2: 74 f0 je 10e4d4 <_Objects_Get_name_as_string+0x18>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10e4e4: 85 d2 test %edx,%edx
10e4e6: 75 08 jne 10e4f0 <_Objects_Get_name_as_string+0x34>
10e4e8: a1 78 29 13 00 mov 0x132978,%eax
10e4ed: 8b 50 08 mov 0x8(%eax),%edx
information = _Objects_Get_information_id( tmpId );
10e4f0: 83 ec 0c sub $0xc,%esp
10e4f3: 52 push %edx
10e4f4: 89 55 cc mov %edx,-0x34(%ebp)
10e4f7: e8 f0 fe ff ff call 10e3ec <_Objects_Get_information_id>
10e4fc: 89 c7 mov %eax,%edi
if ( !information )
10e4fe: 83 c4 10 add $0x10,%esp
10e501: 85 c0 test %eax,%eax
10e503: 8b 55 cc mov -0x34(%ebp),%edx
10e506: 74 ca je 10e4d2 <_Objects_Get_name_as_string+0x16>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
10e508: 51 push %ecx
10e509: 8d 45 e4 lea -0x1c(%ebp),%eax
10e50c: 50 push %eax
10e50d: 52 push %edx
10e50e: 57 push %edi
10e50f: e8 90 00 00 00 call 10e5a4 <_Objects_Get>
switch ( location ) {
10e514: 83 c4 10 add $0x10,%esp
10e517: 8b 55 e4 mov -0x1c(%ebp),%edx
10e51a: 85 d2 test %edx,%edx
10e51c: 75 b4 jne 10e4d2 <_Objects_Get_name_as_string+0x16>
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
10e51e: 80 7f 38 00 cmpb $0x0,0x38(%edi)
10e522: 74 54 je 10e578 <_Objects_Get_name_as_string+0xbc>
s = the_object->name.name_p;
10e524: 8b 78 0c mov 0xc(%eax),%edi
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
10e527: 85 ff test %edi,%edi
10e529: 74 74 je 10e59f <_Objects_Get_name_as_string+0xe3>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10e52b: 4e dec %esi
10e52c: 89 75 d4 mov %esi,-0x2c(%ebp)
10e52f: 74 6e je 10e59f <_Objects_Get_name_as_string+0xe3><== NEVER TAKEN
10e531: 8a 07 mov (%edi),%al
10e533: 84 c0 test %al,%al
10e535: 74 68 je 10e59f <_Objects_Get_name_as_string+0xe3>
10e537: 89 d9 mov %ebx,%ecx
10e539: 31 d2 xor %edx,%edx
10e53b: 89 5d d0 mov %ebx,-0x30(%ebp)
10e53e: eb 07 jmp 10e547 <_Objects_Get_name_as_string+0x8b>
10e540: 8a 04 17 mov (%edi,%edx,1),%al
10e543: 84 c0 test %al,%al
10e545: 74 21 je 10e568 <_Objects_Get_name_as_string+0xac>
*d = (isprint((unsigned char)*s)) ? *s : '*';
10e547: 0f b6 d8 movzbl %al,%ebx
10e54a: 8b 35 88 82 12 00 mov 0x128288,%esi
10e550: 0f be 5c 1e 01 movsbl 0x1(%esi,%ebx,1),%ebx
10e555: 81 e3 97 00 00 00 and $0x97,%ebx
10e55b: 75 02 jne 10e55f <_Objects_Get_name_as_string+0xa3>
10e55d: b0 2a mov $0x2a,%al
10e55f: 88 01 mov %al,(%ecx)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10e561: 42 inc %edx
10e562: 41 inc %ecx
10e563: 3b 55 d4 cmp -0x2c(%ebp),%edx
10e566: 72 d8 jb 10e540 <_Objects_Get_name_as_string+0x84>
10e568: 8b 5d d0 mov -0x30(%ebp),%ebx
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
10e56b: c6 01 00 movb $0x0,(%ecx)
_Thread_Enable_dispatch();
10e56e: e8 e5 0a 00 00 call 10f058 <_Thread_Enable_dispatch>
return name;
10e573: e9 5c ff ff ff jmp 10e4d4 <_Objects_Get_name_as_string+0x18>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
10e578: 8b 40 0c mov 0xc(%eax),%eax
lname[ 0 ] = (u32_name >> 24) & 0xff;
10e57b: 89 c2 mov %eax,%edx
10e57d: c1 ea 18 shr $0x18,%edx
10e580: 88 55 df mov %dl,-0x21(%ebp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
10e583: 89 c2 mov %eax,%edx
10e585: c1 ea 10 shr $0x10,%edx
10e588: 88 55 e0 mov %dl,-0x20(%ebp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
10e58b: 89 c2 mov %eax,%edx
10e58d: c1 ea 08 shr $0x8,%edx
10e590: 88 55 e1 mov %dl,-0x1f(%ebp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
10e593: 88 45 e2 mov %al,-0x1e(%ebp)
lname[ 4 ] = '\0';
10e596: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
s = lname;
10e59a: 8d 7d df lea -0x21(%ebp),%edi
10e59d: eb 8c jmp 10e52b <_Objects_Get_name_as_string+0x6f>
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10e59f: 89 d9 mov %ebx,%ecx
10e5a1: eb c8 jmp 10e56b <_Objects_Get_name_as_string+0xaf>
0010cf90 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
10cf90: 55 push %ebp
10cf91: 89 e5 mov %esp,%ebp
10cf93: 57 push %edi
10cf94: 56 push %esi
10cf95: 53 push %ebx
10cf96: 83 ec 0c sub $0xc,%esp
10cf99: 8b 5d 08 mov 0x8(%ebp),%ebx
10cf9c: 8b 75 0c mov 0xc(%ebp),%esi
10cf9f: 8b 7d 10 mov 0x10(%ebp),%edi
Objects_Control *object;
Objects_Id next_id;
if ( !information )
10cfa2: 85 db test %ebx,%ebx
10cfa4: 75 0a jne 10cfb0 <_Objects_Get_next+0x20>
if ( !location_p )
return NULL;
if ( !next_id_p )
return NULL;
10cfa6: 31 c0 xor %eax,%eax
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
10cfa8: 8d 65 f4 lea -0xc(%ebp),%esp
10cfab: 5b pop %ebx
10cfac: 5e pop %esi
10cfad: 5f pop %edi
10cfae: c9 leave
10cfaf: c3 ret
Objects_Id next_id;
if ( !information )
return NULL;
if ( !location_p )
10cfb0: 85 ff test %edi,%edi
10cfb2: 74 f2 je 10cfa6 <_Objects_Get_next+0x16>
return NULL;
if ( !next_id_p )
10cfb4: 8b 45 14 mov 0x14(%ebp),%eax
10cfb7: 85 c0 test %eax,%eax
10cfb9: 74 eb je 10cfa6 <_Objects_Get_next+0x16>
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
10cfbb: 66 85 f6 test %si,%si
10cfbe: 75 04 jne 10cfc4 <_Objects_Get_next+0x34>
next_id = information->minimum_id;
10cfc0: 8b 73 08 mov 0x8(%ebx),%esi
10cfc3: 90 nop
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
10cfc4: 66 39 73 10 cmp %si,0x10(%ebx)
10cfc8: 72 22 jb 10cfec <_Objects_Get_next+0x5c>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
10cfca: 51 push %ecx
10cfcb: 57 push %edi
10cfcc: 56 push %esi
10cfcd: 53 push %ebx
10cfce: e8 2d 00 00 00 call 10d000 <_Objects_Get>
next_id++;
10cfd3: 46 inc %esi
} while (*location_p != OBJECTS_LOCAL);
10cfd4: 83 c4 10 add $0x10,%esp
10cfd7: 8b 17 mov (%edi),%edx
10cfd9: 85 d2 test %edx,%edx
10cfdb: 75 e7 jne 10cfc4 <_Objects_Get_next+0x34>
*next_id_p = next_id;
10cfdd: 8b 55 14 mov 0x14(%ebp),%edx
10cfe0: 89 32 mov %esi,(%edx)
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
10cfe2: 8d 65 f4 lea -0xc(%ebp),%esp
10cfe5: 5b pop %ebx
10cfe6: 5e pop %esi
10cfe7: 5f pop %edi
10cfe8: c9 leave
10cfe9: c3 ret
10cfea: 66 90 xchg %ax,%ax
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
10cfec: c7 07 01 00 00 00 movl $0x1,(%edi)
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
10cff2: 8b 45 14 mov 0x14(%ebp),%eax
10cff5: c7 00 ff ff ff ff movl $0xffffffff,(%eax)
return 0;
10cffb: 31 c0 xor %eax,%eax
10cffd: eb a9 jmp 10cfa8 <_Objects_Get_next+0x18>
0011b28c <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
11b28c: 55 push %ebp
11b28d: 89 e5 mov %esp,%ebp
11b28f: 53 push %ebx
11b290: 8b 55 08 mov 0x8(%ebp),%edx
11b293: 8b 5d 10 mov 0x10(%ebp),%ebx
/*
* 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;
11b296: b8 01 00 00 00 mov $0x1,%eax
11b29b: 2b 42 08 sub 0x8(%edx),%eax
11b29e: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
11b2a1: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
11b2a5: 39 c8 cmp %ecx,%eax
11b2a7: 77 13 ja 11b2bc <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
11b2a9: 8b 52 1c mov 0x1c(%edx),%edx
11b2ac: 8b 04 82 mov (%edx,%eax,4),%eax
11b2af: 85 c0 test %eax,%eax
11b2b1: 74 09 je 11b2bc <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
11b2b3: c7 03 00 00 00 00 movl $0x0,(%ebx)
* 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;
}
11b2b9: 5b pop %ebx
11b2ba: c9 leave
11b2bb: c3 ret
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
11b2bc: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
11b2c2: 31 c0 xor %eax,%eax
}
11b2c4: 5b pop %ebx
11b2c5: c9 leave
11b2c6: c3 ret
0010e0e0 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10e0e0: 55 push %ebp
10e0e1: 89 e5 mov %esp,%ebp
10e0e3: 83 ec 18 sub $0x18,%esp
10e0e6: 8b 55 08 mov 0x8(%ebp),%edx
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10e0e9: 85 d2 test %edx,%edx
10e0eb: 75 08 jne 10e0f5 <_Objects_Id_to_name+0x15>
10e0ed: a1 58 a7 12 00 mov 0x12a758,%eax
10e0f2: 8b 50 08 mov 0x8(%eax),%edx
10e0f5: 89 d0 mov %edx,%eax
10e0f7: c1 e8 18 shr $0x18,%eax
10e0fa: 83 e0 07 and $0x7,%eax
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
10e0fd: 8d 48 ff lea -0x1(%eax),%ecx
10e100: 83 f9 02 cmp $0x2,%ecx
10e103: 77 1d ja 10e122 <_Objects_Id_to_name+0x42>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10e105: 8b 04 85 48 a1 12 00 mov 0x12a148(,%eax,4),%eax
10e10c: 85 c0 test %eax,%eax
10e10e: 74 12 je 10e122 <_Objects_Id_to_name+0x42>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10e110: 89 d1 mov %edx,%ecx
10e112: c1 e9 1b shr $0x1b,%ecx
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10e115: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !information )
10e118: 85 c0 test %eax,%eax
10e11a: 74 06 je 10e122 <_Objects_Id_to_name+0x42><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
10e11c: 80 78 38 00 cmpb $0x0,0x38(%eax)
10e120: 74 0a je 10e12c <_Objects_Id_to_name+0x4c><== ALWAYS TAKEN
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
10e122: b8 03 00 00 00 mov $0x3,%eax
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
10e127: c9 leave
10e128: c3 ret
10e129: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
10e12c: 51 push %ecx
10e12d: 8d 4d f4 lea -0xc(%ebp),%ecx
10e130: 51 push %ecx
10e131: 52 push %edx
10e132: 50 push %eax
10e133: e8 40 ff ff ff call 10e078 <_Objects_Get>
if ( !the_object )
10e138: 83 c4 10 add $0x10,%esp
10e13b: 85 c0 test %eax,%eax
10e13d: 74 e3 je 10e122 <_Objects_Id_to_name+0x42>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10e13f: 8b 50 0c mov 0xc(%eax),%edx
10e142: 8b 45 0c mov 0xc(%ebp),%eax
10e145: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10e147: e8 50 0a 00 00 call 10eb9c <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10e14c: 31 c0 xor %eax,%eax
}
10e14e: c9 leave
10e14f: c3 ret
0010ceb0 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
10ceb0: 55 push %ebp
10ceb1: 89 e5 mov %esp,%ebp
10ceb3: 57 push %edi
10ceb4: 56 push %esi
10ceb5: 53 push %ebx
10ceb6: 83 ec 0c sub $0xc,%esp
10ceb9: 8b 45 08 mov 0x8(%ebp),%eax
10cebc: 8b 55 0c mov 0xc(%ebp),%edx
10cebf: 8b 5d 10 mov 0x10(%ebp),%ebx
10cec2: 8b 75 20 mov 0x20(%ebp),%esi
10cec5: 0f b7 7d 18 movzwl 0x18(%ebp),%edi
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
10cec9: 89 10 mov %edx,(%eax)
information->the_class = the_class;
10cecb: 66 89 58 04 mov %bx,0x4(%eax)
information->size = size;
10cecf: 89 78 18 mov %edi,0x18(%eax)
information->local_table = 0;
10ced2: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
information->inactive_per_block = 0;
10ced9: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
information->object_blocks = 0;
10cee0: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
information->inactive = 0;
10cee7: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax)
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
information->is_string = is_string;
10ceed: 8b 7d 1c mov 0x1c(%ebp),%edi
10cef0: 89 f9 mov %edi,%ecx
10cef2: 88 48 38 mov %cl,0x38(%eax)
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
10cef5: 66 c7 40 10 00 00 movw $0x0,0x10(%eax)
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
10cefb: 0f b7 db movzwl %bx,%ebx
10cefe: 8b 3c 95 28 75 12 00 mov 0x127528(,%edx,4),%edi
10cf05: 89 04 9f mov %eax,(%edi,%ebx,4)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
10cf08: 8b 7d 14 mov 0x14(%ebp),%edi
10cf0b: c1 ef 1f shr $0x1f,%edi
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
10cf0e: 89 f9 mov %edi,%ecx
10cf10: 88 48 12 mov %cl,0x12(%eax)
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
10cf13: 8b 4d 14 mov 0x14(%ebp),%ecx
10cf16: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
10cf1c: 85 ff test %edi,%edi
10cf1e: 74 04 je 10cf24 <_Objects_Initialize_information+0x74>
10cf20: 85 c9 test %ecx,%ecx
10cf22: 74 67 je 10cf8b <_Objects_Initialize_information+0xdb><== NEVER TAKEN
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
10cf24: 66 89 48 14 mov %cx,0x14(%eax)
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
10cf28: c7 40 1c c4 71 12 00 movl $0x1271c4,0x1c(%eax)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cf2f: c1 e2 18 shl $0x18,%edx
10cf32: 81 ca 00 00 01 00 or $0x10000,%edx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cf38: c1 e3 1b shl $0x1b,%ebx
10cf3b: 09 da or %ebx,%edx
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
10cf3d: 31 db xor %ebx,%ebx
10cf3f: 85 c9 test %ecx,%ecx
10cf41: 0f 95 c3 setne %bl
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cf44: 09 da or %ebx,%edx
10cf46: 89 50 08 mov %edx,0x8(%eax)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
10cf49: f7 c6 03 00 00 00 test $0x3,%esi
10cf4f: 75 23 jne 10cf74 <_Objects_Initialize_information+0xc4>
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
10cf51: 66 89 70 3a mov %si,0x3a(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10cf55: 8d 50 24 lea 0x24(%eax),%edx
10cf58: 89 50 20 mov %edx,0x20(%eax)
head->next = tail;
head->previous = NULL;
10cf5b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10cf62: 8d 50 20 lea 0x20(%eax),%edx
10cf65: 89 50 28 mov %edx,0x28(%eax)
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
10cf68: 85 c9 test %ecx,%ecx
10cf6a: 75 10 jne 10cf7c <_Objects_Initialize_information+0xcc>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10cf6c: 8d 65 f4 lea -0xc(%ebp),%esp
10cf6f: 5b pop %ebx
10cf70: 5e pop %esi
10cf71: 5f pop %edi
10cf72: c9 leave
10cf73: c3 ret
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
10cf74: 83 c6 04 add $0x4,%esi
10cf77: 83 e6 fc and $0xfffffffc,%esi
10cf7a: eb d5 jmp 10cf51 <_Objects_Initialize_information+0xa1>
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10cf7c: 89 45 08 mov %eax,0x8(%ebp)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10cf7f: 8d 65 f4 lea -0xc(%ebp),%esp
10cf82: 5b pop %ebx
10cf83: 5e pop %esi
10cf84: 5f pop %edi
10cf85: c9 leave
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10cf86: e9 a9 fa ff ff jmp 10ca34 <_Objects_Extend_information>
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
10cf8b: 50 push %eax
10cf8c: 6a 13 push $0x13
10cf8e: 6a 01 push $0x1
10cf90: 6a 00 push $0x0
10cf92: e8 69 f9 ff ff call 10c900 <_Internal_error_Occurred>
00117950 <_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
)
{
117950: 55 push %ebp
117951: 89 e5 mov %esp,%ebp
117953: 57 push %edi
117954: 56 push %esi
117955: 53 push %ebx
117956: 83 ec 1c sub $0x1c,%esp
117959: 8b 7d 08 mov 0x8(%ebp),%edi
Objects_Control *the_object;
uint32_t index;
/* ASSERT: information->is_string == true */
if ( !id )
11795c: 8b 5d 10 mov 0x10(%ebp),%ebx
11795f: 85 db test %ebx,%ebx
117961: 74 75 je 1179d8 <_Objects_Name_to_id_string+0x88>
return OBJECTS_INVALID_ADDRESS;
if ( !name )
117963: 8b 4d 0c mov 0xc(%ebp),%ecx
117966: 85 c9 test %ecx,%ecx
117968: 74 4b je 1179b5 <_Objects_Name_to_id_string+0x65>
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
11796a: 8b 47 10 mov 0x10(%edi),%eax
11796d: 66 85 c0 test %ax,%ax
117970: 74 43 je 1179b5 <_Objects_Name_to_id_string+0x65>
for ( index = 1; index <= information->maximum; index++ ) {
117972: 0f b7 c0 movzwl %ax,%eax
117975: 89 45 e4 mov %eax,-0x1c(%ebp)
117978: 8b 47 1c mov 0x1c(%edi),%eax
11797b: bb 01 00 00 00 mov $0x1,%ebx
117980: 89 7d e0 mov %edi,-0x20(%ebp)
117983: 89 c7 mov %eax,%edi
117985: 8d 76 00 lea 0x0(%esi),%esi
the_object = information->local_table[ index ];
117988: 8b 34 9f mov (%edi,%ebx,4),%esi
if ( !the_object )
11798b: 85 f6 test %esi,%esi
11798d: 74 20 je 1179af <_Objects_Name_to_id_string+0x5f>
continue;
if ( !the_object->name.name_p )
11798f: 8b 46 0c mov 0xc(%esi),%eax
117992: 85 c0 test %eax,%eax
117994: 74 19 je 1179af <_Objects_Name_to_id_string+0x5f>
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
117996: 52 push %edx
117997: 8b 4d e0 mov -0x20(%ebp),%ecx
11799a: 0f b7 51 3a movzwl 0x3a(%ecx),%edx
11799e: 52 push %edx
11799f: 50 push %eax
1179a0: ff 75 0c pushl 0xc(%ebp)
1179a3: e8 84 35 00 00 call 11af2c <strncmp>
1179a8: 83 c4 10 add $0x10,%esp
1179ab: 85 c0 test %eax,%eax
1179ad: 74 15 je 1179c4 <_Objects_Name_to_id_string+0x74>
if ( !name )
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
for ( index = 1; index <= information->maximum; index++ ) {
1179af: 43 inc %ebx
1179b0: 3b 5d e4 cmp -0x1c(%ebp),%ebx
1179b3: 76 d3 jbe 117988 <_Objects_Name_to_id_string+0x38>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
}
}
return OBJECTS_INVALID_NAME;
1179b5: b8 01 00 00 00 mov $0x1,%eax
}
1179ba: 8d 65 f4 lea -0xc(%ebp),%esp
1179bd: 5b pop %ebx
1179be: 5e pop %esi
1179bf: 5f pop %edi
1179c0: c9 leave
1179c1: c3 ret
1179c2: 66 90 xchg %ax,%ax
if ( !the_object->name.name_p )
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
*id = the_object->id;
1179c4: 8b 46 08 mov 0x8(%esi),%eax
1179c7: 8b 55 10 mov 0x10(%ebp),%edx
1179ca: 89 02 mov %eax,(%edx)
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
1179cc: 31 c0 xor %eax,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
1179ce: 8d 65 f4 lea -0xc(%ebp),%esp
1179d1: 5b pop %ebx
1179d2: 5e pop %esi
1179d3: 5f pop %edi
1179d4: c9 leave
1179d5: c3 ret
1179d6: 66 90 xchg %ax,%ax
uint32_t index;
/* ASSERT: information->is_string == true */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
1179d8: b8 02 00 00 00 mov $0x2,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
1179dd: 8d 65 f4 lea -0xc(%ebp),%esp
1179e0: 5b pop %ebx
1179e1: 5e pop %esi
1179e2: 5f pop %edi
1179e3: c9 leave
1179e4: c3 ret
0010cfcc <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
10cfcc: 55 push %ebp
10cfcd: 89 e5 mov %esp,%ebp
10cfcf: 57 push %edi
10cfd0: 56 push %esi
10cfd1: 53 push %ebx
10cfd2: 8b 45 08 mov 0x8(%ebp),%eax
10cfd5: 8b 4d 0c mov 0xc(%ebp),%ecx
10cfd8: 8b 55 10 mov 0x10(%ebp),%edx
10cfdb: 8b 7d 14 mov 0x14(%ebp),%edi
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
10cfde: 85 ff test %edi,%edi
10cfe0: 74 56 je 10d038 <_Objects_Name_to_id_u32+0x6c>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
10cfe2: 85 c9 test %ecx,%ecx
10cfe4: 74 08 je 10cfee <_Objects_Name_to_id_u32+0x22>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10cfe6: 8b 70 10 mov 0x10(%eax),%esi
10cfe9: 66 85 f6 test %si,%si
10cfec: 75 0a jne 10cff8 <_Objects_Name_to_id_u32+0x2c>
return OBJECTS_INVALID_NAME;
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
10cfee: b8 01 00 00 00 mov $0x1,%eax
#endif
}
10cff3: 5b pop %ebx
10cff4: 5e pop %esi
10cff5: 5f pop %edi
10cff6: c9 leave
10cff7: c3 ret
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10cff8: 85 d2 test %edx,%edx
10cffa: 75 20 jne 10d01c <_Objects_Name_to_id_u32+0x50>
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
10cffc: 0f b7 f6 movzwl %si,%esi
10cfff: 8b 58 1c mov 0x1c(%eax),%ebx
10d002: b8 01 00 00 00 mov $0x1,%eax
10d007: 90 nop
the_object = information->local_table[ index ];
10d008: 8b 14 83 mov (%ebx,%eax,4),%edx
if ( !the_object )
10d00b: 85 d2 test %edx,%edx
10d00d: 74 05 je 10d014 <_Objects_Name_to_id_u32+0x48>
continue;
if ( name == the_object->name.name_u32 ) {
10d00f: 39 4a 0c cmp %ecx,0xc(%edx)
10d012: 74 18 je 10d02c <_Objects_Name_to_id_u32+0x60>
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
10d014: 40 inc %eax
10d015: 39 c6 cmp %eax,%esi
10d017: 73 ef jae 10d008 <_Objects_Name_to_id_u32+0x3c>
10d019: eb d3 jmp 10cfee <_Objects_Name_to_id_u32+0x22>
10d01b: 90 nop
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
(node == OBJECTS_SEARCH_ALL_NODES ||
10d01c: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
10d022: 74 d8 je 10cffc <_Objects_Name_to_id_u32+0x30>
node == OBJECTS_SEARCH_LOCAL_NODE ||
10d024: 4a dec %edx
10d025: 75 c7 jne 10cfee <_Objects_Name_to_id_u32+0x22>
10d027: eb d3 jmp 10cffc <_Objects_Name_to_id_u32+0x30>
10d029: 8d 76 00 lea 0x0(%esi),%esi
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
10d02c: 8b 42 08 mov 0x8(%edx),%eax
10d02f: 89 07 mov %eax,(%edi)
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10d031: 31 c0 xor %eax,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10d033: 5b pop %ebx
10d034: 5e pop %esi
10d035: 5f pop %edi
10d036: c9 leave
10d037: c3 ret
#endif
/* ASSERT: information->is_string == false */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
10d038: b8 02 00 00 00 mov $0x2,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10d03d: 5b pop %ebx
10d03e: 5e pop %esi
10d03f: 5f pop %edi
10d040: c9 leave
10d041: c3 ret
0010d6b0 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
10d6b0: 55 push %ebp
10d6b1: 89 e5 mov %esp,%ebp
10d6b3: 57 push %edi
10d6b4: 56 push %esi
10d6b5: 53 push %ebx
10d6b6: 83 ec 14 sub $0x14,%esp
10d6b9: 8b 7d 08 mov 0x8(%ebp),%edi
10d6bc: 8b 5d 10 mov 0x10(%ebp),%ebx
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
10d6bf: 0f b7 47 3a movzwl 0x3a(%edi),%eax
10d6c3: 50 push %eax
10d6c4: 53 push %ebx
10d6c5: e8 2e 7a 00 00 call 1150f8 <strnlen>
10d6ca: 89 c6 mov %eax,%esi
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
10d6cc: 83 c4 10 add $0x10,%esp
10d6cf: 80 7f 38 00 cmpb $0x0,0x38(%edi)
10d6d3: 75 57 jne 10d72c <_Objects_Set_name+0x7c>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10d6d5: 0f be 13 movsbl (%ebx),%edx
10d6d8: c1 e2 18 shl $0x18,%edx
10d6db: 83 f8 01 cmp $0x1,%eax
10d6de: 76 38 jbe 10d718 <_Objects_Set_name+0x68>
10d6e0: 0f be 43 01 movsbl 0x1(%ebx),%eax
10d6e4: c1 e0 10 shl $0x10,%eax
10d6e7: 09 d0 or %edx,%eax
10d6e9: 83 fe 02 cmp $0x2,%esi
10d6ec: 74 31 je 10d71f <_Objects_Set_name+0x6f>
10d6ee: 0f be 53 02 movsbl 0x2(%ebx),%edx
10d6f2: c1 e2 08 shl $0x8,%edx
10d6f5: 09 c2 or %eax,%edx
10d6f7: 83 fe 03 cmp $0x3,%esi
10d6fa: 0f 84 88 00 00 00 je 10d788 <_Objects_Set_name+0xd8>
10d700: 0f be 43 03 movsbl 0x3(%ebx),%eax
10d704: 09 c2 or %eax,%edx
10d706: 8b 45 0c mov 0xc(%ebp),%eax
10d709: 89 50 0c mov %edx,0xc(%eax)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
10d70c: b0 01 mov $0x1,%al
}
10d70e: 8d 65 f4 lea -0xc(%ebp),%esp
10d711: 5b pop %ebx
10d712: 5e pop %esi
10d713: 5f pop %edi
10d714: c9 leave
10d715: c3 ret
10d716: 66 90 xchg %ax,%ax
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10d718: 89 d0 mov %edx,%eax
10d71a: 0d 00 00 20 00 or $0x200000,%eax
10d71f: 89 c2 mov %eax,%edx
10d721: 80 ce 20 or $0x20,%dh
10d724: b8 20 00 00 00 mov $0x20,%eax
10d729: eb d9 jmp 10d704 <_Objects_Set_name+0x54>
10d72b: 90 nop
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
10d72c: 83 ec 0c sub $0xc,%esp
10d72f: 8d 40 01 lea 0x1(%eax),%eax
10d732: 50 push %eax
10d733: e8 78 19 00 00 call 10f0b0 <_Workspace_Allocate>
10d738: 89 c7 mov %eax,%edi
if ( !d )
10d73a: 83 c4 10 add $0x10,%esp
10d73d: 85 c0 test %eax,%eax
10d73f: 74 43 je 10d784 <_Objects_Set_name+0xd4>
return false;
if ( the_object->name.name_p ) {
10d741: 8b 55 0c mov 0xc(%ebp),%edx
10d744: 8b 42 0c mov 0xc(%edx),%eax
10d747: 85 c0 test %eax,%eax
10d749: 74 16 je 10d761 <_Objects_Set_name+0xb1>
_Workspace_Free( (void *)the_object->name.name_p );
10d74b: 83 ec 0c sub $0xc,%esp
10d74e: 50 push %eax
10d74f: e8 78 19 00 00 call 10f0cc <_Workspace_Free>
the_object->name.name_p = NULL;
10d754: 8b 45 0c mov 0xc(%ebp),%eax
10d757: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
10d75e: 83 c4 10 add $0x10,%esp
}
strncpy( d, name, length );
10d761: 50 push %eax
10d762: 56 push %esi
10d763: 53 push %ebx
10d764: 57 push %edi
10d765: e8 12 79 00 00 call 11507c <strncpy>
d[length] = '\0';
10d76a: c6 04 37 00 movb $0x0,(%edi,%esi,1)
the_object->name.name_p = d;
10d76e: 8b 55 0c mov 0xc(%ebp),%edx
10d771: 89 7a 0c mov %edi,0xc(%edx)
10d774: 83 c4 10 add $0x10,%esp
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
10d777: b0 01 mov $0x1,%al
}
10d779: 8d 65 f4 lea -0xc(%ebp),%esp
10d77c: 5b pop %ebx
10d77d: 5e pop %esi
10d77e: 5f pop %edi
10d77f: c9 leave
10d780: c3 ret
10d781: 8d 76 00 lea 0x0(%esi),%esi
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
10d784: 31 c0 xor %eax,%eax
10d786: eb 86 jmp 10d70e <_Objects_Set_name+0x5e>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10d788: b8 20 00 00 00 mov $0x20,%eax
10d78d: e9 72 ff ff ff jmp 10d704 <_Objects_Set_name+0x54>
0010d044 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10d044: 55 push %ebp
10d045: 89 e5 mov %esp,%ebp
10d047: 57 push %edi
10d048: 56 push %esi
10d049: 53 push %ebx
10d04a: 83 ec 1c sub $0x1c,%esp
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
10d04d: 8b 45 08 mov 0x8(%ebp),%eax
10d050: 0f b7 58 08 movzwl 0x8(%eax),%ebx
block_count = (information->maximum - index_base) /
10d054: 0f b7 48 14 movzwl 0x14(%eax),%ecx
10d058: 0f b7 40 10 movzwl 0x10(%eax),%eax
10d05c: 29 d8 sub %ebx,%eax
10d05e: 31 d2 xor %edx,%edx
10d060: f7 f1 div %ecx
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d062: 85 c0 test %eax,%eax
10d064: 74 21 je 10d087 <_Objects_Shrink_information+0x43><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
10d066: 8b 55 08 mov 0x8(%ebp),%edx
10d069: 8b 7a 30 mov 0x30(%edx),%edi
10d06c: 3b 0f cmp (%edi),%ecx
10d06e: 74 1f je 10d08f <_Objects_Shrink_information+0x4b><== NEVER TAKEN
10d070: 31 d2 xor %edx,%edx
10d072: eb 0e jmp 10d082 <_Objects_Shrink_information+0x3e>
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
10d074: 01 cb add %ecx,%ebx
10d076: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi
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 ] ==
10d07d: 3b 0c 97 cmp (%edi,%edx,4),%ecx
10d080: 74 12 je 10d094 <_Objects_Shrink_information+0x50>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d082: 42 inc %edx
10d083: 39 d0 cmp %edx,%eax
10d085: 77 ed ja 10d074 <_Objects_Shrink_information+0x30>
return;
}
index_base += information->allocation_size;
}
}
10d087: 8d 65 f4 lea -0xc(%ebp),%esp
10d08a: 5b pop %ebx
10d08b: 5e pop %esi
10d08c: 5f pop %edi
10d08d: c9 leave
10d08e: c3 ret
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 ] ==
10d08f: 31 f6 xor %esi,%esi
10d091: 8d 76 00 lea 0x0(%esi),%esi
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
10d094: 8b 55 08 mov 0x8(%ebp),%edx
10d097: 8b 42 20 mov 0x20(%edx),%eax
10d09a: 89 75 e4 mov %esi,-0x1c(%ebp)
10d09d: eb 07 jmp 10d0a6 <_Objects_Shrink_information+0x62>
10d09f: 90 nop
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d0a0: 85 ff test %edi,%edi
10d0a2: 74 2c je 10d0d0 <_Objects_Shrink_information+0x8c>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d0a4: 89 f8 mov %edi,%eax
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
10d0a6: 0f b7 50 08 movzwl 0x8(%eax),%edx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d0aa: 8b 38 mov (%eax),%edi
if ((index >= index_base) &&
10d0ac: 39 da cmp %ebx,%edx
10d0ae: 72 f0 jb 10d0a0 <_Objects_Shrink_information+0x5c>
(index < (index_base + information->allocation_size))) {
10d0b0: 8b 75 08 mov 0x8(%ebp),%esi
10d0b3: 0f b7 4e 14 movzwl 0x14(%esi),%ecx
10d0b7: 8d 0c 0b lea (%ebx,%ecx,1),%ecx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
10d0ba: 39 ca cmp %ecx,%edx
10d0bc: 73 e2 jae 10d0a0 <_Objects_Shrink_information+0x5c>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
10d0be: 83 ec 0c sub $0xc,%esp
10d0c1: 50 push %eax
10d0c2: e8 39 ef ff ff call 10c000 <_Chain_Extract>
10d0c7: 83 c4 10 add $0x10,%esp
}
}
while ( the_object );
10d0ca: 85 ff test %edi,%edi
10d0cc: 75 d6 jne 10d0a4 <_Objects_Shrink_information+0x60>
10d0ce: 66 90 xchg %ax,%ax
10d0d0: 8b 75 e4 mov -0x1c(%ebp),%esi
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10d0d3: 83 ec 0c sub $0xc,%esp
10d0d6: 8b 55 08 mov 0x8(%ebp),%edx
10d0d9: 8b 42 34 mov 0x34(%edx),%eax
10d0dc: ff 34 30 pushl (%eax,%esi,1)
10d0df: e8 98 18 00 00 call 10e97c <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10d0e4: 8b 55 08 mov 0x8(%ebp),%edx
10d0e7: 8b 42 34 mov 0x34(%edx),%eax
10d0ea: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1)
information->inactive_per_block[ block ] = 0;
10d0f1: 8b 42 30 mov 0x30(%edx),%eax
10d0f4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1)
information->inactive -= information->allocation_size;
10d0fb: 8b 42 14 mov 0x14(%edx),%eax
10d0fe: 66 29 42 2c sub %ax,0x2c(%edx)
return;
10d102: 83 c4 10 add $0x10,%esp
}
index_base += information->allocation_size;
}
}
10d105: 8d 65 f4 lea -0xc(%ebp),%esp
10d108: 5b pop %ebx
10d109: 5e pop %esi
10d10a: 5f pop %edi
10d10b: c9 leave
10d10c: c3 ret
0010d514 <_POSIX_Absolute_timeout_to_ticks>:
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
10d514: 55 push %ebp
10d515: 89 e5 mov %esp,%ebp
10d517: 57 push %edi
10d518: 56 push %esi
10d519: 53 push %ebx
10d51a: 83 ec 38 sub $0x38,%esp
10d51d: 8b 5d 08 mov 0x8(%ebp),%ebx
10d520: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
10d523: c7 06 00 00 00 00 movl $0x0,(%esi)
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
10d529: 53 push %ebx
10d52a: e8 a1 3d 00 00 call 1112d0 <_Timespec_Is_valid>
10d52f: 83 c4 10 add $0x10,%esp
10d532: 84 c0 test %al,%al
10d534: 75 0a jne 10d540 <_POSIX_Absolute_timeout_to_ticks+0x2c>
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
10d536: 31 c0 xor %eax,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10d538: 8d 65 f4 lea -0xc(%ebp),%esp
10d53b: 5b pop %ebx
10d53c: 5e pop %esi
10d53d: 5f pop %edi
10d53e: c9 leave
10d53f: c3 ret
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
10d540: 83 ec 0c sub $0xc,%esp
10d543: 8d 7d e0 lea -0x20(%ebp),%edi
10d546: 57 push %edi
10d547: e8 88 1d 00 00 call 10f2d4 <_TOD_Get>
if ( _Timespec_Less_than( abstime, ¤t_time ) )
10d54c: 5a pop %edx
10d54d: 59 pop %ecx
10d54e: 57 push %edi
10d54f: 53 push %ebx
10d550: e8 a3 3d 00 00 call 1112f8 <_Timespec_Less_than>
10d555: 83 c4 10 add $0x10,%esp
10d558: 84 c0 test %al,%al
10d55a: 74 10 je 10d56c <_POSIX_Absolute_timeout_to_ticks+0x58>
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
10d55c: b8 01 00 00 00 mov $0x1,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10d561: 8d 65 f4 lea -0xc(%ebp),%esp
10d564: 5b pop %ebx
10d565: 5e pop %esi
10d566: 5f pop %edi
10d567: c9 leave
10d568: c3 ret
10d569: 8d 76 00 lea 0x0(%esi),%esi
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
/*
* How long until the requested absolute time?
*/
_Timespec_Subtract( ¤t_time, abstime, &difference );
10d56c: 50 push %eax
10d56d: 8d 45 d8 lea -0x28(%ebp),%eax
10d570: 50 push %eax
10d571: 53 push %ebx
10d572: 57 push %edi
10d573: 89 45 d4 mov %eax,-0x2c(%ebp)
10d576: e8 a1 3d 00 00 call 11131c <_Timespec_Subtract>
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
10d57b: 8b 45 d4 mov -0x2c(%ebp),%eax
10d57e: 89 04 24 mov %eax,(%esp)
10d581: e8 d6 3d 00 00 call 11135c <_Timespec_To_ticks>
10d586: 89 06 mov %eax,(%esi)
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
10d588: 83 c4 10 add $0x10,%esp
return POSIX_ABSOLUTE_TIMEOUT_IS_NOW;
10d58b: 83 f8 01 cmp $0x1,%eax
10d58e: 19 c0 sbb %eax,%eax
10d590: 83 c0 03 add $0x3,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10d593: 8d 65 f4 lea -0xc(%ebp),%esp
10d596: 5b pop %ebx
10d597: 5e pop %esi
10d598: 5f pop %edi
10d599: c9 leave
10d59a: c3 ret
0010c0cc <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
10c0cc: 55 push %ebp
10c0cd: 89 e5 mov %esp,%ebp
10c0cf: 56 push %esi
10c0d0: 53 push %ebx
10c0d1: 8b 5d 08 mov 0x8(%ebp),%ebx
10c0d4: 8b 75 0c mov 0xc(%ebp),%esi
int status;
if ( !cond ) {
10c0d7: 85 db test %ebx,%ebx
10c0d9: 74 39 je 10c114 <_POSIX_Condition_variables_Get+0x48>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *cond == PTHREAD_COND_INITIALIZER ) {
10c0db: 8b 03 mov (%ebx),%eax
10c0dd: 83 f8 ff cmp $0xffffffff,%eax
10c0e0: 74 1a je 10c0fc <_POSIX_Condition_variables_Get+0x30>
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
10c0e2: 52 push %edx
10c0e3: 56 push %esi
10c0e4: 50 push %eax
10c0e5: 68 a0 a1 12 00 push $0x12a1a0
10c0ea: e8 85 2b 00 00 call 10ec74 <_Objects_Get>
10c0ef: 83 c4 10 add $0x10,%esp
&_POSIX_Condition_variables_Information,
(Objects_Id) *cond,
location
);
}
10c0f2: 8d 65 f8 lea -0x8(%ebp),%esp
10c0f5: 5b pop %ebx
10c0f6: 5e pop %esi
10c0f7: c9 leave
10c0f8: c3 ret
10c0f9: 8d 76 00 lea 0x0(%esi),%esi
if ( *cond == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( cond, 0 );
10c0fc: 83 ec 08 sub $0x8,%esp
10c0ff: 6a 00 push $0x0
10c101: 53 push %ebx
10c102: e8 19 00 00 00 call 10c120 <pthread_cond_init>
if ( status ) {
10c107: 83 c4 10 add $0x10,%esp
10c10a: 85 c0 test %eax,%eax
10c10c: 75 06 jne 10c114 <_POSIX_Condition_variables_Get+0x48>
10c10e: 8b 03 mov (%ebx),%eax
10c110: eb d0 jmp 10c0e2 <_POSIX_Condition_variables_Get+0x16>
10c112: 66 90 xchg %ax,%ax
*location = OBJECTS_ERROR;
10c114: c7 06 01 00 00 00 movl $0x1,(%esi)
return (POSIX_Condition_variables_Control *) 0;
10c11a: 31 c0 xor %eax,%eax
10c11c: eb d4 jmp 10c0f2 <_POSIX_Condition_variables_Get+0x26>
0010c1e8 <_POSIX_Condition_variables_Signal_support>:
int _POSIX_Condition_variables_Signal_support(
pthread_cond_t *cond,
bool is_broadcast
)
{
10c1e8: 55 push %ebp
10c1e9: 89 e5 mov %esp,%ebp
10c1eb: 57 push %edi
10c1ec: 56 push %esi
10c1ed: 53 push %ebx
10c1ee: 83 ec 24 sub $0x24,%esp
10c1f1: 8a 5d 0c mov 0xc(%ebp),%bl
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
Thread_Control *the_thread;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c1f4: 8d 45 e4 lea -0x1c(%ebp),%eax
10c1f7: 50 push %eax
10c1f8: ff 75 08 pushl 0x8(%ebp)
10c1fb: e8 cc fe ff ff call 10c0cc <_POSIX_Condition_variables_Get>
10c200: 89 c7 mov %eax,%edi
switch ( location ) {
10c202: 83 c4 10 add $0x10,%esp
10c205: 8b 45 e4 mov -0x1c(%ebp),%eax
10c208: 85 c0 test %eax,%eax
10c20a: 74 10 je 10c21c <_POSIX_Condition_variables_Signal_support+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c20c: b8 16 00 00 00 mov $0x16,%eax
}
10c211: 8d 65 f4 lea -0xc(%ebp),%esp
10c214: 5b pop %ebx
10c215: 5e pop %esi
10c216: 5f pop %edi
10c217: c9 leave
10c218: c3 ret
10c219: 8d 76 00 lea 0x0(%esi),%esi
10c21c: 8d 77 18 lea 0x18(%edi),%esi
10c21f: eb 0b jmp 10c22c <_POSIX_Condition_variables_Signal_support+0x44>
10c221: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
if ( !the_thread )
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
} while ( is_broadcast && the_thread );
10c224: 84 db test %bl,%bl
10c226: 74 20 je 10c248 <_POSIX_Condition_variables_Signal_support+0x60>
10c228: 85 c0 test %eax,%eax
10c22a: 74 1c je 10c248 <_POSIX_Condition_variables_Signal_support+0x60>
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
10c22c: 83 ec 0c sub $0xc,%esp
10c22f: 56 push %esi
10c230: e8 a7 38 00 00 call 10fadc <_Thread_queue_Dequeue>
if ( !the_thread )
10c235: 83 c4 10 add $0x10,%esp
10c238: 85 c0 test %eax,%eax
10c23a: 75 e8 jne 10c224 <_POSIX_Condition_variables_Signal_support+0x3c>
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c23c: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi)
} while ( is_broadcast && the_thread );
10c243: 84 db test %bl,%bl
10c245: 75 e1 jne 10c228 <_POSIX_Condition_variables_Signal_support+0x40>
10c247: 90 nop
_Thread_Enable_dispatch();
10c248: e8 db 34 00 00 call 10f728 <_Thread_Enable_dispatch>
return 0;
10c24d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c24f: 8d 65 f4 lea -0xc(%ebp),%esp
10c252: 5b pop %ebx
10c253: 5e pop %esi
10c254: 5f pop %edi
10c255: c9 leave
10c256: c3 ret
0010c2b0 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
10c2b0: 55 push %ebp
10c2b1: 89 e5 mov %esp,%ebp
10c2b3: 57 push %edi
10c2b4: 56 push %esi
10c2b5: 53 push %ebx
10c2b6: 83 ec 34 sub $0x34,%esp
10c2b9: 8b 7d 08 mov 0x8(%ebp),%edi
10c2bc: 8b 5d 0c mov 0xc(%ebp),%ebx
10c2bf: 8a 45 14 mov 0x14(%ebp),%al
10c2c2: 88 45 d7 mov %al,-0x29(%ebp)
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
10c2c5: 8d 75 e4 lea -0x1c(%ebp),%esi
10c2c8: 56 push %esi
10c2c9: 53 push %ebx
10c2ca: e8 59 01 00 00 call 10c428 <_POSIX_Mutex_Get>
10c2cf: 83 c4 10 add $0x10,%esp
10c2d2: 85 c0 test %eax,%eax
10c2d4: 74 21 je 10c2f7 <_POSIX_Condition_variables_Wait_support+0x47>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c2d6: a1 b0 9c 12 00 mov 0x129cb0,%eax
10c2db: 48 dec %eax
10c2dc: a3 b0 9c 12 00 mov %eax,0x129cb0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c2e1: 83 ec 08 sub $0x8,%esp
10c2e4: 56 push %esi
10c2e5: 57 push %edi
10c2e6: e8 e1 fd ff ff call 10c0cc <_POSIX_Condition_variables_Get>
10c2eb: 89 c6 mov %eax,%esi
switch ( location ) {
10c2ed: 83 c4 10 add $0x10,%esp
10c2f0: 8b 55 e4 mov -0x1c(%ebp),%edx
10c2f3: 85 d2 test %edx,%edx
10c2f5: 74 11 je 10c308 <_POSIX_Condition_variables_Wait_support+0x58>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c2f7: be 16 00 00 00 mov $0x16,%esi
}
10c2fc: 89 f0 mov %esi,%eax
10c2fe: 8d 65 f4 lea -0xc(%ebp),%esp
10c301: 5b pop %ebx
10c302: 5e pop %esi
10c303: 5f pop %edi
10c304: c9 leave
10c305: c3 ret
10c306: 66 90 xchg %ax,%ax
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
10c308: 8b 40 14 mov 0x14(%eax),%eax
10c30b: 85 c0 test %eax,%eax
10c30d: 74 19 je 10c328 <_POSIX_Condition_variables_Wait_support+0x78>
10c30f: 3b 03 cmp (%ebx),%eax
10c311: 74 15 je 10c328 <_POSIX_Condition_variables_Wait_support+0x78>
_Thread_Enable_dispatch();
10c313: e8 10 34 00 00 call 10f728 <_Thread_Enable_dispatch>
return EINVAL;
10c318: be 16 00 00 00 mov $0x16,%esi
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c31d: 89 f0 mov %esi,%eax
10c31f: 8d 65 f4 lea -0xc(%ebp),%esp
10c322: 5b pop %ebx
10c323: 5e pop %esi
10c324: 5f pop %edi
10c325: c9 leave
10c326: c3 ret
10c327: 90 nop
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
10c328: 83 ec 0c sub $0xc,%esp
10c32b: 53 push %ebx
10c32c: e8 73 03 00 00 call 10c6a4 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
10c331: 83 c4 10 add $0x10,%esp
10c334: 80 7d d7 00 cmpb $0x0,-0x29(%ebp)
10c338: 75 4e jne 10c388 <_POSIX_Condition_variables_Wait_support+0xd8>
the_cond->Mutex = *mutex;
10c33a: 8b 03 mov (%ebx),%eax
10c33c: 89 46 14 mov %eax,0x14(%esi)
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;
10c33f: c7 46 48 01 00 00 00 movl $0x1,0x48(%esi)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
10c346: a1 98 a2 12 00 mov 0x12a298,%eax
10c34b: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
10c352: 83 c6 18 add $0x18,%esi
10c355: 89 70 44 mov %esi,0x44(%eax)
_Thread_Executing->Wait.id = *cond;
10c358: 8b 17 mov (%edi),%edx
10c35a: 89 50 20 mov %edx,0x20(%eax)
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
10c35d: 50 push %eax
10c35e: 68 80 ff 10 00 push $0x10ff80
10c363: ff 75 10 pushl 0x10(%ebp)
10c366: 56 push %esi
10c367: e8 98 38 00 00 call 10fc04 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c36c: e8 b7 33 00 00 call 10f728 <_Thread_Enable_dispatch>
* a POSIX signal, then pthread_cond_wait returns spuriously,
* according to the POSIX standard. It means that pthread_cond_wait
* returns a success status, except for the fact that it was not
* woken up a pthread_cond_signal or a pthread_cond_broadcast.
*/
status = _Thread_Executing->Wait.return_code;
10c371: a1 98 a2 12 00 mov 0x12a298,%eax
10c376: 8b 70 34 mov 0x34(%eax),%esi
if ( status == EINTR )
10c379: 83 c4 10 add $0x10,%esp
10c37c: 83 fe 04 cmp $0x4,%esi
10c37f: 75 11 jne 10c392 <_POSIX_Condition_variables_Wait_support+0xe2>
status = 0;
10c381: 31 f6 xor %esi,%esi
10c383: eb 0d jmp 10c392 <_POSIX_Condition_variables_Wait_support+0xe2>
10c385: 8d 76 00 lea 0x0(%esi),%esi
} else {
_Thread_Enable_dispatch();
10c388: e8 9b 33 00 00 call 10f728 <_Thread_Enable_dispatch>
status = ETIMEDOUT;
10c38d: be 74 00 00 00 mov $0x74,%esi
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
10c392: 83 ec 0c sub $0xc,%esp
10c395: 53 push %ebx
10c396: e8 81 02 00 00 call 10c61c <pthread_mutex_lock>
if ( mutex_status )
10c39b: 83 c4 10 add $0x10,%esp
10c39e: 85 c0 test %eax,%eax
10c3a0: 0f 85 51 ff ff ff jne 10c2f7 <_POSIX_Condition_variables_Wait_support+0x47>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c3a6: 89 f0 mov %esi,%eax
10c3a8: 8d 65 f4 lea -0xc(%ebp),%esp
10c3ab: 5b pop %ebx
10c3ac: 5e pop %esi
10c3ad: 5f pop %edi
10c3ae: c9 leave
10c3af: c3 ret
00116368 <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
116368: 55 push %ebp
116369: 89 e5 mov %esp,%ebp
11636b: 57 push %edi
11636c: 56 push %esi
11636d: 53 push %ebx
11636e: 83 ec 24 sub $0x24,%esp
116371: 8b 5d 10 mov 0x10(%ebp),%ebx
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
116374: 68 ff 00 00 00 push $0xff
116379: ff 75 08 pushl 0x8(%ebp)
11637c: e8 b7 4c 00 00 call 11b038 <strnlen>
116381: 89 c6 mov %eax,%esi
116383: a1 90 fa 12 00 mov 0x12fa90,%eax
116388: 40 inc %eax
116389: a3 90 fa 12 00 mov %eax,0x12fa90
* There is no real basis for the default values. They will work
* but were not compared against any existing implementation for
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
11638e: 83 c4 10 add $0x10,%esp
116391: 85 db test %ebx,%ebx
116393: 0f 84 b7 00 00 00 je 116450 <_POSIX_Message_queue_Create_support+0xe8>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
116399: 8b 7b 04 mov 0x4(%ebx),%edi
11639c: 85 ff test %edi,%edi
11639e: 0f 8e f0 00 00 00 jle 116494 <_POSIX_Message_queue_Create_support+0x12c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
1163a4: 8b 5b 08 mov 0x8(%ebx),%ebx
1163a7: 89 5d e4 mov %ebx,-0x1c(%ebp)
1163aa: 85 db test %ebx,%ebx
1163ac: 0f 8e e2 00 00 00 jle 116494 <_POSIX_Message_queue_Create_support+0x12c>
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
_Objects_Allocate( &_POSIX_Message_queue_Information );
1163b2: 83 ec 0c sub $0xc,%esp
1163b5: 68 60 fe 12 00 push $0x12fe60
1163ba: e8 e1 c3 ff ff call 1127a0 <_Objects_Allocate>
1163bf: 89 c3 mov %eax,%ebx
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
1163c1: 83 c4 10 add $0x10,%esp
1163c4: 85 c0 test %eax,%eax
1163c6: 0f 84 0a 01 00 00 je 1164d6 <_POSIX_Message_queue_Create_support+0x16e>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
1163cc: 8b 45 0c mov 0xc(%ebp),%eax
1163cf: 89 43 10 mov %eax,0x10(%ebx)
the_mq->named = true;
1163d2: c6 43 14 01 movb $0x1,0x14(%ebx)
the_mq->open_count = 1;
1163d6: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx)
the_mq->linked = true;
1163dd: c6 43 15 01 movb $0x1,0x15(%ebx)
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
1163e1: 8d 56 01 lea 0x1(%esi),%edx
1163e4: 83 ec 0c sub $0xc,%esp
1163e7: 52 push %edx
1163e8: 89 55 e0 mov %edx,-0x20(%ebp)
1163eb: e8 dc e4 ff ff call 1148cc <_Workspace_Allocate>
1163f0: 89 c6 mov %eax,%esi
if (!name) {
1163f2: 83 c4 10 add $0x10,%esp
1163f5: 85 c0 test %eax,%eax
1163f7: 8b 55 e0 mov -0x20(%ebp),%edx
1163fa: 0f 84 ab 00 00 00 je 1164ab <_POSIX_Message_queue_Create_support+0x143>
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strncpy( name, name_arg, n+1 );
116400: 50 push %eax
116401: 52 push %edx
116402: ff 75 08 pushl 0x8(%ebp)
116405: 56 push %esi
116406: e8 b1 4b 00 00 call 11afbc <strncpy>
*
* Joel: Cite POSIX or OpenGroup on above statement so we can determine
* if it is a real requirement.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
11640b: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
if ( !_CORE_message_queue_Initialize(
116412: ff 75 e4 pushl -0x1c(%ebp)
116415: 57 push %edi
* current scheduling policy.
*
* Joel: Cite POSIX or OpenGroup on above statement so we can determine
* if it is a real requirement.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
116416: 8d 43 5c lea 0x5c(%ebx),%eax
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( !_CORE_message_queue_Initialize(
116419: 50 push %eax
11641a: 8d 43 1c lea 0x1c(%ebx),%eax
11641d: 50 push %eax
11641e: e8 25 0f 00 00 call 117348 <_CORE_message_queue_Initialize>
116423: 83 c4 20 add $0x20,%esp
116426: 84 c0 test %al,%al
116428: 74 3a je 116464 <_POSIX_Message_queue_Create_support+0xfc>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
11642a: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11642e: a1 7c fe 12 00 mov 0x12fe7c,%eax
116433: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
116436: 89 73 0c mov %esi,0xc(%ebx)
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
116439: 8b 45 14 mov 0x14(%ebp),%eax
11643c: 89 18 mov %ebx,(%eax)
_Thread_Enable_dispatch();
11643e: e8 49 d3 ff ff call 11378c <_Thread_Enable_dispatch>
return 0;
116443: 31 c0 xor %eax,%eax
}
116445: 8d 65 f4 lea -0xc(%ebp),%esp
116448: 5b pop %ebx
116449: 5e pop %esi
11644a: 5f pop %edi
11644b: c9 leave
11644c: c3 ret
11644d: 8d 76 00 lea 0x0(%esi),%esi
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
116450: c7 45 e4 10 00 00 00 movl $0x10,-0x1c(%ebp)
* but were not compared against any existing implementation for
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
attr.mq_maxmsg = 10;
116457: bf 0a 00 00 00 mov $0xa,%edi
11645c: e9 51 ff ff ff jmp 1163b2 <_POSIX_Message_queue_Create_support+0x4a>
116461: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
116464: 83 ec 08 sub $0x8,%esp
116467: 53 push %ebx
116468: 68 60 fe 12 00 push $0x12fe60
11646d: e8 a6 c6 ff ff call 112b18 <_Objects_Free>
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
116472: 89 34 24 mov %esi,(%esp)
116475: e8 6e e4 ff ff call 1148e8 <_Workspace_Free>
_Thread_Enable_dispatch();
11647a: e8 0d d3 ff ff call 11378c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
11647f: e8 38 34 00 00 call 1198bc <__errno>
116484: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11648a: 83 c4 10 add $0x10,%esp
11648d: b8 ff ff ff ff mov $0xffffffff,%eax
116492: eb b1 jmp 116445 <_POSIX_Message_queue_Create_support+0xdd>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
_Thread_Enable_dispatch();
116494: e8 f3 d2 ff ff call 11378c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
116499: e8 1e 34 00 00 call 1198bc <__errno>
11649e: c7 00 16 00 00 00 movl $0x16,(%eax)
1164a4: b8 ff ff ff ff mov $0xffffffff,%eax
1164a9: eb 9a jmp 116445 <_POSIX_Message_queue_Create_support+0xdd>
1164ab: 83 ec 08 sub $0x8,%esp
1164ae: 53 push %ebx
1164af: 68 60 fe 12 00 push $0x12fe60
1164b4: e8 5f c6 ff ff call 112b18 <_Objects_Free>
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
1164b9: e8 ce d2 ff ff call 11378c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOMEM );
1164be: e8 f9 33 00 00 call 1198bc <__errno>
1164c3: c7 00 0c 00 00 00 movl $0xc,(%eax)
1164c9: 83 c4 10 add $0x10,%esp
1164cc: b8 ff ff ff ff mov $0xffffffff,%eax
1164d1: e9 6f ff ff ff jmp 116445 <_POSIX_Message_queue_Create_support+0xdd>
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
1164d6: e8 b1 d2 ff ff call 11378c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
1164db: e8 dc 33 00 00 call 1198bc <__errno>
1164e0: c7 00 17 00 00 00 movl $0x17,(%eax)
1164e6: b8 ff ff ff ff mov $0xffffffff,%eax
1164eb: e9 55 ff ff ff jmp 116445 <_POSIX_Message_queue_Create_support+0xdd>
001164f0 <_POSIX_Message_queue_Name_to_id>:
*/
int _POSIX_Message_queue_Name_to_id(
const char *name,
Objects_Id *id
)
{
1164f0: 55 push %ebp
1164f1: 89 e5 mov %esp,%ebp
1164f3: 53 push %ebx
1164f4: 83 ec 14 sub $0x14,%esp
1164f7: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
1164fa: 85 db test %ebx,%ebx
1164fc: 74 05 je 116503 <_POSIX_Message_queue_Name_to_id+0x13>
return EINVAL;
if ( !name[0] )
1164fe: 80 3b 00 cmpb $0x0,(%ebx)
116501: 75 0d jne 116510 <_POSIX_Message_queue_Name_to_id+0x20>
return EINVAL;
116503: b8 16 00 00 00 mov $0x16,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
116508: 8b 5d fc mov -0x4(%ebp),%ebx
11650b: c9 leave
11650c: c3 ret
11650d: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
if ( !name[0] )
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
116510: 83 ec 08 sub $0x8,%esp
116513: 68 ff 00 00 00 push $0xff
116518: 53 push %ebx
116519: e8 1a 4b 00 00 call 11b038 <strnlen>
11651e: 83 c4 10 add $0x10,%esp
116521: 3d fe 00 00 00 cmp $0xfe,%eax
116526: 76 0c jbe 116534 <_POSIX_Message_queue_Name_to_id+0x44>
return ENAMETOOLONG;
116528: b8 5b 00 00 00 mov $0x5b,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
11652d: 8b 5d fc mov -0x4(%ebp),%ebx
116530: c9 leave
116531: c3 ret
116532: 66 90 xchg %ax,%ax
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
return ENAMETOOLONG;
status = _Objects_Name_to_id_string(
116534: 50 push %eax
116535: 8d 45 f4 lea -0xc(%ebp),%eax
116538: 50 push %eax
116539: 53 push %ebx
11653a: 68 60 fe 12 00 push $0x12fe60
11653f: e8 0c 14 00 00 call 117950 <_Objects_Name_to_id_string>
&_POSIX_Message_queue_Information,
name,
&the_id
);
*id = the_id;
116544: 8b 4d f4 mov -0xc(%ebp),%ecx
116547: 8b 55 0c mov 0xc(%ebp),%edx
11654a: 89 0a mov %ecx,(%edx)
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
11654c: 83 c4 10 add $0x10,%esp
return 0;
11654f: 83 f8 01 cmp $0x1,%eax
116552: 19 c0 sbb %eax,%eax
116554: f7 d0 not %eax
116556: 83 e0 02 and $0x2,%eax
return ENOENT;
}
116559: 8b 5d fc mov -0x4(%ebp),%ebx
11655c: c9 leave
11655d: c3 ret
0010fcd8 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10fcd8: 55 push %ebp
10fcd9: 89 e5 mov %esp,%ebp
10fcdb: 53 push %ebx
10fcdc: 83 ec 28 sub $0x28,%esp
10fcdf: 8b 5d 08 mov 0x8(%ebp),%ebx
10fce2: 8a 45 18 mov 0x18(%ebp),%al
10fce5: 88 45 e7 mov %al,-0x19(%ebp)
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
10fce8: 8d 45 f4 lea -0xc(%ebp),%eax
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(
10fceb: 50 push %eax
10fcec: 53 push %ebx
10fced: 68 00 00 13 00 push $0x130000
10fcf2: e8 61 2f 00 00 call 112c58 <_Objects_Get>
switch ( location ) {
10fcf7: 83 c4 10 add $0x10,%esp
10fcfa: 8b 55 f4 mov -0xc(%ebp),%edx
10fcfd: 85 d2 test %edx,%edx
10fcff: 74 17 je 10fd18 <_POSIX_Message_queue_Receive_support+0x40>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10fd01: e8 b6 9b 00 00 call 1198bc <__errno>
10fd06: c7 00 09 00 00 00 movl $0x9,(%eax)
10fd0c: b8 ff ff ff ff mov $0xffffffff,%eax
}
10fd11: 8b 5d fc mov -0x4(%ebp),%ebx
10fd14: c9 leave
10fd15: c3 ret
10fd16: 66 90 xchg %ax,%ax
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
10fd18: 8b 50 14 mov 0x14(%eax),%edx
10fd1b: 89 d1 mov %edx,%ecx
10fd1d: 83 e1 03 and $0x3,%ecx
10fd20: 49 dec %ecx
10fd21: 0f 84 af 00 00 00 je 10fdd6 <_POSIX_Message_queue_Receive_support+0xfe>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10fd27: 8b 40 10 mov 0x10(%eax),%eax
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
10fd2a: 8b 4d 10 mov 0x10(%ebp),%ecx
10fd2d: 39 48 68 cmp %ecx,0x68(%eax)
10fd30: 77 62 ja 10fd94 <_POSIX_Message_queue_Receive_support+0xbc>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
10fd32: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10fd39: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10fd3d: 75 45 jne 10fd84 <_POSIX_Message_queue_Receive_support+0xac><== ALWAYS TAKEN
10fd3f: 31 d2 xor %edx,%edx <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
10fd41: 83 ec 08 sub $0x8,%esp
10fd44: ff 75 1c pushl 0x1c(%ebp)
10fd47: 52 push %edx
10fd48: 8d 55 f0 lea -0x10(%ebp),%edx
10fd4b: 52 push %edx
10fd4c: ff 75 0c pushl 0xc(%ebp)
10fd4f: 53 push %ebx
10fd50: 83 c0 1c add $0x1c,%eax
10fd53: 50 push %eax
10fd54: e8 a3 1f 00 00 call 111cfc <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
10fd59: 83 c4 20 add $0x20,%esp
10fd5c: e8 2b 3a 00 00 call 11378c <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
10fd61: 8b 15 78 00 13 00 mov 0x130078,%edx
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return ((priority >= 0) ? priority : -priority);
10fd67: 8b 42 24 mov 0x24(%edx),%eax
10fd6a: 85 c0 test %eax,%eax
10fd6c: 78 22 js 10fd90 <_POSIX_Message_queue_Receive_support+0xb8>
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
10fd6e: 8b 4d 14 mov 0x14(%ebp),%ecx
10fd71: 89 01 mov %eax,(%ecx)
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
10fd73: 8b 42 34 mov 0x34(%edx),%eax
10fd76: 85 c0 test %eax,%eax
10fd78: 75 36 jne 10fdb0 <_POSIX_Message_queue_Receive_support+0xd8>
return length_out;
10fd7a: 8b 45 f0 mov -0x10(%ebp),%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10fd7d: 8b 5d fc mov -0x4(%ebp),%ebx
10fd80: c9 leave
10fd81: c3 ret
10fd82: 66 90 xchg %ax,%ax
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10fd84: 80 e6 40 and $0x40,%dh
10fd87: 0f 94 c2 sete %dl
10fd8a: 0f b6 d2 movzbl %dl,%edx
10fd8d: eb b2 jmp 10fd41 <_POSIX_Message_queue_Receive_support+0x69>
10fd8f: 90 nop
10fd90: f7 d8 neg %eax
10fd92: eb da jmp 10fd6e <_POSIX_Message_queue_Receive_support+0x96>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
10fd94: e8 f3 39 00 00 call 11378c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
10fd99: e8 1e 9b 00 00 call 1198bc <__errno>
10fd9e: c7 00 7a 00 00 00 movl $0x7a,(%eax)
10fda4: b8 ff ff ff ff mov $0xffffffff,%eax
10fda9: e9 63 ff ff ff jmp 10fd11 <_POSIX_Message_queue_Receive_support+0x39>
10fdae: 66 90 xchg %ax,%ax
_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(
10fdb0: e8 07 9b 00 00 call 1198bc <__errno>
10fdb5: 89 c3 mov %eax,%ebx
10fdb7: 83 ec 0c sub $0xc,%esp
10fdba: a1 78 00 13 00 mov 0x130078,%eax
10fdbf: ff 70 34 pushl 0x34(%eax)
10fdc2: e8 29 02 00 00 call 10fff0 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10fdc7: 89 03 mov %eax,(%ebx)
10fdc9: 83 c4 10 add $0x10,%esp
10fdcc: b8 ff ff ff ff mov $0xffffffff,%eax
10fdd1: e9 3b ff ff ff jmp 10fd11 <_POSIX_Message_queue_Receive_support+0x39>
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();
10fdd6: e8 b1 39 00 00 call 11378c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
10fddb: e8 dc 9a 00 00 call 1198bc <__errno>
10fde0: c7 00 09 00 00 00 movl $0x9,(%eax)
10fde6: b8 ff ff ff ff mov $0xffffffff,%eax
10fdeb: e9 21 ff ff ff jmp 10fd11 <_POSIX_Message_queue_Receive_support+0x39>
0010fe10 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10fe10: 55 push %ebp
10fe11: 89 e5 mov %esp,%ebp
10fe13: 56 push %esi
10fe14: 53 push %ebx
10fe15: 83 ec 20 sub $0x20,%esp
10fe18: 8b 75 08 mov 0x8(%ebp),%esi
10fe1b: 8b 5d 14 mov 0x14(%ebp),%ebx
10fe1e: 8a 55 18 mov 0x18(%ebp),%dl
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
10fe21: 83 fb 20 cmp $0x20,%ebx
10fe24: 0f 87 92 00 00 00 ja 10febc <_POSIX_Message_queue_Send_support+0xac>
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(
10fe2a: 51 push %ecx
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
10fe2b: 8d 45 f4 lea -0xc(%ebp),%eax
10fe2e: 50 push %eax
10fe2f: 56 push %esi
10fe30: 68 00 00 13 00 push $0x130000
10fe35: 88 55 e4 mov %dl,-0x1c(%ebp)
10fe38: e8 1b 2e 00 00 call 112c58 <_Objects_Get>
switch ( location ) {
10fe3d: 83 c4 10 add $0x10,%esp
10fe40: 8b 55 f4 mov -0xc(%ebp),%edx
10fe43: 85 d2 test %edx,%edx
10fe45: 8a 55 e4 mov -0x1c(%ebp),%dl
10fe48: 75 5e jne 10fea8 <_POSIX_Message_queue_Send_support+0x98>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
10fe4a: 8b 48 14 mov 0x14(%eax),%ecx
10fe4d: f6 c1 03 test $0x3,%cl
10fe50: 74 7e je 10fed0 <_POSIX_Message_queue_Send_support+0xc0>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10fe52: 8b 40 10 mov 0x10(%eax),%eax
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10fe55: 84 d2 test %dl,%dl
10fe57: 75 37 jne 10fe90 <_POSIX_Message_queue_Send_support+0x80>
10fe59: 31 d2 xor %edx,%edx
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
10fe5b: ff 75 1c pushl 0x1c(%ebp)
10fe5e: 52 push %edx
RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
unsigned int priority
)
{
return priority * -1;
10fe5f: f7 db neg %ebx
10fe61: 53 push %ebx
10fe62: 6a 00 push $0x0
10fe64: 56 push %esi
10fe65: ff 75 10 pushl 0x10(%ebp)
10fe68: ff 75 0c pushl 0xc(%ebp)
10fe6b: 83 c0 1c add $0x1c,%eax
10fe6e: 50 push %eax
10fe6f: e8 b4 1f 00 00 call 111e28 <_CORE_message_queue_Submit>
10fe74: 89 c3 mov %eax,%ebx
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
10fe76: 83 c4 20 add $0x20,%esp
10fe79: e8 0e 39 00 00 call 11378c <_Thread_Enable_dispatch>
* after it wakes up. The returned status is correct for
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
10fe7e: 83 fb 07 cmp $0x7,%ebx
10fe81: 74 19 je 10fe9c <_POSIX_Message_queue_Send_support+0x8c>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
10fe83: 85 db test %ebx,%ebx
10fe85: 75 61 jne 10fee8 <_POSIX_Message_queue_Send_support+0xd8>
return msg_status;
10fe87: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10fe89: 8d 65 f8 lea -0x8(%ebp),%esp
10fe8c: 5b pop %ebx
10fe8d: 5e pop %esi
10fe8e: c9 leave
10fe8f: c3 ret
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10fe90: 31 d2 xor %edx,%edx
10fe92: f6 c5 40 test $0x40,%ch
10fe95: 0f 94 c2 sete %dl
10fe98: eb c1 jmp 10fe5b <_POSIX_Message_queue_Send_support+0x4b>
10fe9a: 66 90 xchg %ax,%ax
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
msg_status = _Thread_Executing->Wait.return_code;
10fe9c: a1 78 00 13 00 mov 0x130078,%eax
10fea1: 8b 58 34 mov 0x34(%eax),%ebx
10fea4: eb dd jmp 10fe83 <_POSIX_Message_queue_Send_support+0x73>
10fea6: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10fea8: e8 0f 9a 00 00 call 1198bc <__errno>
10fead: c7 00 09 00 00 00 movl $0x9,(%eax)
10feb3: b8 ff ff ff ff mov $0xffffffff,%eax
10feb8: eb cf jmp 10fe89 <_POSIX_Message_queue_Send_support+0x79>
10feba: 66 90 xchg %ax,%ax
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
10febc: e8 fb 99 00 00 call 1198bc <__errno>
10fec1: c7 00 16 00 00 00 movl $0x16,(%eax)
10fec7: b8 ff ff ff ff mov $0xffffffff,%eax
10fecc: eb bb jmp 10fe89 <_POSIX_Message_queue_Send_support+0x79>
10fece: 66 90 xchg %ax,%ax
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
10fed0: e8 b7 38 00 00 call 11378c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
10fed5: e8 e2 99 00 00 call 1198bc <__errno>
10feda: c7 00 09 00 00 00 movl $0x9,(%eax)
10fee0: b8 ff ff ff ff mov $0xffffffff,%eax
10fee5: eb a2 jmp 10fe89 <_POSIX_Message_queue_Send_support+0x79>
10fee7: 90 nop
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
10fee8: e8 cf 99 00 00 call 1198bc <__errno>
10feed: 89 c6 mov %eax,%esi
10feef: 83 ec 0c sub $0xc,%esp
10fef2: 53 push %ebx
10fef3: e8 f8 00 00 00 call 10fff0 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10fef8: 89 06 mov %eax,(%esi)
10fefa: 83 c4 10 add $0x10,%esp
10fefd: b8 ff ff ff ff mov $0xffffffff,%eax
10ff02: eb 85 jmp 10fe89 <_POSIX_Message_queue_Send_support+0x79>
0010d0e4 <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
10d0e4: 55 push %ebp
10d0e5: 89 e5 mov %esp,%ebp
10d0e7: 56 push %esi
10d0e8: 53 push %ebx
10d0e9: 8b 5d 08 mov 0x8(%ebp),%ebx
10d0ec: 8b 75 0c mov 0xc(%ebp),%esi
___POSIX_Mutex_Get_support_error_check( mutex, location );
10d0ef: 85 db test %ebx,%ebx
10d0f1: 74 39 je 10d12c <_POSIX_Mutex_Get+0x48>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d0f3: 8b 03 mov (%ebx),%eax
10d0f5: 83 f8 ff cmp $0xffffffff,%eax
10d0f8: 74 1a je 10d114 <_POSIX_Mutex_Get+0x30>
return (POSIX_Mutex_Control *)
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
10d0fa: 52 push %edx
10d0fb: 56 push %esi
10d0fc: 50 push %eax
10d0fd: 68 80 b9 12 00 push $0x12b980
10d102: e8 f1 2b 00 00 call 10fcf8 <_Objects_Get>
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
return (POSIX_Mutex_Control *)
10d107: 83 c4 10 add $0x10,%esp
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
}
10d10a: 8d 65 f8 lea -0x8(%ebp),%esp
10d10d: 5b pop %ebx
10d10e: 5e pop %esi
10d10f: c9 leave
10d110: c3 ret
10d111: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations *location
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d114: 83 ec 08 sub $0x8,%esp
10d117: 6a 00 push $0x0
10d119: 53 push %ebx
10d11a: e8 b9 00 00 00 call 10d1d8 <pthread_mutex_init>
10d11f: 83 c4 10 add $0x10,%esp
10d122: 85 c0 test %eax,%eax
10d124: 75 06 jne 10d12c <_POSIX_Mutex_Get+0x48>
10d126: 8b 03 mov (%ebx),%eax
10d128: eb d0 jmp 10d0fa <_POSIX_Mutex_Get+0x16>
10d12a: 66 90 xchg %ax,%ax
10d12c: c7 06 01 00 00 00 movl $0x1,(%esi)
10d132: 31 c0 xor %eax,%eax
10d134: eb d4 jmp 10d10a <_POSIX_Mutex_Get+0x26>
0010d138 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
10d138: 55 push %ebp
10d139: 89 e5 mov %esp,%ebp
10d13b: 56 push %esi
10d13c: 53 push %ebx
10d13d: 8b 5d 08 mov 0x8(%ebp),%ebx
10d140: 8b 75 0c mov 0xc(%ebp),%esi
___POSIX_Mutex_Get_support_error_check( mutex, location );
10d143: 85 db test %ebx,%ebx
10d145: 74 39 je 10d180 <_POSIX_Mutex_Get_interrupt_disable+0x48>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d147: 8b 03 mov (%ebx),%eax
10d149: 83 f8 ff cmp $0xffffffff,%eax
10d14c: 74 1a je 10d168 <_POSIX_Mutex_Get_interrupt_disable+0x30>
return (POSIX_Mutex_Control *) _Objects_Get_isr_disable(
10d14e: ff 75 10 pushl 0x10(%ebp)
10d151: 56 push %esi
10d152: 50 push %eax
10d153: 68 80 b9 12 00 push $0x12b980
10d158: e8 43 2b 00 00 call 10fca0 <_Objects_Get_isr_disable>
10d15d: 83 c4 10 add $0x10,%esp
&_POSIX_Mutex_Information,
(Objects_Id) *mutex,
location,
level
);
}
10d160: 8d 65 f8 lea -0x8(%ebp),%esp
10d163: 5b pop %ebx
10d164: 5e pop %esi
10d165: c9 leave
10d166: c3 ret
10d167: 90 nop
ISR_Level *level
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d168: 83 ec 08 sub $0x8,%esp
10d16b: 6a 00 push $0x0
10d16d: 53 push %ebx
10d16e: e8 65 00 00 00 call 10d1d8 <pthread_mutex_init>
10d173: 83 c4 10 add $0x10,%esp
10d176: 85 c0 test %eax,%eax
10d178: 75 06 jne 10d180 <_POSIX_Mutex_Get_interrupt_disable+0x48>
10d17a: 8b 03 mov (%ebx),%eax
10d17c: eb d0 jmp 10d14e <_POSIX_Mutex_Get_interrupt_disable+0x16>
10d17e: 66 90 xchg %ax,%ax
10d180: c7 06 01 00 00 00 movl $0x1,(%esi)
10d186: 31 c0 xor %eax,%eax
10d188: eb d6 jmp 10d160 <_POSIX_Mutex_Get_interrupt_disable+0x28>
0010d338 <_POSIX_Mutex_Lock_support>:
int _POSIX_Mutex_Lock_support(
pthread_mutex_t *mutex,
bool blocking,
Watchdog_Interval timeout
)
{
10d338: 55 push %ebp
10d339: 89 e5 mov %esp,%ebp
10d33b: 53 push %ebx
10d33c: 83 ec 18 sub $0x18,%esp
10d33f: 8a 5d 0c mov 0xc(%ebp),%bl
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
ISR_Level level;
the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level );
10d342: 8d 45 f0 lea -0x10(%ebp),%eax
10d345: 50 push %eax
10d346: 8d 45 f4 lea -0xc(%ebp),%eax
10d349: 50 push %eax
10d34a: ff 75 08 pushl 0x8(%ebp)
10d34d: e8 e6 fd ff ff call 10d138 <_POSIX_Mutex_Get_interrupt_disable>
switch ( location ) {
10d352: 83 c4 10 add $0x10,%esp
10d355: 8b 55 f4 mov -0xc(%ebp),%edx
10d358: 85 d2 test %edx,%edx
10d35a: 75 34 jne 10d390 <_POSIX_Mutex_Lock_support+0x58>
case OBJECTS_LOCAL:
_CORE_mutex_Seize(
10d35c: 83 ec 0c sub $0xc,%esp
10d35f: ff 75 f0 pushl -0x10(%ebp)
10d362: ff 75 10 pushl 0x10(%ebp)
10d365: 0f b6 db movzbl %bl,%ebx
10d368: 53 push %ebx
10d369: ff 70 08 pushl 0x8(%eax)
10d36c: 83 c0 14 add $0x14,%eax
10d36f: 50 push %eax
10d370: e8 47 1d 00 00 call 10f0bc <_CORE_mutex_Seize>
the_mutex->Object.id,
blocking,
timeout,
level
);
return _POSIX_Mutex_Translate_core_mutex_return_code(
10d375: 83 c4 14 add $0x14,%esp
(CORE_mutex_Status) _Thread_Executing->Wait.return_code
10d378: a1 58 bb 12 00 mov 0x12bb58,%eax
the_mutex->Object.id,
blocking,
timeout,
level
);
return _POSIX_Mutex_Translate_core_mutex_return_code(
10d37d: ff 70 34 pushl 0x34(%eax)
10d380: e8 1b 01 00 00 call 10d4a0 <_POSIX_Mutex_Translate_core_mutex_return_code>
10d385: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d388: 8b 5d fc mov -0x4(%ebp),%ebx
10d38b: c9 leave
10d38c: c3 ret
10d38d: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10d390: b8 16 00 00 00 mov $0x16,%eax
}
10d395: 8b 5d fc mov -0x4(%ebp),%ebx
10d398: c9 leave
10d399: c3 ret
00114948 <_POSIX_Semaphore_Create_support>:
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
114948: 55 push %ebp
114949: 89 e5 mov %esp,%ebp
11494b: 56 push %esi
11494c: 53 push %ebx
11494d: 8b 5d 08 mov 0x8(%ebp),%ebx
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)
114950: 8b 55 0c mov 0xc(%ebp),%edx
114953: 85 d2 test %edx,%edx
114955: 0f 85 b9 00 00 00 jne 114a14 <_POSIX_Semaphore_Create_support+0xcc>
rtems_set_errno_and_return_minus_one( ENOSYS );
if ( name ) {
11495b: 85 db test %ebx,%ebx
11495d: 74 1c je 11497b <_POSIX_Semaphore_Create_support+0x33>
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
11495f: 83 ec 08 sub $0x8,%esp
114962: 68 ff 00 00 00 push $0xff
114967: 53 push %ebx
114968: e8 2b 3e 00 00 call 118798 <strnlen>
11496d: 83 c4 10 add $0x10,%esp
114970: 3d fe 00 00 00 cmp $0xfe,%eax
114975: 0f 87 ad 00 00 00 ja 114a28 <_POSIX_Semaphore_Create_support+0xe0>
11497b: a1 d0 d2 12 00 mov 0x12d2d0,%eax
114980: 40 inc %eax
114981: a3 d0 d2 12 00 mov %eax,0x12d2d0
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
_Objects_Allocate( &_POSIX_Semaphore_Information );
114986: 83 ec 0c sub $0xc,%esp
114989: 68 20 d6 12 00 push $0x12d620
11498e: e8 91 b9 ff ff call 110324 <_Objects_Allocate>
114993: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
114995: 83 c4 10 add $0x10,%esp
114998: 85 c0 test %eax,%eax
11499a: 0f 84 9a 00 00 00 je 114a3a <_POSIX_Semaphore_Create_support+0xf2>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
1149a0: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
if ( name ) {
1149a7: 85 db test %ebx,%ebx
1149a9: 74 55 je 114a00 <_POSIX_Semaphore_Create_support+0xb8>
the_semaphore->named = true;
1149ab: c6 40 14 01 movb $0x1,0x14(%eax)
the_semaphore->open_count = 1;
1149af: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax)
the_semaphore->linked = true;
1149b6: c6 40 15 01 movb $0x1,0x15(%eax)
* 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;
1149ba: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
1149c1: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
1149c8: 50 push %eax
1149c9: ff 75 10 pushl 0x10(%ebp)
the_semaphore->named = false;
the_semaphore->open_count = 0;
the_semaphore->linked = false;
}
the_sem_attr = &the_semaphore->Semaphore.Attributes;
1149cc: 8d 46 5c lea 0x5c(%esi),%eax
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
1149cf: 50 push %eax
1149d0: 8d 46 1c lea 0x1c(%esi),%eax
1149d3: 50 push %eax
1149d4: e8 cb b3 ff ff call 10fda4 <_CORE_semaphore_Initialize>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
1149d9: 0f b7 56 08 movzwl 0x8(%esi),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1149dd: a1 3c d6 12 00 mov 0x12d63c,%eax
1149e2: 89 34 90 mov %esi,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
1149e5: 89 5e 0c mov %ebx,0xc(%esi)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
1149e8: 8b 45 14 mov 0x14(%ebp),%eax
1149eb: 89 30 mov %esi,(%eax)
_Thread_Enable_dispatch();
1149ed: e8 1e c9 ff ff call 111310 <_Thread_Enable_dispatch>
return 0;
1149f2: 83 c4 10 add $0x10,%esp
1149f5: 31 c0 xor %eax,%eax
}
1149f7: 8d 65 f8 lea -0x8(%ebp),%esp
1149fa: 5b pop %ebx
1149fb: 5e pop %esi
1149fc: c9 leave
1149fd: c3 ret
1149fe: 66 90 xchg %ax,%ax
if ( name ) {
the_semaphore->named = true;
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
114a00: c6 40 14 00 movb $0x0,0x14(%eax)
the_semaphore->open_count = 0;
114a04: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_semaphore->linked = false;
114a0b: c6 40 15 00 movb $0x0,0x15(%eax)
114a0f: eb a9 jmp 1149ba <_POSIX_Semaphore_Create_support+0x72>
114a11: 8d 76 00 lea 0x0(%esi),%esi
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 );
114a14: e8 47 2c 00 00 call 117660 <__errno>
114a19: c7 00 58 00 00 00 movl $0x58,(%eax)
114a1f: b8 ff ff ff ff mov $0xffffffff,%eax
114a24: eb d1 jmp 1149f7 <_POSIX_Semaphore_Create_support+0xaf>
114a26: 66 90 xchg %ax,%ax
if ( name ) {
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
114a28: e8 33 2c 00 00 call 117660 <__errno>
114a2d: c7 00 5b 00 00 00 movl $0x5b,(%eax)
114a33: b8 ff ff ff ff mov $0xffffffff,%eax
114a38: eb bd jmp 1149f7 <_POSIX_Semaphore_Create_support+0xaf>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
114a3a: e8 d1 c8 ff ff call 111310 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
114a3f: e8 1c 2c 00 00 call 117660 <__errno>
114a44: c7 00 1c 00 00 00 movl $0x1c,(%eax)
114a4a: b8 ff ff ff ff mov $0xffffffff,%eax
114a4f: eb a6 jmp 1149f7 <_POSIX_Semaphore_Create_support+0xaf>
00114aa4 <_POSIX_Semaphore_Name_to_id>:
int _POSIX_Semaphore_Name_to_id(
const char *name,
sem_t *id
)
{
114aa4: 55 push %ebp
114aa5: 89 e5 mov %esp,%ebp
114aa7: 83 ec 18 sub $0x18,%esp
114aaa: 8b 45 08 mov 0x8(%ebp),%eax
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
114aad: 85 c0 test %eax,%eax
114aaf: 74 05 je 114ab6 <_POSIX_Semaphore_Name_to_id+0x12>
return EINVAL;
if ( !name[0] )
114ab1: 80 38 00 cmpb $0x0,(%eax)
114ab4: 75 0a jne 114ac0 <_POSIX_Semaphore_Name_to_id+0x1c>
return EINVAL;
114ab6: b8 16 00 00 00 mov $0x16,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
114abb: c9 leave
114abc: c3 ret
114abd: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
if ( !name[0] )
return EINVAL;
status = _Objects_Name_to_id_string(
114ac0: 52 push %edx
114ac1: 8d 55 f4 lea -0xc(%ebp),%edx
114ac4: 52 push %edx
114ac5: 50 push %eax
114ac6: 68 20 d6 12 00 push $0x12d620
114acb: e8 78 0c 00 00 call 115748 <_Objects_Name_to_id_string>
&_POSIX_Semaphore_Information,
name,
&the_id
);
*id = the_id;
114ad0: 8b 4d f4 mov -0xc(%ebp),%ecx
114ad3: 8b 55 0c mov 0xc(%ebp),%edx
114ad6: 89 0a mov %ecx,(%edx)
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
114ad8: 83 c4 10 add $0x10,%esp
return 0;
114adb: 83 f8 01 cmp $0x1,%eax
114ade: 19 c0 sbb %eax,%eax
114ae0: f7 d0 not %eax
114ae2: 83 e0 02 and $0x2,%eax
return ENOENT;
}
114ae5: c9 leave
114ae6: c3 ret
00114b10 <_POSIX_Semaphore_Wait_support>:
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,
Watchdog_Interval timeout
)
{
114b10: 55 push %ebp
114b11: 89 e5 mov %esp,%ebp
114b13: 53 push %ebx
114b14: 83 ec 18 sub $0x18,%esp
114b17: 8a 5d 0c mov 0xc(%ebp),%bl
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
114b1a: 8d 45 f4 lea -0xc(%ebp),%eax
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
_Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location );
114b1d: 50 push %eax
114b1e: 8b 45 08 mov 0x8(%ebp),%eax
114b21: ff 30 pushl (%eax)
114b23: 68 20 d6 12 00 push $0x12d620
114b28: e8 af bc ff ff call 1107dc <_Objects_Get>
switch ( location ) {
114b2d: 83 c4 10 add $0x10,%esp
114b30: 8b 55 f4 mov -0xc(%ebp),%edx
114b33: 85 d2 test %edx,%edx
114b35: 74 15 je 114b4c <_POSIX_Semaphore_Wait_support+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
114b37: e8 24 2b 00 00 call 117660 <__errno>
114b3c: c7 00 16 00 00 00 movl $0x16,(%eax)
114b42: b8 ff ff ff ff mov $0xffffffff,%eax
}
114b47: 8b 5d fc mov -0x4(%ebp),%ebx
114b4a: c9 leave
114b4b: c3 ret
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
114b4c: ff 75 10 pushl 0x10(%ebp)
114b4f: 0f b6 db movzbl %bl,%ebx
114b52: 53 push %ebx
114b53: ff 70 08 pushl 0x8(%eax)
114b56: 83 c0 1c add $0x1c,%eax
114b59: 50 push %eax
114b5a: e8 29 07 00 00 call 115288 <_CORE_semaphore_Seize>
&the_semaphore->Semaphore,
the_semaphore->Object.id,
blocking,
timeout
);
_Thread_Enable_dispatch();
114b5f: e8 ac c7 ff ff call 111310 <_Thread_Enable_dispatch>
if ( !_Thread_Executing->Wait.return_code )
114b64: 83 c4 10 add $0x10,%esp
114b67: a1 b8 d8 12 00 mov 0x12d8b8,%eax
114b6c: 8b 40 34 mov 0x34(%eax),%eax
114b6f: 85 c0 test %eax,%eax
114b71: 75 09 jne 114b7c <_POSIX_Semaphore_Wait_support+0x6c>
return 0;
114b73: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
114b75: 8b 5d fc mov -0x4(%ebp),%ebx
114b78: c9 leave
114b79: c3 ret
114b7a: 66 90 xchg %ax,%ax
_Thread_Enable_dispatch();
if ( !_Thread_Executing->Wait.return_code )
return 0;
rtems_set_errno_and_return_minus_one(
114b7c: e8 df 2a 00 00 call 117660 <__errno>
114b81: 89 c3 mov %eax,%ebx
114b83: 83 ec 0c sub $0xc,%esp
114b86: a1 b8 d8 12 00 mov 0x12d8b8,%eax
114b8b: ff 70 34 pushl 0x34(%eax)
114b8e: e8 3d 26 00 00 call 1171d0 <_POSIX_Semaphore_Translate_core_semaphore_return_code>
114b93: 89 03 mov %eax,(%ebx)
114b95: 83 c4 10 add $0x10,%esp
114b98: b8 ff ff ff ff mov $0xffffffff,%eax
114b9d: eb a8 jmp 114b47 <_POSIX_Semaphore_Wait_support+0x37>
001106dc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
1106dc: 55 push %ebp
1106dd: 89 e5 mov %esp,%ebp
1106df: 83 ec 08 sub $0x8,%esp
1106e2: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
1106e5: 8b 82 ec 00 00 00 mov 0xec(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
1106eb: 8b 88 d8 00 00 00 mov 0xd8(%eax),%ecx
1106f1: 85 c9 test %ecx,%ecx
1106f3: 75 09 jne 1106fe <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN
1106f5: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax)
1106fc: 74 06 je 110704 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
1106fe: c9 leave
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
1106ff: e9 40 d6 ff ff jmp 10dd44 <_Thread_Enable_dispatch>
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
110704: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
11070a: 85 c0 test %eax,%eax
11070c: 74 f0 je 1106fe <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
11070e: a1 70 88 12 00 mov 0x128870,%eax
110713: 48 dec %eax
110714: a3 70 88 12 00 mov %eax,0x128870
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
110719: 83 ec 08 sub $0x8,%esp
11071c: 6a ff push $0xffffffff
11071e: 52 push %edx
11071f: e8 c0 08 00 00 call 110fe4 <_POSIX_Thread_Exit>
110724: 83 c4 10 add $0x10,%esp
} else
_Thread_Enable_dispatch();
}
110727: c9 leave
110728: c3 ret
00111a3c <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
111a3c: 55 push %ebp
111a3d: 89 e5 mov %esp,%ebp
111a3f: 57 push %edi
111a40: 56 push %esi
111a41: 53 push %ebx
111a42: 83 ec 18 sub $0x18,%esp
111a45: 8b 5d 08 mov 0x8(%ebp),%ebx
111a48: 8b 75 0c mov 0xc(%ebp),%esi
111a4b: 8b 7d 10 mov 0x10(%ebp),%edi
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
111a4e: ff 36 pushl (%esi)
111a50: e8 cb ff ff ff call 111a20 <_POSIX_Priority_Is_valid>
111a55: 83 c4 10 add $0x10,%esp
111a58: 84 c0 test %al,%al
111a5a: 74 2a je 111a86 <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
111a5c: c7 07 00 00 00 00 movl $0x0,(%edi)
*budget_callout = NULL;
111a62: 8b 45 14 mov 0x14(%ebp),%eax
111a65: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
111a6b: 85 db test %ebx,%ebx
111a6d: 74 25 je 111a94 <_POSIX_Thread_Translate_sched_param+0x58>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
111a6f: 83 fb 01 cmp $0x1,%ebx
111a72: 0f 84 90 00 00 00 je 111b08 <_POSIX_Thread_Translate_sched_param+0xcc>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
111a78: 83 fb 02 cmp $0x2,%ebx
111a7b: 0f 84 8f 00 00 00 je 111b10 <_POSIX_Thread_Translate_sched_param+0xd4>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
111a81: 83 fb 04 cmp $0x4,%ebx
111a84: 74 1e je 111aa4 <_POSIX_Thread_Translate_sched_param+0x68>
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
111a86: b8 16 00 00 00 mov $0x16,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
111a8b: 8d 65 f4 lea -0xc(%ebp),%esp
111a8e: 5b pop %ebx
111a8f: 5e pop %esi
111a90: 5f pop %edi
111a91: c9 leave
111a92: c3 ret
111a93: 90 nop
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
111a94: c7 07 01 00 00 00 movl $0x1,(%edi)
return 0;
111a9a: 31 c0 xor %eax,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
111a9c: 8d 65 f4 lea -0xc(%ebp),%esp
111a9f: 5b pop %ebx
111aa0: 5e pop %esi
111aa1: 5f pop %edi
111aa2: c9 leave
111aa3: c3 ret
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
111aa4: 8b 5e 08 mov 0x8(%esi),%ebx
111aa7: 85 db test %ebx,%ebx
111aa9: 75 07 jne 111ab2 <_POSIX_Thread_Translate_sched_param+0x76>
111aab: 8b 4e 0c mov 0xc(%esi),%ecx
111aae: 85 c9 test %ecx,%ecx
111ab0: 74 d4 je 111a86 <_POSIX_Thread_Translate_sched_param+0x4a>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
111ab2: 8b 56 10 mov 0x10(%esi),%edx
111ab5: 85 d2 test %edx,%edx
111ab7: 75 07 jne 111ac0 <_POSIX_Thread_Translate_sched_param+0x84>
111ab9: 8b 46 14 mov 0x14(%esi),%eax
111abc: 85 c0 test %eax,%eax
111abe: 74 c6 je 111a86 <_POSIX_Thread_Translate_sched_param+0x4a>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
111ac0: 83 ec 0c sub $0xc,%esp
111ac3: 8d 46 08 lea 0x8(%esi),%eax
111ac6: 50 push %eax
111ac7: e8 08 da ff ff call 10f4d4 <_Timespec_To_ticks>
111acc: 89 c3 mov %eax,%ebx
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
111ace: 8d 46 10 lea 0x10(%esi),%eax
111ad1: 89 04 24 mov %eax,(%esp)
111ad4: e8 fb d9 ff ff call 10f4d4 <_Timespec_To_ticks>
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
111ad9: 83 c4 10 add $0x10,%esp
111adc: 39 c3 cmp %eax,%ebx
111ade: 72 a6 jb 111a86 <_POSIX_Thread_Translate_sched_param+0x4a>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
111ae0: 83 ec 0c sub $0xc,%esp
111ae3: ff 76 04 pushl 0x4(%esi)
111ae6: e8 35 ff ff ff call 111a20 <_POSIX_Priority_Is_valid>
111aeb: 83 c4 10 add $0x10,%esp
111aee: 84 c0 test %al,%al
111af0: 74 94 je 111a86 <_POSIX_Thread_Translate_sched_param+0x4a>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
111af2: c7 07 03 00 00 00 movl $0x3,(%edi)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
111af8: 8b 45 14 mov 0x14(%ebp),%eax
111afb: c7 00 04 bd 10 00 movl $0x10bd04,(%eax)
return 0;
111b01: 31 c0 xor %eax,%eax
111b03: eb 86 jmp 111a8b <_POSIX_Thread_Translate_sched_param+0x4f>
111b05: 8d 76 00 lea 0x0(%esi),%esi
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
111b08: 31 c0 xor %eax,%eax
111b0a: e9 7c ff ff ff jmp 111a8b <_POSIX_Thread_Translate_sched_param+0x4f>
111b0f: 90 nop
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
111b10: c7 07 02 00 00 00 movl $0x2,(%edi)
return 0;
111b16: 31 c0 xor %eax,%eax
111b18: e9 6e ff ff ff jmp 111a8b <_POSIX_Thread_Translate_sched_param+0x4f>
001108e8 <_POSIX_Threads_Create_extension>:
bool _POSIX_Threads_Create_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *created
)
{
1108e8: 55 push %ebp
1108e9: 89 e5 mov %esp,%ebp
1108eb: 57 push %edi
1108ec: 56 push %esi
1108ed: 53 push %ebx
1108ee: 83 ec 28 sub $0x28,%esp
1108f1: 8b 55 0c mov 0xc(%ebp),%edx
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
1108f4: 68 f0 00 00 00 push $0xf0
1108f9: 89 55 e4 mov %edx,-0x1c(%ebp)
1108fc: e8 5f e0 ff ff call 10e960 <_Workspace_Allocate>
110901: 89 c3 mov %eax,%ebx
if ( !api )
110903: 83 c4 10 add $0x10,%esp
110906: 85 c0 test %eax,%eax
110908: 8b 55 e4 mov -0x1c(%ebp),%edx
11090b: 0f 84 2f 01 00 00 je 110a40 <_POSIX_Threads_Create_extension+0x158><== NEVER TAKEN
return false;
created->API_Extensions[ THREAD_API_POSIX ] = api;
110911: 89 82 ec 00 00 00 mov %eax,0xec(%edx)
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
110917: b9 40 00 00 00 mov $0x40,%ecx
11091c: 31 c0 xor %eax,%eax
11091e: 89 df mov %ebx,%edi
110920: f3 aa rep stos %al,%es:(%edi)
110922: c7 03 01 00 00 00 movl $0x1,(%ebx)
110928: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
11092f: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx)
110936: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx)
11093d: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
110944: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx)
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
11094b: c7 43 40 01 00 00 00 movl $0x1,0x40(%ebx)
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
110952: c7 83 84 00 00 00 01 movl $0x1,0x84(%ebx)
110959: 00 00 00
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
11095c: be 78 13 12 00 mov $0x121378,%esi
110961: 8d bb 88 00 00 00 lea 0x88(%ebx),%edi
110967: b1 07 mov $0x7,%cl
110969: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
11096b: 0f b6 05 74 32 12 00 movzbl 0x123274,%eax
110972: 2b 42 14 sub 0x14(%edx),%eax
110975: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
_POSIX_Priority_From_core( created->current_priority );
/*
* POSIX 1003.1 1996, 18.2.2.2
*/
api->cancelation_requested = 0;
11097b: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
110982: 00 00 00
api->cancelability_state = PTHREAD_CANCEL_ENABLE;
110985: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx)
11098c: 00 00 00
api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
11098f: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
110996: 00 00 00
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
110999: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax
11099f: 89 83 e4 00 00 00 mov %eax,0xe4(%ebx)
head->next = tail;
head->previous = NULL;
1109a5: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
1109ac: 00 00 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
1109af: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax
1109b5: 89 83 ec 00 00 00 mov %eax,0xec(%ebx)
*
* The check for class == 1 is debug. Should never really happen.
*/
/* XXX use signal constants */
api->signals_pending = 0;
1109bb: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx)
1109c2: 00 00 00
1109c5: 0f b6 42 0b movzbl 0xb(%edx),%eax
1109c9: 83 e0 07 and $0x7,%eax
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API
1109cc: 83 f8 03 cmp $0x3,%eax
1109cf: 74 53 je 110a24 <_POSIX_Threads_Create_extension+0x13c>
#endif
) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
} else {
api->signals_blocked = 0xffffffff;
1109d1: c7 83 d0 00 00 00 ff movl $0xffffffff,0xd0(%ebx)
1109d8: ff ff ff
}
_Thread_queue_Initialize(
1109db: 6a 00 push $0x0
1109dd: 68 00 10 00 00 push $0x1000
1109e2: 6a 00 push $0x0
1109e4: 8d 43 44 lea 0x44(%ebx),%eax
1109e7: 50 push %eax
1109e8: 89 55 e4 mov %edx,-0x1c(%ebp)
1109eb: e8 50 d6 ff ff call 10e040 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_JOIN_AT_EXIT,
0
);
_Watchdog_Initialize(
1109f0: 8b 55 e4 mov -0x1c(%ebp),%edx
1109f3: 8b 42 08 mov 0x8(%edx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1109f6: c7 83 b0 00 00 00 00 movl $0x0,0xb0(%ebx)
1109fd: 00 00 00
the_watchdog->routine = routine;
110a00: c7 83 c4 00 00 00 4c movl $0x110a4c,0xc4(%ebx)
110a07: 0a 11 00
the_watchdog->id = id;
110a0a: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx)
the_watchdog->user_data = user_data;
110a10: 89 93 cc 00 00 00 mov %edx,0xcc(%ebx)
_POSIX_Threads_Sporadic_budget_TSR,
created->Object.id,
created
);
return true;
110a16: 83 c4 10 add $0x10,%esp
110a19: b0 01 mov $0x1,%al
}
110a1b: 8d 65 f4 lea -0xc(%ebp),%esp
110a1e: 5b pop %ebx
110a1f: 5e pop %esi
110a20: 5f pop %edi
110a21: c9 leave
110a22: c3 ret
110a23: 90 nop
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API
#if defined(RTEMS_DEBUG)
&& _Objects_Get_class( created->Object.id ) == 1
#endif
) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
110a24: a1 38 7b 12 00 mov 0x127b38,%eax
api->signals_blocked = executing_api->signals_blocked;
110a29: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
110a2f: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
110a35: 89 83 d0 00 00 00 mov %eax,0xd0(%ebx)
110a3b: eb 9e jmp 1109db <_POSIX_Threads_Create_extension+0xf3>
110a3d: 8d 76 00 lea 0x0(%esi),%esi
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
if ( !api )
return false;
110a40: 31 c0 xor %eax,%eax
created->Object.id,
created
);
return true;
}
110a42: 8d 65 f4 lea -0xc(%ebp),%esp
110a45: 5b pop %ebx
110a46: 5e pop %esi
110a47: 5f pop %edi
110a48: c9 leave
110a49: c3 ret
00110860 <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
110860: 55 push %ebp
110861: 89 e5 mov %esp,%ebp
110863: 57 push %edi
110864: 56 push %esi
110865: 53 push %ebx
110866: 83 ec 28 sub $0x28,%esp
110869: 8b 7d 0c mov 0xc(%ebp),%edi
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
11086c: 8b 87 ec 00 00 00 mov 0xec(%edi),%eax
110872: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
110875: 57 push %edi
110876: e8 f1 22 00 00 call 112b6c <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
11087b: 89 3c 24 mov %edi,(%esp)
11087e: e8 51 23 00 00 call 112bd4 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
110883: 8b 77 28 mov 0x28(%edi),%esi
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
110886: 83 c4 10 add $0x10,%esp
110889: 8b 45 e4 mov -0x1c(%ebp),%eax
11088c: 8d 58 44 lea 0x44(%eax),%ebx
11088f: eb 08 jmp 110899 <_POSIX_Threads_Delete_extension+0x39>
110891: 8d 76 00 lea 0x0(%esi),%esi
*(void **)the_thread->Wait.return_argument = value_ptr;
110894: 8b 40 28 mov 0x28(%eax),%eax
110897: 89 30 mov %esi,(%eax)
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
110899: 83 ec 0c sub $0xc,%esp
11089c: 53 push %ebx
11089d: e8 0e d4 ff ff call 10dcb0 <_Thread_queue_Dequeue>
1108a2: 83 c4 10 add $0x10,%esp
1108a5: 85 c0 test %eax,%eax
1108a7: 75 eb jne 110894 <_POSIX_Threads_Delete_extension+0x34>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
1108a9: 8b 45 e4 mov -0x1c(%ebp),%eax
1108ac: 83 b8 84 00 00 00 04 cmpl $0x4,0x84(%eax)
1108b3: 74 1f je 1108d4 <_POSIX_Threads_Delete_extension+0x74>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
1108b5: c7 87 ec 00 00 00 00 movl $0x0,0xec(%edi)
1108bc: 00 00 00
(void) _Workspace_Free( api );
1108bf: 8b 45 e4 mov -0x1c(%ebp),%eax
1108c2: 89 45 08 mov %eax,0x8(%ebp)
}
1108c5: 8d 65 f4 lea -0xc(%ebp),%esp
1108c8: 5b pop %ebx
1108c9: 5e pop %esi
1108ca: 5f pop %edi
1108cb: c9 leave
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
(void) _Workspace_Free( api );
1108cc: e9 ab e0 ff ff jmp 10e97c <_Workspace_Free>
1108d1: 8d 76 00 lea 0x0(%esi),%esi
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
1108d4: 83 ec 0c sub $0xc,%esp
1108d7: 05 a8 00 00 00 add $0xa8,%eax
1108dc: 50 push %eax
1108dd: e8 56 df ff ff call 10e838 <_Watchdog_Remove>
1108e2: 83 c4 10 add $0x10,%esp
1108e5: eb ce jmp 1108b5 <_POSIX_Threads_Delete_extension+0x55>
00110824 <_POSIX_Threads_Initialize_user_threads>:
*
* This routine creates and starts all configured user
* initialzation threads.
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
110824: 55 push %ebp
110825: 89 e5 mov %esp,%ebp
110827: 83 ec 08 sub $0x8,%esp
if ( _POSIX_Threads_Initialize_user_threads_p )
11082a: a1 f8 57 12 00 mov 0x1257f8,%eax
11082f: 85 c0 test %eax,%eax
110831: 74 05 je 110838 <_POSIX_Threads_Initialize_user_threads+0x14>
(*_POSIX_Threads_Initialize_user_threads_p)();
}
110833: c9 leave
* initialzation threads.
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
if ( _POSIX_Threads_Initialize_user_threads_p )
(*_POSIX_Threads_Initialize_user_threads_p)();
110834: ff e0 jmp *%eax
110836: 66 90 xchg %ax,%ax
}
110838: c9 leave
110839: c3 ret
0010b9e4 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
10b9e4: 55 push %ebp
10b9e5: 89 e5 mov %esp,%ebp
10b9e7: 57 push %edi
10b9e8: 56 push %esi
10b9e9: 53 push %ebx
10b9ea: 83 ec 6c sub $0x6c,%esp
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
10b9ed: 8b 3d 74 45 12 00 mov 0x124574,%edi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
10b9f3: a1 70 45 12 00 mov 0x124570,%eax
10b9f8: 89 45 94 mov %eax,-0x6c(%ebp)
if ( !user_threads || maximum == 0 )
10b9fb: 85 ff test %edi,%edi
10b9fd: 74 44 je 10ba43 <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10b9ff: 85 c0 test %eax,%eax
10ba01: 74 40 je 10ba43 <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10ba03: 31 db xor %ebx,%ebx
10ba05: 8d 75 a4 lea -0x5c(%ebp),%esi
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
10ba08: 83 ec 0c sub $0xc,%esp
10ba0b: 56 push %esi
10ba0c: e8 0f 61 00 00 call 111b20 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
10ba11: 5a pop %edx
10ba12: 59 pop %ecx
10ba13: 6a 02 push $0x2
10ba15: 56 push %esi
10ba16: e8 31 61 00 00 call 111b4c <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
10ba1b: 59 pop %ecx
10ba1c: 58 pop %eax
10ba1d: ff 74 df 04 pushl 0x4(%edi,%ebx,8)
10ba21: 56 push %esi
10ba22: e8 59 61 00 00 call 111b80 <pthread_attr_setstacksize>
status = pthread_create(
10ba27: 6a 00 push $0x0
10ba29: ff 34 df pushl (%edi,%ebx,8)
10ba2c: 56 push %esi
10ba2d: 8d 45 e4 lea -0x1c(%ebp),%eax
10ba30: 50 push %eax
10ba31: e8 92 fc ff ff call 10b6c8 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
10ba36: 83 c4 20 add $0x20,%esp
10ba39: 85 c0 test %eax,%eax
10ba3b: 75 0e jne 10ba4b <_POSIX_Threads_Initialize_user_threads_body+0x67>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
10ba3d: 43 inc %ebx
10ba3e: 39 5d 94 cmp %ebx,-0x6c(%ebp)
10ba41: 77 c5 ja 10ba08 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
10ba43: 8d 65 f4 lea -0xc(%ebp),%esp
10ba46: 5b pop %ebx
10ba47: 5e pop %esi
10ba48: 5f pop %edi
10ba49: c9 leave
10ba4a: c3 ret
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
10ba4b: 52 push %edx
10ba4c: 50 push %eax
10ba4d: 6a 01 push $0x1
10ba4f: 6a 02 push $0x2
10ba51: e8 d6 1e 00 00 call 10d92c <_Internal_error_Occurred>
00110a4c <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
110a4c: 55 push %ebp
110a4d: 89 e5 mov %esp,%ebp
110a4f: 56 push %esi
110a50: 53 push %ebx
110a51: 8b 75 0c mov 0xc(%ebp),%esi
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110a54: 8b 9e ec 00 00 00 mov 0xec(%esi),%ebx
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
110a5a: 83 ec 0c sub $0xc,%esp
110a5d: 8d 83 98 00 00 00 lea 0x98(%ebx),%eax
110a63: 50 push %eax
110a64: e8 5b 0f 00 00 call 1119c4 <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
110a69: 89 46 78 mov %eax,0x78(%esi)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
110a6c: 0f b6 05 74 32 12 00 movzbl 0x123274,%eax
110a73: 2b 83 88 00 00 00 sub 0x88(%ebx),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
110a79: 89 46 18 mov %eax,0x18(%esi)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
110a7c: 83 c4 10 add $0x10,%esp
110a7f: 8b 4e 1c mov 0x1c(%esi),%ecx
110a82: 85 c9 test %ecx,%ecx
110a84: 75 05 jne 110a8b <_POSIX_Threads_Sporadic_budget_TSR+0x3f><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
110a86: 39 46 14 cmp %eax,0x14(%esi)
110a89: 77 35 ja 110ac0 <_POSIX_Threads_Sporadic_budget_TSR+0x74>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
110a8b: 83 ec 0c sub $0xc,%esp
110a8e: 8d 83 90 00 00 00 lea 0x90(%ebx),%eax
110a94: 50 push %eax
110a95: e8 2a 0f 00 00 call 1119c4 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
110a9a: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
110aa0: 83 c4 10 add $0x10,%esp
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
110aa3: 81 c3 a8 00 00 00 add $0xa8,%ebx
110aa9: 89 5d 0c mov %ebx,0xc(%ebp)
110aac: c7 45 08 5c 76 12 00 movl $0x12765c,0x8(%ebp)
}
110ab3: 8d 65 f8 lea -0x8(%ebp),%esp
110ab6: 5b pop %ebx
110ab7: 5e pop %esi
110ab8: c9 leave
110ab9: e9 42 dc ff ff jmp 10e700 <_Watchdog_Insert>
110abe: 66 90 xchg %ax,%ax
if ( the_thread->resource_count == 0 ) {
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
110ac0: 52 push %edx
110ac1: 6a 01 push $0x1
110ac3: 50 push %eax
110ac4: 56 push %esi
110ac5: e8 7e c9 ff ff call 10d448 <_Thread_Change_priority>
110aca: 83 c4 10 add $0x10,%esp
110acd: eb bc jmp 110a8b <_POSIX_Threads_Sporadic_budget_TSR+0x3f>
00110ad0 <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
110ad0: 55 push %ebp
110ad1: 89 e5 mov %esp,%ebp
110ad3: 83 ec 08 sub $0x8,%esp
110ad6: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110ad9: 8b 88 ec 00 00 00 mov 0xec(%eax),%ecx
/*
* 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 */
110adf: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax)
110ae6: 0f b6 15 74 32 12 00 movzbl 0x123274,%edx
110aed: 2b 91 8c 00 00 00 sub 0x8c(%ecx),%edx
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
110af3: 89 50 18 mov %edx,0x18(%eax)
*/
#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 ) {
110af6: 8b 48 1c mov 0x1c(%eax),%ecx
110af9: 85 c9 test %ecx,%ecx
110afb: 75 05 jne 110b02 <_POSIX_Threads_Sporadic_budget_callout+0x32><== NEVER TAKEN
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
110afd: 39 50 14 cmp %edx,0x14(%eax)
110b00: 72 02 jb 110b04 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
110b02: c9 leave <== NOT EXECUTED
110b03: c3 ret <== 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 );
110b04: 51 push %ecx
110b05: 6a 01 push $0x1
110b07: 52 push %edx
110b08: 50 push %eax
110b09: e8 3a c9 ff ff call 10d448 <_Thread_Change_priority>
110b0e: 83 c4 10 add $0x10,%esp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
110b11: c9 leave
110b12: c3 ret
00112b6c <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
112b6c: 55 push %ebp
112b6d: 89 e5 mov %esp,%ebp
112b6f: 57 push %edi
112b70: 56 push %esi
112b71: 53 push %ebx
112b72: 83 ec 0c sub $0xc,%esp
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 ];
112b75: 8b 45 08 mov 0x8(%ebp),%eax
112b78: 8b 98 ec 00 00 00 mov 0xec(%eax),%ebx
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
112b7e: c7 83 d8 00 00 00 01 movl $0x1,0xd8(%ebx)
112b85: 00 00 00
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
112b88: 8d b3 e8 00 00 00 lea 0xe8(%ebx),%esi
while ( !_Chain_Is_empty( handler_stack ) ) {
112b8e: 39 b3 e4 00 00 00 cmp %esi,0xe4(%ebx)
112b94: 74 33 je 112bc9 <_POSIX_Threads_cancel_run+0x5d>
112b96: 66 90 xchg %ax,%ax
_ISR_Disable( level );
112b98: 9c pushf
112b99: fa cli
112b9a: 59 pop %ecx
handler = (POSIX_Cancel_Handler_control *)
112b9b: 8b bb ec 00 00 00 mov 0xec(%ebx),%edi
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
112ba1: 8b 17 mov (%edi),%edx
previous = the_node->previous;
112ba3: 8b 47 04 mov 0x4(%edi),%eax
next->previous = previous;
112ba6: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
112ba9: 89 10 mov %edx,(%eax)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
112bab: 51 push %ecx
112bac: 9d popf
(*handler->routine)( handler->arg );
112bad: 83 ec 0c sub $0xc,%esp
112bb0: ff 77 0c pushl 0xc(%edi)
112bb3: ff 57 08 call *0x8(%edi)
_Workspace_Free( handler );
112bb6: 89 3c 24 mov %edi,(%esp)
112bb9: e8 be bd ff ff call 10e97c <_Workspace_Free>
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
112bbe: 83 c4 10 add $0x10,%esp
112bc1: 39 b3 e4 00 00 00 cmp %esi,0xe4(%ebx)
112bc7: 75 cf jne 112b98 <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
112bc9: 8d 65 f4 lea -0xc(%ebp),%esp
112bcc: 5b pop %ebx
112bcd: 5e pop %esi
112bce: 5f pop %edi
112bcf: c9 leave
112bd0: c3 ret
0011181c <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
11181c: 55 push %ebp
11181d: 89 e5 mov %esp,%ebp
11181f: 56 push %esi
111820: 53 push %ebx
111821: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
(void) _Watchdog_Remove( timer );
111824: 83 ec 0c sub $0xc,%esp
111827: 53 push %ebx
111828: e8 07 db ff ff call 10f334 <_Watchdog_Remove>
_ISR_Disable( level );
11182d: 9c pushf
11182e: fa cli
11182f: 5e pop %esi
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( timer->state != WATCHDOG_INACTIVE ) {
111830: 83 c4 10 add $0x10,%esp
111833: 8b 43 08 mov 0x8(%ebx),%eax
111836: 85 c0 test %eax,%eax
111838: 74 0e je 111848 <_POSIX_Timer_Insert_helper+0x2c>
_ISR_Enable( level );
11183a: 56 push %esi
11183b: 9d popf
return false;
11183c: 31 c0 xor %eax,%eax
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
return true;
}
11183e: 8d 65 f8 lea -0x8(%ebp),%esp
111841: 5b pop %ebx
111842: 5e pop %esi
111843: c9 leave
111844: c3 ret
111845: 8d 76 00 lea 0x0(%esi),%esi
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
111848: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
the_watchdog->routine = routine;
11184f: 8b 45 14 mov 0x14(%ebp),%eax
111852: 89 43 1c mov %eax,0x1c(%ebx)
the_watchdog->id = id;
111855: 8b 45 10 mov 0x10(%ebp),%eax
111858: 89 43 20 mov %eax,0x20(%ebx)
the_watchdog->user_data = user_data;
11185b: 8b 45 18 mov 0x18(%ebp),%eax
11185e: 89 43 24 mov %eax,0x24(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
111861: 8b 45 0c mov 0xc(%ebp),%eax
111864: 89 43 0c mov %eax,0xc(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
111867: 83 ec 08 sub $0x8,%esp
11186a: 53 push %ebx
11186b: 68 7c 99 12 00 push $0x12997c
111870: e8 87 d9 ff ff call 10f1fc <_Watchdog_Insert>
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
111875: 56 push %esi
111876: 9d popf
return true;
111877: 83 c4 10 add $0x10,%esp
11187a: b0 01 mov $0x1,%al
}
11187c: 8d 65 f8 lea -0x8(%ebp),%esp
11187f: 5b pop %ebx
111880: 5e pop %esi
111881: c9 leave
111882: c3 ret
0010b7f0 <_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)
{
10b7f0: 55 push %ebp
10b7f1: 89 e5 mov %esp,%ebp
10b7f3: 53 push %ebx
10b7f4: 83 ec 04 sub $0x4,%esp
10b7f7: 8b 5d 0c mov 0xc(%ebp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10b7fa: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10b7fd: 8b 53 54 mov 0x54(%ebx),%edx
10b800: 85 d2 test %edx,%edx
10b802: 75 28 jne 10b82c <_POSIX_Timer_TSR+0x3c>
10b804: 8b 43 58 mov 0x58(%ebx),%eax
10b807: 85 c0 test %eax,%eax
10b809: 75 21 jne 10b82c <_POSIX_Timer_TSR+0x3c> <== ALWAYS TAKEN
/* 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;
10b80b: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== 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 ) ) {
10b80f: 83 ec 08 sub $0x8,%esp
10b812: ff 73 44 pushl 0x44(%ebx)
10b815: ff 73 38 pushl 0x38(%ebx)
10b818: e8 8f 5b 00 00 call 1113ac <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
10b81d: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
10b824: 83 c4 10 add $0x10,%esp
}
10b827: 8b 5d fc mov -0x4(%ebp),%ebx
10b82a: c9 leave
10b82b: c3 ret
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
10b82c: 83 ec 0c sub $0xc,%esp
10b82f: 53 push %ebx
10b830: 68 f0 b7 10 00 push $0x10b7f0
10b835: ff 73 08 pushl 0x8(%ebx)
10b838: ff 73 64 pushl 0x64(%ebx)
10b83b: 8d 43 10 lea 0x10(%ebx),%eax
10b83e: 50 push %eax
10b83f: e8 d8 5f 00 00 call 11181c <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
10b844: 83 c4 20 add $0x20,%esp
10b847: 84 c0 test %al,%al
10b849: 74 dc je 10b827 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
10b84b: 83 ec 0c sub $0xc,%esp
10b84e: 8d 43 6c lea 0x6c(%ebx),%eax
10b851: 50 push %eax
10b852: e8 95 16 00 00 call 10ceec <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b857: c6 43 3c 03 movb $0x3,0x3c(%ebx)
10b85b: 83 c4 10 add $0x10,%esp
10b85e: eb af jmp 10b80f <_POSIX_Timer_TSR+0x1f>
00112c58 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
112c58: 55 push %ebp
112c59: 89 e5 mov %esp,%ebp
112c5b: 57 push %edi
112c5c: 56 push %esi
112c5d: 53 push %ebx
112c5e: 83 ec 78 sub $0x78,%esp
112c61: 8b 5d 0c mov 0xc(%ebp),%ebx
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
112c64: 6a 01 push $0x1
112c66: 0f b6 45 10 movzbl 0x10(%ebp),%eax
112c6a: 50 push %eax
112c6b: 8d 55 dc lea -0x24(%ebp),%edx
112c6e: 52 push %edx
112c6f: 53 push %ebx
112c70: ff 75 08 pushl 0x8(%ebp)
112c73: 89 55 9c mov %edx,-0x64(%ebp)
112c76: e8 b5 00 00 00 call 112d30 <_POSIX_signals_Clear_signals>
112c7b: 83 c4 20 add $0x20,%esp
112c7e: 84 c0 test %al,%al
112c80: 8b 55 9c mov -0x64(%ebp),%edx
112c83: 0f 84 9b 00 00 00 je 112d24 <_POSIX_signals_Check_signal+0xcc>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
112c89: 8d 04 5b lea (%ebx,%ebx,2),%eax
112c8c: c1 e0 02 shl $0x2,%eax
112c8f: 8b 88 a8 7b 12 00 mov 0x127ba8(%eax),%ecx
112c95: 89 4d a4 mov %ecx,-0x5c(%ebp)
112c98: 49 dec %ecx
112c99: 0f 84 85 00 00 00 je 112d24 <_POSIX_signals_Check_signal+0xcc><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
112c9f: 8b 75 08 mov 0x8(%ebp),%esi
112ca2: 8b b6 d0 00 00 00 mov 0xd0(%esi),%esi
112ca8: 89 75 a0 mov %esi,-0x60(%ebp)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
112cab: 8b 88 a4 7b 12 00 mov 0x127ba4(%eax),%ecx
112cb1: 09 f1 or %esi,%ecx
112cb3: 8b 75 08 mov 0x8(%ebp),%esi
112cb6: 89 8e d0 00 00 00 mov %ecx,0xd0(%esi)
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
112cbc: 8d 75 b4 lea -0x4c(%ebp),%esi
112cbf: 89 75 94 mov %esi,-0x6c(%ebp)
112cc2: 8b 35 38 7b 12 00 mov 0x127b38,%esi
112cc8: 83 c6 20 add $0x20,%esi
112ccb: b9 0a 00 00 00 mov $0xa,%ecx
112cd0: 8b 7d 94 mov -0x6c(%ebp),%edi
112cd3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
112cd5: 83 b8 a0 7b 12 00 02 cmpl $0x2,0x127ba0(%eax)
112cdc: 74 36 je 112d14 <_POSIX_signals_Check_signal+0xbc>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
112cde: 83 ec 0c sub $0xc,%esp
112ce1: 53 push %ebx
112ce2: ff 55 a4 call *-0x5c(%ebp)
break;
112ce5: 83 c4 10 add $0x10,%esp
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
112ce8: 8b 3d 38 7b 12 00 mov 0x127b38,%edi
112cee: 83 c7 20 add $0x20,%edi
112cf1: b9 0a 00 00 00 mov $0xa,%ecx
112cf6: 8b 75 94 mov -0x6c(%ebp),%esi
112cf9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
112cfb: 8b 55 a0 mov -0x60(%ebp),%edx
112cfe: 8b 45 08 mov 0x8(%ebp),%eax
112d01: 89 90 d0 00 00 00 mov %edx,0xd0(%eax)
return true;
112d07: b0 01 mov $0x1,%al
}
112d09: 8d 65 f4 lea -0xc(%ebp),%esp
112d0c: 5b pop %ebx
112d0d: 5e pop %esi
112d0e: 5f pop %edi
112d0f: c9 leave
112d10: c3 ret
112d11: 8d 76 00 lea 0x0(%esi),%esi
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
112d14: 50 push %eax
112d15: 6a 00 push $0x0
112d17: 52 push %edx
112d18: 53 push %ebx
112d19: ff 55 a4 call *-0x5c(%ebp)
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
112d1c: 83 c4 10 add $0x10,%esp
112d1f: eb c7 jmp 112ce8 <_POSIX_signals_Check_signal+0x90>
112d21: 8d 76 00 lea 0x0(%esi),%esi
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
return false;
112d24: 31 c0 xor %eax,%eax
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
}
112d26: 8d 65 f4 lea -0xc(%ebp),%esp
112d29: 5b pop %ebx
112d2a: 5e pop %esi
112d2b: 5f pop %edi
112d2c: c9 leave
112d2d: c3 ret
001132e0 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
1132e0: 55 push %ebp
1132e1: 89 e5 mov %esp,%ebp
1132e3: 53 push %ebx
1132e4: 8b 4d 08 mov 0x8(%ebp),%ecx
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
1132e7: 9c pushf
1132e8: fa cli
1132e9: 5a pop %edx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
1132ea: 8d 04 49 lea (%ecx,%ecx,2),%eax
1132ed: c1 e0 02 shl $0x2,%eax
1132f0: 83 b8 a0 7b 12 00 02 cmpl $0x2,0x127ba0(%eax)
1132f7: 74 13 je 11330c <_POSIX_signals_Clear_process_signals+0x2c>
1132f9: 49 dec %ecx
1132fa: b8 fe ff ff ff mov $0xfffffffe,%eax
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
1132ff: d3 c0 rol %cl,%eax
113301: 21 05 a8 7d 12 00 and %eax,0x127da8
}
_ISR_Enable( level );
113307: 52 push %edx
113308: 9d popf
}
113309: 5b pop %ebx
11330a: c9 leave
11330b: c3 ret
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11330c: 8d 98 c4 7d 12 00 lea 0x127dc4(%eax),%ebx
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
113312: 39 98 c0 7d 12 00 cmp %ebx,0x127dc0(%eax)
113318: 75 ed jne 113307 <_POSIX_signals_Clear_process_signals+0x27><== NEVER TAKEN
11331a: eb dd jmp 1132f9 <_POSIX_signals_Clear_process_signals+0x19>
00112d30 <_POSIX_signals_Clear_signals>:
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
112d30: 55 push %ebp
112d31: 89 e5 mov %esp,%ebp
112d33: 57 push %edi
112d34: 56 push %esi
112d35: 53 push %ebx
112d36: 83 ec 1c sub $0x1c,%esp
112d39: 8b 5d 0c mov 0xc(%ebp),%ebx
112d3c: 0f b6 7d 14 movzbl 0x14(%ebp),%edi
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
112d40: 8d 4b ff lea -0x1(%ebx),%ecx
112d43: b8 01 00 00 00 mov $0x1,%eax
112d48: d3 e0 shl %cl,%eax
/* 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 )
112d4a: 80 7d 18 00 cmpb $0x0,0x18(%ebp)
112d4e: 74 40 je 112d90 <_POSIX_signals_Clear_signals+0x60>
signals_blocked = ~api->signals_blocked;
112d50: 8b 55 08 mov 0x8(%ebp),%edx
112d53: 8b 8a d0 00 00 00 mov 0xd0(%edx),%ecx
112d59: f7 d1 not %ecx
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 );
112d5b: 9c pushf
112d5c: fa cli
112d5d: 8f 45 e4 popl -0x1c(%ebp)
if ( is_global ) {
112d60: 89 fa mov %edi,%edx
112d62: 84 d2 test %dl,%dl
112d64: 74 32 je 112d98 <_POSIX_signals_Clear_signals+0x68>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
112d66: 23 05 a8 7d 12 00 and 0x127da8,%eax
112d6c: 85 c8 test %ecx,%eax
112d6e: 74 54 je 112dc4 <_POSIX_signals_Clear_signals+0x94>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
112d70: 8d 14 5b lea (%ebx,%ebx,2),%edx
112d73: c1 e2 02 shl $0x2,%edx
112d76: 83 ba a0 7b 12 00 02 cmpl $0x2,0x127ba0(%edx)
112d7d: 74 49 je 112dc8 <_POSIX_signals_Clear_signals+0x98>
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
112d7f: 83 ec 0c sub $0xc,%esp
112d82: 53 push %ebx
112d83: e8 58 05 00 00 call 1132e0 <_POSIX_signals_Clear_process_signals>
112d88: 83 c4 10 add $0x10,%esp
do_callout = true;
112d8b: b0 01 mov $0x1,%al
112d8d: eb 26 jmp 112db5 <_POSIX_signals_Clear_signals+0x85>
112d8f: 90 nop
*/
if ( check_blocked )
signals_blocked = ~api->signals_blocked;
else
signals_blocked = SIGNAL_ALL_MASK;
112d90: b9 ff ff ff ff mov $0xffffffff,%ecx
112d95: eb c4 jmp 112d5b <_POSIX_signals_Clear_signals+0x2b>
112d97: 90 nop
}
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
112d98: 8b 55 08 mov 0x8(%ebp),%edx
112d9b: 8b 9a d4 00 00 00 mov 0xd4(%edx),%ebx
112da1: 89 c6 mov %eax,%esi
112da3: 21 de and %ebx,%esi
112da5: 85 ce test %ecx,%esi
112da7: 74 1b je 112dc4 <_POSIX_signals_Clear_signals+0x94>
api->signals_pending &= ~mask;
112da9: f7 d0 not %eax
112dab: 21 d8 and %ebx,%eax
112dad: 89 82 d4 00 00 00 mov %eax,0xd4(%edx)
do_callout = true;
112db3: b0 01 mov $0x1,%al
}
}
_ISR_Enable( level );
112db5: ff 75 e4 pushl -0x1c(%ebp)
112db8: 9d popf
return do_callout;
}
112db9: 8d 65 f4 lea -0xc(%ebp),%esp
112dbc: 5b pop %ebx
112dbd: 5e pop %esi
112dbe: 5f pop %edi
112dbf: c9 leave
112dc0: c3 ret
112dc1: 8d 76 00 lea 0x0(%esi),%esi
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
do_callout = false;
112dc4: 31 c0 xor %eax,%eax
112dc6: eb ed jmp 112db5 <_POSIX_signals_Clear_signals+0x85>
do_callout = true;
}
}
_ISR_Enable( level );
return do_callout;
}
112dc8: 8d 8a c0 7d 12 00 lea 0x127dc0(%edx),%ecx
112dce: 8b 82 c0 7d 12 00 mov 0x127dc0(%edx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
112dd4: 8d 71 04 lea 0x4(%ecx),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
112dd7: 39 f0 cmp %esi,%eax
112dd9: 74 45 je 112e20 <_POSIX_signals_Clear_signals+0xf0>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
112ddb: 8b 30 mov (%eax),%esi
head->next = new_first;
112ddd: 89 b2 c0 7d 12 00 mov %esi,0x127dc0(%edx)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
112de3: 89 4e 04 mov %ecx,0x4(%esi)
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 );
112de6: 83 ec 0c sub $0xc,%esp
112de9: 53 push %ebx
112dea: 89 45 e0 mov %eax,-0x20(%ebp)
112ded: e8 ee 04 00 00 call 1132e0 <_POSIX_signals_Clear_process_signals>
* 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;
112df2: 8b 45 e0 mov -0x20(%ebp),%eax
112df5: 8d 70 08 lea 0x8(%eax),%esi
112df8: b9 03 00 00 00 mov $0x3,%ecx
112dfd: 8b 7d 10 mov 0x10(%ebp),%edi
112e00: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
112e02: 8b 15 28 7d 12 00 mov 0x127d28,%edx
the_node->next = tail;
112e08: c7 00 24 7d 12 00 movl $0x127d24,(%eax)
tail->previous = the_node;
112e0e: a3 28 7d 12 00 mov %eax,0x127d28
old_last->next = the_node;
112e13: 89 02 mov %eax,(%edx)
the_node->previous = old_last;
112e15: 89 50 04 mov %edx,0x4(%eax)
112e18: 83 c4 10 add $0x10,%esp
112e1b: e9 5f ff ff ff jmp 112d7f <_POSIX_signals_Clear_signals+0x4f>
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 );
112e20: 83 ec 0c sub $0xc,%esp
112e23: 53 push %ebx
112e24: e8 b7 04 00 00 call 1132e0 <_POSIX_signals_Clear_process_signals>
112e29: 83 c4 10 add $0x10,%esp
112e2c: e9 4e ff ff ff jmp 112d7f <_POSIX_signals_Clear_signals+0x4f>
0010c0cc <_POSIX_signals_Get_lowest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
sigset_t set
)
{
10c0cc: 55 push %ebp
10c0cd: 89 e5 mov %esp,%ebp
10c0cf: 56 push %esi
10c0d0: 53 push %ebx
10c0d1: 8b 55 08 mov 0x8(%ebp),%edx
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c0d4: b8 1b 00 00 00 mov $0x1b,%eax
10c0d9: bb 01 00 00 00 mov $0x1,%ebx
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
10c0de: 8d 48 ff lea -0x1(%eax),%ecx
10c0e1: 89 de mov %ebx,%esi
10c0e3: d3 e6 shl %cl,%esi
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c0e5: 85 d6 test %edx,%esi
10c0e7: 75 20 jne 10c109 <_POSIX_signals_Get_lowest+0x3d><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c0e9: 40 inc %eax
10c0ea: 83 f8 20 cmp $0x20,%eax
10c0ed: 75 ef jne 10c0de <_POSIX_signals_Get_lowest+0x12>
10c0ef: b0 01 mov $0x1,%al
10c0f1: bb 01 00 00 00 mov $0x1,%ebx
10c0f6: eb 06 jmp 10c0fe <_POSIX_signals_Get_lowest+0x32>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10c0f8: 40 inc %eax
10c0f9: 83 f8 1b cmp $0x1b,%eax
10c0fc: 74 0b je 10c109 <_POSIX_signals_Get_lowest+0x3d><== NEVER TAKEN
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
10c0fe: 8d 48 ff lea -0x1(%eax),%ecx
10c101: 89 de mov %ebx,%esi
10c103: d3 e6 shl %cl,%esi
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c105: 85 d6 test %edx,%esi
10c107: 74 ef je 10c0f8 <_POSIX_signals_Get_lowest+0x2c>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10c109: 5b pop %ebx
10c10a: 5e pop %esi
10c10b: c9 leave
10c10c: c3 ret
00124444 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
124444: 55 push %ebp
124445: 89 e5 mov %esp,%ebp
124447: 57 push %edi
124448: 56 push %esi
124449: 53 push %ebx
12444a: 83 ec 0c sub $0xc,%esp
12444d: 8b 5d 08 mov 0x8(%ebp),%ebx
124450: 8b 55 0c mov 0xc(%ebp),%edx
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
124453: 8b b3 ec 00 00 00 mov 0xec(%ebx),%esi
124459: 8d 4a ff lea -0x1(%edx),%ecx
12445c: b8 01 00 00 00 mov $0x1,%eax
124461: d3 e0 shl %cl,%eax
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
124463: 8b 4b 10 mov 0x10(%ebx),%ecx
124466: 89 cf mov %ecx,%edi
124468: 81 e7 00 80 00 10 and $0x10008000,%edi
12446e: 81 ff 00 80 00 10 cmp $0x10008000,%edi
124474: 74 72 je 1244e8 <_POSIX_signals_Unblock_thread+0xa4>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
124476: 8b 96 d0 00 00 00 mov 0xd0(%esi),%edx
12447c: f7 d2 not %edx
12447e: 85 d0 test %edx,%eax
124480: 74 5a je 1244dc <_POSIX_signals_Unblock_thread+0x98>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
124482: f7 c1 00 00 00 10 test $0x10000000,%ecx
124488: 74 3a je 1244c4 <_POSIX_signals_Unblock_thread+0x80>
the_thread->Wait.return_code = EINTR;
12448a: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
124491: f7 c1 e0 be 03 00 test $0x3bee0,%ecx
124497: 0f 85 93 00 00 00 jne 124530 <_POSIX_signals_Unblock_thread+0xec>
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
12449d: 83 e1 08 and $0x8,%ecx
1244a0: 74 3a je 1244dc <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
1244a2: 83 ec 0c sub $0xc,%esp
1244a5: 8d 43 48 lea 0x48(%ebx),%eax
1244a8: 50 push %eax
1244a9: e8 8a f4 fe ff call 113938 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
1244ae: 5a pop %edx
1244af: 59 pop %ecx
1244b0: 68 f8 ff 03 10 push $0x1003fff8
1244b5: 53 push %ebx
1244b6: e8 c1 e1 fe ff call 11267c <_Thread_Clear_state>
1244bb: 83 c4 10 add $0x10,%esp
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
1244be: 31 c0 xor %eax,%eax
1244c0: eb 1c jmp 1244de <_POSIX_signals_Unblock_thread+0x9a>
1244c2: 66 90 xchg %ax,%ax
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
1244c4: 85 c9 test %ecx,%ecx
1244c6: 75 14 jne 1244dc <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1244c8: a1 74 e8 12 00 mov 0x12e874,%eax
1244cd: 85 c0 test %eax,%eax
1244cf: 74 0b je 1244dc <_POSIX_signals_Unblock_thread+0x98>
1244d1: 3b 1d 78 e8 12 00 cmp 0x12e878,%ebx
1244d7: 74 7b je 124554 <_POSIX_signals_Unblock_thread+0x110><== ALWAYS TAKEN
1244d9: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Dispatch_necessary = true;
}
}
return false;
1244dc: 31 c0 xor %eax,%eax
}
1244de: 8d 65 f4 lea -0xc(%ebp),%esp
1244e1: 5b pop %ebx
1244e2: 5e pop %esi
1244e3: 5f pop %edi
1244e4: c9 leave
1244e5: c3 ret
1244e6: 66 90 xchg %ax,%ax
* 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) ) {
1244e8: 85 43 30 test %eax,0x30(%ebx)
1244eb: 74 33 je 124520 <_POSIX_signals_Unblock_thread+0xdc>
the_thread->Wait.return_code = EINTR;
1244ed: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
1244f4: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
1244f7: 8b 75 10 mov 0x10(%ebp),%esi
1244fa: 85 f6 test %esi,%esi
1244fc: 74 42 je 124540 <_POSIX_signals_Unblock_thread+0xfc>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
1244fe: b9 03 00 00 00 mov $0x3,%ecx
124503: 89 c7 mov %eax,%edi
124505: 8b 75 10 mov 0x10(%ebp),%esi
124508: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
12450a: 83 ec 0c sub $0xc,%esp
12450d: 53 push %ebx
12450e: e8 d5 eb fe ff call 1130e8 <_Thread_queue_Extract_with_proxy>
return true;
124513: 83 c4 10 add $0x10,%esp
124516: b0 01 mov $0x1,%al
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
124518: 8d 65 f4 lea -0xc(%ebp),%esp
12451b: 5b pop %ebx
12451c: 5e pop %esi
12451d: 5f pop %edi
12451e: c9 leave
12451f: c3 ret
* 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) ) {
124520: 8b 8e d0 00 00 00 mov 0xd0(%esi),%ecx
124526: f7 d1 not %ecx
124528: 85 c8 test %ecx,%eax
12452a: 75 c1 jne 1244ed <_POSIX_signals_Unblock_thread+0xa9>
12452c: eb ae jmp 1244dc <_POSIX_signals_Unblock_thread+0x98>
12452e: 66 90 xchg %ax,%ax
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
124530: 83 ec 0c sub $0xc,%esp
124533: 53 push %ebx
124534: e8 af eb fe ff call 1130e8 <_Thread_queue_Extract_with_proxy>
124539: 83 c4 10 add $0x10,%esp
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
12453c: 31 c0 xor %eax,%eax
12453e: eb 9e jmp 1244de <_POSIX_signals_Unblock_thread+0x9a>
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
124540: 89 10 mov %edx,(%eax)
the_info->si_code = SI_USER;
124542: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
124549: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
124550: eb b8 jmp 12450a <_POSIX_signals_Unblock_thread+0xc6>
124552: 66 90 xchg %ax,%ax
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
124554: c6 05 84 e8 12 00 01 movb $0x1,0x12e884
}
}
return false;
12455b: 31 c0 xor %eax,%eax
12455d: e9 7c ff ff ff jmp 1244de <_POSIX_signals_Unblock_thread+0x9a>
0010d86c <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
10d86c: 55 push %ebp
10d86d: 89 e5 mov %esp,%ebp
10d86f: 56 push %esi
10d870: 53 push %ebx
10d871: 8b 5d 08 mov 0x8(%ebp),%ebx
10d874: 8b 75 0c mov 0xc(%ebp),%esi
if ( !the_heap )
10d877: 85 db test %ebx,%ebx
10d879: 74 35 je 10d8b0 <_Protected_heap_Get_information+0x44>
return false;
if ( !the_info )
10d87b: 85 f6 test %esi,%esi
10d87d: 74 31 je 10d8b0 <_Protected_heap_Get_information+0x44>
return false;
_RTEMS_Lock_allocator();
10d87f: 83 ec 0c sub $0xc,%esp
10d882: ff 35 1c 80 12 00 pushl 0x12801c
10d888: e8 c7 ed ff ff call 10c654 <_API_Mutex_Lock>
_Heap_Get_information( the_heap, the_info );
10d88d: 5a pop %edx
10d88e: 59 pop %ecx
10d88f: 56 push %esi
10d890: 53 push %ebx
10d891: e8 86 47 00 00 call 11201c <_Heap_Get_information>
_RTEMS_Unlock_allocator();
10d896: 58 pop %eax
10d897: ff 35 1c 80 12 00 pushl 0x12801c
10d89d: e8 fa ed ff ff call 10c69c <_API_Mutex_Unlock>
return true;
10d8a2: 83 c4 10 add $0x10,%esp
10d8a5: b0 01 mov $0x1,%al
}
10d8a7: 8d 65 f8 lea -0x8(%ebp),%esp
10d8aa: 5b pop %ebx
10d8ab: 5e pop %esi
10d8ac: c9 leave
10d8ad: c3 ret
10d8ae: 66 90 xchg %ax,%ax
{
if ( !the_heap )
return false;
if ( !the_info )
return false;
10d8b0: 31 c0 xor %eax,%eax
_RTEMS_Lock_allocator();
_Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
return true;
}
10d8b2: 8d 65 f8 lea -0x8(%ebp),%esp
10d8b5: 5b pop %ebx
10d8b6: 5e pop %esi
10d8b7: c9 leave
10d8b8: c3 ret
00110bf4 <_Protected_heap_Walk>:
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
110bf4: 55 push %ebp
110bf5: 89 e5 mov %esp,%ebp
110bf7: 56 push %esi
110bf8: 53 push %ebx
110bf9: 83 ec 10 sub $0x10,%esp
110bfc: 8b 5d 08 mov 0x8(%ebp),%ebx
110bff: 8b 75 0c mov 0xc(%ebp),%esi
110c02: 8a 45 10 mov 0x10(%ebp),%al
* 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 ) {
110c05: 8b 15 30 de 12 00 mov 0x12de30,%edx
110c0b: 85 d2 test %edx,%edx
110c0d: 74 19 je 110c28 <_Protected_heap_Walk+0x34>
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
110c0f: 0f b6 c0 movzbl %al,%eax
110c12: 89 45 10 mov %eax,0x10(%ebp)
110c15: 89 75 0c mov %esi,0xc(%ebp)
110c18: 89 5d 08 mov %ebx,0x8(%ebp)
}
return status;
}
110c1b: 8d 65 f8 lea -0x8(%ebp),%esp
110c1e: 5b pop %ebx
110c1f: 5e pop %esi
110c20: c9 leave
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 );
110c21: e9 4a f2 ff ff jmp 10fe70 <_Heap_Walk>
110c26: 66 90 xchg %ax,%ax
* 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();
110c28: 83 ec 0c sub $0xc,%esp
110c2b: ff 35 1c df 12 00 pushl 0x12df1c
110c31: 88 45 f4 mov %al,-0xc(%ebp)
110c34: e8 cf e3 ff ff call 10f008 <_API_Mutex_Lock>
status = _Heap_Walk( the_heap, source, do_dump );
110c39: 83 c4 0c add $0xc,%esp
110c3c: 8a 45 f4 mov -0xc(%ebp),%al
110c3f: 0f b6 c0 movzbl %al,%eax
110c42: 50 push %eax
110c43: 56 push %esi
110c44: 53 push %ebx
110c45: e8 26 f2 ff ff call 10fe70 <_Heap_Walk>
_RTEMS_Unlock_allocator();
110c4a: 5a pop %edx
110c4b: ff 35 1c df 12 00 pushl 0x12df1c
110c51: 88 45 f4 mov %al,-0xc(%ebp)
110c54: e8 f7 e3 ff ff call 10f050 <_API_Mutex_Unlock>
110c59: 83 c4 10 add $0x10,%esp
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
110c5c: 8a 45 f4 mov -0xc(%ebp),%al
110c5f: 8d 65 f8 lea -0x8(%ebp),%esp
110c62: 5b pop %ebx
110c63: 5e pop %esi
110c64: c9 leave
110c65: c3 ret
00110e64 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
110e64: 55 push %ebp
110e65: 89 e5 mov %esp,%ebp
110e67: 53 push %ebx
110e68: 83 ec 10 sub $0x10,%esp
110e6b: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
110e6e: 80 3d 44 32 12 00 01 cmpb $0x1,0x123244
110e75: 19 c0 sbb %eax,%eax
110e77: 83 e0 c0 and $0xffffffc0,%eax
110e7a: 83 c0 60 add $0x60,%eax
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
110e7d: 50 push %eax
110e7e: e8 dd da ff ff call 10e960 <_Workspace_Allocate>
if ( !api )
110e83: 83 c4 10 add $0x10,%esp
110e86: 85 c0 test %eax,%eax
110e88: 74 6a je 110ef4 <_RTEMS_tasks_Create_extension+0x90>
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
110e8a: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx)
api->pending_events = EVENT_SETS_NONE_PENDING;
110e90: c7 00 00 00 00 00 movl $0x0,(%eax)
api->event_condition = 0;
110e96: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
110e9d: c6 40 08 00 movb $0x0,0x8(%eax)
information->handler = NULL;
110ea1: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
information->mode_set = RTEMS_DEFAULT_MODES;
110ea8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
information->signals_posted = 0;
110eaf: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
information->signals_pending = 0;
110eb6: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
information->nest_level = 0;
110ebd: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
110ec4: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx)
110ecb: 00 00 00
if ( rtems_configuration_get_notepads_enabled() ) {
110ece: 80 3d 44 32 12 00 00 cmpb $0x0,0x123244
110ed5: 74 13 je 110eea <_RTEMS_tasks_Create_extension+0x86>
110ed7: 31 d2 xor %edx,%edx
110ed9: 8d 76 00 lea 0x0(%esi),%esi
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
110edc: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4)
110ee3: 00
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
110ee4: 42 inc %edx
110ee5: 83 fa 10 cmp $0x10,%edx
110ee8: 75 f2 jne 110edc <_RTEMS_tasks_Create_extension+0x78>
api->Notepads[i] = 0;
}
return true;
110eea: b0 01 mov $0x1,%al
}
110eec: 8b 5d fc mov -0x4(%ebp),%ebx
110eef: c9 leave
110ef0: c3 ret
110ef1: 8d 76 00 lea 0x0(%esi),%esi
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
110ef4: 31 c0 xor %eax,%eax
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
110ef6: 8b 5d fc mov -0x4(%ebp),%ebx
110ef9: c9 leave
110efa: c3 ret
00110e0c <_RTEMS_tasks_Delete_extension>:
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
110e0c: 55 push %ebp
110e0d: 89 e5 mov %esp,%ebp
110e0f: 56 push %esi
110e10: 53 push %ebx
110e11: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
110e14: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax
deleted->task_variables = NULL;
110e1a: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx)
110e21: 00 00 00
while (tvp) {
110e24: 85 c0 test %eax,%eax
110e26: 75 06 jne 110e2e <_RTEMS_tasks_Delete_extension+0x22>
110e28: eb 17 jmp 110e41 <_RTEMS_tasks_Delete_extension+0x35>
110e2a: 66 90 xchg %ax,%ax
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
tvp = next;
110e2c: 89 f0 mov %esi,%eax
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
110e2e: 8b 30 mov (%eax),%esi
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
110e30: 83 ec 08 sub $0x8,%esp
110e33: 50 push %eax
110e34: 53 push %ebx
110e35: e8 56 01 00 00 call 110f90 <_RTEMS_Tasks_Invoke_task_variable_dtor>
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
110e3a: 83 c4 10 add $0x10,%esp
110e3d: 85 f6 test %esi,%esi
110e3f: 75 eb jne 110e2c <_RTEMS_tasks_Delete_extension+0x20>
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
110e41: 83 ec 0c sub $0xc,%esp
110e44: ff b3 e8 00 00 00 pushl 0xe8(%ebx)
110e4a: e8 2d db ff ff call 10e97c <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
110e4f: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
110e56: 00 00 00
110e59: 83 c4 10 add $0x10,%esp
}
110e5c: 8d 65 f8 lea -0x8(%ebp),%esp
110e5f: 5b pop %ebx
110e60: 5e pop %esi
110e61: c9 leave
110e62: c3 ret
00110d90 <_RTEMS_tasks_Initialize_user_tasks>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
110d90: 55 push %ebp
110d91: 89 e5 mov %esp,%ebp
110d93: 83 ec 08 sub $0x8,%esp
if ( _RTEMS_tasks_Initialize_user_tasks_p )
110d96: a1 c4 32 12 00 mov 0x1232c4,%eax
110d9b: 85 c0 test %eax,%eax
110d9d: 74 05 je 110da4 <_RTEMS_tasks_Initialize_user_tasks+0x14>
(*_RTEMS_tasks_Initialize_user_tasks_p)();
}
110d9f: c9 leave
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
if ( _RTEMS_tasks_Initialize_user_tasks_p )
(*_RTEMS_tasks_Initialize_user_tasks_p)();
110da0: ff e0 jmp *%eax
110da2: 66 90 xchg %ax,%ax
}
110da4: c9 leave
110da5: c3 ret
0010ba80 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10ba80: 55 push %ebp
10ba81: 89 e5 mov %esp,%ebp
10ba83: 57 push %edi
10ba84: 56 push %esi
10ba85: 53 push %ebx
10ba86: 83 ec 1c sub $0x1c,%esp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
10ba89: 8b 1d 6c 32 12 00 mov 0x12326c,%ebx
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
10ba8f: 8b 3d 68 32 12 00 mov 0x123268,%edi
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
10ba95: 85 db test %ebx,%ebx
10ba97: 74 46 je 10badf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10ba99: 85 ff test %edi,%edi
10ba9b: 74 42 je 10badf <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN
10ba9d: 31 f6 xor %esi,%esi
10ba9f: 90 nop
return_value = rtems_task_create(
10baa0: 83 ec 08 sub $0x8,%esp
10baa3: 8d 45 e4 lea -0x1c(%ebp),%eax
10baa6: 50 push %eax
10baa7: ff 73 0c pushl 0xc(%ebx)
10baaa: ff 73 14 pushl 0x14(%ebx)
10baad: ff 73 04 pushl 0x4(%ebx)
10bab0: ff 73 08 pushl 0x8(%ebx)
10bab3: ff 33 pushl (%ebx)
10bab5: e8 92 fd ff ff call 10b84c <rtems_task_create>
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
10baba: 83 c4 20 add $0x20,%esp
10babd: 85 c0 test %eax,%eax
10babf: 75 26 jne 10bae7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
10bac1: 51 push %ecx
10bac2: ff 73 18 pushl 0x18(%ebx)
10bac5: ff 73 10 pushl 0x10(%ebx)
10bac8: ff 75 e4 pushl -0x1c(%ebp)
10bacb: e8 24 00 00 00 call 10baf4 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10bad0: 83 c4 10 add $0x10,%esp
10bad3: 85 c0 test %eax,%eax
10bad5: 75 10 jne 10bae7 <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bad7: 46 inc %esi
10bad8: 83 c3 1c add $0x1c,%ebx
10badb: 39 f7 cmp %esi,%edi
10badd: 77 c1 ja 10baa0 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
10badf: 8d 65 f4 lea -0xc(%ebp),%esp
10bae2: 5b pop %ebx
10bae3: 5e pop %esi
10bae4: 5f pop %edi
10bae5: c9 leave
10bae6: c3 ret
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 );
10bae7: 52 push %edx
10bae8: 50 push %eax
10bae9: 6a 01 push $0x1
10baeb: 6a 01 push $0x1
10baed: e8 0e 0e 00 00 call 10c900 <_Internal_error_Occurred>
00110d48 <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
110d48: 55 push %ebp
110d49: 89 e5 mov %esp,%ebp
/*
* Per Task Variables
*/
tvp = executing->task_variables;
110d4b: 8b 45 08 mov 0x8(%ebp),%eax
110d4e: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
while (tvp) {
110d54: 85 c0 test %eax,%eax
110d56: 74 13 je 110d6b <_RTEMS_tasks_Switch_extension+0x23>
tvp->tval = *tvp->ptr;
110d58: 8b 50 04 mov 0x4(%eax),%edx
110d5b: 8b 0a mov (%edx),%ecx
110d5d: 89 48 0c mov %ecx,0xc(%eax)
*tvp->ptr = tvp->gval;
110d60: 8b 48 08 mov 0x8(%eax),%ecx
110d63: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
110d65: 8b 00 mov (%eax),%eax
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
110d67: 85 c0 test %eax,%eax
110d69: 75 ed jne 110d58 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
110d6b: 8b 45 0c mov 0xc(%ebp),%eax
110d6e: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
while (tvp) {
110d74: 85 c0 test %eax,%eax
110d76: 74 13 je 110d8b <_RTEMS_tasks_Switch_extension+0x43>
tvp->gval = *tvp->ptr;
110d78: 8b 50 04 mov 0x4(%eax),%edx
110d7b: 8b 0a mov (%edx),%ecx
110d7d: 89 48 08 mov %ecx,0x8(%eax)
*tvp->ptr = tvp->tval;
110d80: 8b 48 0c mov 0xc(%eax),%ecx
110d83: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
110d85: 8b 00 mov (%eax),%eax
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
110d87: 85 c0 test %eax,%eax
110d89: 75 ed jne 110d78 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
110d8b: c9 leave
110d8c: c3 ret
0010c4dc <_Rate_monotonic_Initiate_statistics>:
}
void _Rate_monotonic_Initiate_statistics(
Rate_monotonic_Control *the_period
)
{
10c4dc: 55 push %ebp
10c4dd: 89 e5 mov %esp,%ebp
10c4df: 57 push %edi
10c4e0: 56 push %esi
10c4e1: 53 push %ebx
10c4e2: 83 ec 28 sub $0x28,%esp
10c4e5: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *owning_thread = the_period->owner;
10c4e8: 8b 73 40 mov 0x40(%ebx),%esi
* If using nanosecond statistics, we need to obtain the uptime.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
_TOD_Get_uptime( &uptime );
10c4eb: 8d 7d e0 lea -0x20(%ebp),%edi
10c4ee: 57 push %edi
10c4ef: e8 a4 18 00 00 call 10dd98 <_TOD_Get_uptime>
/*
* Set the starting point and the CPU time used for the statistics.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
the_period->time_period_initiated = uptime;
10c4f4: 8b 45 e0 mov -0x20(%ebp),%eax
10c4f7: 8b 55 e4 mov -0x1c(%ebp),%edx
10c4fa: 89 43 4c mov %eax,0x4c(%ebx)
10c4fd: 89 53 50 mov %edx,0x50(%ebx)
#else
the_period->time_period_initiated = _Watchdog_Ticks_since_boot;
#endif
the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used;
10c500: 8b 86 84 00 00 00 mov 0x84(%esi),%eax
10c506: 8b 96 88 00 00 00 mov 0x88(%esi),%edx
10c50c: 89 43 44 mov %eax,0x44(%ebx)
10c50f: 89 53 48 mov %edx,0x48(%ebx)
* routine is invoked from rtems_rate_monotonic_period, the owner will
* be the executing thread. When this routine is invoked from
* _Rate_monotonic_Timeout, it will not.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
10c512: 83 c4 10 add $0x10,%esp
10c515: 39 35 b8 ae 12 00 cmp %esi,0x12aeb8
10c51b: 74 0b je 10c528 <_Rate_monotonic_Initiate_statistics+0x4c>
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
}
#endif
}
10c51d: 8d 65 f4 lea -0xc(%ebp),%esp
10c520: 5b pop %ebx
10c521: 5e pop %esi
10c522: 5f pop %edi
10c523: c9 leave
10c524: c3 ret
10c525: 8d 76 00 lea 0x0(%esi),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10c528: 50 push %eax
&_Thread_Time_of_last_context_switch, &uptime, &ran
10c529: 8d 75 d8 lea -0x28(%ebp),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10c52c: 56 push %esi
10c52d: 57 push %edi
10c52e: 68 c8 a9 12 00 push $0x12a9c8
10c533: e8 dc 39 00 00 call 10ff14 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
10c538: 59 pop %ecx
10c539: 5f pop %edi
10c53a: 56 push %esi
10c53b: 83 c3 44 add $0x44,%ebx
10c53e: 53 push %ebx
10c53f: e8 d4 38 00 00 call 10fe18 <_Timespec_Add_to>
10c544: 83 c4 10 add $0x10,%esp
}
#endif
}
10c547: 8d 65 f4 lea -0xc(%ebp),%esp
10c54a: 5b pop %ebx
10c54b: 5e pop %esi
10c54c: 5f pop %edi
10c54d: c9 leave
10c54e: c3 ret
0010ca98 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10ca98: 55 push %ebp
10ca99: 89 e5 mov %esp,%ebp
10ca9b: 83 ec 2c sub $0x2c,%esp
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
10ca9e: 8d 45 f4 lea -0xc(%ebp),%eax
10caa1: 50 push %eax
10caa2: ff 75 08 pushl 0x8(%ebp)
10caa5: 68 e0 a7 12 00 push $0x12a7e0
10caaa: e8 89 1d 00 00 call 10e838 <_Objects_Get>
switch ( location ) {
10caaf: 83 c4 10 add $0x10,%esp
10cab2: 8b 55 f4 mov -0xc(%ebp),%edx
10cab5: 85 d2 test %edx,%edx
10cab7: 75 29 jne 10cae2 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10cab9: 8b 50 40 mov 0x40(%eax),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10cabc: f6 42 11 40 testb $0x40,0x11(%edx)
10cac0: 74 08 je 10caca <_Rate_monotonic_Timeout+0x32>
10cac2: 8b 48 08 mov 0x8(%eax),%ecx
10cac5: 39 4a 20 cmp %ecx,0x20(%edx)
10cac8: 74 4e je 10cb18 <_Rate_monotonic_Timeout+0x80>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
10caca: 83 78 38 01 cmpl $0x1,0x38(%eax)
10cace: 74 14 je 10cae4 <_Rate_monotonic_Timeout+0x4c>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10cad0: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10cad7: a1 d0 a8 12 00 mov 0x12a8d0,%eax
10cadc: 48 dec %eax
10cadd: a3 d0 a8 12 00 mov %eax,0x12a8d0
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10cae2: c9 leave
10cae3: c3 ret
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
10cae4: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax)
_Rate_monotonic_Initiate_statistics( the_period );
10caeb: 83 ec 0c sub $0xc,%esp
10caee: 50 push %eax
10caef: 89 45 e4 mov %eax,-0x1c(%ebp)
10caf2: e8 e5 f9 ff ff call 10c4dc <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10caf7: 8b 45 e4 mov -0x1c(%ebp),%eax
10cafa: 8b 50 3c mov 0x3c(%eax),%edx
10cafd: 89 50 1c mov %edx,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10cb00: 5a pop %edx
10cb01: 59 pop %ecx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
10cb02: 83 c0 10 add $0x10,%eax
10cb05: 50 push %eax
10cb06: 68 dc a9 12 00 push $0x12a9dc
10cb0b: e8 e4 36 00 00 call 1101f4 <_Watchdog_Insert>
10cb10: 83 c4 10 add $0x10,%esp
10cb13: eb c2 jmp 10cad7 <_Rate_monotonic_Timeout+0x3f>
10cb15: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10cb18: 83 ec 08 sub $0x8,%esp
10cb1b: 68 f8 ff 03 10 push $0x1003fff8
10cb20: 52 push %edx
10cb21: 89 45 e4 mov %eax,-0x1c(%ebp)
10cb24: e8 43 24 00 00 call 10ef6c <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10cb29: 8b 45 e4 mov -0x1c(%ebp),%eax
10cb2c: 89 04 24 mov %eax,(%esp)
10cb2f: eb c1 jmp 10caf2 <_Rate_monotonic_Timeout+0x5a>
0010c550 <_Rate_monotonic_Update_statistics>:
void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
10c550: 55 push %ebp
10c551: 89 e5 mov %esp,%ebp
10c553: 57 push %edi
10c554: 56 push %esi
10c555: 53 push %ebx
10c556: 83 ec 1c sub $0x1c,%esp
10c559: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
10c55c: ff 43 54 incl 0x54(%ebx)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
10c55f: 83 7b 38 04 cmpl $0x4,0x38(%ebx)
10c563: 0f 84 bf 00 00 00 je 10c628 <_Rate_monotonic_Update_statistics+0xd8>
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c569: 51 push %ecx
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
10c56a: 8d 7d e0 lea -0x20(%ebp),%edi
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c56d: 57 push %edi
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
10c56e: 8d 75 d8 lea -0x28(%ebp),%esi
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c571: 56 push %esi
10c572: 53 push %ebx
10c573: e8 cc fe ff ff call 10c444 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
10c578: 83 c4 10 add $0x10,%esp
10c57b: 84 c0 test %al,%al
10c57d: 75 09 jne 10c588 <_Rate_monotonic_Update_statistics+0x38>
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
10c57f: 8d 65 f4 lea -0xc(%ebp),%esp
10c582: 5b pop %ebx
10c583: 5e pop %esi
10c584: 5f pop %edi
10c585: c9 leave
10c586: c3 ret
10c587: 90 nop
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
10c588: 83 ec 08 sub $0x8,%esp
10c58b: 57 push %edi
10c58c: 8d 43 6c lea 0x6c(%ebx),%eax
10c58f: 50 push %eax
10c590: e8 83 38 00 00 call 10fe18 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
10c595: 58 pop %eax
10c596: 5a pop %edx
10c597: 8d 43 5c lea 0x5c(%ebx),%eax
10c59a: 50 push %eax
10c59b: 57 push %edi
10c59c: e8 4f 39 00 00 call 10fef0 <_Timespec_Less_than>
10c5a1: 83 c4 10 add $0x10,%esp
10c5a4: 84 c0 test %al,%al
10c5a6: 74 0c je 10c5b4 <_Rate_monotonic_Update_statistics+0x64>
stats->min_cpu_time = executed;
10c5a8: 8b 45 e0 mov -0x20(%ebp),%eax
10c5ab: 8b 55 e4 mov -0x1c(%ebp),%edx
10c5ae: 89 43 5c mov %eax,0x5c(%ebx)
10c5b1: 89 53 60 mov %edx,0x60(%ebx)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
10c5b4: 83 ec 08 sub $0x8,%esp
10c5b7: 8d 43 64 lea 0x64(%ebx),%eax
10c5ba: 50 push %eax
10c5bb: 57 push %edi
10c5bc: e8 0b 39 00 00 call 10fecc <_Timespec_Greater_than>
10c5c1: 83 c4 10 add $0x10,%esp
10c5c4: 84 c0 test %al,%al
10c5c6: 74 0c je 10c5d4 <_Rate_monotonic_Update_statistics+0x84>
stats->max_cpu_time = executed;
10c5c8: 8b 45 e0 mov -0x20(%ebp),%eax
10c5cb: 8b 55 e4 mov -0x1c(%ebp),%edx
10c5ce: 89 43 64 mov %eax,0x64(%ebx)
10c5d1: 89 53 68 mov %edx,0x68(%ebx)
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
10c5d4: 83 ec 08 sub $0x8,%esp
10c5d7: 56 push %esi
10c5d8: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10c5de: 50 push %eax
10c5df: e8 34 38 00 00 call 10fe18 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
10c5e4: 5a pop %edx
10c5e5: 59 pop %ecx
10c5e6: 8d 43 74 lea 0x74(%ebx),%eax
10c5e9: 50 push %eax
10c5ea: 56 push %esi
10c5eb: e8 00 39 00 00 call 10fef0 <_Timespec_Less_than>
10c5f0: 83 c4 10 add $0x10,%esp
10c5f3: 84 c0 test %al,%al
10c5f5: 75 39 jne 10c630 <_Rate_monotonic_Update_statistics+0xe0>
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
10c5f7: 83 ec 08 sub $0x8,%esp
10c5fa: 8d 43 7c lea 0x7c(%ebx),%eax
10c5fd: 50 push %eax
10c5fe: 56 push %esi
10c5ff: e8 c8 38 00 00 call 10fecc <_Timespec_Greater_than>
10c604: 83 c4 10 add $0x10,%esp
10c607: 84 c0 test %al,%al
10c609: 0f 84 70 ff ff ff je 10c57f <_Rate_monotonic_Update_statistics+0x2f>
stats->max_wall_time = since_last_period;
10c60f: 8b 45 d8 mov -0x28(%ebp),%eax
10c612: 8b 55 dc mov -0x24(%ebp),%edx
10c615: 89 43 7c mov %eax,0x7c(%ebx)
10c618: 89 93 80 00 00 00 mov %edx,0x80(%ebx)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
10c61e: 8d 65 f4 lea -0xc(%ebp),%esp
10c621: 5b pop %ebx
10c622: 5e pop %esi
10c623: 5f pop %edi
10c624: c9 leave
10c625: c3 ret
10c626: 66 90 xchg %ax,%ax
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
10c628: ff 43 58 incl 0x58(%ebx)
10c62b: e9 39 ff ff ff jmp 10c569 <_Rate_monotonic_Update_statistics+0x19>
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
10c630: 8b 45 d8 mov -0x28(%ebp),%eax
10c633: 8b 55 dc mov -0x24(%ebp),%edx
10c636: 89 43 74 mov %eax,0x74(%ebx)
10c639: 89 53 78 mov %edx,0x78(%ebx)
10c63c: eb b9 jmp 10c5f7 <_Rate_monotonic_Update_statistics+0xa7>
00111610 <_Scheduler_priority_Block>:
void _Scheduler_priority_Block(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
111610: 55 push %ebp
111611: 89 e5 mov %esp,%ebp
111613: 53 push %ebx
111614: 8b 45 0c mov 0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract(
Thread_Control *the_thread
)
{
Chain_Control *ready = the_thread->scheduler.priority->ready_chain;
111617: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
11161d: 8b 12 mov (%edx),%edx
if ( _Chain_Has_only_one_node( ready ) ) {
11161f: 8b 4a 08 mov 0x8(%edx),%ecx
111622: 39 0a cmp %ecx,(%edx)
111624: 74 6e je 111694 <_Scheduler_priority_Block+0x84>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
111626: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
111628: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
11162b: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
11162e: 89 0a mov %ecx,(%edx)
{
_Scheduler_priority_Ready_queue_extract(the_thread);
/* TODO: flash critical section */
if ( _Thread_Is_heir( the_thread ) )
111630: 3b 05 3c 7b 12 00 cmp 0x127b3c,%eax
111636: 74 18 je 111650 <_Scheduler_priority_Block+0x40>
_Scheduler_priority_Schedule_body(the_scheduler);
if ( _Thread_Is_executing( the_thread ) )
111638: 3b 05 38 7b 12 00 cmp 0x127b38,%eax
11163e: 74 04 je 111644 <_Scheduler_priority_Block+0x34>
_Scheduler_priority_Block_body(the_scheduler, the_thread);
}
111640: 5b pop %ebx
111641: c9 leave
111642: c3 ret
111643: 90 nop
_Thread_Dispatch_necessary = true;
111644: c6 05 44 7b 12 00 01 movb $0x1,0x127b44
11164b: 5b pop %ebx
11164c: c9 leave
11164d: c3 ret
11164e: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
111650: 66 8b 1d 60 7b 12 00 mov 0x127b60,%bx
111657: 31 d2 xor %edx,%edx
111659: 89 d1 mov %edx,%ecx
11165b: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
11165f: 0f b7 c9 movzwl %cx,%ecx
111662: 66 8b 9c 09 80 7b 12 mov 0x127b80(%ecx,%ecx,1),%bx
111669: 00
11166a: 66 0f bc d3 bsf %bx,%dx
return (_Priority_Bits_index( major ) << 4) +
11166e: c1 e1 04 shl $0x4,%ecx
111671: 0f b7 d2 movzwl %dx,%edx
111674: 8d 14 11 lea (%ecx,%edx,1),%edx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
111677: 8d 14 52 lea (%edx,%edx,2),%edx
11167a: c1 e2 02 shl $0x2,%edx
11167d: 8b 4d 08 mov 0x8(%ebp),%ecx
111680: 03 11 add (%ecx),%edx
111682: 8b 0a mov (%edx),%ecx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
111684: 83 c2 04 add $0x4,%edx
111687: 39 d1 cmp %edx,%ecx
111689: 74 4d je 1116d8 <_Scheduler_priority_Block+0xc8><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
Scheduler_Control *the_scheduler
)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
11168b: 89 0d 3c 7b 12 00 mov %ecx,0x127b3c
111691: eb a5 jmp 111638 <_Scheduler_priority_Block+0x28>
111693: 90 nop
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
111694: 8d 4a 04 lea 0x4(%edx),%ecx
111697: 89 0a mov %ecx,(%edx)
head->next = tail;
head->previous = NULL;
111699: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
tail->previous = head;
1116a0: 89 52 08 mov %edx,0x8(%edx)
{
Chain_Control *ready = the_thread->scheduler.priority->ready_chain;
if ( _Chain_Has_only_one_node( ready ) ) {
_Chain_Initialize_empty( ready );
_Priority_bit_map_Remove( &the_thread->scheduler.priority->Priority_map );
1116a3: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
1116a9: 8b 59 04 mov 0x4(%ecx),%ebx
1116ac: 66 8b 13 mov (%ebx),%dx
1116af: 66 23 51 0e and 0xe(%ecx),%dx
1116b3: 66 89 13 mov %dx,(%ebx)
if ( *the_priority_map->minor == 0 )
1116b6: 66 85 d2 test %dx,%dx
1116b9: 0f 85 71 ff ff ff jne 111630 <_Scheduler_priority_Block+0x20>
_Priority_Major_bit_map &= the_priority_map->block_major;
1116bf: 66 8b 15 60 7b 12 00 mov 0x127b60,%dx
1116c6: 23 51 0c and 0xc(%ecx),%edx
1116c9: 66 89 15 60 7b 12 00 mov %dx,0x127b60
1116d0: e9 5b ff ff ff jmp 111630 <_Scheduler_priority_Block+0x20>
1116d5: 8d 76 00 lea 0x0(%esi),%esi
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
1116d8: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
1116da: eb af jmp 11168b <_Scheduler_priority_Block+0x7b><== NOT EXECUTED
0010d240 <_Scheduler_priority_Schedule>:
*/
void _Scheduler_priority_Schedule(
Scheduler_Control *the_scheduler
)
{
10d240: 55 push %ebp
10d241: 89 e5 mov %esp,%ebp
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d243: 66 8b 0d 60 7b 12 00 mov 0x127b60,%cx
10d24a: 31 c0 xor %eax,%eax
10d24c: 89 c2 mov %eax,%edx
10d24e: 66 0f bc d1 bsf %cx,%dx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d252: 0f b7 d2 movzwl %dx,%edx
10d255: 66 8b 8c 12 80 7b 12 mov 0x127b80(%edx,%edx,1),%cx
10d25c: 00
10d25d: 66 0f bc c1 bsf %cx,%ax
return (_Priority_Bits_index( major ) << 4) +
10d261: c1 e2 04 shl $0x4,%edx
10d264: 0f b7 c0 movzwl %ax,%eax
10d267: 8d 04 02 lea (%edx,%eax,1),%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10d26a: 8d 04 40 lea (%eax,%eax,2),%eax
10d26d: c1 e0 02 shl $0x2,%eax
10d270: 8b 55 08 mov 0x8(%ebp),%edx
10d273: 03 02 add (%edx),%eax
_Scheduler_priority_Schedule_body( the_scheduler );
}
10d275: 8b 10 mov (%eax),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d277: 83 c0 04 add $0x4,%eax
10d27a: 39 c2 cmp %eax,%edx
10d27c: 74 0a je 10d288 <_Scheduler_priority_Schedule+0x48><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
Scheduler_Control *the_scheduler
)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d27e: 89 15 3c 7b 12 00 mov %edx,0x127b3c
10d284: c9 leave
10d285: c3 ret
10d286: 66 90 xchg %ax,%ax
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10d288: 31 d2 xor %edx,%edx <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
Scheduler_Control *the_scheduler
)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d28a: 89 15 3c 7b 12 00 mov %edx,0x127b3c <== NOT EXECUTED
10d290: c9 leave <== NOT EXECUTED
10d291: c3 ret <== NOT EXECUTED
0010d320 <_Scheduler_priority_Unblock>:
void _Scheduler_priority_Unblock (
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
10d320: 55 push %ebp
10d321: 89 e5 mov %esp,%ebp
10d323: 53 push %ebx
10d324: 8b 45 0c mov 0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue(
Thread_Control *the_thread
)
{
_Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
10d327: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d32d: 8b 4a 04 mov 0x4(%edx),%ecx
10d330: 66 8b 5a 0a mov 0xa(%edx),%bx
10d334: 66 09 19 or %bx,(%ecx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d337: 66 8b 0d 60 7b 12 00 mov 0x127b60,%cx
10d33e: 0b 4a 08 or 0x8(%edx),%ecx
10d341: 66 89 0d 60 7b 12 00 mov %cx,0x127b60
_Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain,
10d348: 8b 12 mov (%edx),%edx
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10d34a: 8b 4a 08 mov 0x8(%edx),%ecx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
10d34d: 8d 5a 04 lea 0x4(%edx),%ebx
10d350: 89 18 mov %ebx,(%eax)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
10d352: 89 42 08 mov %eax,0x8(%edx)
old_last->next = the_node;
10d355: 89 01 mov %eax,(%ecx)
the_node->previous = old_last;
10d357: 89 48 04 mov %ecx,0x4(%eax)
* 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 ) {
10d35a: 8b 50 14 mov 0x14(%eax),%edx
10d35d: 8b 0d 3c 7b 12 00 mov 0x127b3c,%ecx
10d363: 3b 51 14 cmp 0x14(%ecx),%edx
10d366: 73 17 jae 10d37f <_Scheduler_priority_Unblock+0x5f>
_Thread_Heir = the_thread;
10d368: a3 3c 7b 12 00 mov %eax,0x127b3c
if ( _Thread_Executing->is_preemptible ||
10d36d: a1 38 7b 12 00 mov 0x127b38,%eax
10d372: 80 78 74 00 cmpb $0x0,0x74(%eax)
10d376: 74 0c je 10d384 <_Scheduler_priority_Unblock+0x64>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10d378: c6 05 44 7b 12 00 01 movb $0x1,0x127b44
_Scheduler_priority_Unblock_body(the_scheduler, the_thread);
}
10d37f: 5b pop %ebx
10d380: c9 leave
10d381: c3 ret
10d382: 66 90 xchg %ax,%ax
* 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 ||
10d384: 85 d2 test %edx,%edx
10d386: 75 f7 jne 10d37f <_Scheduler_priority_Unblock+0x5f>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10d388: c6 05 44 7b 12 00 01 movb $0x1,0x127b44
10d38f: eb ee jmp 10d37f <_Scheduler_priority_Unblock+0x5f>
0010d394 <_Scheduler_priority_Yield>:
*/
void _Scheduler_priority_Yield(
Scheduler_Control *the_scheduler __attribute__((unused))
)
{
10d394: 55 push %ebp
10d395: 89 e5 mov %esp,%ebp
10d397: 56 push %esi
10d398: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10d399: a1 38 7b 12 00 mov 0x127b38,%eax
ready = executing->scheduler.priority->ready_chain;
10d39e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
10d3a4: 8b 12 mov (%edx),%edx
_ISR_Disable( level );
10d3a6: 9c pushf
10d3a7: fa cli
10d3a8: 59 pop %ecx
if ( !_Chain_Has_only_one_node( ready ) ) {
10d3a9: 8b 5a 08 mov 0x8(%edx),%ebx
10d3ac: 39 1a cmp %ebx,(%edx)
10d3ae: 74 40 je 10d3f0 <_Scheduler_priority_Yield+0x5c>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10d3b0: 8b 30 mov (%eax),%esi
previous = the_node->previous;
10d3b2: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
10d3b5: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
10d3b8: 89 33 mov %esi,(%ebx)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10d3ba: 8b 5a 08 mov 0x8(%edx),%ebx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
10d3bd: 8d 72 04 lea 0x4(%edx),%esi
10d3c0: 89 30 mov %esi,(%eax)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
10d3c2: 89 42 08 mov %eax,0x8(%edx)
old_last->next = the_node;
10d3c5: 89 03 mov %eax,(%ebx)
the_node->previous = old_last;
10d3c7: 89 58 04 mov %ebx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10d3ca: 51 push %ecx
10d3cb: 9d popf
10d3cc: fa cli
if ( _Thread_Is_heir( executing ) )
10d3cd: 3b 05 3c 7b 12 00 cmp 0x127b3c,%eax
10d3d3: 74 0f je 10d3e4 <_Scheduler_priority_Yield+0x50>
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
10d3d5: c6 05 44 7b 12 00 01 movb $0x1,0x127b44
_ISR_Enable( level );
10d3dc: 51 push %ecx
10d3dd: 9d popf
}
10d3de: 5b pop %ebx
10d3df: 5e pop %esi
10d3e0: c9 leave
10d3e1: c3 ret
10d3e2: 66 90 xchg %ax,%ax
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
10d3e4: 8b 02 mov (%edx),%eax
10d3e6: a3 3c 7b 12 00 mov %eax,0x127b3c
10d3eb: eb e8 jmp 10d3d5 <_Scheduler_priority_Yield+0x41>
10d3ed: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10d3f0: 3b 05 3c 7b 12 00 cmp 0x127b3c,%eax
10d3f6: 75 dd jne 10d3d5 <_Scheduler_priority_Yield+0x41>
10d3f8: eb e2 jmp 10d3dc <_Scheduler_priority_Yield+0x48>
0010dac4 <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
10dac4: 55 push %ebp
10dac5: 89 e5 mov %esp,%ebp
10dac7: 53 push %ebx
10dac8: 83 ec 04 sub $0x4,%esp
10dacb: 8b 5d 08 mov 0x8(%ebp),%ebx
10dace: a1 50 23 13 00 mov 0x132350,%eax
10dad3: 40 inc %eax
10dad4: a3 50 23 13 00 mov %eax,0x132350
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
10dad9: a1 24 24 13 00 mov 0x132424,%eax
if ( time->tv_sec < seconds )
10dade: 8b 13 mov (%ebx),%edx
10dae0: 39 d0 cmp %edx,%eax
10dae2: 7f 34 jg 10db18 <_TOD_Set+0x54>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
10dae4: 51 push %ecx
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
10dae5: 29 c2 sub %eax,%edx
10dae7: 52 push %edx
10dae8: 6a 00 push $0x0
10daea: 68 50 24 13 00 push $0x132450
10daef: e8 e8 24 00 00 call 10ffdc <_Watchdog_Adjust>
10daf4: 83 c4 10 add $0x10,%esp
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
10daf7: 8b 03 mov (%ebx),%eax
10daf9: a3 24 24 13 00 mov %eax,0x132424
10dafe: 8b 43 04 mov 0x4(%ebx),%eax
10db01: a3 28 24 13 00 mov %eax,0x132428
_TOD_Is_set = true;
10db06: c6 05 64 23 13 00 01 movb $0x1,0x132364
_TOD_Activate();
_Thread_Enable_dispatch();
}
10db0d: 8b 5d fc mov -0x4(%ebp),%ebx
10db10: c9 leave
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
10db11: e9 42 15 00 00 jmp 10f058 <_Thread_Enable_dispatch>
10db16: 66 90 xchg %ax,%ax
10db18: 51 push %ecx
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
if ( time->tv_sec < seconds )
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
10db19: 29 d0 sub %edx,%eax
10db1b: 50 push %eax
10db1c: 6a 01 push $0x1
10db1e: 68 50 24 13 00 push $0x132450
10db23: e8 b4 24 00 00 call 10ffdc <_Watchdog_Adjust>
10db28: 83 c4 10 add $0x10,%esp
10db2b: eb ca jmp 10daf7 <_TOD_Set+0x33>
0010c1bc <_TOD_To_seconds>:
*/
uint32_t _TOD_To_seconds(
const rtems_time_of_day *the_tod
)
{
10c1bc: 55 push %ebp
10c1bd: 89 e5 mov %esp,%ebp
10c1bf: 56 push %esi
10c1c0: 53 push %ebx
10c1c1: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t time;
uint32_t year_mod_4;
time = the_tod->day - 1;
10c1c4: 8b 72 08 mov 0x8(%edx),%esi
10c1c7: 4e dec %esi
year_mod_4 = the_tod->year & 3;
10c1c8: 8b 02 mov (%edx),%eax
if ( year_mod_4 == 0 )
10c1ca: 89 c3 mov %eax,%ebx
10c1cc: 83 e3 03 and $0x3,%ebx
10c1cf: 74 67 je 10c238 <_TOD_To_seconds+0x7c>
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
10c1d1: 8b 4a 04 mov 0x4(%edx),%ecx
10c1d4: 0f b7 8c 09 c0 3a 12 movzwl 0x123ac0(%ecx,%ecx,1),%ecx
10c1db: 00
10c1dc: 8d 34 31 lea (%ecx,%esi,1),%esi
time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10c1df: 0f b7 8c 1b f4 3a 12 movzwl 0x123af4(%ebx,%ebx,1),%ecx
10c1e6: 00
if ( year_mod_4 == 0 )
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
10c1e7: 2d c4 07 00 00 sub $0x7c4,%eax
10c1ec: c1 e8 02 shr $0x2,%eax
10c1ef: 8d 1c c0 lea (%eax,%eax,8),%ebx
10c1f2: 8d 1c d8 lea (%eax,%ebx,8),%ebx
10c1f5: 8d 1c 9b lea (%ebx,%ebx,4),%ebx
10c1f8: 8d 04 98 lea (%eax,%ebx,4),%eax
10c1fb: 01 c1 add %eax,%ecx
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10c1fd: 01 f1 add %esi,%ecx
time *= TOD_SECONDS_PER_DAY;
10c1ff: 8d 04 89 lea (%ecx,%ecx,4),%eax
10c202: 8d 04 81 lea (%ecx,%eax,4),%eax
10c205: 8d 04 c1 lea (%ecx,%eax,8),%eax
10c208: c1 e0 02 shl $0x2,%eax
10c20b: 29 c8 sub %ecx,%eax
10c20d: c1 e0 07 shl $0x7,%eax
time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute)
10c210: 8b 5a 14 mov 0x14(%edx),%ebx
10c213: 8b 4a 0c mov 0xc(%edx),%ecx
10c216: 8d 0c 49 lea (%ecx,%ecx,2),%ecx
10c219: 8d 0c 89 lea (%ecx,%ecx,4),%ecx
10c21c: c1 e1 02 shl $0x2,%ecx
10c21f: 03 4a 10 add 0x10(%edx),%ecx
* TOD_SECONDS_PER_MINUTE;
10c222: 8d 14 49 lea (%ecx,%ecx,2),%edx
10c225: 8d 14 92 lea (%edx,%edx,4),%edx
time += the_tod->second;
10c228: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx
time += TOD_SECONDS_1970_THROUGH_1988;
10c22f: 8d 04 02 lea (%edx,%eax,1),%eax
return( time );
}
10c232: 5b pop %ebx
10c233: 5e pop %esi
10c234: c9 leave
10c235: c3 ret
10c236: 66 90 xchg %ax,%ax
time = the_tod->day - 1;
year_mod_4 = the_tod->year & 3;
if ( year_mod_4 == 0 )
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
10c238: 8b 4a 04 mov 0x4(%edx),%ecx
10c23b: 0f b7 8c 09 da 3a 12 movzwl 0x123ada(%ecx,%ecx,1),%ecx
10c242: 00
10c243: 8d 34 31 lea (%ecx,%esi,1),%esi
10c246: eb 97 jmp 10c1df <_TOD_To_seconds+0x23>
0010c248 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10c248: 55 push %ebp
10c249: 89 e5 mov %esp,%ebp
10c24b: 53 push %ebx
10c24c: 8b 4d 08 mov 0x8(%ebp),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
10c24f: 8b 1d 2c 62 12 00 mov 0x12622c,%ebx
if ((!the_tod) ||
10c255: 85 c9 test %ecx,%ecx
10c257: 74 53 je 10c2ac <_TOD_Validate+0x64> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10c259: b8 40 42 0f 00 mov $0xf4240,%eax
10c25e: 31 d2 xor %edx,%edx
10c260: f7 f3 div %ebx
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10c262: 3b 41 18 cmp 0x18(%ecx),%eax
10c265: 76 45 jbe 10c2ac <_TOD_Validate+0x64>
(the_tod->ticks >= ticks_per_second) ||
10c267: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10c26b: 77 3f ja 10c2ac <_TOD_Validate+0x64>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10c26d: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10c271: 77 39 ja 10c2ac <_TOD_Validate+0x64>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10c273: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10c277: 77 33 ja 10c2ac <_TOD_Validate+0x64>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10c279: 8b 41 04 mov 0x4(%ecx),%eax
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10c27c: 85 c0 test %eax,%eax
10c27e: 74 2c je 10c2ac <_TOD_Validate+0x64> <== NEVER TAKEN
(the_tod->month == 0) ||
10c280: 83 f8 0c cmp $0xc,%eax
10c283: 77 27 ja 10c2ac <_TOD_Validate+0x64>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c285: 8b 11 mov (%ecx),%edx
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
10c287: 81 fa c3 07 00 00 cmp $0x7c3,%edx
10c28d: 76 1d jbe 10c2ac <_TOD_Validate+0x64>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10c28f: 8b 49 08 mov 0x8(%ecx),%ecx
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c292: 85 c9 test %ecx,%ecx
10c294: 74 16 je 10c2ac <_TOD_Validate+0x64> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10c296: 83 e2 03 and $0x3,%edx
10c299: 75 16 jne 10c2b1 <_TOD_Validate+0x69>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10c29b: 8b 04 85 34 3b 12 00 mov 0x123b34(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10c2a2: 39 c8 cmp %ecx,%eax
10c2a4: 0f 93 c0 setae %al
10c2a7: eb 05 jmp 10c2ae <_TOD_Validate+0x66>
10c2a9: 8d 76 00 lea 0x0(%esi),%esi
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
10c2ac: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10c2ae: 5b pop %ebx
10c2af: c9 leave
10c2b0: c3 ret
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10c2b1: 8b 04 85 00 3b 12 00 mov 0x123b00(,%eax,4),%eax
10c2b8: eb e8 jmp 10c2a2 <_TOD_Validate+0x5a>
0010d448 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10d448: 55 push %ebp
10d449: 89 e5 mov %esp,%ebp
10d44b: 57 push %edi
10d44c: 56 push %esi
10d44d: 53 push %ebx
10d44e: 83 ec 28 sub $0x28,%esp
10d451: 8b 5d 08 mov 0x8(%ebp),%ebx
10d454: 8b 75 0c mov 0xc(%ebp),%esi
10d457: 8a 45 10 mov 0x10(%ebp),%al
10d45a: 88 45 e7 mov %al,-0x19(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10d45d: 8b 7b 10 mov 0x10(%ebx),%edi
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
10d460: 53 push %ebx
10d461: e8 3a 0d 00 00 call 10e1a0 <_Thread_Set_transient>
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
10d466: 83 c4 10 add $0x10,%esp
10d469: 39 73 14 cmp %esi,0x14(%ebx)
10d46c: 74 0d je 10d47b <_Thread_Change_priority+0x33>
_Thread_Set_priority( the_thread, new_priority );
10d46e: 83 ec 08 sub $0x8,%esp
10d471: 56 push %esi
10d472: 53 push %ebx
10d473: e8 c4 0c 00 00 call 10e13c <_Thread_Set_priority>
10d478: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10d47b: 9c pushf
10d47c: fa cli
10d47d: 5e pop %esi
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
10d47e: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10d481: 83 f8 04 cmp $0x4,%eax
10d484: 74 26 je 10d4ac <_Thread_Change_priority+0x64>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10d486: 83 e7 04 and $0x4,%edi
10d489: 74 15 je 10d4a0 <_Thread_Change_priority+0x58><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10d48b: 56 push %esi
10d48c: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10d48d: a9 e0 be 03 00 test $0x3bee0,%eax
10d492: 0f 85 94 00 00 00 jne 10d52c <_Thread_Change_priority+0xe4>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10d498: 8d 65 f4 lea -0xc(%ebp),%esp
10d49b: 5b pop %ebx
10d49c: 5e pop %esi
10d49d: 5f pop %edi
10d49e: c9 leave
10d49f: c3 ret
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10d4a0: 89 c2 mov %eax,%edx
10d4a2: 83 e2 fb and $0xfffffffb,%edx
10d4a5: 89 53 10 mov %edx,0x10(%ebx)
10d4a8: eb e1 jmp 10d48b <_Thread_Change_priority+0x43>
10d4aa: 66 90 xchg %ax,%ax
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10d4ac: 83 e7 04 and $0x4,%edi
10d4af: 75 40 jne 10d4f1 <_Thread_Change_priority+0xa9><== NEVER TAKEN
* Ready Queue with interrupts off.
*
* FIXME: hard-coded for priority scheduling. Might be ok since this
* function is specific to priority scheduling?
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10d4b1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( prepend_it )
10d4b8: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10d4bc: 0f 84 82 00 00 00 je 10d544 <_Thread_Change_priority+0xfc>
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first(
Thread_Control *the_thread
)
{
_Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
10d4c2: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d4c8: 8b 50 04 mov 0x4(%eax),%edx
10d4cb: 66 8b 48 0a mov 0xa(%eax),%cx
10d4cf: 66 09 0a or %cx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d4d2: 66 8b 15 60 7b 12 00 mov 0x127b60,%dx
10d4d9: 0b 50 08 or 0x8(%eax),%edx
10d4dc: 66 89 15 60 7b 12 00 mov %dx,0x127b60
_Chain_Prepend_unprotected( the_thread->scheduler.priority->ready_chain,
10d4e3: 8b 00 mov (%eax),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10d4e5: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10d4e8: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10d4ea: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10d4ec: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10d4ee: 89 5a 04 mov %ebx,0x4(%edx)
_Scheduler_priority_Ready_queue_enqueue_first( the_thread );
else
_Scheduler_priority_Ready_queue_enqueue( the_thread );
}
_ISR_Flash( level );
10d4f1: 56 push %esi
10d4f2: 9d popf
10d4f3: fa cli
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule(
Scheduler_Control *the_scheduler
)
{
the_scheduler->Operations.schedule( the_scheduler );
10d4f4: 83 ec 0c sub $0xc,%esp
10d4f7: 68 00 76 12 00 push $0x127600
10d4fc: ff 15 04 76 12 00 call *0x127604
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10d502: a1 38 7b 12 00 mov 0x127b38,%eax
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule(&_Scheduler);
if ( !_Thread_Is_executing_also_the_heir() &&
10d507: 83 c4 10 add $0x10,%esp
10d50a: 3b 05 3c 7b 12 00 cmp 0x127b3c,%eax
10d510: 74 0d je 10d51f <_Thread_Change_priority+0xd7>
10d512: 80 78 74 00 cmpb $0x0,0x74(%eax)
10d516: 74 07 je 10d51f <_Thread_Change_priority+0xd7>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10d518: c6 05 44 7b 12 00 01 movb $0x1,0x127b44
_ISR_Enable( level );
10d51f: 56 push %esi
10d520: 9d popf
}
10d521: 8d 65 f4 lea -0xc(%ebp),%esp
10d524: 5b pop %ebx
10d525: 5e pop %esi
10d526: 5f pop %edi
10d527: c9 leave
10d528: c3 ret
10d529: 8d 76 00 lea 0x0(%esi),%esi
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10d52c: 89 5d 0c mov %ebx,0xc(%ebp)
10d52f: 8b 43 44 mov 0x44(%ebx),%eax
10d532: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10d535: 8d 65 f4 lea -0xc(%ebp),%esp
10d538: 5b pop %ebx
10d539: 5e pop %esi
10d53a: 5f pop %edi
10d53b: c9 leave
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10d53c: e9 63 0b 00 00 jmp 10e0a4 <_Thread_queue_Requeue>
10d541: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue(
Thread_Control *the_thread
)
{
_Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
10d544: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d54a: 8b 50 04 mov 0x4(%eax),%edx
10d54d: 66 8b 48 0a mov 0xa(%eax),%cx
10d551: 66 09 0a or %cx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d554: 66 8b 15 60 7b 12 00 mov 0x127b60,%dx
10d55b: 0b 50 08 or 0x8(%eax),%edx
10d55e: 66 89 15 60 7b 12 00 mov %dx,0x127b60
_Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain,
10d565: 8b 00 mov (%eax),%eax
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10d567: 8b 50 08 mov 0x8(%eax),%edx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
10d56a: 8d 48 04 lea 0x4(%eax),%ecx
10d56d: 89 0b mov %ecx,(%ebx)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
10d56f: 89 58 08 mov %ebx,0x8(%eax)
old_last->next = the_node;
10d572: 89 1a mov %ebx,(%edx)
the_node->previous = old_last;
10d574: 89 53 04 mov %edx,0x4(%ebx)
10d577: e9 75 ff ff ff jmp 10d4f1 <_Thread_Change_priority+0xa9>
0010d57c <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10d57c: 55 push %ebp
10d57d: 89 e5 mov %esp,%ebp
10d57f: 53 push %ebx
10d580: 83 ec 04 sub $0x4,%esp
10d583: 8b 55 08 mov 0x8(%ebp),%edx
10d586: 8b 45 0c mov 0xc(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10d589: 9c pushf
10d58a: fa cli
10d58b: 5b pop %ebx
current_state = the_thread->current_state;
10d58c: 8b 4a 10 mov 0x10(%edx),%ecx
if ( current_state & state ) {
10d58f: 85 c8 test %ecx,%eax
10d591: 74 0b je 10d59e <_Thread_Clear_state+0x22>
10d593: f7 d0 not %eax
10d595: 21 c8 and %ecx,%eax
current_state =
the_thread->current_state = _States_Clear( state, current_state );
10d597: 89 42 10 mov %eax,0x10(%edx)
if ( _States_Is_ready( current_state ) ) {
10d59a: 85 c0 test %eax,%eax
10d59c: 74 0a je 10d5a8 <_Thread_Clear_state+0x2c>
_Scheduler_Unblock( &_Scheduler, the_thread);
}
}
_ISR_Enable( level );
10d59e: 53 push %ebx
10d59f: 9d popf
}
10d5a0: 8b 5d fc mov -0x4(%ebp),%ebx
10d5a3: c9 leave
10d5a4: c3 ret
10d5a5: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
the_scheduler->Operations.unblock( the_scheduler, the_thread );
10d5a8: 83 ec 08 sub $0x8,%esp
10d5ab: 52 push %edx
10d5ac: 68 00 76 12 00 push $0x127600
10d5b1: ff 15 10 76 12 00 call *0x127610
10d5b7: 83 c4 10 add $0x10,%esp
10d5ba: eb e2 jmp 10d59e <_Thread_Clear_state+0x22>
0010d748 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10d748: 55 push %ebp
10d749: 89 e5 mov %esp,%ebp
10d74b: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10d74e: 8d 45 f4 lea -0xc(%ebp),%eax
10d751: 50 push %eax
10d752: ff 75 08 pushl 0x8(%ebp)
10d755: e8 c6 01 00 00 call 10d920 <_Thread_Get>
switch ( location ) {
10d75a: 83 c4 10 add $0x10,%esp
10d75d: 8b 55 f4 mov -0xc(%ebp),%edx
10d760: 85 d2 test %edx,%edx
10d762: 75 1c jne 10d780 <_Thread_Delay_ended+0x38><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10d764: 83 ec 08 sub $0x8,%esp
10d767: 68 18 00 00 10 push $0x10000018
10d76c: 50 push %eax
10d76d: e8 0a fe ff ff call 10d57c <_Thread_Clear_state>
10d772: a1 50 75 12 00 mov 0x127550,%eax
10d777: 48 dec %eax
10d778: a3 50 75 12 00 mov %eax,0x127550
10d77d: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10d780: c9 leave
10d781: c3 ret
0010d784 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10d784: 55 push %ebp
10d785: 89 e5 mov %esp,%ebp
10d787: 57 push %edi
10d788: 56 push %esi
10d789: 53 push %ebx
10d78a: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10d78d: 8b 1d 38 7b 12 00 mov 0x127b38,%ebx
_ISR_Disable( level );
10d793: 9c pushf
10d794: fa cli
10d795: 58 pop %eax
while ( _Thread_Dispatch_necessary == true ) {
10d796: 8a 15 44 7b 12 00 mov 0x127b44,%dl
10d79c: 84 d2 test %dl,%dl
10d79e: 0f 84 3c 01 00 00 je 10d8e0 <_Thread_Dispatch+0x15c>
heir = _Thread_Heir;
10d7a4: 8b 35 3c 7b 12 00 mov 0x127b3c,%esi
_Thread_Dispatch_disable_level = 1;
10d7aa: c7 05 50 75 12 00 01 movl $0x1,0x127550
10d7b1: 00 00 00
_Thread_Dispatch_necessary = false;
10d7b4: c6 05 44 7b 12 00 00 movb $0x0,0x127b44
_Thread_Executing = heir;
10d7bb: 89 35 38 7b 12 00 mov %esi,0x127b38
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
10d7c1: 39 f3 cmp %esi,%ebx
10d7c3: 0f 84 17 01 00 00 je 10d8e0 <_Thread_Dispatch+0x15c>
10d7c9: 8d 7d d8 lea -0x28(%ebp),%edi
10d7cc: e9 f5 00 00 00 jmp 10d8c6 <_Thread_Dispatch+0x142>
10d7d1: 8d 76 00 lea 0x0(%esi),%esi
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
10d7d4: 50 push %eax
10d7d5: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10d7d6: 83 ec 0c sub $0xc,%esp
10d7d9: 8d 45 e0 lea -0x20(%ebp),%eax
10d7dc: 50 push %eax
10d7dd: e8 ae 3a 00 00 call 111290 <_TOD_Get_uptime>
_Timestamp_Subtract(
10d7e2: 83 c4 0c add $0xc,%esp
10d7e5: 57 push %edi
10d7e6: 8d 45 e0 lea -0x20(%ebp),%eax
10d7e9: 50 push %eax
10d7ea: 68 48 76 12 00 push $0x127648
10d7ef: e8 2c 0c 00 00 call 10e420 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10d7f4: 58 pop %eax
10d7f5: 5a pop %edx
10d7f6: 57 push %edi
10d7f7: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10d7fd: 50 push %eax
10d7fe: e8 e1 0b 00 00 call 10e3e4 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10d803: 8b 45 e0 mov -0x20(%ebp),%eax
10d806: 8b 55 e4 mov -0x1c(%ebp),%edx
10d809: a3 48 76 12 00 mov %eax,0x127648
10d80e: 89 15 4c 76 12 00 mov %edx,0x12764c
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10d814: a1 20 76 12 00 mov 0x127620,%eax
10d819: 83 c4 10 add $0x10,%esp
10d81c: 85 c0 test %eax,%eax
10d81e: 74 10 je 10d830 <_Thread_Dispatch+0xac> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10d820: 8b 10 mov (%eax),%edx
10d822: 89 93 e4 00 00 00 mov %edx,0xe4(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10d828: 8b 96 e4 00 00 00 mov 0xe4(%esi),%edx
10d82e: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10d830: 83 ec 08 sub $0x8,%esp
10d833: 56 push %esi
10d834: 53 push %ebx
10d835: e8 86 0e 00 00 call 10e6c0 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10d83a: 5a pop %edx
10d83b: 59 pop %ecx
10d83c: 81 c6 c8 00 00 00 add $0xc8,%esi
10d842: 56 push %esi
10d843: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax
10d849: 50 push %eax
10d84a: e8 71 11 00 00 call 10e9c0 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10d84f: 83 c4 10 add $0x10,%esp
10d852: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax
10d858: 85 c0 test %eax,%eax
10d85a: 74 36 je 10d892 <_Thread_Dispatch+0x10e>
#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 );
10d85c: a1 e0 75 12 00 mov 0x1275e0,%eax
10d861: 39 c3 cmp %eax,%ebx
10d863: 74 2d je 10d892 <_Thread_Dispatch+0x10e>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10d865: 85 c0 test %eax,%eax
10d867: 74 11 je 10d87a <_Thread_Dispatch+0xf6>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10d869: 83 ec 0c sub $0xc,%esp
10d86c: 05 e0 00 00 00 add $0xe0,%eax
10d871: 50 push %eax
10d872: e8 7d 11 00 00 call 10e9f4 <_CPU_Context_save_fp>
10d877: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10d87a: 83 ec 0c sub $0xc,%esp
10d87d: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax
10d883: 50 push %eax
10d884: e8 75 11 00 00 call 10e9fe <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10d889: 89 1d e0 75 12 00 mov %ebx,0x1275e0
10d88f: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10d892: 8b 1d 38 7b 12 00 mov 0x127b38,%ebx
_ISR_Disable( level );
10d898: 9c pushf
10d899: fa cli
10d89a: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10d89b: 8a 15 44 7b 12 00 mov 0x127b44,%dl
10d8a1: 84 d2 test %dl,%dl
10d8a3: 74 3b je 10d8e0 <_Thread_Dispatch+0x15c>
heir = _Thread_Heir;
10d8a5: 8b 35 3c 7b 12 00 mov 0x127b3c,%esi
_Thread_Dispatch_disable_level = 1;
10d8ab: c7 05 50 75 12 00 01 movl $0x1,0x127550
10d8b2: 00 00 00
_Thread_Dispatch_necessary = false;
10d8b5: c6 05 44 7b 12 00 00 movb $0x0,0x127b44
_Thread_Executing = heir;
10d8bc: 89 35 38 7b 12 00 mov %esi,0x127b38
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
10d8c2: 39 de cmp %ebx,%esi
10d8c4: 74 1a je 10d8e0 <_Thread_Dispatch+0x15c><== NEVER TAKEN
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
10d8c6: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10d8ca: 0f 85 04 ff ff ff jne 10d7d4 <_Thread_Dispatch+0x50>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10d8d0: 8b 15 20 75 12 00 mov 0x127520,%edx
10d8d6: 89 56 78 mov %edx,0x78(%esi)
10d8d9: e9 f6 fe ff ff jmp 10d7d4 <_Thread_Dispatch+0x50>
10d8de: 66 90 xchg %ax,%ax
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
10d8e0: c7 05 50 75 12 00 00 movl $0x0,0x127550
10d8e7: 00 00 00
_ISR_Enable( level );
10d8ea: 50 push %eax
10d8eb: 9d popf
_API_extensions_Run_postswitch();
10d8ec: e8 e3 e5 ff ff call 10bed4 <_API_extensions_Run_postswitch>
}
10d8f1: 8d 65 f4 lea -0xc(%ebp),%esp
10d8f4: 5b pop %ebx
10d8f5: 5e pop %esi
10d8f6: 5f pop %edi
10d8f7: c9 leave
10d8f8: c3 ret
0010d920 <_Thread_Get>:
*/
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
10d920: 55 push %ebp
10d921: 89 e5 mov %esp,%ebp
10d923: 53 push %ebx
10d924: 83 ec 04 sub $0x4,%esp
10d927: 8b 45 08 mov 0x8(%ebp),%eax
10d92a: 8b 4d 0c mov 0xc(%ebp),%ecx
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
10d92d: 85 c0 test %eax,%eax
10d92f: 74 47 je 10d978 <_Thread_Get+0x58>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10d931: 89 c2 mov %eax,%edx
10d933: c1 ea 18 shr $0x18,%edx
10d936: 83 e2 07 and $0x7,%edx
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
10d939: 8d 5a ff lea -0x1(%edx),%ebx
10d93c: 83 fb 02 cmp $0x2,%ebx
10d93f: 77 27 ja 10d968 <_Thread_Get+0x48>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10d941: 89 c3 mov %eax,%ebx
10d943: c1 eb 1b shr $0x1b,%ebx
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
10d946: 4b dec %ebx
10d947: 75 1f jne 10d968 <_Thread_Get+0x48>
*location = OBJECTS_ERROR;
goto done;
}
#endif
information = api_information[ the_class ];
10d949: 8b 14 95 28 75 12 00 mov 0x127528(,%edx,4),%edx
10d950: 8b 52 04 mov 0x4(%edx),%edx
if ( !information ) {
10d953: 85 d2 test %edx,%edx
10d955: 74 11 je 10d968 <_Thread_Get+0x48>
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
10d957: 53 push %ebx
10d958: 51 push %ecx
10d959: 50 push %eax
10d95a: 52 push %edx
10d95b: e8 e8 f4 ff ff call 10ce48 <_Objects_Get>
10d960: 83 c4 10 add $0x10,%esp
done:
return tp;
}
10d963: 8b 5d fc mov -0x4(%ebp),%ebx
10d966: c9 leave
10d967: c3 ret
}
#endif
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
10d968: c7 01 01 00 00 00 movl $0x1,(%ecx)
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
10d96e: 31 c0 xor %eax,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10d970: 8b 5d fc mov -0x4(%ebp),%ebx
10d973: c9 leave
10d974: c3 ret
10d975: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10d978: a1 50 75 12 00 mov 0x127550,%eax
10d97d: 40 inc %eax
10d97e: a3 50 75 12 00 mov %eax,0x127550
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
10d983: c7 01 00 00 00 00 movl $0x0,(%ecx)
tp = _Thread_Executing;
10d989: a1 38 7b 12 00 mov 0x127b38,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10d98e: 8b 5d fc mov -0x4(%ebp),%ebx
10d991: c9 leave
10d992: c3 ret
0011316c <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
11316c: 55 push %ebp
11316d: 89 e5 mov %esp,%ebp
11316f: 53 push %ebx
113170: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
113173: 8b 1d 38 7b 12 00 mov 0x127b38,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
113179: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
_ISR_Set_level(level);
11317f: 85 c0 test %eax,%eax
113181: 74 79 je 1131fc <_Thread_Handler+0x90>
113183: fa cli
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
113184: a0 cc 71 12 00 mov 0x1271cc,%al
113189: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
11318c: c6 05 cc 71 12 00 01 movb $0x1,0x1271cc
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
113193: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax
113199: 85 c0 test %eax,%eax
11319b: 74 24 je 1131c1 <_Thread_Handler+0x55>
#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 );
11319d: a1 e0 75 12 00 mov 0x1275e0,%eax
1131a2: 39 c3 cmp %eax,%ebx
1131a4: 74 1b je 1131c1 <_Thread_Handler+0x55>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
1131a6: 85 c0 test %eax,%eax
1131a8: 74 11 je 1131bb <_Thread_Handler+0x4f>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
1131aa: 83 ec 0c sub $0xc,%esp
1131ad: 05 e0 00 00 00 add $0xe0,%eax
1131b2: 50 push %eax
1131b3: e8 3c b8 ff ff call 10e9f4 <_CPU_Context_save_fp>
1131b8: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
1131bb: 89 1d e0 75 12 00 mov %ebx,0x1275e0
/*
* 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 );
1131c1: 83 ec 0c sub $0xc,%esp
1131c4: 53 push %ebx
1131c5: e8 5a b3 ff ff call 10e524 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
1131ca: e8 2d a7 ff ff call 10d8fc <_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) */ {
1131cf: 83 c4 10 add $0x10,%esp
1131d2: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
1131d6: 74 28 je 113200 <_Thread_Handler+0x94>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
1131d8: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax
1131de: 85 c0 test %eax,%eax
1131e0: 74 2d je 11320f <_Thread_Handler+0xa3>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
1131e2: 48 dec %eax
1131e3: 74 43 je 113228 <_Thread_Handler+0xbc> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
1131e5: 83 ec 0c sub $0xc,%esp
1131e8: 53 push %ebx
1131e9: e8 72 b3 ff ff call 10e560 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
1131ee: 83 c4 0c add $0xc,%esp
1131f1: 6a 05 push $0x5
1131f3: 6a 01 push $0x1
1131f5: 6a 00 push $0x0
1131f7: e8 04 97 ff ff call 10c900 <_Internal_error_Occurred>
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
_ISR_Set_level(level);
1131fc: fb sti
1131fd: eb 85 jmp 113184 <_Thread_Handler+0x18>
1131ff: 90 nop
* _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 ();
113200: e8 7b be 00 00 call 11f080 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
113205: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax
11320b: 85 c0 test %eax,%eax
11320d: 75 d3 jne 1131e2 <_Thread_Handler+0x76>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
11320f: 83 ec 0c sub $0xc,%esp
113212: ff b3 9c 00 00 00 pushl 0x9c(%ebx)
113218: ff 93 90 00 00 00 call *0x90(%ebx)
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
11321e: 89 43 28 mov %eax,0x28(%ebx)
113221: 83 c4 10 add $0x10,%esp
113224: eb bf jmp 1131e5 <_Thread_Handler+0x79>
113226: 66 90 xchg %ax,%ax
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
113228: 83 ec 0c sub $0xc,%esp
11322b: ff b3 98 00 00 00 pushl 0x98(%ebx)
113231: ff 93 90 00 00 00 call *0x90(%ebx)
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
113237: 89 43 28 mov %eax,0x28(%ebx)
11323a: 83 c4 10 add $0x10,%esp
11323d: eb a6 jmp 1131e5 <_Thread_Handler+0x79>
0010d994 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10d994: 55 push %ebp
10d995: 89 e5 mov %esp,%ebp
10d997: 57 push %edi
10d998: 56 push %esi
10d999: 53 push %ebx
10d99a: 83 ec 1c sub $0x1c,%esp
10d99d: 8b 5d 0c mov 0xc(%ebp),%ebx
10d9a0: 8b 4d 10 mov 0x10(%ebp),%ecx
10d9a3: 8b 75 14 mov 0x14(%ebp),%esi
10d9a6: 8a 55 18 mov 0x18(%ebp),%dl
10d9a9: 0f b6 7d 20 movzbl 0x20(%ebp),%edi
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10d9ad: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10d9b4: 00 00 00
10d9b7: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10d9be: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10d9c1: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10d9c8: 00 00 00
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
10d9cb: 85 c9 test %ecx,%ecx
10d9cd: 0f 84 14 02 00 00 je 10dbe7 <_Thread_Initialize+0x253>
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
10d9d3: c6 83 b4 00 00 00 00 movb $0x0,0xb4(%ebx)
10d9da: 89 f0 mov %esi,%eax
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10d9dc: 89 8b bc 00 00 00 mov %ecx,0xbc(%ebx)
the_stack->size = size;
10d9e2: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10d9e8: 84 d2 test %dl,%dl
10d9ea: 0f 85 94 01 00 00 jne 10db84 <_Thread_Initialize+0x1f0>
10d9f0: 31 c0 xor %eax,%eax
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10d9f2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10d9f9: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx)
the_thread->Start.fp_context = fp_area;
10d9ff: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10da05: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10da0c: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10da13: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10da1a: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10da21: a1 2c 76 12 00 mov 0x12762c,%eax
10da26: 85 c0 test %eax,%eax
10da28: 0f 85 7a 01 00 00 jne 10dba8 <_Thread_Initialize+0x214>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10da2e: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
10da35: 00 00 00
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10da38: 31 f6 xor %esi,%esi
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10da3a: 89 f8 mov %edi,%eax
10da3c: 88 83 a0 00 00 00 mov %al,0xa0(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10da42: 8b 45 24 mov 0x24(%ebp),%eax
10da45: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.budget_callout = budget_callout;
10da4b: 8b 45 28 mov 0x28(%ebp),%eax
10da4e: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
switch ( budget_algorithm ) {
10da54: 83 7d 24 02 cmpl $0x2,0x24(%ebp)
10da58: 75 08 jne 10da62 <_Thread_Initialize+0xce>
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10da5a: a1 20 75 12 00 mov 0x127520,%eax
10da5f: 89 43 78 mov %eax,0x78(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10da62: 8b 45 2c mov 0x2c(%ebp),%eax
10da65: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
the_thread->current_state = STATES_DORMANT;
10da6b: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10da72: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10da79: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10da80: 8b 45 1c mov 0x1c(%ebp),%eax
10da83: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10da86: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return
10da8c: 83 ec 08 sub $0x8,%esp
10da8f: 53 push %ebx
10da90: 68 00 76 12 00 push $0x127600
10da95: ff 15 14 76 12 00 call *0x127614
10da9b: 89 c7 mov %eax,%edi
sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread );
if ( !sched )
10da9d: 83 c4 10 add $0x10,%esp
10daa0: 85 c0 test %eax,%eax
10daa2: 74 46 je 10daea <_Thread_Initialize+0x156>
goto failed;
_Thread_Set_priority( the_thread, priority );
10daa4: 83 ec 08 sub $0x8,%esp
10daa7: ff 75 1c pushl 0x1c(%ebp)
10daaa: 53 push %ebx
10daab: e8 8c 06 00 00 call 10e13c <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10dab0: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10dab7: 00 00 00
10daba: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10dac1: 00 00 00
_Thread_Stack_Free( the_thread );
return false;
}
10dac4: 8b 45 08 mov 0x8(%ebp),%eax
10dac7: 8b 40 1c mov 0x1c(%eax),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10daca: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10dace: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10dad1: 8b 45 30 mov 0x30(%ebp),%eax
10dad4: 89 43 0c mov %eax,0xc(%ebx)
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
10dad7: 89 1c 24 mov %ebx,(%esp)
10dada: e8 0d 0b 00 00 call 10e5ec <_User_extensions_Thread_create>
if ( extension_status )
10dadf: 83 c4 10 add $0x10,%esp
10dae2: 84 c0 test %al,%al
10dae4: 0f 85 8e 00 00 00 jne 10db78 <_Thread_Initialize+0x1e4>
return true;
failed:
if ( the_thread->libc_reent )
10daea: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax
10daf0: 85 c0 test %eax,%eax
10daf2: 74 0c je 10db00 <_Thread_Initialize+0x16c>
_Workspace_Free( the_thread->libc_reent );
10daf4: 83 ec 0c sub $0xc,%esp
10daf7: 50 push %eax
10daf8: e8 7f 0e 00 00 call 10e97c <_Workspace_Free>
10dafd: 83 c4 10 add $0x10,%esp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10db00: 8b 83 e8 00 00 00 mov 0xe8(%ebx),%eax
10db06: 85 c0 test %eax,%eax
10db08: 74 0c je 10db16 <_Thread_Initialize+0x182>
_Workspace_Free( the_thread->API_Extensions[i] );
10db0a: 83 ec 0c sub $0xc,%esp
10db0d: 50 push %eax
10db0e: e8 69 0e 00 00 call 10e97c <_Workspace_Free>
10db13: 83 c4 10 add $0x10,%esp
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10db16: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
10db1c: 85 c0 test %eax,%eax
10db1e: 74 0c je 10db2c <_Thread_Initialize+0x198>
_Workspace_Free( the_thread->API_Extensions[i] );
10db20: 83 ec 0c sub $0xc,%esp
10db23: 50 push %eax
10db24: e8 53 0e 00 00 call 10e97c <_Workspace_Free>
10db29: 83 c4 10 add $0x10,%esp
if ( extensions_area )
10db2c: 85 f6 test %esi,%esi
10db2e: 74 0c je 10db3c <_Thread_Initialize+0x1a8>
(void) _Workspace_Free( extensions_area );
10db30: 83 ec 0c sub $0xc,%esp
10db33: 56 push %esi
10db34: e8 43 0e 00 00 call 10e97c <_Workspace_Free>
10db39: 83 c4 10 add $0x10,%esp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10db3c: 8b 45 e4 mov -0x1c(%ebp),%eax
10db3f: 85 c0 test %eax,%eax
10db41: 74 0e je 10db51 <_Thread_Initialize+0x1bd>
(void) _Workspace_Free( fp_area );
10db43: 83 ec 0c sub $0xc,%esp
10db46: ff 75 e4 pushl -0x1c(%ebp)
10db49: e8 2e 0e 00 00 call 10e97c <_Workspace_Free>
10db4e: 83 c4 10 add $0x10,%esp
#endif
if ( sched )
10db51: 85 ff test %edi,%edi
10db53: 74 0c je 10db61 <_Thread_Initialize+0x1cd>
(void) _Workspace_Free( sched );
10db55: 83 ec 0c sub $0xc,%esp
10db58: 57 push %edi
10db59: e8 1e 0e 00 00 call 10e97c <_Workspace_Free>
10db5e: 83 c4 10 add $0x10,%esp
_Thread_Stack_Free( the_thread );
10db61: 83 ec 0c sub $0xc,%esp
10db64: 53 push %ebx
10db65: e8 0a 07 00 00 call 10e274 <_Thread_Stack_Free>
return false;
10db6a: 83 c4 10 add $0x10,%esp
10db6d: 31 c0 xor %eax,%eax
}
10db6f: 8d 65 f4 lea -0xc(%ebp),%esp
10db72: 5b pop %ebx
10db73: 5e pop %esi
10db74: 5f pop %edi
10db75: c9 leave
10db76: c3 ret
10db77: 90 nop
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
10db78: b0 01 mov $0x1,%al
_Thread_Stack_Free( the_thread );
return false;
}
10db7a: 8d 65 f4 lea -0xc(%ebp),%esp
10db7d: 5b pop %ebx
10db7e: 5e pop %esi
10db7f: 5f pop %edi
10db80: c9 leave
10db81: c3 ret
10db82: 66 90 xchg %ax,%ax
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10db84: 83 ec 0c sub $0xc,%esp
10db87: 6a 6c push $0x6c
10db89: e8 d2 0d 00 00 call 10e960 <_Workspace_Allocate>
10db8e: 89 45 e4 mov %eax,-0x1c(%ebp)
if ( !fp_area )
10db91: 83 c4 10 add $0x10,%esp
10db94: 85 c0 test %eax,%eax
10db96: 0f 85 5d fe ff ff jne 10d9f9 <_Thread_Initialize+0x65>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10db9c: 31 f6 xor %esi,%esi
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
10db9e: 31 ff xor %edi,%edi
10dba0: e9 45 ff ff ff jmp 10daea <_Thread_Initialize+0x156>
10dba5: 8d 76 00 lea 0x0(%esi),%esi
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10dba8: 83 ec 0c sub $0xc,%esp
10dbab: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10dbb2: 50 push %eax
10dbb3: e8 a8 0d 00 00 call 10e960 <_Workspace_Allocate>
10dbb8: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10dbba: 83 c4 10 add $0x10,%esp
10dbbd: 85 c0 test %eax,%eax
10dbbf: 74 5a je 10dc1b <_Thread_Initialize+0x287>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10dbc1: 89 83 f0 00 00 00 mov %eax,0xf0(%ebx)
10dbc7: 8b 0d 2c 76 12 00 mov 0x12762c,%ecx
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10dbcd: 31 d2 xor %edx,%edx
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10dbcf: 31 c0 xor %eax,%eax
10dbd1: 8d 76 00 lea 0x0(%esi),%esi
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
10dbd4: c7 04 96 00 00 00 00 movl $0x0,(%esi,%edx,4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10dbdb: 40 inc %eax
10dbdc: 89 c2 mov %eax,%edx
10dbde: 39 c1 cmp %eax,%ecx
10dbe0: 73 f2 jae 10dbd4 <_Thread_Initialize+0x240>
10dbe2: e9 53 fe ff ff jmp 10da3a <_Thread_Initialize+0xa6>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10dbe7: 83 ec 08 sub $0x8,%esp
10dbea: 56 push %esi
10dbeb: 53 push %ebx
10dbec: 88 55 e0 mov %dl,-0x20(%ebp)
10dbef: e8 1c 06 00 00 call 10e210 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10dbf4: 83 c4 10 add $0x10,%esp
10dbf7: 85 c0 test %eax,%eax
10dbf9: 8a 55 e0 mov -0x20(%ebp),%dl
10dbfc: 74 16 je 10dc14 <_Thread_Initialize+0x280>
10dbfe: 39 c6 cmp %eax,%esi
10dc00: 77 12 ja 10dc14 <_Thread_Initialize+0x280><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10dc02: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx
the_thread->Start.core_allocated_stack = true;
10dc08: c6 83 b4 00 00 00 01 movb $0x1,0xb4(%ebx)
10dc0f: e9 c8 fd ff ff jmp 10d9dc <_Thread_Initialize+0x48>
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
10dc14: 31 c0 xor %eax,%eax
10dc16: e9 54 ff ff ff jmp 10db6f <_Thread_Initialize+0x1db>
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
10dc1b: 31 ff xor %edi,%edi
10dc1d: e9 c8 fe ff ff jmp 10daea <_Thread_Initialize+0x156>
001125f8 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
1125f8: 55 push %ebp
1125f9: 89 e5 mov %esp,%ebp
1125fb: 53 push %ebx
1125fc: 83 ec 10 sub $0x10,%esp
1125ff: 8b 5d 08 mov 0x8(%ebp),%ebx
the_thread->resource_count = 0;
112602: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
112609: 8a 83 a0 00 00 00 mov 0xa0(%ebx),%al
11260f: 88 43 74 mov %al,0x74(%ebx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
112612: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
112618: 89 43 7c mov %eax,0x7c(%ebx)
the_thread->budget_callout = the_thread->Start.budget_callout;
11261b: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
112621: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
the_thread->Start.pointer_argument = pointer_argument;
112627: 8b 45 0c mov 0xc(%ebp),%eax
11262a: 89 83 98 00 00 00 mov %eax,0x98(%ebx)
the_thread->Start.numeric_argument = numeric_argument;
112630: 8b 45 10 mov 0x10(%ebp),%eax
112633: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx)
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
112639: 53 push %ebx
11263a: e8 d1 c4 ff ff call 10eb10 <_Thread_queue_Extract_with_proxy>
11263f: 83 c4 10 add $0x10,%esp
112642: 84 c0 test %al,%al
112644: 75 06 jne 11264c <_Thread_Reset+0x54>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
112646: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
11264a: 74 28 je 112674 <_Thread_Reset+0x7c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
11264c: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax
112652: 39 43 14 cmp %eax,0x14(%ebx)
112655: 74 15 je 11266c <_Thread_Reset+0x74>
the_thread->real_priority = the_thread->Start.initial_priority;
112657: 89 43 18 mov %eax,0x18(%ebx)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
11265a: 89 45 0c mov %eax,0xc(%ebp)
11265d: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
112660: 8b 5d fc mov -0x4(%ebp),%ebx
112663: c9 leave
(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 );
112664: e9 83 c6 ff ff jmp 10ecec <_Thread_Set_priority>
112669: 8d 76 00 lea 0x0(%esi),%esi
}
}
11266c: 8b 5d fc mov -0x4(%ebp),%ebx
11266f: c9 leave
112670: c3 ret
112671: 8d 76 00 lea 0x0(%esi),%esi
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 );
112674: 83 ec 0c sub $0xc,%esp
112677: 8d 43 48 lea 0x48(%ebx),%eax
11267a: 50 push %eax
11267b: e8 a8 cd ff ff call 10f428 <_Watchdog_Remove>
112680: 83 c4 10 add $0x10,%esp
112683: eb c7 jmp 11264c <_Thread_Reset+0x54>
00111450 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
111450: 55 push %ebp
111451: 89 e5 mov %esp,%ebp
111453: 53 push %ebx
111454: 83 ec 04 sub $0x4,%esp
111457: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
11145a: 9c pushf
11145b: fa cli
11145c: 5b pop %ebx
current_state = the_thread->current_state;
11145d: 8b 50 10 mov 0x10(%eax),%edx
if ( current_state & STATES_SUSPENDED ) {
111460: f6 c2 02 test $0x2,%dl
111463: 74 0a je 11146f <_Thread_Resume+0x1f> <== NEVER TAKEN
111465: 83 e2 fd and $0xfffffffd,%edx
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
111468: 89 50 10 mov %edx,0x10(%eax)
if ( _States_Is_ready( current_state ) ) {
11146b: 85 d2 test %edx,%edx
11146d: 74 09 je 111478 <_Thread_Resume+0x28>
_Scheduler_Unblock( &_Scheduler, the_thread );
}
}
_ISR_Enable( level );
11146f: 53 push %ebx
111470: 9d popf
}
111471: 8b 5d fc mov -0x4(%ebp),%ebx
111474: c9 leave
111475: c3 ret
111476: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
the_scheduler->Operations.unblock( the_scheduler, the_thread );
111478: 83 ec 08 sub $0x8,%esp
11147b: 50 push %eax
11147c: 68 a0 af 12 00 push $0x12afa0
111481: ff 15 b0 af 12 00 call *0x12afb0
111487: 83 c4 10 add $0x10,%esp
11148a: eb e3 jmp 11146f <_Thread_Resume+0x1f>
0010e210 <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
10e210: 55 push %ebp
10e211: 89 e5 mov %esp,%ebp
10e213: 53 push %ebx
10e214: 83 ec 04 sub $0x4,%esp
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
the_stack_size = 0;
10e217: a1 70 32 12 00 mov 0x123270,%eax
10e21c: 8b 5d 0c mov 0xc(%ebp),%ebx
10e21f: 39 c3 cmp %eax,%ebx
10e221: 73 02 jae 10e225 <_Thread_Stack_Allocate+0x15>
10e223: 89 c3 mov %eax,%ebx
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( Configuration.stack_allocate_hook ) {
10e225: a1 a4 32 12 00 mov 0x1232a4,%eax
10e22a: 85 c0 test %eax,%eax
10e22c: 74 32 je 10e260 <_Thread_Stack_Allocate+0x50>
stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size );
10e22e: 83 ec 0c sub $0xc,%esp
10e231: 53 push %ebx
10e232: ff d0 call *%eax
10e234: 83 c4 10 add $0x10,%esp
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10e237: 85 c0 test %eax,%eax
10e239: 74 11 je 10e24c <_Thread_Stack_Allocate+0x3c>
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10e23b: 8b 55 08 mov 0x8(%ebp),%edx
10e23e: 89 82 c4 00 00 00 mov %eax,0xc4(%edx)
return the_stack_size;
}
10e244: 89 d8 mov %ebx,%eax
10e246: 8b 5d fc mov -0x4(%ebp),%ebx
10e249: c9 leave
10e24a: c3 ret
10e24b: 90 nop
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
the_stack_size = 0;
10e24c: 31 db xor %ebx,%ebx
the_thread->Start.stack = stack_addr;
10e24e: 8b 55 08 mov 0x8(%ebp),%edx
10e251: 89 82 c4 00 00 00 mov %eax,0xc4(%edx)
return the_stack_size;
}
10e257: 89 d8 mov %ebx,%eax
10e259: 8b 5d fc mov -0x4(%ebp),%ebx
10e25c: c9 leave
10e25d: c3 ret
10e25e: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size (
size_t size
)
{
return size + CPU_STACK_ALIGNMENT;
10e260: 83 c3 10 add $0x10,%ebx
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
10e263: 83 ec 0c sub $0xc,%esp
10e266: 53 push %ebx
10e267: e8 f4 06 00 00 call 10e960 <_Workspace_Allocate>
10e26c: 83 c4 10 add $0x10,%esp
10e26f: eb c6 jmp 10e237 <_Thread_Stack_Allocate+0x27>
0010e274 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10e274: 55 push %ebp
10e275: 89 e5 mov %esp,%ebp
10e277: 83 ec 08 sub $0x8,%esp
10e27a: 8b 45 08 mov 0x8(%ebp),%eax
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
10e27d: 80 b8 b4 00 00 00 00 cmpb $0x0,0xb4(%eax)
10e284: 74 16 je 10e29c <_Thread_Stack_Free+0x28>
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
10e286: 8b 15 a8 32 12 00 mov 0x1232a8,%edx
10e28c: 85 d2 test %edx,%edx
10e28e: 74 10 je 10e2a0 <_Thread_Stack_Free+0x2c>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e290: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax
10e296: 89 45 08 mov %eax,0x8(%ebp)
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e299: c9 leave
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e29a: ff e2 jmp *%edx
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e29c: c9 leave
10e29d: c3 ret
10e29e: 66 90 xchg %ax,%ax
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e2a0: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax
10e2a6: 89 45 08 mov %eax,0x8(%ebp)
}
10e2a9: c9 leave
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e2aa: e9 cd 06 00 00 jmp 10e97c <_Workspace_Free>
00111980 <_Thread_Suspend>:
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
111980: 55 push %ebp
111981: 89 e5 mov %esp,%ebp
111983: 53 push %ebx
111984: 83 ec 04 sub $0x4,%esp
111987: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
_ISR_Disable( level );
11198a: 9c pushf
11198b: fa cli
11198c: 5b pop %ebx
if ( !_States_Is_ready( the_thread->current_state ) ) {
11198d: 8b 50 10 mov 0x10(%eax),%edx
111990: 85 d2 test %edx,%edx
111992: 74 10 je 1119a4 <_Thread_Suspend+0x24>
111994: 83 ca 02 or $0x2,%edx
111997: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state =
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
11199a: 53 push %ebx
11199b: 9d popf
the_thread->current_state = STATES_SUSPENDED;
_Scheduler_Block(&_Scheduler, the_thread);
_ISR_Enable( level );
}
11199c: 8b 5d fc mov -0x4(%ebp),%ebx
11199f: c9 leave
1119a0: c3 ret
1119a1: 8d 76 00 lea 0x0(%esi),%esi
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
1119a4: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax)
RTEMS_INLINE_ROUTINE void _Scheduler_Block(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
the_scheduler->Operations.block( the_scheduler, the_thread );
1119ab: 83 ec 08 sub $0x8,%esp
1119ae: 50 push %eax
1119af: 68 00 76 12 00 push $0x127600
1119b4: ff 15 0c 76 12 00 call *0x12760c
_Scheduler_Block(&_Scheduler, the_thread);
_ISR_Enable( level );
1119ba: 53 push %ebx
1119bb: 9d popf
1119bc: 83 c4 10 add $0x10,%esp
}
1119bf: 8b 5d fc mov -0x4(%ebp),%ebx
1119c2: c9 leave
1119c3: c3 ret
0010e36c <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10e36c: 55 push %ebp
10e36d: 89 e5 mov %esp,%ebp
10e36f: 53 push %ebx
10e370: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10e373: 8b 1d 38 7b 12 00 mov 0x127b38,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10e379: 80 7b 74 00 cmpb $0x0,0x74(%ebx)
10e37d: 74 19 je 10e398 <_Thread_Tickle_timeslice+0x2c>
return;
if ( !_States_Is_ready( executing->current_state ) )
10e37f: 8b 43 10 mov 0x10(%ebx),%eax
10e382: 85 c0 test %eax,%eax
10e384: 75 12 jne 10e398 <_Thread_Tickle_timeslice+0x2c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10e386: 8b 43 7c mov 0x7c(%ebx),%eax
10e389: 83 f8 01 cmp $0x1,%eax
10e38c: 72 0a jb 10e398 <_Thread_Tickle_timeslice+0x2c>
10e38e: 83 f8 02 cmp $0x2,%eax
10e391: 76 29 jbe 10e3bc <_Thread_Tickle_timeslice+0x50>
10e393: 83 f8 03 cmp $0x3,%eax
10e396: 74 08 je 10e3a0 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
10e398: 8b 5d fc mov -0x4(%ebp),%ebx
10e39b: c9 leave
10e39c: c3 ret
10e39d: 8d 76 00 lea 0x0(%esi),%esi
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10e3a0: 8b 43 78 mov 0x78(%ebx),%eax
10e3a3: 48 dec %eax
10e3a4: 89 43 78 mov %eax,0x78(%ebx)
10e3a7: 85 c0 test %eax,%eax
10e3a9: 75 ed jne 10e398 <_Thread_Tickle_timeslice+0x2c>
(*executing->budget_callout)( executing );
10e3ab: 83 ec 0c sub $0xc,%esp
10e3ae: 53 push %ebx
10e3af: ff 93 80 00 00 00 call *0x80(%ebx)
10e3b5: 83 c4 10 add $0x10,%esp
10e3b8: eb de jmp 10e398 <_Thread_Tickle_timeslice+0x2c>
10e3ba: 66 90 xchg %ax,%ax
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
10e3bc: 8b 43 78 mov 0x78(%ebx),%eax
10e3bf: 48 dec %eax
10e3c0: 89 43 78 mov %eax,0x78(%ebx)
10e3c3: 85 c0 test %eax,%eax
10e3c5: 7f d1 jg 10e398 <_Thread_Tickle_timeslice+0x2c>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield( &_Scheduler );
10e3c7: 83 ec 0c sub $0xc,%esp
10e3ca: 68 00 76 12 00 push $0x127600
10e3cf: ff 15 08 76 12 00 call *0x127608
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Scheduler_Yield( );
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10e3d5: a1 20 75 12 00 mov 0x127520,%eax
10e3da: 89 43 78 mov %eax,0x78(%ebx)
10e3dd: 83 c4 10 add $0x10,%esp
10e3e0: eb b6 jmp 10e398 <_Thread_Tickle_timeslice+0x2c>
0010dcfc <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
10dcfc: 55 push %ebp
10dcfd: 89 e5 mov %esp,%ebp
10dcff: 57 push %edi
10dd00: 56 push %esi
10dd01: 53 push %ebx
10dd02: 83 ec 2c sub $0x2c,%esp
10dd05: 8b 7d 08 mov 0x8(%ebp),%edi
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
10dd08: 9c pushf
10dd09: fa cli
10dd0a: 58 pop %eax
10dd0b: 89 f9 mov %edi,%ecx
for( index=0 ;
10dd0d: 31 d2 xor %edx,%edx
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10dd0f: 8b 19 mov (%ecx),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10dd11: 8d 34 52 lea (%edx,%edx,2),%esi
10dd14: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
10dd18: 39 f3 cmp %esi,%ebx
10dd1a: 75 18 jne 10dd34 <_Thread_queue_Dequeue_priority+0x38>
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
10dd1c: 42 inc %edx
10dd1d: 83 c1 0c add $0xc,%ecx
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
10dd20: 83 fa 04 cmp $0x4,%edx
10dd23: 75 ea jne 10dd0f <_Thread_queue_Dequeue_priority+0x13>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
10dd25: 50 push %eax
10dd26: 9d popf
return NULL;
10dd27: 31 f6 xor %esi,%esi
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10dd29: 89 f0 mov %esi,%eax
10dd2b: 8d 65 f4 lea -0xc(%ebp),%esp
10dd2e: 5b pop %ebx
10dd2f: 5e pop %esi
10dd30: 5f pop %edi
10dd31: c9 leave
10dd32: c3 ret
10dd33: 90 nop
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *) _Chain_First(
10dd34: 89 de mov %ebx,%esi
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
10dd36: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10dd3d: 8b 53 38 mov 0x38(%ebx),%edx
dequeue:
the_thread->Wait.queue = NULL;
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
10dd40: 8b 0b mov (%ebx),%ecx
previous_node = the_thread->Object.Node.previous;
10dd42: 8b 7b 04 mov 0x4(%ebx),%edi
10dd45: 89 7d d4 mov %edi,-0x2c(%ebp)
10dd48: 8d 7b 3c lea 0x3c(%ebx),%edi
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
10dd4b: 39 fa cmp %edi,%edx
10dd4d: 74 7f je 10ddce <_Thread_queue_Dequeue_priority+0xd2>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10dd4f: 8b 7b 40 mov 0x40(%ebx),%edi
10dd52: 89 7d e4 mov %edi,-0x1c(%ebp)
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
10dd55: 8b 3a mov (%edx),%edi
10dd57: 89 7d e0 mov %edi,-0x20(%ebp)
previous_node->next = new_first_node;
10dd5a: 8b 7d d4 mov -0x2c(%ebp),%edi
10dd5d: 89 17 mov %edx,(%edi)
next_node->previous = new_first_node;
10dd5f: 89 51 04 mov %edx,0x4(%ecx)
new_first_node->next = next_node;
10dd62: 89 0a mov %ecx,(%edx)
new_first_node->previous = previous_node;
10dd64: 89 7a 04 mov %edi,0x4(%edx)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
10dd67: 8b 4b 40 mov 0x40(%ebx),%ecx
10dd6a: 39 4b 38 cmp %ecx,0x38(%ebx)
10dd6d: 74 17 je 10dd86 <_Thread_queue_Dequeue_priority+0x8a>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
10dd6f: 8d 4a 38 lea 0x38(%edx),%ecx
10dd72: 8b 7d e0 mov -0x20(%ebp),%edi
10dd75: 89 4f 04 mov %ecx,0x4(%edi)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
10dd78: 89 7a 38 mov %edi,0x38(%edx)
tail->previous = last_node;
10dd7b: 8b 4d e4 mov -0x1c(%ebp),%ecx
10dd7e: 89 4a 40 mov %ecx,0x40(%edx)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
10dd81: 83 c2 3c add $0x3c,%edx
10dd84: 89 11 mov %edx,(%ecx)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10dd86: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10dd8a: 74 18 je 10dda4 <_Thread_queue_Dequeue_priority+0xa8>
_ISR_Enable( level );
10dd8c: 50 push %eax
10dd8d: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10dd8e: 83 ec 08 sub $0x8,%esp
10dd91: 68 f8 ff 03 10 push $0x1003fff8
10dd96: 53 push %ebx
10dd97: e8 e0 f7 ff ff call 10d57c <_Thread_Clear_state>
10dd9c: 83 c4 10 add $0x10,%esp
10dd9f: eb 88 jmp 10dd29 <_Thread_queue_Dequeue_priority+0x2d>
10dda1: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10dda4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10ddab: 50 push %eax
10ddac: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10ddad: 83 ec 0c sub $0xc,%esp
10ddb0: 8d 43 48 lea 0x48(%ebx),%eax
10ddb3: 50 push %eax
10ddb4: e8 7f 0a 00 00 call 10e838 <_Watchdog_Remove>
10ddb9: 58 pop %eax
10ddba: 5a pop %edx
10ddbb: 68 f8 ff 03 10 push $0x1003fff8
10ddc0: 53 push %ebx
10ddc1: e8 b6 f7 ff ff call 10d57c <_Thread_Clear_state>
10ddc6: 83 c4 10 add $0x10,%esp
10ddc9: e9 5b ff ff ff jmp 10dd29 <_Thread_queue_Dequeue_priority+0x2d>
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
10ddce: 8b 7d d4 mov -0x2c(%ebp),%edi
10ddd1: 89 0f mov %ecx,(%edi)
next_node->previous = previous_node;
10ddd3: 89 79 04 mov %edi,0x4(%ecx)
10ddd6: eb ae jmp 10dd86 <_Thread_queue_Dequeue_priority+0x8a>
0010de70 <_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
)
{
10de70: 55 push %ebp
10de71: 89 e5 mov %esp,%ebp
10de73: 57 push %edi
10de74: 56 push %esi
10de75: 53 push %ebx
10de76: 83 ec 0c sub $0xc,%esp
10de79: 8b 7d 0c mov 0xc(%ebp),%edi
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10de7c: 8d 47 3c lea 0x3c(%edi),%eax
10de7f: 89 47 38 mov %eax,0x38(%edi)
head->next = tail;
head->previous = NULL;
10de82: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10de89: 8d 47 38 lea 0x38(%edi),%eax
10de8c: 89 47 40 mov %eax,0x40(%edi)
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
10de8f: 8b 57 14 mov 0x14(%edi),%edx
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
10de92: 89 d0 mov %edx,%eax
10de94: c1 e8 06 shr $0x6,%eax
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
10de97: 8b 4d 08 mov 0x8(%ebp),%ecx
10de9a: 8b 59 38 mov 0x38(%ecx),%ebx
if ( _Thread_queue_Is_reverse_search( priority ) )
10de9d: f6 c2 20 test $0x20,%dl
10dea0: 75 66 jne 10df08 <_Thread_queue_Enqueue_priority+0x98>
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10dea2: 8d 04 40 lea (%eax,%eax,2),%eax
10dea5: 8d 04 81 lea (%ecx,%eax,4),%eax
10dea8: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
10deab: 83 c0 04 add $0x4,%eax
10deae: 89 7d e8 mov %edi,-0x18(%ebp)
10deb1: 89 c7 mov %eax,%edi
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
10deb3: 9c pushf
10deb4: fa cli
10deb5: 5e pop %esi
10deb6: 89 75 ec mov %esi,-0x14(%ebp)
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10deb9: 8b 4d f0 mov -0x10(%ebp),%ecx
10debc: 8b 01 mov (%ecx),%eax
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10debe: 39 f8 cmp %edi,%eax
10dec0: 75 18 jne 10deda <_Thread_queue_Enqueue_priority+0x6a>
10dec2: e9 0e 01 00 00 jmp 10dfd5 <_Thread_queue_Enqueue_priority+0x165>
10dec7: 90 nop
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
10dec8: 56 push %esi
10dec9: 9d popf
10deca: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10decb: 85 58 10 test %ebx,0x10(%eax)
10dece: 0f 84 ac 00 00 00 je 10df80 <_Thread_queue_Enqueue_priority+0x110><== NEVER TAKEN
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
10ded4: 8b 00 mov (%eax),%eax
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10ded6: 39 f8 cmp %edi,%eax
10ded8: 74 07 je 10dee1 <_Thread_queue_Enqueue_priority+0x71>
search_priority = search_thread->current_priority;
10deda: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority <= search_priority )
10dedd: 39 ca cmp %ecx,%edx
10dedf: 77 e7 ja 10dec8 <_Thread_queue_Enqueue_priority+0x58>
10dee1: 8b 7d e8 mov -0x18(%ebp),%edi
10dee4: 89 75 f0 mov %esi,-0x10(%ebp)
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
10dee7: 8b 75 08 mov 0x8(%ebp),%esi
10deea: 8b 5e 30 mov 0x30(%esi),%ebx
10deed: 83 fb 01 cmp $0x1,%ebx
10def0: 0f 84 92 00 00 00 je 10df88 <_Thread_queue_Enqueue_priority+0x118>
* 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;
10def6: 8b 45 10 mov 0x10(%ebp),%eax
10def9: 8b 55 ec mov -0x14(%ebp),%edx
10defc: 89 10 mov %edx,(%eax)
return the_thread_queue->sync_state;
}
10defe: 89 d8 mov %ebx,%eax
10df00: 83 c4 0c add $0xc,%esp
10df03: 5b pop %ebx
10df04: 5e pop %esi
10df05: 5f pop %edi
10df06: c9 leave
10df07: c3 ret
10df08: 8d 04 40 lea (%eax,%eax,2),%eax
10df0b: 8b 4d 08 mov 0x8(%ebp),%ecx
10df0e: 8d 34 81 lea (%ecx,%eax,4),%esi
10df11: 89 7d f0 mov %edi,-0x10(%ebp)
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
10df14: 0f b6 0d 74 32 12 00 movzbl 0x123274,%ecx
10df1b: 41 inc %ecx
_ISR_Disable( level );
10df1c: 9c pushf
10df1d: fa cli
10df1e: 5f pop %edi
10df1f: 89 7d ec mov %edi,-0x14(%ebp)
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10df22: 8b 46 08 mov 0x8(%esi),%eax
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10df25: 39 f0 cmp %esi,%eax
10df27: 75 12 jne 10df3b <_Thread_queue_Enqueue_priority+0xcb>
10df29: eb 17 jmp 10df42 <_Thread_queue_Enqueue_priority+0xd2>
10df2b: 90 nop
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
10df2c: 57 push %edi
10df2d: 9d popf
10df2e: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10df2f: 85 58 10 test %ebx,0x10(%eax)
10df32: 74 48 je 10df7c <_Thread_queue_Enqueue_priority+0x10c>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
10df34: 8b 40 04 mov 0x4(%eax),%eax
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10df37: 39 f0 cmp %esi,%eax
10df39: 74 07 je 10df42 <_Thread_queue_Enqueue_priority+0xd2>
search_priority = search_thread->current_priority;
10df3b: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority >= search_priority )
10df3e: 39 ca cmp %ecx,%edx
10df40: 72 ea jb 10df2c <_Thread_queue_Enqueue_priority+0xbc>
10df42: 89 7d e8 mov %edi,-0x18(%ebp)
10df45: 8b 7d f0 mov -0x10(%ebp),%edi
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
10df48: 8b 75 08 mov 0x8(%ebp),%esi
10df4b: 8b 5e 30 mov 0x30(%esi),%ebx
10df4e: 83 fb 01 cmp $0x1,%ebx
10df51: 75 a3 jne 10def6 <_Thread_queue_Enqueue_priority+0x86>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10df53: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
if ( priority == search_priority )
10df5a: 39 ca cmp %ecx,%edx
10df5c: 74 53 je 10dfb1 <_Thread_queue_Enqueue_priority+0x141>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
10df5e: 8b 10 mov (%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
10df60: 89 17 mov %edx,(%edi)
the_node->previous = search_node;
10df62: 89 47 04 mov %eax,0x4(%edi)
search_node->next = the_node;
10df65: 89 38 mov %edi,(%eax)
next_node->previous = the_node;
10df67: 89 7a 04 mov %edi,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10df6a: 89 77 44 mov %esi,0x44(%edi)
_ISR_Enable( level );
10df6d: ff 75 e8 pushl -0x18(%ebp)
10df70: 9d popf
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10df71: 89 d8 mov %ebx,%eax
10df73: 83 c4 0c add $0xc,%esp
10df76: 5b pop %ebx
10df77: 5e pop %esi
10df78: 5f pop %edi
10df79: c9 leave
10df7a: c3 ret
10df7b: 90 nop
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10df7c: 57 push %edi
10df7d: 9d popf
goto restart_reverse_search;
10df7e: eb 94 jmp 10df14 <_Thread_queue_Enqueue_priority+0xa4>
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10df80: 56 push %esi <== NOT EXECUTED
10df81: 9d popf <== NOT EXECUTED
goto restart_forward_search;
10df82: e9 2c ff ff ff jmp 10deb3 <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED
10df87: 90 nop <== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10df88: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
if ( priority == search_priority )
10df8f: 39 ca cmp %ecx,%edx
10df91: 74 1e je 10dfb1 <_Thread_queue_Enqueue_priority+0x141>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
10df93: 8b 50 04 mov 0x4(%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10df96: 89 07 mov %eax,(%edi)
the_node->previous = previous_node;
10df98: 89 57 04 mov %edx,0x4(%edi)
previous_node->next = the_node;
10df9b: 89 3a mov %edi,(%edx)
search_node->previous = the_node;
10df9d: 89 78 04 mov %edi,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10dfa0: 89 77 44 mov %esi,0x44(%edi)
_ISR_Enable( level );
10dfa3: ff 75 f0 pushl -0x10(%ebp)
10dfa6: 9d popf
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10dfa7: 89 d8 mov %ebx,%eax
10dfa9: 83 c4 0c add $0xc,%esp
10dfac: 5b pop %ebx
10dfad: 5e pop %esi
10dfae: 5f pop %edi
10dfaf: c9 leave
10dfb0: c3 ret
_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;
10dfb1: 8b 50 40 mov 0x40(%eax),%edx
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
10dfb4: 8d 48 3c lea 0x3c(%eax),%ecx
10dfb7: 89 0f mov %ecx,(%edi)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
10dfb9: 89 57 04 mov %edx,0x4(%edi)
previous_node->next = the_node;
10dfbc: 89 3a mov %edi,(%edx)
search_node->previous = the_node;
10dfbe: 89 78 40 mov %edi,0x40(%eax)
the_thread->Wait.queue = the_thread_queue;
10dfc1: 8b 45 08 mov 0x8(%ebp),%eax
10dfc4: 89 47 44 mov %eax,0x44(%edi)
_ISR_Enable( level );
10dfc7: ff 75 ec pushl -0x14(%ebp)
10dfca: 9d popf
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10dfcb: bb 01 00 00 00 mov $0x1,%ebx
10dfd0: e9 29 ff ff ff jmp 10defe <_Thread_queue_Enqueue_priority+0x8e>
10dfd5: 8b 7d e8 mov -0x18(%ebp),%edi
10dfd8: 89 75 f0 mov %esi,-0x10(%ebp)
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
10dfdb: b9 ff ff ff ff mov $0xffffffff,%ecx
10dfe0: e9 02 ff ff ff jmp 10dee7 <_Thread_queue_Enqueue_priority+0x77>
00111824 <_Thread_queue_Extract>:
void _Thread_queue_Extract(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
111824: 55 push %ebp
111825: 89 e5 mov %esp,%ebp
111827: 83 ec 08 sub $0x8,%esp
11182a: 8b 45 08 mov 0x8(%ebp),%eax
11182d: 8b 55 0c mov 0xc(%ebp),%edx
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
111830: 83 78 34 01 cmpl $0x1,0x34(%eax)
111834: 74 0e je 111844 <_Thread_queue_Extract+0x20>
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
111836: 89 55 0c mov %edx,0xc(%ebp)
111839: 89 45 08 mov %eax,0x8(%ebp)
}
11183c: c9 leave
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
11183d: e9 fe 19 00 00 jmp 113240 <_Thread_queue_Extract_fifo>
111842: 66 90 xchg %ax,%ax
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
111844: 51 push %ecx
111845: 6a 00 push $0x0
111847: 52 push %edx
111848: 50 push %eax
111849: e8 06 00 00 00 call 111854 <_Thread_queue_Extract_priority_helper>
11184e: 83 c4 10 add $0x10,%esp
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
}
111851: c9 leave
111852: c3 ret
00113240 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
113240: 55 push %ebp
113241: 89 e5 mov %esp,%ebp
113243: 53 push %ebx
113244: 83 ec 04 sub $0x4,%esp
113247: 8b 5d 0c mov 0xc(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
11324a: 9c pushf
11324b: fa cli
11324c: 58 pop %eax
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
11324d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
113254: 74 2e je 113284 <_Thread_queue_Extract_fifo+0x44>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
113256: 8b 0b mov (%ebx),%ecx
previous = the_node->previous;
113258: 8b 53 04 mov 0x4(%ebx),%edx
next->previous = previous;
11325b: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
11325e: 89 0a mov %ecx,(%edx)
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
113260: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
113267: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
11326b: 74 1f je 11328c <_Thread_queue_Extract_fifo+0x4c>
_ISR_Enable( level );
11326d: 50 push %eax
11326e: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
11326f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
113276: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
113279: 8b 5d fc mov -0x4(%ebp),%ebx
11327c: c9 leave
11327d: e9 fa a2 ff ff jmp 10d57c <_Thread_Clear_state>
113282: 66 90 xchg %ax,%ax
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
113284: 50 push %eax
113285: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
113286: 8b 5d fc mov -0x4(%ebp),%ebx
113289: c9 leave
11328a: c3 ret
11328b: 90 nop
11328c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
113293: 50 push %eax
113294: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
113295: 83 ec 0c sub $0xc,%esp
113298: 8d 43 48 lea 0x48(%ebx),%eax
11329b: 50 push %eax
11329c: e8 97 b5 ff ff call 10e838 <_Watchdog_Remove>
1132a1: 83 c4 10 add $0x10,%esp
1132a4: eb c9 jmp 11326f <_Thread_queue_Extract_fifo+0x2f>
00111854 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
111854: 55 push %ebp
111855: 89 e5 mov %esp,%ebp
111857: 57 push %edi
111858: 56 push %esi
111859: 53 push %ebx
11185a: 83 ec 1c sub $0x1c,%esp
11185d: 8b 5d 0c mov 0xc(%ebp),%ebx
111860: 8a 45 10 mov 0x10(%ebp),%al
111863: 88 45 e3 mov %al,-0x1d(%ebp)
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
111866: 9c pushf
111867: fa cli
111868: 8f 45 e4 popl -0x1c(%ebp)
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
11186b: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
111872: 74 6c je 1118e0 <_Thread_queue_Extract_priority_helper+0x8c><== NEVER TAKEN
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
111874: 8b 13 mov (%ebx),%edx
previous_node = the_node->previous;
111876: 8b 4b 04 mov 0x4(%ebx),%ecx
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
111879: 8b 43 38 mov 0x38(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11187c: 8d 73 3c lea 0x3c(%ebx),%esi
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
11187f: 39 f0 cmp %esi,%eax
111881: 74 69 je 1118ec <_Thread_queue_Extract_priority_helper+0x98>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
111883: 8b 7b 40 mov 0x40(%ebx),%edi
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
111886: 8b 30 mov (%eax),%esi
previous_node->next = new_first_node;
111888: 89 01 mov %eax,(%ecx)
next_node->previous = new_first_node;
11188a: 89 42 04 mov %eax,0x4(%edx)
new_first_node->next = next_node;
11188d: 89 10 mov %edx,(%eax)
new_first_node->previous = previous_node;
11188f: 89 48 04 mov %ecx,0x4(%eax)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
111892: 8b 53 40 mov 0x40(%ebx),%edx
111895: 39 53 38 cmp %edx,0x38(%ebx)
111898: 74 11 je 1118ab <_Thread_queue_Extract_priority_helper+0x57>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
11189a: 8d 50 38 lea 0x38(%eax),%edx
11189d: 89 56 04 mov %edx,0x4(%esi)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
1118a0: 89 70 38 mov %esi,0x38(%eax)
tail->previous = last_node;
1118a3: 89 78 40 mov %edi,0x40(%eax)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
1118a6: 83 c0 3c add $0x3c,%eax
1118a9: 89 07 mov %eax,(%edi)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
1118ab: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
1118af: 75 23 jne 1118d4 <_Thread_queue_Extract_priority_helper+0x80>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
1118b1: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
1118b5: 74 3d je 1118f4 <_Thread_queue_Extract_priority_helper+0xa0>
_ISR_Enable( level );
1118b7: ff 75 e4 pushl -0x1c(%ebp)
1118ba: 9d popf
1118bb: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
1118c2: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1118c5: 8d 65 f4 lea -0xc(%ebp),%esp
1118c8: 5b pop %ebx
1118c9: 5e pop %esi
1118ca: 5f pop %edi
1118cb: c9 leave
1118cc: e9 ab bc ff ff jmp 10d57c <_Thread_Clear_state>
1118d1: 8d 76 00 lea 0x0(%esi),%esi
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
1118d4: ff 75 e4 pushl -0x1c(%ebp)
1118d7: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1118d8: 8d 65 f4 lea -0xc(%ebp),%esp
1118db: 5b pop %ebx
1118dc: 5e pop %esi
1118dd: 5f pop %edi
1118de: c9 leave
1118df: c3 ret
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 );
1118e0: ff 75 e4 pushl -0x1c(%ebp)
1118e3: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1118e4: 8d 65 f4 lea -0xc(%ebp),%esp
1118e7: 5b pop %ebx
1118e8: 5e pop %esi
1118e9: 5f pop %edi
1118ea: c9 leave
1118eb: c3 ret
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
1118ec: 89 11 mov %edx,(%ecx)
next_node->previous = previous_node;
1118ee: 89 4a 04 mov %ecx,0x4(%edx)
1118f1: eb b8 jmp 1118ab <_Thread_queue_Extract_priority_helper+0x57>
1118f3: 90 nop
1118f4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
1118fb: ff 75 e4 pushl -0x1c(%ebp)
1118fe: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
1118ff: 83 ec 0c sub $0xc,%esp
111902: 8d 43 48 lea 0x48(%ebx),%eax
111905: 50 push %eax
111906: e8 2d cf ff ff call 10e838 <_Watchdog_Remove>
11190b: 83 c4 10 add $0x10,%esp
11190e: eb ab jmp 1118bb <_Thread_queue_Extract_priority_helper+0x67>
0010dfe8 <_Thread_queue_Extract_with_proxy>:
*/
bool _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread
)
{
10dfe8: 55 push %ebp
10dfe9: 89 e5 mov %esp,%ebp
10dfeb: 83 ec 08 sub $0x8,%esp
10dfee: 8b 45 08 mov 0x8(%ebp),%eax
States_Control state;
state = the_thread->current_state;
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10dff1: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10dff8: 75 06 jne 10e000 <_Thread_queue_Extract_with_proxy+0x18>
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
return true;
}
return false;
10dffa: 31 c0 xor %eax,%eax
}
10dffc: c9 leave
10dffd: c3 ret
10dffe: 66 90 xchg %ax,%ax
if ( proxy_extract_callout )
(*proxy_extract_callout)( the_thread );
}
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10e000: 83 ec 08 sub $0x8,%esp
10e003: 50 push %eax
10e004: ff 70 44 pushl 0x44(%eax)
10e007: e8 18 38 00 00 call 111824 <_Thread_queue_Extract>
return true;
10e00c: 83 c4 10 add $0x10,%esp
10e00f: b0 01 mov $0x1,%al
}
return false;
}
10e011: c9 leave
10e012: c3 ret
0010fe40 <_Thread_queue_First>:
*/
Thread_Control *_Thread_queue_First(
Thread_queue_Control *the_thread_queue
)
{
10fe40: 55 push %ebp
10fe41: 89 e5 mov %esp,%ebp
10fe43: 83 ec 08 sub $0x8,%esp
10fe46: 8b 45 08 mov 0x8(%ebp),%eax
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
10fe49: 83 78 34 01 cmpl $0x1,0x34(%eax)
10fe4d: 74 0d je 10fe5c <_Thread_queue_First+0x1c>
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
10fe4f: ba b8 37 11 00 mov $0x1137b8,%edx
return (*first_p)( the_thread_queue );
10fe54: 89 45 08 mov %eax,0x8(%ebp)
}
10fe57: c9 leave
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
10fe58: ff e2 jmp *%edx
10fe5a: 66 90 xchg %ax,%ax
)
{
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
10fe5c: ba 68 fe 10 00 mov $0x10fe68,%edx
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
10fe61: 89 45 08 mov %eax,0x8(%ebp)
}
10fe64: c9 leave
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
10fe65: ff e2 jmp *%edx
001137b8 <_Thread_queue_First_fifo>:
*/
Thread_Control *_Thread_queue_First_fifo(
Thread_queue_Control *the_thread_queue
)
{
1137b8: 55 push %ebp
1137b9: 89 e5 mov %esp,%ebp
1137bb: 8b 55 08 mov 0x8(%ebp),%edx
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL;
}
1137be: 8b 02 mov (%edx),%eax
1137c0: 83 c2 04 add $0x4,%edx
Thread_Control *_Thread_queue_First_fifo(
Thread_queue_Control *the_thread_queue
)
{
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
1137c3: 39 d0 cmp %edx,%eax
1137c5: 74 05 je 1137cc <_Thread_queue_First_fifo+0x14>
return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL;
}
1137c7: c9 leave
1137c8: c3 ret
1137c9: 8d 76 00 lea 0x0(%esi),%esi
)
{
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL;
1137cc: 31 c0 xor %eax,%eax
}
1137ce: c9 leave
1137cf: c3 ret
0010e014 <_Thread_queue_Flush>:
#else
Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)),
#endif
uint32_t status
)
{
10e014: 55 push %ebp
10e015: 89 e5 mov %esp,%ebp
10e017: 56 push %esi
10e018: 53 push %ebx
10e019: 8b 5d 08 mov 0x8(%ebp),%ebx
10e01c: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10e01f: eb 06 jmp 10e027 <_Thread_queue_Flush+0x13>
10e021: 8d 76 00 lea 0x0(%esi),%esi
#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;
10e024: 89 70 34 mov %esi,0x34(%eax)
uint32_t status
)
{
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10e027: 83 ec 0c sub $0xc,%esp
10e02a: 53 push %ebx
10e02b: e8 80 fc ff ff call 10dcb0 <_Thread_queue_Dequeue>
10e030: 83 c4 10 add $0x10,%esp
10e033: 85 c0 test %eax,%eax
10e035: 75 ed jne 10e024 <_Thread_queue_Flush+0x10>
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
}
}
10e037: 8d 65 f8 lea -0x8(%ebp),%esp
10e03a: 5b pop %ebx
10e03b: 5e pop %esi
10e03c: c9 leave
10e03d: c3 ret
0010e040 <_Thread_queue_Initialize>:
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
10e040: 55 push %ebp
10e041: 89 e5 mov %esp,%ebp
10e043: 56 push %esi
10e044: 53 push %ebx
10e045: 8b 45 08 mov 0x8(%ebp),%eax
10e048: 8b 55 0c mov 0xc(%ebp),%edx
the_thread_queue->state = state;
10e04b: 8b 4d 10 mov 0x10(%ebp),%ecx
10e04e: 89 48 38 mov %ecx,0x38(%eax)
the_thread_queue->discipline = the_discipline;
10e051: 89 50 34 mov %edx,0x34(%eax)
the_thread_queue->timeout_status = timeout_status;
10e054: 8b 4d 14 mov 0x14(%ebp),%ecx
10e057: 89 48 3c mov %ecx,0x3c(%eax)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10e05a: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10e061: 83 fa 01 cmp $0x1,%edx
10e064: 74 16 je 10e07c <_Thread_queue_Initialize+0x3c>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10e066: 8d 50 04 lea 0x4(%eax),%edx
10e069: 89 10 mov %edx,(%eax)
head->next = tail;
head->previous = NULL;
10e06b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
tail->previous = head;
10e072: 89 40 08 mov %eax,0x8(%eax)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
10e075: 5b pop %ebx
10e076: 5e pop %esi
10e077: c9 leave
10e078: c3 ret
10e079: 8d 76 00 lea 0x0(%esi),%esi
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 ) {
10e07c: 89 c1 mov %eax,%ecx
10e07e: 30 d2 xor %dl,%dl
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10e080: 8d 1c 52 lea (%edx,%edx,2),%ebx
10e083: 8d 1c 98 lea (%eax,%ebx,4),%ebx
10e086: 8d 73 04 lea 0x4(%ebx),%esi
10e089: 89 31 mov %esi,(%ecx)
head->next = tail;
head->previous = NULL;
10e08b: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10e092: 89 59 08 mov %ebx,0x8(%ecx)
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
10e095: 42 inc %edx
10e096: 83 c1 0c add $0xc,%ecx
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
10e099: 83 fa 04 cmp $0x4,%edx
10e09c: 75 e2 jne 10e080 <_Thread_queue_Initialize+0x40>
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
10e09e: 5b pop %ebx
10e09f: 5e pop %esi
10e0a0: c9 leave
10e0a1: c3 ret
0010e0a4 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10e0a4: 55 push %ebp
10e0a5: 89 e5 mov %esp,%ebp
10e0a7: 57 push %edi
10e0a8: 56 push %esi
10e0a9: 53 push %ebx
10e0aa: 83 ec 1c sub $0x1c,%esp
10e0ad: 8b 75 08 mov 0x8(%ebp),%esi
10e0b0: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10e0b3: 85 f6 test %esi,%esi
10e0b5: 74 06 je 10e0bd <_Thread_queue_Requeue+0x19><== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10e0b7: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10e0bb: 74 0b je 10e0c8 <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
10e0bd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10e0c0: 5b pop %ebx <== NOT EXECUTED
10e0c1: 5e pop %esi <== NOT EXECUTED
10e0c2: 5f pop %edi <== NOT EXECUTED
10e0c3: c9 leave <== NOT EXECUTED
10e0c4: c3 ret <== NOT EXECUTED
10e0c5: 8d 76 00 lea 0x0(%esi),%esi <== 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 );
10e0c8: 9c pushf
10e0c9: fa cli
10e0ca: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10e0cb: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10e0d2: 75 0c jne 10e0e0 <_Thread_queue_Requeue+0x3c><== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
10e0d4: 53 push %ebx
10e0d5: 9d popf
}
}
10e0d6: 8d 65 f4 lea -0xc(%ebp),%esp
10e0d9: 5b pop %ebx
10e0da: 5e pop %esi
10e0db: 5f pop %edi
10e0dc: c9 leave
10e0dd: c3 ret
10e0de: 66 90 xchg %ax,%ax
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;
10e0e0: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
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 );
10e0e7: 50 push %eax
10e0e8: 6a 01 push $0x1
10e0ea: 57 push %edi
10e0eb: 56 push %esi
10e0ec: e8 63 37 00 00 call 111854 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10e0f1: 83 c4 0c add $0xc,%esp
10e0f4: 8d 45 e4 lea -0x1c(%ebp),%eax
10e0f7: 50 push %eax
10e0f8: 57 push %edi
10e0f9: 56 push %esi
10e0fa: e8 71 fd ff ff call 10de70 <_Thread_queue_Enqueue_priority>
10e0ff: 83 c4 10 add $0x10,%esp
10e102: eb d0 jmp 10e0d4 <_Thread_queue_Requeue+0x30>
0010e104 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10e104: 55 push %ebp
10e105: 89 e5 mov %esp,%ebp
10e107: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e10a: 8d 45 f4 lea -0xc(%ebp),%eax
10e10d: 50 push %eax
10e10e: ff 75 08 pushl 0x8(%ebp)
10e111: e8 0a f8 ff ff call 10d920 <_Thread_Get>
switch ( location ) {
10e116: 83 c4 10 add $0x10,%esp
10e119: 8b 55 f4 mov -0xc(%ebp),%edx
10e11c: 85 d2 test %edx,%edx
10e11e: 75 17 jne 10e137 <_Thread_queue_Timeout+0x33><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10e120: 83 ec 0c sub $0xc,%esp
10e123: 50 push %eax
10e124: e8 e7 37 00 00 call 111910 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e129: a1 50 75 12 00 mov 0x127550,%eax
10e12e: 48 dec %eax
10e12f: a3 50 75 12 00 mov %eax,0x127550
10e134: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10e137: c9 leave
10e138: c3 ret
00118db0 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
118db0: 55 push %ebp
118db1: 89 e5 mov %esp,%ebp
118db3: 57 push %edi
118db4: 56 push %esi
118db5: 53 push %ebx
118db6: 83 ec 4c sub $0x4c,%esp
118db9: 8b 5d 08 mov 0x8(%ebp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
118dbc: 8d 45 e0 lea -0x20(%ebp),%eax
118dbf: 89 45 b4 mov %eax,-0x4c(%ebp)
118dc2: 89 45 dc mov %eax,-0x24(%ebp)
head->previous = NULL;
118dc5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
tail->previous = head;
118dcc: 8d 4d dc lea -0x24(%ebp),%ecx
118dcf: 89 4d e4 mov %ecx,-0x1c(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
118dd2: 8d 7d d0 lea -0x30(%ebp),%edi
118dd5: 8d 45 d4 lea -0x2c(%ebp),%eax
118dd8: 89 45 b0 mov %eax,-0x50(%ebp)
118ddb: 89 45 d0 mov %eax,-0x30(%ebp)
head->previous = NULL;
118dde: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
tail->previous = head;
118de5: 89 7d d8 mov %edi,-0x28(%ebp)
118de8: 8d 73 30 lea 0x30(%ebx),%esi
118deb: 8d 4b 68 lea 0x68(%ebx),%ecx
118dee: 89 4d c4 mov %ecx,-0x3c(%ebp)
118df1: 8d 43 08 lea 0x8(%ebx),%eax
118df4: 89 45 bc mov %eax,-0x44(%ebp)
118df7: 8d 53 40 lea 0x40(%ebx),%edx
118dfa: 89 55 c0 mov %edx,-0x40(%ebp)
118dfd: 8d 76 00 lea 0x0(%esi),%esi
Chain_Control *tmp;
/*
* 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;
118e00: 8d 4d dc lea -0x24(%ebp),%ecx
118e03: 89 4b 78 mov %ecx,0x78(%ebx)
118e06: 66 90 xchg %ax,%ax
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
118e08: a1 44 23 14 00 mov 0x142344,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
118e0d: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
118e10: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118e13: 51 push %ecx
118e14: 57 push %edi
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
118e15: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118e17: 50 push %eax
118e18: 56 push %esi
118e19: e8 6a 3f 00 00 call 11cd88 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
118e1e: a1 a4 22 14 00 mov 0x1422a4,%eax
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
118e23: 8b 53 74 mov 0x74(%ebx),%edx
/*
* 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 ) {
118e26: 83 c4 10 add $0x10,%esp
118e29: 39 d0 cmp %edx,%eax
118e2b: 0f 87 af 00 00 00 ja 118ee0 <_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 ) {
118e31: 0f 82 c9 00 00 00 jb 118f00 <_Timer_server_Body+0x150>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
118e37: 89 43 74 mov %eax,0x74(%ebx)
118e3a: 66 90 xchg %ax,%ax
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
118e3c: 8b 43 78 mov 0x78(%ebx),%eax
118e3f: 83 ec 0c sub $0xc,%esp
118e42: 50 push %eax
118e43: e8 04 0a 00 00 call 11984c <_Chain_Get>
if ( timer == NULL ) {
118e48: 83 c4 10 add $0x10,%esp
118e4b: 85 c0 test %eax,%eax
118e4d: 74 35 je 118e84 <_Timer_server_Body+0xd4><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
118e4f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
118e52: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
118e55: 74 19 je 118e70 <_Timer_server_Body+0xc0><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
118e57: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
118e5a: 75 e0 jne 118e3c <_Timer_server_Body+0x8c><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
118e5c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
118e5f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
118e62: 50 push %eax <== NOT EXECUTED
118e63: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
118e66: e8 a9 3f 00 00 call 11ce14 <_Watchdog_Insert> <== NOT EXECUTED
118e6b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
118e6e: eb cc jmp 118e3c <_Timer_server_Body+0x8c><== NOT EXECUTED
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
118e70: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
118e73: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
118e76: 50 push %eax <== NOT EXECUTED
118e77: 56 push %esi <== NOT EXECUTED
118e78: e8 97 3f 00 00 call 11ce14 <_Watchdog_Insert> <== NOT EXECUTED
118e7d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
118e80: eb ba jmp 118e3c <_Timer_server_Body+0x8c><== NOT EXECUTED
118e82: 66 90 xchg %ax,%ax <== 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 );
118e84: 9c pushf
118e85: fa cli
118e86: 58 pop %eax
tmp = ts->insert_chain;
118e87: 8b 53 78 mov 0x78(%ebx),%edx
if ( _Chain_Is_empty( insert_chain ) ) {
118e8a: 8b 55 b4 mov -0x4c(%ebp),%edx
118e8d: 39 55 dc cmp %edx,-0x24(%ebp)
118e90: 0f 84 86 00 00 00 je 118f1c <_Timer_server_Body+0x16c><== ALWAYS TAKEN
118e96: b2 01 mov $0x1,%dl <== NOT EXECUTED
ts->insert_chain = NULL;
do_loop = false;
}
_ISR_Enable( level );
118e98: 50 push %eax
118e99: 9d popf
* 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;
while ( do_loop ) {
118e9a: 84 d2 test %dl,%dl
118e9c: 0f 85 66 ff ff ff jne 118e08 <_Timer_server_Body+0x58><== NEVER TAKEN
_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 ) ) {
118ea2: 8b 4d b0 mov -0x50(%ebp),%ecx
118ea5: 39 4d d0 cmp %ecx,-0x30(%ebp)
118ea8: 75 22 jne 118ecc <_Timer_server_Body+0x11c>
118eaa: eb 7e jmp 118f2a <_Timer_server_Body+0x17a>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
118eac: 8b 10 mov (%eax),%edx
head->next = new_first;
118eae: 89 55 d0 mov %edx,-0x30(%ebp)
new_first->previous = head;
118eb1: 89 7a 04 mov %edi,0x4(%edx)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
118eb4: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
118ebb: 51 push %ecx
118ebc: 9d popf
/*
* 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 );
118ebd: 83 ec 08 sub $0x8,%esp
118ec0: ff 70 24 pushl 0x24(%eax)
118ec3: ff 70 20 pushl 0x20(%eax)
118ec6: ff 50 1c call *0x1c(%eax)
}
118ec9: 83 c4 10 add $0x10,%esp
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
118ecc: 9c pushf
118ecd: fa cli
118ece: 59 pop %ecx
initialized = false;
}
#endif
return status;
}
118ecf: 8b 45 d0 mov -0x30(%ebp),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
118ed2: 3b 45 b0 cmp -0x50(%ebp),%eax
118ed5: 75 d5 jne 118eac <_Timer_server_Body+0xfc>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
118ed7: 51 push %ecx
118ed8: 9d popf
118ed9: e9 22 ff ff ff jmp 118e00 <_Timer_server_Body+0x50>
118ede: 66 90 xchg %ax,%ax
/*
* 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 );
118ee0: 51 push %ecx
118ee1: 57 push %edi
if ( snapshot > last_snapshot ) {
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
118ee2: 89 c1 mov %eax,%ecx
118ee4: 29 d1 sub %edx,%ecx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118ee6: 51 push %ecx
118ee7: ff 75 c4 pushl -0x3c(%ebp)
118eea: 89 45 b8 mov %eax,-0x48(%ebp)
118eed: e8 96 3e 00 00 call 11cd88 <_Watchdog_Adjust_to_chain>
118ef2: 83 c4 10 add $0x10,%esp
118ef5: 8b 45 b8 mov -0x48(%ebp),%eax
118ef8: e9 3a ff ff ff jmp 118e37 <_Timer_server_Body+0x87>
118efd: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
118f00: 51 push %ecx
} else if ( snapshot < last_snapshot ) {
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
118f01: 29 c2 sub %eax,%edx
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
118f03: 52 push %edx
118f04: 6a 01 push $0x1
118f06: ff 75 c4 pushl -0x3c(%ebp)
118f09: 89 45 b8 mov %eax,-0x48(%ebp)
118f0c: e8 ff 3d 00 00 call 11cd10 <_Watchdog_Adjust>
118f11: 83 c4 10 add $0x10,%esp
118f14: 8b 45 b8 mov -0x48(%ebp),%eax
118f17: e9 1b ff ff ff jmp 118e37 <_Timer_server_Body+0x87>
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
tmp = ts->insert_chain;
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
118f1c: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
do_loop = false;
118f23: 31 d2 xor %edx,%edx
118f25: e9 6e ff ff ff jmp 118e98 <_Timer_server_Body+0xe8>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
118f2a: c6 43 7c 00 movb $0x0,0x7c(%ebx)
118f2e: a1 d0 21 14 00 mov 0x1421d0,%eax
118f33: 40 inc %eax
118f34: a3 d0 21 14 00 mov %eax,0x1421d0
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
118f39: 83 ec 08 sub $0x8,%esp
118f3c: 6a 08 push $0x8
118f3e: ff 33 pushl (%ebx)
118f40: e8 5f 37 00 00 call 11c6a4 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
118f45: 89 d8 mov %ebx,%eax
118f47: e8 c4 fd ff ff call 118d10 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
118f4c: 89 d8 mov %ebx,%eax
118f4e: e8 0d fe ff ff call 118d60 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
118f53: e8 24 2e 00 00 call 11bd7c <_Thread_Enable_dispatch>
ts->active = true;
118f58: c6 43 7c 01 movb $0x1,0x7c(%ebx)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
118f5c: 5a pop %edx
118f5d: ff 75 bc pushl -0x44(%ebp)
118f60: e8 e7 3f 00 00 call 11cf4c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
118f65: 58 pop %eax
118f66: ff 75 c0 pushl -0x40(%ebp)
118f69: e8 de 3f 00 00 call 11cf4c <_Watchdog_Remove>
118f6e: 83 c4 10 add $0x10,%esp
118f71: e9 8a fe ff ff jmp 118e00 <_Timer_server_Body+0x50>
00118f78 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
118f78: 55 push %ebp
118f79: 89 e5 mov %esp,%ebp
118f7b: 57 push %edi
118f7c: 56 push %esi
118f7d: 53 push %ebx
118f7e: 83 ec 2c sub $0x2c,%esp
118f81: 8b 5d 08 mov 0x8(%ebp),%ebx
118f84: 8b 45 0c mov 0xc(%ebp),%eax
if ( ts->insert_chain == NULL ) {
118f87: 8b 53 78 mov 0x78(%ebx),%edx
118f8a: 85 d2 test %edx,%edx
118f8c: 74 16 je 118fa4 <_Timer_server_Schedule_operation_method+0x2c><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
118f8e: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED
118f91: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
118f94: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
}
}
118f97: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
118f9a: 5b pop %ebx <== NOT EXECUTED
118f9b: 5e pop %esi <== NOT EXECUTED
118f9c: 5f pop %edi <== NOT EXECUTED
118f9d: c9 leave <== 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 );
118f9e: e9 6d 08 00 00 jmp 119810 <_Chain_Append> <== NOT EXECUTED
118fa3: 90 nop <== NOT EXECUTED
118fa4: 8b 15 d0 21 14 00 mov 0x1421d0,%edx
118faa: 42 inc %edx
118fab: 89 15 d0 21 14 00 mov %edx,0x1421d0
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
118fb1: 8b 50 38 mov 0x38(%eax),%edx
118fb4: 83 fa 01 cmp $0x1,%edx
118fb7: 74 7b je 119034 <_Timer_server_Schedule_operation_method+0xbc>
_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 ) {
118fb9: 83 fa 03 cmp $0x3,%edx
118fbc: 74 0e je 118fcc <_Timer_server_Schedule_operation_method+0x54>
* 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 );
}
}
118fbe: 8d 65 f4 lea -0xc(%ebp),%esp
118fc1: 5b pop %ebx
118fc2: 5e pop %esi
118fc3: 5f pop %edi
118fc4: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
118fc5: e9 b2 2d 00 00 jmp 11bd7c <_Thread_Enable_dispatch>
118fca: 66 90 xchg %ax,%ax
} 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 );
118fcc: 9c pushf
118fcd: fa cli
118fce: 8f 45 e4 popl -0x1c(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
118fd1: 8b 0d a4 22 14 00 mov 0x1422a4,%ecx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
118fd7: 8b 53 74 mov 0x74(%ebx),%edx
118fda: 89 55 d4 mov %edx,-0x2c(%ebp)
initialized = false;
}
#endif
return status;
}
118fdd: 8b 53 68 mov 0x68(%ebx),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
118fe0: 8d 7b 6c lea 0x6c(%ebx),%edi
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
118fe3: 39 fa cmp %edi,%edx
118fe5: 74 21 je 119008 <_Timer_server_Schedule_operation_method+0x90>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
118fe7: 8b 7a 10 mov 0x10(%edx),%edi
if ( snapshot > last_snapshot ) {
118fea: 3b 4d d4 cmp -0x2c(%ebp),%ecx
118fed: 0f 86 a1 00 00 00 jbe 119094 <_Timer_server_Schedule_operation_method+0x11c>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
118ff3: 89 ce mov %ecx,%esi
118ff5: 2b 75 d4 sub -0x2c(%ebp),%esi
118ff8: 89 75 d4 mov %esi,-0x2c(%ebp)
if (delta_interval > delta) {
118ffb: 39 f7 cmp %esi,%edi
118ffd: 0f 86 9b 00 00 00 jbe 11909e <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN
delta_interval -= delta;
119003: 29 f7 sub %esi,%edi
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
119005: 89 7a 10 mov %edi,0x10(%edx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
119008: 89 4b 74 mov %ecx,0x74(%ebx)
_ISR_Enable( level );
11900b: ff 75 e4 pushl -0x1c(%ebp)
11900e: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
11900f: 83 ec 08 sub $0x8,%esp
119012: 83 c0 10 add $0x10,%eax
119015: 50 push %eax
119016: 8d 43 68 lea 0x68(%ebx),%eax
119019: 50 push %eax
11901a: e8 f5 3d 00 00 call 11ce14 <_Watchdog_Insert>
if ( !ts->active ) {
11901f: 8a 43 7c mov 0x7c(%ebx),%al
119022: 83 c4 10 add $0x10,%esp
119025: 84 c0 test %al,%al
119027: 75 95 jne 118fbe <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_tod_system_watchdog( ts );
119029: 89 d8 mov %ebx,%eax
11902b: e8 30 fd ff ff call 118d60 <_Timer_server_Reset_tod_system_watchdog>
119030: eb 8c jmp 118fbe <_Timer_server_Schedule_operation_method+0x46>
119032: 66 90 xchg %ax,%ax
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 );
119034: 9c pushf
119035: fa cli
119036: 8f 45 e4 popl -0x1c(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
119039: 8b 0d 44 23 14 00 mov 0x142344,%ecx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
11903f: 8b 7b 3c mov 0x3c(%ebx),%edi
initialized = false;
}
#endif
return status;
}
119042: 8b 53 30 mov 0x30(%ebx),%edx
119045: 8d 73 34 lea 0x34(%ebx),%esi
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
last_snapshot = ts->Interval_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
119048: 39 f2 cmp %esi,%edx
11904a: 74 10 je 11905c <_Timer_server_Schedule_operation_method+0xe4>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
11904c: 89 ce mov %ecx,%esi
11904e: 29 fe sub %edi,%esi
delta_interval = first_watchdog->delta_interval;
119050: 8b 7a 10 mov 0x10(%edx),%edi
if (delta_interval > delta) {
119053: 39 fe cmp %edi,%esi
119055: 73 39 jae 119090 <_Timer_server_Schedule_operation_method+0x118>
delta_interval -= delta;
119057: 29 f7 sub %esi,%edi
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
119059: 89 7a 10 mov %edi,0x10(%edx)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
11905c: 89 4b 3c mov %ecx,0x3c(%ebx)
_ISR_Enable( level );
11905f: ff 75 e4 pushl -0x1c(%ebp)
119062: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
119063: 83 ec 08 sub $0x8,%esp
119066: 83 c0 10 add $0x10,%eax
119069: 50 push %eax
11906a: 8d 43 30 lea 0x30(%ebx),%eax
11906d: 50 push %eax
11906e: e8 a1 3d 00 00 call 11ce14 <_Watchdog_Insert>
if ( !ts->active ) {
119073: 8a 43 7c mov 0x7c(%ebx),%al
119076: 83 c4 10 add $0x10,%esp
119079: 84 c0 test %al,%al
11907b: 0f 85 3d ff ff ff jne 118fbe <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_interval_system_watchdog( ts );
119081: 89 d8 mov %ebx,%eax
119083: e8 88 fc ff ff call 118d10 <_Timer_server_Reset_interval_system_watchdog>
119088: e9 31 ff ff ff jmp 118fbe <_Timer_server_Schedule_operation_method+0x46>
11908d: 8d 76 00 lea 0x0(%esi),%esi
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
119090: 31 ff xor %edi,%edi
119092: eb c5 jmp 119059 <_Timer_server_Schedule_operation_method+0xe1>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
119094: 03 7d d4 add -0x2c(%ebp),%edi
delta_interval += delta;
119097: 29 cf sub %ecx,%edi
119099: e9 67 ff ff ff jmp 119005 <_Timer_server_Schedule_operation_method+0x8d>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11909e: 31 ff xor %edi,%edi <== NOT EXECUTED
1190a0: e9 60 ff ff ff jmp 119005 <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED
0010fbfc <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
10fbfc: 55 push %ebp
10fbfd: 89 e5 mov %esp,%ebp
10fbff: 57 push %edi
10fc00: 56 push %esi
10fc01: 53 push %ebx
10fc02: 83 ec 2c sub $0x2c,%esp
10fc05: 8b 45 08 mov 0x8(%ebp),%eax
10fc08: 8b 4d 0c mov 0xc(%ebp),%ecx
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10fc0b: 8b 38 mov (%eax),%edi
left += lhs->tv_nsec;
10fc0d: 8b 70 04 mov 0x4(%eax),%esi
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10fc10: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx
10fc15: 8b 01 mov (%ecx),%eax
10fc17: f7 eb imul %ebx
10fc19: 89 45 e0 mov %eax,-0x20(%ebp)
10fc1c: 89 55 e4 mov %edx,-0x1c(%ebp)
right += rhs->tv_nsec;
10fc1f: 8b 41 04 mov 0x4(%ecx),%eax
10fc22: 99 cltd
10fc23: 01 45 e0 add %eax,-0x20(%ebp)
10fc26: 11 55 e4 adc %edx,-0x1c(%ebp)
if ( right == 0 ) {
10fc29: 8b 55 e4 mov -0x1c(%ebp),%edx
10fc2c: 0b 55 e0 or -0x20(%ebp),%edx
10fc2f: 74 73 je 10fca4 <_Timespec_Divide+0xa8>
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10fc31: 89 f8 mov %edi,%eax
10fc33: f7 eb imul %ebx
10fc35: 89 45 d0 mov %eax,-0x30(%ebp)
10fc38: 89 55 d4 mov %edx,-0x2c(%ebp)
left += lhs->tv_nsec;
10fc3b: 89 f7 mov %esi,%edi
10fc3d: c1 ff 1f sar $0x1f,%edi
10fc40: 01 75 d0 add %esi,-0x30(%ebp)
10fc43: 11 7d d4 adc %edi,-0x2c(%ebp)
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
10fc46: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx
10fc4d: bb a0 86 01 00 mov $0x186a0,%ebx
10fc52: 8b 45 d0 mov -0x30(%ebp),%eax
10fc55: f7 e3 mul %ebx
10fc57: 8d 34 11 lea (%ecx,%edx,1),%esi
10fc5a: ff 75 e4 pushl -0x1c(%ebp)
10fc5d: ff 75 e0 pushl -0x20(%ebp)
10fc60: 56 push %esi
10fc61: 50 push %eax
10fc62: e8 45 0a 01 00 call 1206ac <__udivdi3>
10fc67: 83 c4 10 add $0x10,%esp
10fc6a: 89 c3 mov %eax,%ebx
10fc6c: 89 d6 mov %edx,%esi
*ival_percentage = answer / 1000;
10fc6e: 6a 00 push $0x0
10fc70: 68 e8 03 00 00 push $0x3e8
10fc75: 52 push %edx
10fc76: 50 push %eax
10fc77: e8 30 0a 01 00 call 1206ac <__udivdi3>
10fc7c: 83 c4 10 add $0x10,%esp
10fc7f: 8b 55 10 mov 0x10(%ebp),%edx
10fc82: 89 02 mov %eax,(%edx)
*fval_percentage = answer % 1000;
10fc84: 6a 00 push $0x0
10fc86: 68 e8 03 00 00 push $0x3e8
10fc8b: 56 push %esi
10fc8c: 53 push %ebx
10fc8d: e8 2a 0b 01 00 call 1207bc <__umoddi3>
10fc92: 83 c4 10 add $0x10,%esp
10fc95: 8b 55 14 mov 0x14(%ebp),%edx
10fc98: 89 02 mov %eax,(%edx)
}
10fc9a: 8d 65 f4 lea -0xc(%ebp),%esp
10fc9d: 5b pop %ebx
10fc9e: 5e pop %esi
10fc9f: 5f pop %edi
10fca0: c9 leave
10fca1: c3 ret
10fca2: 66 90 xchg %ax,%ax
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
10fca4: 8b 45 10 mov 0x10(%ebp),%eax
10fca7: c7 00 00 00 00 00 movl $0x0,(%eax)
*fval_percentage = 0;
10fcad: 8b 55 14 mov 0x14(%ebp),%edx
10fcb0: c7 02 00 00 00 00 movl $0x0,(%edx)
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
*fval_percentage = answer % 1000;
}
10fcb6: 8d 65 f4 lea -0xc(%ebp),%esp
10fcb9: 5b pop %ebx
10fcba: 5e pop %esi
10fcbb: 5f pop %edi
10fcbc: c9 leave
10fcbd: c3 ret
0011f79c <_Timespec_Is_valid>:
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
const struct timespec *time
)
{
11f79c: 55 push %ebp
11f79d: 89 e5 mov %esp,%ebp
11f79f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !time )
11f7a2: 85 c0 test %eax,%eax
11f7a4: 74 1a je 11f7c0 <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_sec < 0 )
11f7a6: 8b 10 mov (%eax),%edx
11f7a8: 85 d2 test %edx,%edx
11f7aa: 78 14 js 11f7c0 <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_nsec < 0 )
11f7ac: 8b 40 04 mov 0x4(%eax),%eax
11f7af: 85 c0 test %eax,%eax
11f7b1: 78 0d js 11f7c0 <_Timespec_Is_valid+0x24>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
11f7b3: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
11f7b8: 0f 96 c0 setbe %al
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
11f7bb: c9 leave
11f7bc: c3 ret
11f7bd: 8d 76 00 lea 0x0(%esi),%esi
if ( time->tv_sec < 0 )
return false;
if ( time->tv_nsec < 0 )
return false;
11f7c0: 31 c0 xor %eax,%eax
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
11f7c2: c9 leave
11f7c3: c3 ret
001119c4 <_Timespec_To_ticks>:
*/
uint32_t _Timespec_To_ticks(
const struct timespec *time
)
{
1119c4: 55 push %ebp
1119c5: 89 e5 mov %esp,%ebp
1119c7: 56 push %esi
1119c8: 53 push %ebx
1119c9: 8b 5d 08 mov 0x8(%ebp),%ebx
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
1119cc: 8b 33 mov (%ebx),%esi
1119ce: 85 f6 test %esi,%esi
1119d0: 75 07 jne 1119d9 <_Timespec_To_ticks+0x15>
1119d2: 8b 43 04 mov 0x4(%ebx),%eax
1119d5: 85 c0 test %eax,%eax
1119d7: 74 37 je 111a10 <_Timespec_To_ticks+0x4c>
return 0;
ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
1119d9: e8 7a 17 00 00 call 113158 <TOD_TICKS_PER_SECOND_method>
1119de: 89 c1 mov %eax,%ecx
1119e0: 0f af ce imul %esi,%ecx
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
1119e3: a1 8c 32 12 00 mov 0x12328c,%eax
1119e8: 8d 04 80 lea (%eax,%eax,4),%eax
1119eb: 8d 04 80 lea (%eax,%eax,4),%eax
1119ee: 8d 34 80 lea (%eax,%eax,4),%esi
1119f1: c1 e6 03 shl $0x3,%esi
1119f4: 8b 43 04 mov 0x4(%ebx),%eax
1119f7: 31 d2 xor %edx,%edx
1119f9: f7 f6 div %esi
if (ticks)
1119fb: 01 c8 add %ecx,%eax
1119fd: 74 05 je 111a04 <_Timespec_To_ticks+0x40>
return ticks;
return 1;
}
1119ff: 5b pop %ebx
111a00: 5e pop %esi
111a01: c9 leave
111a02: c3 ret
111a03: 90 nop
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
if (ticks)
return ticks;
return 1;
111a04: b8 01 00 00 00 mov $0x1,%eax
}
111a09: 5b pop %ebx
111a0a: 5e pop %esi
111a0b: c9 leave
111a0c: c3 ret
111a0d: 8d 76 00 lea 0x0(%esi),%esi
)
{
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
return 0;
111a10: 31 c0 xor %eax,%eax
if (ticks)
return ticks;
return 1;
}
111a12: 5b pop %ebx
111a13: 5e pop %esi
111a14: c9 leave
111a15: c3 ret
0010e59c <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10e59c: 55 push %ebp
10e59d: 89 e5 mov %esp,%ebp
10e59f: 57 push %edi
10e5a0: 56 push %esi
10e5a1: 53 push %ebx
10e5a2: 83 ec 1c sub $0x1c,%esp
10e5a5: 8b 75 08 mov 0x8(%ebp),%esi
10e5a8: 8b 7d 10 mov 0x10(%ebp),%edi
10e5ab: 8a 45 0c mov 0xc(%ebp),%al
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e5ae: 8b 1d b4 77 12 00 mov 0x1277b4,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e5b4: 81 fb ac 77 12 00 cmp $0x1277ac,%ebx
10e5ba: 74 25 je 10e5e1 <_User_extensions_Fatal+0x45><== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e5bc: 0f b6 c0 movzbl %al,%eax
10e5bf: 89 45 e4 mov %eax,-0x1c(%ebp)
10e5c2: 66 90 xchg %ax,%ax
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
10e5c4: 8b 43 30 mov 0x30(%ebx),%eax
10e5c7: 85 c0 test %eax,%eax
10e5c9: 74 0b je 10e5d6 <_User_extensions_Fatal+0x3a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e5cb: 52 push %edx
10e5cc: 57 push %edi
10e5cd: ff 75 e4 pushl -0x1c(%ebp)
10e5d0: 56 push %esi
10e5d1: ff d0 call *%eax
10e5d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e5d6: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e5d9: 81 fb ac 77 12 00 cmp $0x1277ac,%ebx
10e5df: 75 e3 jne 10e5c4 <_User_extensions_Fatal+0x28><== ALWAYS TAKEN
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e5e1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10e5e4: 5b pop %ebx <== NOT EXECUTED
10e5e5: 5e pop %esi <== NOT EXECUTED
10e5e6: 5f pop %edi <== NOT EXECUTED
10e5e7: c9 leave <== NOT EXECUTED
10e5e8: c3 ret <== NOT EXECUTED
0010e460 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10e460: 55 push %ebp
10e461: 89 e5 mov %esp,%ebp
10e463: 57 push %edi
10e464: 56 push %esi
10e465: 53 push %ebx
10e466: 83 ec 1c sub $0x1c,%esp
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;
10e469: a1 bc 32 12 00 mov 0x1232bc,%eax
10e46e: 89 45 dc mov %eax,-0x24(%ebp)
initial_extensions = Configuration.User_extension_table;
10e471: 8b 35 c0 32 12 00 mov 0x1232c0,%esi
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e477: c7 05 ac 77 12 00 b0 movl $0x1277b0,0x1277ac
10e47e: 77 12 00
head->previous = NULL;
10e481: c7 05 b0 77 12 00 00 movl $0x0,0x1277b0
10e488: 00 00 00
tail->previous = head;
10e48b: c7 05 b4 77 12 00 ac movl $0x1277ac,0x1277b4
10e492: 77 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e495: c7 05 54 75 12 00 58 movl $0x127558,0x127554
10e49c: 75 12 00
head->previous = NULL;
10e49f: c7 05 58 75 12 00 00 movl $0x0,0x127558
10e4a6: 00 00 00
tail->previous = head;
10e4a9: c7 05 5c 75 12 00 54 movl $0x127554,0x12755c
10e4b0: 75 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10e4b3: 85 f6 test %esi,%esi
10e4b5: 74 64 je 10e51b <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10e4b7: 89 c2 mov %eax,%edx
10e4b9: 8d 04 40 lea (%eax,%eax,2),%eax
10e4bc: 8d 0c 82 lea (%edx,%eax,4),%ecx
10e4bf: c1 e1 02 shl $0x2,%ecx
10e4c2: 83 ec 0c sub $0xc,%esp
10e4c5: 51 push %ecx
10e4c6: 89 4d d8 mov %ecx,-0x28(%ebp)
10e4c9: e8 c6 04 00 00 call 10e994 <_Workspace_Allocate_or_fatal_error>
10e4ce: 89 c3 mov %eax,%ebx
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10e4d0: 31 c0 xor %eax,%eax
10e4d2: 8b 4d d8 mov -0x28(%ebp),%ecx
10e4d5: 89 df mov %ebx,%edi
10e4d7: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e4d9: 83 c4 10 add $0x10,%esp
10e4dc: 8b 45 dc mov -0x24(%ebp),%eax
10e4df: 85 c0 test %eax,%eax
10e4e1: 74 38 je 10e51b <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN
10e4e3: 89 75 e4 mov %esi,-0x1c(%ebp)
10e4e6: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
10e4ed: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10e4f0: 8d 7b 14 lea 0x14(%ebx),%edi
10e4f3: 8b 75 e4 mov -0x1c(%ebp),%esi
10e4f6: b9 08 00 00 00 mov $0x8,%ecx
10e4fb: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10e4fd: 83 ec 0c sub $0xc,%esp
10e500: 53 push %ebx
10e501: e8 12 35 00 00 call 111a18 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10e506: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e509: ff 45 e0 incl -0x20(%ebp)
10e50c: 83 45 e4 20 addl $0x20,-0x1c(%ebp)
10e510: 83 c4 10 add $0x10,%esp
10e513: 8b 45 e0 mov -0x20(%ebp),%eax
10e516: 39 45 dc cmp %eax,-0x24(%ebp)
10e519: 77 d5 ja 10e4f0 <_User_extensions_Handler_initialization+0x90>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10e51b: 8d 65 f4 lea -0xc(%ebp),%esp
10e51e: 5b pop %ebx
10e51f: 5e pop %esi
10e520: 5f pop %edi
10e521: c9 leave
10e522: c3 ret
0010f9e4 <_User_extensions_Remove_set>:
#include <rtems/score/userext.h>
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
10f9e4: 55 push %ebp
10f9e5: 89 e5 mov %esp,%ebp
10f9e7: 53 push %ebx
10f9e8: 83 ec 10 sub $0x10,%esp
10f9eb: 8b 5d 08 mov 0x8(%ebp),%ebx
_Chain_Extract( &the_extension->Node );
10f9ee: 53 push %ebx
10f9ef: e8 a4 d9 ff ff call 10d398 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
10f9f4: 83 c4 10 add $0x10,%esp
10f9f7: 8b 43 24 mov 0x24(%ebx),%eax
10f9fa: 85 c0 test %eax,%eax
10f9fc: 74 12 je 10fa10 <_User_extensions_Remove_set+0x2c>
_Chain_Extract( &the_extension->Switch.Node );
10f9fe: 83 c3 08 add $0x8,%ebx
10fa01: 89 5d 08 mov %ebx,0x8(%ebp)
}
10fa04: 8b 5d fc mov -0x4(%ebp),%ebx
10fa07: c9 leave
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
10fa08: e9 8b d9 ff ff jmp 10d398 <_Chain_Extract>
10fa0d: 8d 76 00 lea 0x0(%esi),%esi
}
10fa10: 8b 5d fc mov -0x4(%ebp),%ebx
10fa13: c9 leave
10fa14: c3 ret
0010e524 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10e524: 55 push %ebp
10e525: 89 e5 mov %esp,%ebp
10e527: 56 push %esi
10e528: 53 push %ebx
10e529: 8b 75 08 mov 0x8(%ebp),%esi
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e52c: 8b 1d ac 77 12 00 mov 0x1277ac,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e532: 81 fb b0 77 12 00 cmp $0x1277b0,%ebx
10e538: 74 1c je 10e556 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
10e53a: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
10e53c: 8b 43 28 mov 0x28(%ebx),%eax
10e53f: 85 c0 test %eax,%eax
10e541: 74 09 je 10e54c <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
10e543: 83 ec 0c sub $0xc,%esp
10e546: 56 push %esi
10e547: ff d0 call *%eax
10e549: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e54c: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e54e: 81 fb b0 77 12 00 cmp $0x1277b0,%ebx
10e554: 75 e6 jne 10e53c <_User_extensions_Thread_begin+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
10e556: 8d 65 f8 lea -0x8(%ebp),%esp
10e559: 5b pop %ebx
10e55a: 5e pop %esi
10e55b: c9 leave
10e55c: c3 ret
0010e5ec <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10e5ec: 55 push %ebp
10e5ed: 89 e5 mov %esp,%ebp
10e5ef: 56 push %esi
10e5f0: 53 push %ebx
10e5f1: 8b 75 08 mov 0x8(%ebp),%esi
return false;
}
}
return true;
}
10e5f4: 8b 1d ac 77 12 00 mov 0x1277ac,%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e5fa: 81 fb b0 77 12 00 cmp $0x1277b0,%ebx
10e600: 74 26 je 10e628 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10e602: 66 90 xchg %ax,%ax
!_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 ) {
10e604: 8b 43 14 mov 0x14(%ebx),%eax
10e607: 85 c0 test %eax,%eax
10e609: 74 13 je 10e61e <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10e60b: 83 ec 08 sub $0x8,%esp
10e60e: 56 push %esi
10e60f: ff 35 38 7b 12 00 pushl 0x127b38
10e615: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10e617: 83 c4 10 add $0x10,%esp
10e61a: 84 c0 test %al,%al
10e61c: 74 16 je 10e634 <_User_extensions_Thread_create+0x48>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e61e: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e620: 81 fb b0 77 12 00 cmp $0x1277b0,%ebx
10e626: 75 dc jne 10e604 <_User_extensions_Thread_create+0x18>
if ( !status )
return false;
}
}
return true;
10e628: b0 01 mov $0x1,%al
}
10e62a: 8d 65 f8 lea -0x8(%ebp),%esp
10e62d: 5b pop %ebx
10e62e: 5e pop %esi
10e62f: c9 leave
10e630: c3 ret
10e631: 8d 76 00 lea 0x0(%esi),%esi
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
10e634: 31 c0 xor %eax,%eax
}
}
return true;
}
10e636: 8d 65 f8 lea -0x8(%ebp),%esp
10e639: 5b pop %ebx
10e63a: 5e pop %esi
10e63b: c9 leave
10e63c: c3 ret
0010e640 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10e640: 55 push %ebp
10e641: 89 e5 mov %esp,%ebp
10e643: 56 push %esi
10e644: 53 push %ebx
10e645: 8b 75 08 mov 0x8(%ebp),%esi
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10e648: 8b 1d b4 77 12 00 mov 0x1277b4,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e64e: 81 fb ac 77 12 00 cmp $0x1277ac,%ebx
10e654: 74 23 je 10e679 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10e656: 66 90 xchg %ax,%ax
!_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 )
10e658: 8b 43 20 mov 0x20(%ebx),%eax
10e65b: 85 c0 test %eax,%eax
10e65d: 74 0f je 10e66e <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10e65f: 83 ec 08 sub $0x8,%esp
10e662: 56 push %esi
10e663: ff 35 38 7b 12 00 pushl 0x127b38
10e669: ff d0 call *%eax
10e66b: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e66e: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e671: 81 fb ac 77 12 00 cmp $0x1277ac,%ebx
10e677: 75 df jne 10e658 <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10e679: 8d 65 f8 lea -0x8(%ebp),%esp
10e67c: 5b pop %ebx
10e67d: 5e pop %esi
10e67e: c9 leave
10e67f: c3 ret
0010e560 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10e560: 55 push %ebp
10e561: 89 e5 mov %esp,%ebp
10e563: 56 push %esi
10e564: 53 push %ebx
10e565: 8b 75 08 mov 0x8(%ebp),%esi
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e568: 8b 1d b4 77 12 00 mov 0x1277b4,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e56e: 81 fb ac 77 12 00 cmp $0x1277ac,%ebx
10e574: 74 1d je 10e593 <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN
10e576: 66 90 xchg %ax,%ax
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10e578: 8b 43 2c mov 0x2c(%ebx),%eax
10e57b: 85 c0 test %eax,%eax
10e57d: 74 09 je 10e588 <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
10e57f: 83 ec 0c sub $0xc,%esp
10e582: 56 push %esi
10e583: ff d0 call *%eax
10e585: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e588: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e58b: 81 fb ac 77 12 00 cmp $0x1277ac,%ebx
10e591: 75 e5 jne 10e578 <_User_extensions_Thread_exitted+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
10e593: 8d 65 f8 lea -0x8(%ebp),%esp
10e596: 5b pop %ebx
10e597: 5e pop %esi
10e598: c9 leave
10e599: c3 ret
0010f230 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10f230: 55 push %ebp
10f231: 89 e5 mov %esp,%ebp
10f233: 56 push %esi
10f234: 53 push %ebx
10f235: 8b 75 08 mov 0x8(%ebp),%esi
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f238: 8b 1d ac 9a 12 00 mov 0x129aac,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f23e: 81 fb b0 9a 12 00 cmp $0x129ab0,%ebx
10f244: 74 22 je 10f268 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10f246: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
10f248: 8b 43 1c mov 0x1c(%ebx),%eax
10f24b: 85 c0 test %eax,%eax
10f24d: 74 0f je 10f25e <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10f24f: 83 ec 08 sub $0x8,%esp
10f252: 56 push %esi
10f253: ff 35 38 9e 12 00 pushl 0x129e38
10f259: ff d0 call *%eax
10f25b: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10f25e: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f260: 81 fb b0 9a 12 00 cmp $0x129ab0,%ebx
10f266: 75 e0 jne 10f248 <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f268: 8d 65 f8 lea -0x8(%ebp),%esp
10f26b: 5b pop %ebx
10f26c: 5e pop %esi
10f26d: c9 leave
10f26e: c3 ret
0010e680 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10e680: 55 push %ebp
10e681: 89 e5 mov %esp,%ebp
10e683: 56 push %esi
10e684: 53 push %ebx
10e685: 8b 75 08 mov 0x8(%ebp),%esi
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10e688: 8b 1d ac 77 12 00 mov 0x1277ac,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e68e: 81 fb b0 77 12 00 cmp $0x1277b0,%ebx
10e694: 74 22 je 10e6b8 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10e696: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
10e698: 8b 43 18 mov 0x18(%ebx),%eax
10e69b: 85 c0 test %eax,%eax
10e69d: 74 0f je 10e6ae <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10e69f: 83 ec 08 sub $0x8,%esp
10e6a2: 56 push %esi
10e6a3: ff 35 38 7b 12 00 pushl 0x127b38
10e6a9: ff d0 call *%eax
10e6ab: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e6ae: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e6b0: 81 fb b0 77 12 00 cmp $0x1277b0,%ebx
10e6b6: 75 e0 jne 10e698 <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10e6b8: 8d 65 f8 lea -0x8(%ebp),%esp
10e6bb: 5b pop %ebx
10e6bc: 5e pop %esi
10e6bd: c9 leave
10e6be: c3 ret
0010e6c0 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
10e6c0: 55 push %ebp
10e6c1: 89 e5 mov %esp,%ebp
10e6c3: 57 push %edi
10e6c4: 56 push %esi
10e6c5: 53 push %ebx
10e6c6: 83 ec 0c sub $0xc,%esp
10e6c9: 8b 7d 08 mov 0x8(%ebp),%edi
10e6cc: 8b 75 0c mov 0xc(%ebp),%esi
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10e6cf: 8b 1d 54 75 12 00 mov 0x127554,%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10e6d5: 81 fb 58 75 12 00 cmp $0x127558,%ebx
10e6db: 74 18 je 10e6f5 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN
10e6dd: 8d 76 00 lea 0x0(%esi),%esi
!_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 );
10e6e0: 83 ec 08 sub $0x8,%esp
10e6e3: 56 push %esi
10e6e4: 57 push %edi
10e6e5: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
10e6e8: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10e6ea: 83 c4 10 add $0x10,%esp
10e6ed: 81 fb 58 75 12 00 cmp $0x127558,%ebx
10e6f3: 75 eb jne 10e6e0 <_User_extensions_Thread_switch+0x20>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10e6f5: 8d 65 f4 lea -0xc(%ebp),%esp
10e6f8: 5b pop %ebx
10e6f9: 5e pop %esi
10e6fa: 5f pop %edi
10e6fb: c9 leave
10e6fc: c3 ret
0010ffdc <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10ffdc: 55 push %ebp
10ffdd: 89 e5 mov %esp,%ebp
10ffdf: 57 push %edi
10ffe0: 56 push %esi
10ffe1: 53 push %ebx
10ffe2: 83 ec 1c sub $0x1c,%esp
10ffe5: 8b 75 08 mov 0x8(%ebp),%esi
10ffe8: 8b 4d 0c mov 0xc(%ebp),%ecx
10ffeb: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10ffee: 9c pushf
10ffef: fa cli
10fff0: 58 pop %eax
}
}
_ISR_Enable( level );
}
10fff1: 8b 16 mov (%esi),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10fff3: 8d 7e 04 lea 0x4(%esi),%edi
10fff6: 89 7d e4 mov %edi,-0x1c(%ebp)
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
10fff9: 39 fa cmp %edi,%edx
10fffb: 74 3d je 11003a <_Watchdog_Adjust+0x5e>
switch ( direction ) {
10fffd: 85 c9 test %ecx,%ecx
10ffff: 75 43 jne 110044 <_Watchdog_Adjust+0x68>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
110001: 85 db test %ebx,%ebx
110003: 74 35 je 11003a <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
110005: 8b 7a 10 mov 0x10(%edx),%edi
110008: 39 fb cmp %edi,%ebx
11000a: 73 0f jae 11001b <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN
11000c: eb 3e jmp 11004c <_Watchdog_Adjust+0x70> <== NOT EXECUTED
11000e: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
110010: 29 fb sub %edi,%ebx
110012: 74 26 je 11003a <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
110014: 8b 7a 10 mov 0x10(%edx),%edi
110017: 39 df cmp %ebx,%edi
110019: 77 31 ja 11004c <_Watchdog_Adjust+0x70>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
11001b: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
110022: 50 push %eax
110023: 9d popf
_Watchdog_Tickle( header );
110024: 83 ec 0c sub $0xc,%esp
110027: 56 push %esi
110028: e8 cb 01 00 00 call 1101f8 <_Watchdog_Tickle>
_ISR_Disable( level );
11002d: 9c pushf
11002e: fa cli
11002f: 58 pop %eax
}
}
_ISR_Enable( level );
}
110030: 8b 16 mov (%esi),%edx
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
110032: 83 c4 10 add $0x10,%esp
110035: 39 55 e4 cmp %edx,-0x1c(%ebp)
110038: 75 d6 jne 110010 <_Watchdog_Adjust+0x34>
}
break;
}
}
_ISR_Enable( level );
11003a: 50 push %eax
11003b: 9d popf
}
11003c: 8d 65 f4 lea -0xc(%ebp),%esp
11003f: 5b pop %ebx
110040: 5e pop %esi
110041: 5f pop %edi
110042: c9 leave
110043: c3 ret
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
110044: 49 dec %ecx
110045: 75 f3 jne 11003a <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
110047: 01 5a 10 add %ebx,0x10(%edx)
break;
11004a: eb ee jmp 11003a <_Watchdog_Adjust+0x5e>
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
11004c: 29 df sub %ebx,%edi
11004e: 89 7a 10 mov %edi,0x10(%edx)
break;
110051: eb e7 jmp 11003a <_Watchdog_Adjust+0x5e>
0010e700 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
10e700: 55 push %ebp
10e701: 89 e5 mov %esp,%ebp
10e703: 57 push %edi
10e704: 56 push %esi
10e705: 53 push %ebx
10e706: 83 ec 04 sub $0x4,%esp
10e709: 8b 5d 0c mov 0xc(%ebp),%ebx
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
10e70c: 8b 3d 34 7b 12 00 mov 0x127b34,%edi
_ISR_Disable( level );
10e712: 9c pushf
10e713: fa cli
10e714: 8f 45 f0 popl -0x10(%ebp)
/*
* 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 ) {
10e717: 8b 43 08 mov 0x8(%ebx),%eax
10e71a: 85 c0 test %eax,%eax
10e71c: 0f 85 9e 00 00 00 jne 10e7c0 <_Watchdog_Insert+0xc0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
10e722: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx)
_Watchdog_Sync_count++;
10e729: a1 c0 76 12 00 mov 0x1276c0,%eax
10e72e: 40 inc %eax
10e72f: a3 c0 76 12 00 mov %eax,0x1276c0
restart:
delta_interval = the_watchdog->initial;
10e734: 8b 43 0c mov 0xc(%ebx),%eax
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
10e737: 8b 4d 08 mov 0x8(%ebp),%ecx
10e73a: 8b 11 mov (%ecx),%edx
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10e73c: 85 c0 test %eax,%eax
10e73e: 74 5d je 10e79d <_Watchdog_Insert+0x9d>
10e740: 8b 32 mov (%edx),%esi
10e742: 85 f6 test %esi,%esi
10e744: 74 57 je 10e79d <_Watchdog_Insert+0x9d>
break;
if ( delta_interval < after->delta_interval ) {
10e746: 8b 4a 10 mov 0x10(%edx),%ecx
10e749: 39 c8 cmp %ecx,%eax
10e74b: 73 22 jae 10e76f <_Watchdog_Insert+0x6f>
10e74d: eb 49 jmp 10e798 <_Watchdog_Insert+0x98>
10e74f: 90 nop
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
10e750: 8b 35 40 76 12 00 mov 0x127640,%esi
10e756: 39 f7 cmp %esi,%edi
10e758: 72 72 jb 10e7cc <_Watchdog_Insert+0xcc>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
10e75a: 29 c8 sub %ecx,%eax
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10e75c: 8b 12 mov (%edx),%edx
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10e75e: 85 c0 test %eax,%eax
10e760: 74 3b je 10e79d <_Watchdog_Insert+0x9d>
10e762: 8b 0a mov (%edx),%ecx
10e764: 85 c9 test %ecx,%ecx
10e766: 74 35 je 10e79d <_Watchdog_Insert+0x9d>
break;
if ( delta_interval < after->delta_interval ) {
10e768: 8b 4a 10 mov 0x10(%edx),%ecx
10e76b: 39 c1 cmp %eax,%ecx
10e76d: 77 29 ja 10e798 <_Watchdog_Insert+0x98>
break;
}
delta_interval -= after->delta_interval;
_ISR_Flash( level );
10e76f: ff 75 f0 pushl -0x10(%ebp)
10e772: 9d popf
10e773: fa cli
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
10e774: 83 7b 08 01 cmpl $0x1,0x8(%ebx)
10e778: 74 d6 je 10e750 <_Watchdog_Insert+0x50>
_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;
10e77a: 89 3d 40 76 12 00 mov %edi,0x127640
_Watchdog_Sync_count--;
10e780: a1 c0 76 12 00 mov 0x1276c0,%eax
10e785: 48 dec %eax
10e786: a3 c0 76 12 00 mov %eax,0x1276c0
_ISR_Enable( level );
10e78b: ff 75 f0 pushl -0x10(%ebp)
10e78e: 9d popf
}
10e78f: 58 pop %eax
10e790: 5b pop %ebx
10e791: 5e pop %esi
10e792: 5f pop %edi
10e793: c9 leave
10e794: c3 ret
10e795: 8d 76 00 lea 0x0(%esi),%esi
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
10e798: 29 c1 sub %eax,%ecx
10e79a: 89 4a 10 mov %ecx,0x10(%edx)
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
10e79d: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
10e7a4: 89 43 10 mov %eax,0x10(%ebx)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
10e7a7: 8b 42 04 mov 0x4(%edx),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10e7aa: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10e7ad: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10e7af: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10e7b1: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10e7b3: 89 5a 04 mov %ebx,0x4(%edx)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
10e7b6: a1 c4 76 12 00 mov 0x1276c4,%eax
10e7bb: 89 43 14 mov %eax,0x14(%ebx)
10e7be: eb ba jmp 10e77a <_Watchdog_Insert+0x7a>
* 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 );
10e7c0: ff 75 f0 pushl -0x10(%ebp)
10e7c3: 9d popf
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10e7c4: 58 pop %eax
10e7c5: 5b pop %ebx
10e7c6: 5e pop %esi
10e7c7: 5f pop %edi
10e7c8: c9 leave
10e7c9: c3 ret
10e7ca: 66 90 xchg %ax,%ax
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
10e7cc: 89 3d 40 76 12 00 mov %edi,0x127640
goto restart;
10e7d2: e9 5d ff ff ff jmp 10e734 <_Watchdog_Insert+0x34>
0010e838 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10e838: 55 push %ebp
10e839: 89 e5 mov %esp,%ebp
10e83b: 56 push %esi
10e83c: 53 push %ebx
10e83d: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10e840: 9c pushf
10e841: fa cli
10e842: 59 pop %ecx
previous_state = the_watchdog->state;
10e843: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10e846: 83 f8 01 cmp $0x1,%eax
10e849: 74 4d je 10e898 <_Watchdog_Remove+0x60>
10e84b: 73 0f jae 10e85c <_Watchdog_Remove+0x24>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10e84d: 8b 1d c4 76 12 00 mov 0x1276c4,%ebx
10e853: 89 5a 18 mov %ebx,0x18(%edx)
_ISR_Enable( level );
10e856: 51 push %ecx
10e857: 9d popf
return( previous_state );
}
10e858: 5b pop %ebx
10e859: 5e pop %esi
10e85a: c9 leave
10e85b: c3 ret
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
10e85c: 83 f8 03 cmp $0x3,%eax
10e85f: 77 ec ja 10e84d <_Watchdog_Remove+0x15> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10e861: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
10e868: 8b 1a mov (%edx),%ebx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10e86a: 8b 33 mov (%ebx),%esi
10e86c: 85 f6 test %esi,%esi
10e86e: 74 06 je 10e876 <_Watchdog_Remove+0x3e>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10e870: 8b 72 10 mov 0x10(%edx),%esi
10e873: 01 73 10 add %esi,0x10(%ebx)
if ( _Watchdog_Sync_count )
10e876: 8b 35 c0 76 12 00 mov 0x1276c0,%esi
10e87c: 85 f6 test %esi,%esi
10e87e: 74 0c je 10e88c <_Watchdog_Remove+0x54>
_Watchdog_Sync_level = _ISR_Nest_level;
10e880: 8b 35 34 7b 12 00 mov 0x127b34,%esi
10e886: 89 35 40 76 12 00 mov %esi,0x127640
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10e88c: 8b 72 04 mov 0x4(%edx),%esi
next->previous = previous;
10e88f: 89 73 04 mov %esi,0x4(%ebx)
previous->next = next;
10e892: 89 1e mov %ebx,(%esi)
10e894: eb b7 jmp 10e84d <_Watchdog_Remove+0x15>
10e896: 66 90 xchg %ax,%ax
/*
* 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;
10e898: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10e89f: eb ac jmp 10e84d <_Watchdog_Remove+0x15>
0010fbd8 <_Watchdog_Report>:
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
10fbd8: 55 push %ebp
10fbd9: 89 e5 mov %esp,%ebp
10fbdb: 57 push %edi
10fbdc: 56 push %esi
10fbdd: 53 push %ebx
10fbde: 83 ec 2c sub $0x2c,%esp
10fbe1: 8b 55 08 mov 0x8(%ebp),%edx
10fbe4: 8b 45 0c mov 0xc(%ebp),%eax
printk(
10fbe7: 8b 78 24 mov 0x24(%eax),%edi
10fbea: 8b 70 20 mov 0x20(%eax),%esi
10fbed: 8b 58 1c mov 0x1c(%eax),%ebx
10fbf0: 8b 48 0c mov 0xc(%eax),%ecx
10fbf3: 89 4d d4 mov %ecx,-0x2c(%ebp)
10fbf6: 8b 48 10 mov 0x10(%eax),%ecx
10fbf9: 89 4d e4 mov %ecx,-0x1c(%ebp)
10fbfc: 85 d2 test %edx,%edx
10fbfe: 74 2c je 10fc2c <_Watchdog_Report+0x54>
10fc00: b9 a3 2c 12 00 mov $0x122ca3,%ecx
10fc05: 83 ec 0c sub $0xc,%esp
10fc08: 57 push %edi
10fc09: 56 push %esi
10fc0a: 53 push %ebx
10fc0b: 50 push %eax
10fc0c: ff 75 d4 pushl -0x2c(%ebp)
10fc0f: ff 75 e4 pushl -0x1c(%ebp)
10fc12: 51 push %ecx
10fc13: 52 push %edx
10fc14: 68 06 37 12 00 push $0x123706
10fc19: e8 66 9e ff ff call 109a84 <printk>
10fc1e: 83 c4 30 add $0x30,%esp
watch,
watch->routine,
watch->id,
watch->user_data
);
}
10fc21: 8d 65 f4 lea -0xc(%ebp),%esp
10fc24: 5b pop %ebx
10fc25: 5e pop %esi
10fc26: 5f pop %edi
10fc27: c9 leave
10fc28: c3 ret
10fc29: 8d 76 00 lea 0x0(%esi),%esi
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
printk(
10fc2c: b9 69 35 12 00 mov $0x123569,%ecx
10fc31: 89 ca mov %ecx,%edx
10fc33: eb d0 jmp 10fc05 <_Watchdog_Report+0x2d>
0010fb68 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10fb68: 55 push %ebp
10fb69: 89 e5 mov %esp,%ebp
10fb6b: 57 push %edi
10fb6c: 56 push %esi
10fb6d: 53 push %ebx
10fb6e: 83 ec 20 sub $0x20,%esp
10fb71: 8b 7d 08 mov 0x8(%ebp),%edi
10fb74: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10fb77: 9c pushf
10fb78: fa cli
10fb79: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10fb7c: 56 push %esi
10fb7d: 57 push %edi
10fb7e: 68 d0 36 12 00 push $0x1236d0
10fb83: e8 fc 9e ff ff call 109a84 <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
10fb88: 8b 1e mov (%esi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10fb8a: 83 c6 04 add $0x4,%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
10fb8d: 83 c4 10 add $0x10,%esp
10fb90: 39 f3 cmp %esi,%ebx
10fb92: 74 31 je 10fbc5 <_Watchdog_Report_chain+0x5d>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10fb94: 83 ec 08 sub $0x8,%esp
10fb97: 53 push %ebx
10fb98: 6a 00 push $0x0
10fb9a: e8 39 00 00 00 call 10fbd8 <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
10fb9f: 8b 1b mov (%ebx),%ebx
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
10fba1: 83 c4 10 add $0x10,%esp
10fba4: 39 f3 cmp %esi,%ebx
10fba6: 75 ec jne 10fb94 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10fba8: 83 ec 08 sub $0x8,%esp
10fbab: 57 push %edi
10fbac: 68 e7 36 12 00 push $0x1236e7
10fbb1: e8 ce 9e ff ff call 109a84 <printk>
10fbb6: 83 c4 10 add $0x10,%esp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
10fbb9: ff 75 e4 pushl -0x1c(%ebp)
10fbbc: 9d popf
}
10fbbd: 8d 65 f4 lea -0xc(%ebp),%esp
10fbc0: 5b pop %ebx
10fbc1: 5e pop %esi
10fbc2: 5f pop %edi
10fbc3: c9 leave
10fbc4: c3 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
10fbc5: 83 ec 0c sub $0xc,%esp
10fbc8: 68 f6 36 12 00 push $0x1236f6
10fbcd: e8 b2 9e ff ff call 109a84 <printk>
10fbd2: 83 c4 10 add $0x10,%esp
10fbd5: eb e2 jmp 10fbb9 <_Watchdog_Report_chain+0x51>
0010e910 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
10e910: 55 push %ebp
10e911: 89 e5 mov %esp,%ebp
10e913: 57 push %edi
10e914: 53 push %ebx
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
10e915: 8b 1d 80 32 12 00 mov 0x123280,%ebx
uintptr_t size = Configuration.work_space_size;
10e91b: 8b 15 84 32 12 00 mov 0x123284,%edx
if ( Configuration.do_zero_of_workspace )
10e921: 80 3d ac 32 12 00 00 cmpb $0x0,0x1232ac
10e928: 75 1e jne 10e948 <_Workspace_Handler_initialization+0x38>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10e92a: 6a 04 push $0x4
10e92c: 52 push %edx
10e92d: 53 push %ebx
10e92e: 68 80 75 12 00 push $0x127580
10e933: e8 c0 dd ff ff call 10c6f8 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10e938: 83 c4 10 add $0x10,%esp
10e93b: 85 c0 test %eax,%eax
10e93d: 74 13 je 10e952 <_Workspace_Handler_initialization+0x42>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10e93f: 8d 65 f8 lea -0x8(%ebp),%esp
10e942: 5b pop %ebx
10e943: 5f pop %edi
10e944: c9 leave
10e945: c3 ret
10e946: 66 90 xchg %ax,%ax
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 );
10e948: 31 c0 xor %eax,%eax
10e94a: 89 df mov %ebx,%edi
10e94c: 89 d1 mov %edx,%ecx
10e94e: f3 aa rep stos %al,%es:(%edi)
10e950: eb d8 jmp 10e92a <_Workspace_Handler_initialization+0x1a>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10e952: 50 push %eax
10e953: 6a 02 push $0x2
10e955: 6a 01 push $0x1
10e957: 6a 00 push $0x0
10e959: e8 a2 df ff ff call 10c900 <_Internal_error_Occurred>
0010c49c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
10c49c: 55 push %ebp
10c49d: 89 e5 mov %esp,%ebp
10c49f: 57 push %edi
10c4a0: 56 push %esi
10c4a1: 53 push %ebx
10c4a2: 83 ec 78 sub $0x78,%esp
10c4a5: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
10c4a8: 53 push %ebx
10c4a9: e8 52 ea ff ff call 10af00 <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
10c4ae: 83 c4 10 add $0x10,%esp
10c4b1: 85 c0 test %eax,%eax
10c4b3: 0f 85 57 01 00 00 jne 10c610 <_rename_r+0x174>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
10c4b9: 52 push %edx
10c4ba: 8d 45 b8 lea -0x48(%ebp),%eax
10c4bd: 89 45 94 mov %eax,-0x6c(%ebp)
10c4c0: 50 push %eax
10c4c1: 8d 45 e4 lea -0x1c(%ebp),%eax
10c4c4: 50 push %eax
10c4c5: 53 push %ebx
10c4c6: e8 e1 03 00 00 call 10c8ac <rtems_filesystem_get_start_loc>
10c4cb: 83 c4 10 add $0x10,%esp
10c4ce: 31 d2 xor %edx,%edx
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
10c4d0: c6 45 93 00 movb $0x0,-0x6d(%ebp)
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
10c4d4: 8d 7d cc lea -0x34(%ebp),%edi
10c4d7: b9 05 00 00 00 mov $0x5,%ecx
10c4dc: 8b 75 94 mov -0x6c(%ebp),%esi
10c4df: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = old + old_parent_pathlen;
10c4e1: 01 d3 add %edx,%ebx
10c4e3: 89 5d e0 mov %ebx,-0x20(%ebp)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10c4e6: be ff ff ff ff mov $0xffffffff,%esi
10c4eb: 89 f1 mov %esi,%ecx
10c4ed: 89 df mov %ebx,%edi
10c4ef: 31 c0 xor %eax,%eax
10c4f1: f2 ae repnz scas %es:(%edi),%al
10c4f3: f7 d1 not %ecx
10c4f5: 49 dec %ecx
10c4f6: 83 ec 08 sub $0x8,%esp
10c4f9: 51 push %ecx
10c4fa: 53 push %ebx
10c4fb: e8 44 ea ff ff call 10af44 <rtems_filesystem_prefix_separators>
10c500: 01 c3 add %eax,%ebx
10c502: 89 5d e0 mov %ebx,-0x20(%ebp)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10c505: 89 f1 mov %esi,%ecx
10c507: 89 df mov %ebx,%edi
10c509: 31 c0 xor %eax,%eax
10c50b: f2 ae repnz scas %es:(%edi),%al
10c50d: f7 d1 not %ecx
10c50f: 49 dec %ecx
10c510: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c517: 8d 75 cc lea -0x34(%ebp),%esi
10c51a: 56 push %esi
10c51b: 6a 00 push $0x0
10c51d: 51 push %ecx
10c51e: 53 push %ebx
10c51f: e8 30 e9 ff ff call 10ae54 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
10c524: 83 c4 20 add $0x20,%esp
10c527: 85 c0 test %eax,%eax
10c529: 0f 85 c9 00 00 00 jne 10c5f8 <_rename_r+0x15c>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
10c52f: 50 push %eax
10c530: 8d 5d a4 lea -0x5c(%ebp),%ebx
10c533: 53 push %ebx
10c534: 8d 45 e4 lea -0x1c(%ebp),%eax
10c537: 50 push %eax
10c538: ff 75 10 pushl 0x10(%ebp)
10c53b: e8 6c 03 00 00 call 10c8ac <rtems_filesystem_get_start_loc>
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
10c540: 83 c4 0c add $0xc,%esp
10c543: 8d 45 e0 lea -0x20(%ebp),%eax
10c546: 50 push %eax
10c547: 53 push %ebx
10c548: 8b 45 10 mov 0x10(%ebp),%eax
10c54b: 03 45 e4 add -0x1c(%ebp),%eax
10c54e: 50 push %eax
10c54f: 8b 45 b0 mov -0x50(%ebp),%eax
10c552: ff 50 04 call *0x4(%eax)
if ( result != 0 ) {
10c555: 83 c4 10 add $0x10,%esp
10c558: 85 c0 test %eax,%eax
10c55a: 0f 85 e0 00 00 00 jne 10c640 <_rename_r+0x1a4>
/*
* 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 ) {
10c560: 8b 45 b4 mov -0x4c(%ebp),%eax
10c563: 39 45 c8 cmp %eax,-0x38(%ebp)
10c566: 75 48 jne 10c5b0 <_rename_r+0x114>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
10c568: ff 75 e0 pushl -0x20(%ebp)
10c56b: 53 push %ebx
10c56c: 56 push %esi
10c56d: ff 75 94 pushl -0x6c(%ebp)
10c570: 8b 45 b0 mov -0x50(%ebp),%eax
10c573: ff 50 40 call *0x40(%eax)
10c576: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &new_parent_loc );
10c578: 89 1c 24 mov %ebx,(%esp)
10c57b: e8 f0 eb ff ff call 10b170 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10c580: 83 c4 10 add $0x10,%esp
10c583: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
10c587: 75 17 jne 10c5a0 <_rename_r+0x104>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
10c589: 83 ec 0c sub $0xc,%esp
10c58c: 56 push %esi
10c58d: e8 de eb ff ff call 10b170 <rtems_filesystem_freenode>
return result;
10c592: 83 c4 10 add $0x10,%esp
}
10c595: 89 f8 mov %edi,%eax
10c597: 8d 65 f4 lea -0xc(%ebp),%esp
10c59a: 5b pop %ebx
10c59b: 5e pop %esi
10c59c: 5f pop %edi
10c59d: c9 leave
10c59e: c3 ret
10c59f: 90 nop
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
10c5a0: 83 ec 0c sub $0xc,%esp
10c5a3: ff 75 94 pushl -0x6c(%ebp)
10c5a6: e8 c5 eb ff ff call 10b170 <rtems_filesystem_freenode>
10c5ab: 83 c4 10 add $0x10,%esp
10c5ae: eb d9 jmp 10c589 <_rename_r+0xed>
* 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 );
10c5b0: 83 ec 0c sub $0xc,%esp
10c5b3: 53 push %ebx
10c5b4: e8 b7 eb ff ff call 10b170 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10c5b9: 83 c4 10 add $0x10,%esp
10c5bc: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
10c5c0: 74 0e je 10c5d0 <_rename_r+0x134>
rtems_filesystem_freenode( &old_parent_loc );
10c5c2: 83 ec 0c sub $0xc,%esp
10c5c5: ff 75 94 pushl -0x6c(%ebp)
10c5c8: e8 a3 eb ff ff call 10b170 <rtems_filesystem_freenode>
10c5cd: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10c5d0: 83 ec 0c sub $0xc,%esp
10c5d3: 56 push %esi
10c5d4: e8 97 eb ff ff call 10b170 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
10c5d9: e8 96 a9 00 00 call 116f74 <__errno>
10c5de: c7 00 12 00 00 00 movl $0x12,(%eax)
10c5e4: 83 c4 10 add $0x10,%esp
10c5e7: bf ff ff ff ff mov $0xffffffff,%edi
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
10c5ec: 89 f8 mov %edi,%eax
10c5ee: 8d 65 f4 lea -0xc(%ebp),%esp
10c5f1: 5b pop %ebx
10c5f2: 5e pop %esi
10c5f3: 5f pop %edi
10c5f4: c9 leave
10c5f5: c3 ret
10c5f6: 66 90 xchg %ax,%ax
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 )
10c5f8: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
10c5fc: 75 78 jne 10c676 <_rename_r+0x1da> <== ALWAYS TAKEN
rtems_filesystem_freenode( &old_parent_loc );
return -1;
10c5fe: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
10c603: 89 f8 mov %edi,%eax <== NOT EXECUTED
10c605: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c608: 5b pop %ebx <== NOT EXECUTED
10c609: 5e pop %esi <== NOT EXECUTED
10c60a: 5f pop %edi <== NOT EXECUTED
10c60b: c9 leave <== NOT EXECUTED
10c60c: c3 ret <== NOT EXECUTED
10c60d: 8d 76 00 lea 0x0(%esi),%esi <== 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,
10c610: 89 c2 mov %eax,%edx
10c612: 83 ec 0c sub $0xc,%esp
10c615: 6a 00 push $0x0
10c617: 8d 45 b8 lea -0x48(%ebp),%eax
10c61a: 89 45 94 mov %eax,-0x6c(%ebp)
10c61d: 50 push %eax
10c61e: 6a 02 push $0x2
10c620: 52 push %edx
10c621: 53 push %ebx
10c622: 89 55 8c mov %edx,-0x74(%ebp)
10c625: e8 92 e8 ff ff call 10aebc <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
10c62a: 83 c4 20 add $0x20,%esp
10c62d: 85 c0 test %eax,%eax
10c62f: 8b 55 8c mov -0x74(%ebp),%edx
10c632: 75 ca jne 10c5fe <_rename_r+0x162> <== NEVER TAKEN
return -1;
free_old_parentloc = true;
10c634: c6 45 93 01 movb $0x1,-0x6d(%ebp)
10c638: e9 97 fe ff ff jmp 10c4d4 <_rename_r+0x38>
10c63d: 8d 76 00 lea 0x0(%esi),%esi
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
10c640: 83 ec 0c sub $0xc,%esp
10c643: 53 push %ebx
10c644: e8 27 eb ff ff call 10b170 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10c649: 83 c4 10 add $0x10,%esp
10c64c: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
10c650: 74 0e je 10c660 <_rename_r+0x1c4> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
10c652: 83 ec 0c sub $0xc,%esp
10c655: ff 75 94 pushl -0x6c(%ebp)
10c658: e8 13 eb ff ff call 10b170 <rtems_filesystem_freenode>
10c65d: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10c660: 83 ec 0c sub $0xc,%esp
10c663: 56 push %esi
10c664: e8 07 eb ff ff call 10b170 <rtems_filesystem_freenode>
return -1;
10c669: 83 c4 10 add $0x10,%esp
10c66c: bf ff ff ff ff mov $0xffffffff,%edi
10c671: e9 1f ff ff ff jmp 10c595 <_rename_r+0xf9>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
10c676: 83 ec 0c sub $0xc,%esp
10c679: ff 75 94 pushl -0x6c(%ebp)
10c67c: e8 ef ea ff ff call 10b170 <rtems_filesystem_freenode>
10c681: 83 c4 10 add $0x10,%esp
return -1;
10c684: bf ff ff ff ff mov $0xffffffff,%edi
10c689: e9 07 ff ff ff jmp 10c595 <_rename_r+0xf9>
0010ad6c <_times>:
#endif
clock_t _times(
struct tms *ptms
)
{
10ad6c: 55 push %ebp
10ad6d: 89 e5 mov %esp,%ebp
10ad6f: 56 push %esi
10ad70: 53 push %ebx
10ad71: 83 ec 10 sub $0x10,%esp
10ad74: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_interval ticks;
if ( !ptms )
10ad77: 85 db test %ebx,%ebx
10ad79: 74 75 je 10adf0 <_times+0x84>
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
10ad7b: e8 88 04 00 00 call 10b208 <rtems_clock_get_ticks_since_boot>
10ad80: 89 c6 mov %eax,%esi
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
10ad82: 8b 0d ac 35 12 00 mov 0x1235ac,%ecx
10ad88: ba 83 de 1b 43 mov $0x431bde83,%edx
10ad8d: 89 c8 mov %ecx,%eax
10ad8f: f7 e2 mul %edx
10ad91: c1 ea 12 shr $0x12,%edx
10ad94: 89 55 e8 mov %edx,-0x18(%ebp)
10ad97: 8d 04 89 lea (%ecx,%ecx,4),%eax
10ad9a: 8d 04 80 lea (%eax,%eax,4),%eax
10ad9d: 8d 04 80 lea (%eax,%eax,4),%eax
10ada0: c1 e0 03 shl $0x3,%eax
10ada3: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx
10ada8: 31 d2 xor %edx,%edx
10adaa: f7 f1 div %ecx
10adac: 89 55 ec mov %edx,-0x14(%ebp)
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
10adaf: 8d 45 f0 lea -0x10(%ebp),%eax
10adb2: 50 push %eax
10adb3: 8d 45 f4 lea -0xc(%ebp),%eax
10adb6: 50 push %eax
10adb7: 8d 45 e8 lea -0x18(%ebp),%eax
10adba: 50 push %eax
10adbb: a1 58 7e 12 00 mov 0x127e58,%eax
10adc0: 05 84 00 00 00 add $0x84,%eax
10adc5: 50 push %eax
10adc6: e8 6d 38 00 00 call 10e638 <_Timespec_Divide>
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
10adcb: 8b 45 f4 mov -0xc(%ebp),%eax
10adce: 89 03 mov %eax,(%ebx)
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
10add0: 89 73 04 mov %esi,0x4(%ebx)
ptms->tms_cutime = 0;
10add3: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
ptms->tms_cstime = 0;
10adda: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return ticks;
10ade1: 83 c4 10 add $0x10,%esp
}
10ade4: 89 f0 mov %esi,%eax
10ade6: 8d 65 f8 lea -0x8(%ebp),%esp
10ade9: 5b pop %ebx
10adea: 5e pop %esi
10adeb: c9 leave
10adec: c3 ret
10aded: 8d 76 00 lea 0x0(%esi),%esi
)
{
rtems_interval ticks;
if ( !ptms )
rtems_set_errno_and_return_minus_one( EFAULT );
10adf0: e8 1f 88 00 00 call 113614 <__errno>
10adf5: c7 00 0e 00 00 00 movl $0xe,(%eax)
10adfb: be ff ff ff ff mov $0xffffffff,%esi
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
ptms->tms_cstime = 0;
return ticks;
}
10ae00: 89 f0 mov %esi,%eax
10ae02: 8d 65 f8 lea -0x8(%ebp),%esp
10ae05: 5b pop %ebx
10ae06: 5e pop %esi
10ae07: c9 leave
10ae08: c3 ret
00109b2c <access>:
int access(
const char *path,
int amode
)
{
109b2c: 55 push %ebp
109b2d: 89 e5 mov %esp,%ebp
109b2f: 53 push %ebx
109b30: 83 ec 5c sub $0x5c,%esp
109b33: 8b 5d 0c mov 0xc(%ebp),%ebx
struct stat statbuf;
if ( stat(path, &statbuf) )
109b36: 8d 45 b0 lea -0x50(%ebp),%eax
109b39: 50 push %eax
109b3a: ff 75 08 pushl 0x8(%ebp)
109b3d: e8 42 17 00 00 call 10b284 <stat>
109b42: 83 c4 10 add $0x10,%esp
109b45: 85 c0 test %eax,%eax
109b47: 75 1f jne 109b68 <access+0x3c>
return -1;
if ( amode & R_OK ) {
109b49: f6 c3 04 test $0x4,%bl
109b4c: 75 26 jne 109b74 <access+0x48>
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
109b4e: f6 c3 02 test $0x2,%bl
109b51: 75 0d jne 109b60 <access+0x34>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
109b53: 83 e3 01 and $0x1,%ebx
109b56: 75 24 jne 109b7c <access+0x50>
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
109b58: 31 c0 xor %eax,%eax
}
109b5a: 8b 5d fc mov -0x4(%ebp),%ebx
109b5d: c9 leave
109b5e: c3 ret
109b5f: 90 nop
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
109b60: f6 45 bc 80 testb $0x80,-0x44(%ebp)
109b64: 75 ed jne 109b53 <access+0x27>
109b66: 66 90 xchg %ax,%ax
return -1;
109b68: b8 ff ff ff ff mov $0xffffffff,%eax
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
109b6d: 8b 5d fc mov -0x4(%ebp),%ebx
109b70: c9 leave
109b71: c3 ret
109b72: 66 90 xchg %ax,%ax
if ( stat(path, &statbuf) )
return -1;
if ( amode & R_OK ) {
if (!( statbuf.st_mode & S_IREAD ))
109b74: f6 45 bd 01 testb $0x1,-0x43(%ebp)
109b78: 75 d4 jne 109b4e <access+0x22>
109b7a: eb ec jmp 109b68 <access+0x3c>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
109b7c: 8b 45 bc mov -0x44(%ebp),%eax
109b7f: 83 e0 40 and $0x40,%eax
return -1;
}
return 0;
109b82: 83 f8 01 cmp $0x1,%eax
109b85: 19 c0 sbb %eax,%eax
109b87: eb d1 jmp 109b5a <access+0x2e>
0010b5d4 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
10b5d4: 55 push %ebp
10b5d5: 89 e5 mov %esp,%ebp
10b5d7: 57 push %edi
10b5d8: 56 push %esi
10b5d9: 53 push %ebx
10b5da: 83 ec 1c sub $0x1c,%esp
10b5dd: 8b 5d 08 mov 0x8(%ebp),%ebx
10b5e0: 8b 75 0c mov 0xc(%ebp),%esi
long adjustment;
/*
* Simple validations
*/
if ( !delta )
10b5e3: 85 db test %ebx,%ebx
10b5e5: 0f 84 f1 00 00 00 je 10b6dc <adjtime+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
10b5eb: 8b 53 04 mov 0x4(%ebx),%edx
10b5ee: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx
10b5f4: 0f 87 e2 00 00 00 ja 10b6dc <adjtime+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
10b5fa: 85 f6 test %esi,%esi
10b5fc: 74 10 je 10b60e <adjtime+0x3a>
olddelta->tv_sec = 0;
10b5fe: c7 06 00 00 00 00 movl $0x0,(%esi)
olddelta->tv_usec = 0;
10b604: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10b60b: 8b 53 04 mov 0x4(%ebx),%edx
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
10b60e: 8b 03 mov (%ebx),%eax
10b610: 8d 04 80 lea (%eax,%eax,4),%eax
10b613: 8d 04 80 lea (%eax,%eax,4),%eax
10b616: 8d 04 80 lea (%eax,%eax,4),%eax
10b619: 8d 04 80 lea (%eax,%eax,4),%eax
10b61c: 8d 04 80 lea (%eax,%eax,4),%eax
10b61f: 8d 04 80 lea (%eax,%eax,4),%eax
10b622: c1 e0 06 shl $0x6,%eax
adjustment += delta->tv_usec;
10b625: 8d 04 02 lea (%edx,%eax,1),%eax
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
10b628: 3b 05 8c 47 12 00 cmp 0x12478c,%eax
10b62e: 73 0c jae 10b63c <adjtime+0x68>
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
10b630: 31 c0 xor %eax,%eax
}
10b632: 8d 65 f4 lea -0xc(%ebp),%esp
10b635: 5b pop %ebx
10b636: 5e pop %esi
10b637: 5f pop %edi
10b638: c9 leave
10b639: c3 ret
10b63a: 66 90 xchg %ax,%ax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b63c: a1 90 8b 12 00 mov 0x128b90,%eax
10b641: 40 inc %eax
10b642: a3 90 8b 12 00 mov %eax,0x128b90
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
10b647: 83 ec 0c sub $0xc,%esp
10b64a: 8d 7d e0 lea -0x20(%ebp),%edi
10b64d: 57 push %edi
10b64e: e8 89 17 00 00 call 10cddc <_TOD_Get>
ts.tv_sec += delta->tv_sec;
10b653: 8b 03 mov (%ebx),%eax
10b655: 01 45 e0 add %eax,-0x20(%ebp)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
10b658: 8b 43 04 mov 0x4(%ebx),%eax
10b65b: 8d 04 80 lea (%eax,%eax,4),%eax
10b65e: 8d 04 80 lea (%eax,%eax,4),%eax
10b661: 8d 04 80 lea (%eax,%eax,4),%eax
10b664: c1 e0 03 shl $0x3,%eax
10b667: 03 45 e4 add -0x1c(%ebp),%eax
10b66a: 89 45 e4 mov %eax,-0x1c(%ebp)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10b66d: 83 c4 10 add $0x10,%esp
10b670: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10b675: 76 18 jbe 10b68f <adjtime+0xbb>
10b677: 8b 55 e0 mov -0x20(%ebp),%edx
10b67a: 66 90 xchg %ax,%ax
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
10b67c: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
10b681: 42 inc %edx
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10b682: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10b687: 77 f3 ja 10b67c <adjtime+0xa8> <== NEVER TAKEN
10b689: 89 45 e4 mov %eax,-0x1c(%ebp)
10b68c: 89 55 e0 mov %edx,-0x20(%ebp)
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
10b68f: 3d 00 36 65 c4 cmp $0xc4653600,%eax
10b694: 77 19 ja 10b6af <adjtime+0xdb> <== NEVER TAKEN
10b696: 8b 55 e0 mov -0x20(%ebp),%edx
10b699: 8d 76 00 lea 0x0(%esi),%esi
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
10b69c: 05 00 ca 9a 3b add $0x3b9aca00,%eax
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
10b6a1: 4a dec %edx
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
10b6a2: 3d 00 36 65 c4 cmp $0xc4653600,%eax
10b6a7: 76 f3 jbe 10b69c <adjtime+0xc8>
10b6a9: 89 45 e4 mov %eax,-0x1c(%ebp)
10b6ac: 89 55 e0 mov %edx,-0x20(%ebp)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
10b6af: 83 ec 0c sub $0xc,%esp
10b6b2: 57 push %edi
10b6b3: e8 b4 17 00 00 call 10ce6c <_TOD_Set>
_Thread_Enable_dispatch();
10b6b8: e8 f7 2b 00 00 call 10e2b4 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
10b6bd: 83 c4 10 add $0x10,%esp
10b6c0: 85 f6 test %esi,%esi
10b6c2: 0f 84 68 ff ff ff je 10b630 <adjtime+0x5c>
*olddelta = *delta;
10b6c8: 8b 03 mov (%ebx),%eax
10b6ca: 8b 53 04 mov 0x4(%ebx),%edx
10b6cd: 89 06 mov %eax,(%esi)
10b6cf: 89 56 04 mov %edx,0x4(%esi)
return 0;
10b6d2: 31 c0 xor %eax,%eax
}
10b6d4: 8d 65 f4 lea -0xc(%ebp),%esp
10b6d7: 5b pop %ebx
10b6d8: 5e pop %esi
10b6d9: 5f pop %edi
10b6da: c9 leave
10b6db: c3 ret
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
10b6dc: e8 07 87 00 00 call 113de8 <__errno>
10b6e1: c7 00 16 00 00 00 movl $0x16,(%eax)
10b6e7: b8 ff ff ff ff mov $0xffffffff,%eax
10b6ec: e9 41 ff ff ff jmp 10b632 <adjtime+0x5e>
0010bd04 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
10bd04: 55 push %ebp
10bd05: 89 e5 mov %esp,%ebp
10bd07: 57 push %edi
10bd08: 56 push %esi
10bd09: 53 push %ebx
10bd0a: 83 ec 18 sub $0x18,%esp
10bd0d: 8b 75 08 mov 0x8(%ebp),%esi
10bd10: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
10bd13: 68 60 a1 12 00 push $0x12a160
10bd18: e8 67 11 00 00 call 10ce84 <pthread_mutex_lock>
if (aiocbp == NULL)
10bd1d: 83 c4 10 add $0x10,%esp
10bd20: 85 db test %ebx,%ebx
10bd22: 0f 84 c8 00 00 00 je 10bdf0 <aio_cancel+0xec>
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
}
else
{
if (aiocbp->aio_fildes != fildes) {
10bd28: 8b 3b mov (%ebx),%edi
10bd2a: 39 f7 cmp %esi,%edi
10bd2c: 0f 85 9a 00 00 00 jne 10bdcc <aio_cancel+0xc8> <== ALWAYS TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
10bd32: 56 push %esi <== NOT EXECUTED
10bd33: 6a 00 push $0x0 <== NOT EXECUTED
10bd35: 57 push %edi <== NOT EXECUTED
10bd36: 68 a8 a1 12 00 push $0x12a1a8 <== NOT EXECUTED
10bd3b: e8 a4 03 00 00 call 10c0e4 <rtems_aio_search_fd> <== NOT EXECUTED
10bd40: 89 c6 mov %eax,%esi <== NOT EXECUTED
fildes,
0);
if (r_chain == NULL)
10bd42: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10bd45: 85 c0 test %eax,%eax <== NOT EXECUTED
10bd47: 74 3b je 10bd84 <aio_cancel+0x80> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
pthread_mutex_lock (&r_chain->mutex);
10bd49: 8d 7e 1c lea 0x1c(%esi),%edi <== NOT EXECUTED
10bd4c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bd4f: 57 push %edi <== NOT EXECUTED
10bd50: e8 2f 11 00 00 call 10ce84 <pthread_mutex_lock> <== NOT EXECUTED
result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp);
10bd55: 58 pop %eax <== NOT EXECUTED
10bd56: 5a pop %edx <== NOT EXECUTED
10bd57: 53 push %ebx <== NOT EXECUTED
10bd58: 56 push %esi <== NOT EXECUTED
10bd59: e8 36 07 00 00 call 10c494 <rtems_aio_remove_req> <== NOT EXECUTED
10bd5e: 89 c3 mov %eax,%ebx <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
10bd60: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10bd63: e8 a4 11 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
10bd68: c7 04 24 60 a1 12 00 movl $0x12a160,(%esp) <== NOT EXECUTED
10bd6f: e8 98 11 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
return result;
10bd74: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return AIO_ALLDONE;
}
10bd77: 89 d8 mov %ebx,%eax
10bd79: 8d 65 f4 lea -0xc(%ebp),%esp
10bd7c: 5b pop %ebx
10bd7d: 5e pop %esi
10bd7e: 5f pop %edi
10bd7f: c9 leave
10bd80: c3 ret
10bd81: 8d 76 00 lea 0x0(%esi),%esi
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
fildes,
0);
if (r_chain == NULL)
if (!rtems_chain_is_empty (&aio_request_queue.idle_req))
10bd84: 81 3d b4 a1 12 00 b8 cmpl $0x12a1b8,0x12a1b4 <== NOT EXECUTED
10bd8b: a1 12 00
10bd8e: 74 b9 je 10bd49 <aio_cancel+0x45> <== NOT EXECUTED
{
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req,
10bd90: 51 push %ecx <== NOT EXECUTED
10bd91: 6a 00 push $0x0 <== NOT EXECUTED
10bd93: 57 push %edi <== NOT EXECUTED
10bd94: 68 b4 a1 12 00 push $0x12a1b4 <== NOT EXECUTED
10bd99: e8 46 03 00 00 call 10c0e4 <rtems_aio_search_fd> <== NOT EXECUTED
fildes,
0);
if (r_chain == NULL)
10bd9e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10bda1: 85 c0 test %eax,%eax <== NOT EXECUTED
10bda3: 74 27 je 10bdcc <aio_cancel+0xc8> <== NOT EXECUTED
{
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
result = rtems_aio_remove_req (&r_chain->next_fd, aiocbp);
10bda5: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10bda8: 53 push %ebx <== NOT EXECUTED
10bda9: 50 push %eax <== NOT EXECUTED
10bdaa: e8 e5 06 00 00 call 10c494 <rtems_aio_remove_req> <== NOT EXECUTED
10bdaf: 89 c3 mov %eax,%ebx <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
10bdb1: c7 04 24 60 a1 12 00 movl $0x12a160,(%esp) <== NOT EXECUTED
10bdb8: e8 4f 11 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
return result;
10bdbd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return result;
}
return AIO_ALLDONE;
}
10bdc0: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10bdc2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10bdc5: 5b pop %ebx <== NOT EXECUTED
10bdc6: 5e pop %esi <== NOT EXECUTED
10bdc7: 5f pop %edi <== NOT EXECUTED
10bdc8: c9 leave <== NOT EXECUTED
10bdc9: c3 ret <== NOT EXECUTED
10bdca: 66 90 xchg %ax,%ax <== NOT EXECUTED
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req,
fildes,
0);
if (r_chain == NULL)
{
pthread_mutex_unlock (&aio_request_queue.mutex);
10bdcc: 83 ec 0c sub $0xc,%esp
10bdcf: 68 60 a1 12 00 push $0x12a160
10bdd4: e8 33 11 00 00 call 10cf0c <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
10bdd9: e8 1e 9e 00 00 call 115bfc <__errno>
10bdde: c7 00 16 00 00 00 movl $0x16,(%eax)
10bde4: 83 c4 10 add $0x10,%esp
10bde7: bb ff ff ff ff mov $0xffffffff,%ebx
10bdec: eb 89 jmp 10bd77 <aio_cancel+0x73>
10bdee: 66 90 xchg %ax,%ax
pthread_mutex_lock (&aio_request_queue.mutex);
if (aiocbp == NULL)
{
if (fcntl (fildes, F_GETFL) < 0) {
10bdf0: 83 ec 08 sub $0x8,%esp
10bdf3: 6a 03 push $0x3
10bdf5: 56 push %esi
10bdf6: e8 ad 69 00 00 call 1127a8 <fcntl>
10bdfb: 83 c4 10 add $0x10,%esp
10bdfe: 85 c0 test %eax,%eax
10be00: 0f 88 d4 00 00 00 js 10beda <aio_cancel+0x1d6> <== ALWAYS TAKEN
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
10be06: 50 push %eax <== NOT EXECUTED
10be07: 6a 00 push $0x0 <== NOT EXECUTED
10be09: 56 push %esi <== NOT EXECUTED
10be0a: 68 a8 a1 12 00 push $0x12a1a8 <== NOT EXECUTED
10be0f: e8 d0 02 00 00 call 10c0e4 <rtems_aio_search_fd> <== NOT EXECUTED
10be14: 89 c3 mov %eax,%ebx <== NOT EXECUTED
fildes,
0);
if (r_chain == NULL)
10be16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10be19: 85 c0 test %eax,%eax <== NOT EXECUTED
10be1b: 74 3b je 10be58 <aio_cancel+0x154> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_ALLDONE;
}
pthread_mutex_lock (&r_chain->mutex);
10be1d: 8d 70 1c lea 0x1c(%eax),%esi <== NOT EXECUTED
10be20: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10be23: 56 push %esi <== NOT EXECUTED
10be24: e8 5b 10 00 00 call 10ce84 <pthread_mutex_lock> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10be29: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10be2c: e8 27 2a 00 00 call 10e858 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
10be31: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10be34: e8 1b 06 00 00 call 10c454 <rtems_aio_remove_fd> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
10be39: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
10be3c: e8 cb 10 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
10be41: c7 04 24 60 a1 12 00 movl $0x12a160,(%esp) <== NOT EXECUTED
10be48: e8 bf 10 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_CANCELED;
10be4d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10be50: 31 db xor %ebx,%ebx <== NOT EXECUTED
10be52: e9 20 ff ff ff jmp 10bd77 <aio_cancel+0x73> <== NOT EXECUTED
10be57: 90 nop <== NOT EXECUTED
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
fildes,
0);
if (r_chain == NULL)
{
if (!rtems_chain_is_empty (&aio_request_queue.idle_req))
10be58: 81 3d b4 a1 12 00 b8 cmpl $0x12a1b8,0x12a1b4 <== NOT EXECUTED
10be5f: a1 12 00
10be62: 74 45 je 10bea9 <aio_cancel+0x1a5> <== NOT EXECUTED
{
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req,
10be64: 57 push %edi <== NOT EXECUTED
10be65: 6a 00 push $0x0 <== NOT EXECUTED
10be67: 56 push %esi <== NOT EXECUTED
10be68: 68 b4 a1 12 00 push $0x12a1b4 <== NOT EXECUTED
10be6d: e8 72 02 00 00 call 10c0e4 <rtems_aio_search_fd> <== NOT EXECUTED
10be72: 89 c3 mov %eax,%ebx <== NOT EXECUTED
fildes,
0);
if (r_chain == NULL) {
10be74: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10be77: 85 c0 test %eax,%eax <== NOT EXECUTED
10be79: 74 48 je 10bec3 <aio_cancel+0x1bf> <== NOT EXECUTED
10be7b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10be7e: 50 push %eax <== NOT EXECUTED
10be7f: e8 d4 29 00 00 call 10e858 <_Chain_Extract> <== NOT EXECUTED
pthread_mutex_unlock(&aio_request_queue.mutex);
return AIO_ALLDONE;
}
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
10be84: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10be87: e8 c8 05 00 00 call 10c454 <rtems_aio_remove_fd> <== NOT EXECUTED
pthread_mutex_destroy (&r_chain->mutex);
10be8c: 8d 73 1c lea 0x1c(%ebx),%esi <== NOT EXECUTED
10be8f: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
10be92: e8 81 0d 00 00 call 10cc18 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_cond_destroy (&r_chain->mutex);
10be97: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
10be9a: e8 35 0a 00 00 call 10c8d4 <pthread_cond_destroy> <== NOT EXECUTED
free (r_chain);
10be9f: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10bea2: e8 7d cc ff ff call 108b24 <free> <== NOT EXECUTED
10bea7: eb 98 jmp 10be41 <aio_cancel+0x13d> <== NOT EXECUTED
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
}
pthread_mutex_unlock (&aio_request_queue.mutex);
10bea9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10beac: 68 60 a1 12 00 push $0x12a160 <== NOT EXECUTED
10beb1: e8 56 10 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_ALLDONE;
10beb6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10beb9: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED
10bebe: e9 b4 fe ff ff jmp 10bd77 <aio_cancel+0x73> <== NOT EXECUTED
{
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req,
fildes,
0);
if (r_chain == NULL) {
pthread_mutex_unlock(&aio_request_queue.mutex);
10bec3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bec6: 68 60 a1 12 00 push $0x12a160 <== NOT EXECUTED
10becb: e8 3c 10 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_ALLDONE;
10bed0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10bed3: b3 02 mov $0x2,%bl <== NOT EXECUTED
10bed5: e9 9d fe ff ff jmp 10bd77 <aio_cancel+0x73> <== NOT EXECUTED
pthread_mutex_lock (&aio_request_queue.mutex);
if (aiocbp == NULL)
{
if (fcntl (fildes, F_GETFL) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
10beda: 83 ec 0c sub $0xc,%esp
10bedd: 68 60 a1 12 00 push $0x12a160
10bee2: e8 25 10 00 00 call 10cf0c <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
10bee7: e8 10 9d 00 00 call 115bfc <__errno>
10beec: c7 00 09 00 00 00 movl $0x9,(%eax)
10bef2: 83 c4 10 add $0x10,%esp
10bef5: bb ff ff ff ff mov $0xffffffff,%ebx
10befa: e9 78 fe ff ff jmp 10bd77 <aio_cancel+0x73>
0010bf0c <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
10bf0c: 55 push %ebp
10bf0d: 89 e5 mov %esp,%ebp
10bf0f: 53 push %ebx
10bf10: 83 ec 04 sub $0x4,%esp
10bf13: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
10bf16: 81 7d 08 00 20 00 00 cmpl $0x2000,0x8(%ebp)
10bf1d: 75 41 jne 10bf60 <aio_fsync+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10bf1f: 83 ec 08 sub $0x8,%esp
10bf22: 6a 03 push $0x3
10bf24: ff 33 pushl (%ebx)
10bf26: e8 7d 68 00 00 call 1127a8 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10bf2b: 83 e0 03 and $0x3,%eax
10bf2e: 48 dec %eax
10bf2f: 83 c4 10 add $0x10,%esp
10bf32: 83 f8 01 cmp $0x1,%eax
10bf35: 77 4d ja 10bf84 <aio_fsync+0x78> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10bf37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bf3a: 6a 18 push $0x18 <== NOT EXECUTED
10bf3c: e8 f7 d0 ff ff call 109038 <malloc> <== NOT EXECUTED
if (req == NULL)
10bf41: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10bf44: 85 c0 test %eax,%eax <== NOT EXECUTED
10bf46: 74 57 je 10bf9f <aio_fsync+0x93> <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10bf48: 89 58 14 mov %ebx,0x14(%eax) <== NOT EXECUTED
req->aiocbp->aio_lio_opcode = LIO_SYNC;
10bf4b: c7 43 2c 03 00 00 00 movl $0x3,0x2c(%ebx) <== NOT EXECUTED
return rtems_aio_enqueue (req);
10bf52: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
10bf55: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10bf58: c9 leave <== NOT EXECUTED
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
10bf59: e9 92 05 00 00 jmp 10c4f0 <rtems_aio_enqueue> <== NOT EXECUTED
10bf5e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10bf60: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10bf67: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10bf6e: e8 89 9c 00 00 call 115bfc <__errno>
10bf73: c7 00 16 00 00 00 movl $0x16,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
10bf79: b8 ff ff ff ff mov $0xffffffff,%eax
10bf7e: 8b 5d fc mov -0x4(%ebp),%ebx
10bf81: c9 leave
10bf82: c3 ret
10bf83: 90 nop
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10bf84: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10bf8b: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10bf92: e8 65 9c 00 00 call 115bfc <__errno>
10bf97: c7 00 09 00 00 00 movl $0x9,(%eax)
10bf9d: eb da jmp 10bf79 <aio_fsync+0x6d>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10bf9f: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx)
10bfa6: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10bfad: e8 4a 9c 00 00 call 115bfc <__errno> <== NOT EXECUTED
10bfb2: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10bfb8: eb bf jmp 10bf79 <aio_fsync+0x6d> <== NOT EXECUTED
0010c6f8 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
10c6f8: 55 push %ebp
10c6f9: 89 e5 mov %esp,%ebp
10c6fb: 53 push %ebx
10c6fc: 83 ec 0c sub $0xc,%esp
10c6ff: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10c702: 6a 03 push $0x3
10c704: ff 33 pushl (%ebx)
10c706: e8 9d 60 00 00 call 1127a8 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10c70b: 83 c4 10 add $0x10,%esp
10c70e: 83 e0 03 and $0x3,%eax
10c711: 74 05 je 10c718 <aio_read+0x20> <== NEVER TAKEN
10c713: 83 f8 02 cmp $0x2,%eax
10c716: 75 38 jne 10c750 <aio_read+0x58>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10c718: 8b 53 14 mov 0x14(%ebx),%edx
10c71b: 85 d2 test %edx,%edx
10c71d: 75 55 jne 10c774 <aio_read+0x7c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10c71f: 8b 43 08 mov 0x8(%ebx),%eax
10c722: 85 c0 test %eax,%eax
10c724: 78 4e js 10c774 <aio_read+0x7c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10c726: 83 ec 0c sub $0xc,%esp
10c729: 6a 18 push $0x18
10c72b: e8 08 c9 ff ff call 109038 <malloc>
if (req == NULL)
10c730: 83 c4 10 add $0x10,%esp
10c733: 85 c0 test %eax,%eax
10c735: 74 58 je 10c78f <aio_read+0x97> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10c737: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_READ;
10c73a: c7 43 2c 01 00 00 00 movl $0x1,0x2c(%ebx)
return rtems_aio_enqueue (req);
10c741: 89 45 08 mov %eax,0x8(%ebp)
}
10c744: 8b 5d fc mov -0x4(%ebp),%ebx
10c747: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
10c748: e9 a3 fd ff ff jmp 10c4f0 <rtems_aio_enqueue>
10c74d: 8d 76 00 lea 0x0(%esi),%esi
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10c750: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10c757: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c75e: e8 99 94 00 00 call 115bfc <__errno>
10c763: c7 00 09 00 00 00 movl $0x9,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
10c769: b8 ff ff ff ff mov $0xffffffff,%eax
10c76e: 8b 5d fc mov -0x4(%ebp),%ebx
10c771: c9 leave
10c772: c3 ret
10c773: 90 nop
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10c774: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10c77b: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c782: e8 75 94 00 00 call 115bfc <__errno>
10c787: c7 00 16 00 00 00 movl $0x16,(%eax)
10c78d: eb da jmp 10c769 <aio_read+0x71>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10c78f: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx)
10c796: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10c79d: e8 5a 94 00 00 call 115bfc <__errno> <== NOT EXECUTED
10c7a2: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10c7a8: eb bf jmp 10c769 <aio_read+0x71> <== NOT EXECUTED
0010c7b8 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
10c7b8: 55 push %ebp
10c7b9: 89 e5 mov %esp,%ebp
10c7bb: 53 push %ebx
10c7bc: 83 ec 0c sub $0xc,%esp
10c7bf: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10c7c2: 6a 03 push $0x3
10c7c4: ff 33 pushl (%ebx)
10c7c6: e8 dd 5f 00 00 call 1127a8 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10c7cb: 83 e0 03 and $0x3,%eax
10c7ce: 48 dec %eax
10c7cf: 83 c4 10 add $0x10,%esp
10c7d2: 83 f8 01 cmp $0x1,%eax
10c7d5: 77 35 ja 10c80c <aio_write+0x54>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10c7d7: 8b 53 14 mov 0x14(%ebx),%edx
10c7da: 85 d2 test %edx,%edx
10c7dc: 75 52 jne 10c830 <aio_write+0x78>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10c7de: 8b 43 08 mov 0x8(%ebx),%eax
10c7e1: 85 c0 test %eax,%eax
10c7e3: 78 4b js 10c830 <aio_write+0x78>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10c7e5: 83 ec 0c sub $0xc,%esp
10c7e8: 6a 18 push $0x18
10c7ea: e8 49 c8 ff ff call 109038 <malloc>
if (req == NULL)
10c7ef: 83 c4 10 add $0x10,%esp
10c7f2: 85 c0 test %eax,%eax
10c7f4: 74 55 je 10c84b <aio_write+0x93> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10c7f6: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
10c7f9: c7 43 2c 02 00 00 00 movl $0x2,0x2c(%ebx)
return rtems_aio_enqueue (req);
10c800: 89 45 08 mov %eax,0x8(%ebp)
}
10c803: 8b 5d fc mov -0x4(%ebp),%ebx
10c806: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
10c807: e9 e4 fc ff ff jmp 10c4f0 <rtems_aio_enqueue>
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10c80c: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10c813: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c81a: e8 dd 93 00 00 call 115bfc <__errno>
10c81f: c7 00 09 00 00 00 movl $0x9,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
10c825: b8 ff ff ff ff mov $0xffffffff,%eax
10c82a: 8b 5d fc mov -0x4(%ebp),%ebx
10c82d: c9 leave
10c82e: c3 ret
10c82f: 90 nop
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10c830: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10c837: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c83e: e8 b9 93 00 00 call 115bfc <__errno>
10c843: c7 00 16 00 00 00 movl $0x16,(%eax)
10c849: eb da jmp 10c825 <aio_write+0x6d>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10c84b: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10c852: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10c859: e8 9e 93 00 00 call 115bfc <__errno> <== NOT EXECUTED
10c85e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10c864: eb bf jmp 10c825 <aio_write+0x6d> <== NOT EXECUTED
001092f0 <cfsetospeed>:
int cfsetospeed(
struct termios *tp,
speed_t speed
)
{
1092f0: 55 push %ebp
1092f1: 89 e5 mov %esp,%ebp
1092f3: 83 ec 08 sub $0x8,%esp
1092f6: 8b 4d 08 mov 0x8(%ebp),%ecx
1092f9: 8b 55 0c mov 0xc(%ebp),%edx
if ( speed & ~CBAUD )
1092fc: f7 c2 f0 ef ff ff test $0xffffeff0,%edx
109302: 75 14 jne 109318 <cfsetospeed+0x28>
rtems_set_errno_and_return_minus_one( EINVAL );
tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
109304: 8b 41 08 mov 0x8(%ecx),%eax
109307: 25 f0 ef ff ff and $0xffffeff0,%eax
10930c: 09 d0 or %edx,%eax
10930e: 89 41 08 mov %eax,0x8(%ecx)
return 0;
109311: 31 c0 xor %eax,%eax
}
109313: c9 leave
109314: c3 ret
109315: 8d 76 00 lea 0x0(%esi),%esi
struct termios *tp,
speed_t speed
)
{
if ( speed & ~CBAUD )
rtems_set_errno_and_return_minus_one( EINVAL );
109318: e8 8f bb 00 00 call 114eac <__errno>
10931d: c7 00 16 00 00 00 movl $0x16,(%eax)
109323: b8 ff ff ff ff mov $0xffffffff,%eax
tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
return 0;
}
109328: c9 leave
109329: c3 ret
00110698 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
110698: 55 push %ebp
110699: 89 e5 mov %esp,%ebp
11069b: 57 push %edi
11069c: 56 push %esi
11069d: 83 ec 20 sub $0x20,%esp
1106a0: 8b 55 08 mov 0x8(%ebp),%edx
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
1106a3: 85 d2 test %edx,%edx
1106a5: 74 75 je 11071c <chdir+0x84>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
1106a7: 31 c0 xor %eax,%eax
1106a9: b9 ff ff ff ff mov $0xffffffff,%ecx
1106ae: 89 d7 mov %edx,%edi
1106b0: f2 ae repnz scas %es:(%edi),%al
1106b2: f7 d1 not %ecx
1106b4: 49 dec %ecx
1106b5: 83 ec 0c sub $0xc,%esp
1106b8: 6a 01 push $0x1
1106ba: 8d 75 e4 lea -0x1c(%ebp),%esi
1106bd: 56 push %esi
1106be: 6a 01 push $0x1
1106c0: 51 push %ecx
1106c1: 52 push %edx
1106c2: e8 31 7d ff ff call 1083f8 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
1106c7: 83 c4 20 add $0x20,%esp
1106ca: 85 c0 test %eax,%eax
1106cc: 74 0e je 1106dc <chdir+0x44>
return -1;
1106ce: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
1106d3: 8d 65 f8 lea -0x8(%ebp),%esp
1106d6: 5e pop %esi
1106d7: 5f pop %edi
1106d8: c9 leave
1106d9: c3 ret
1106da: 66 90 xchg %ax,%ax
return -1;
/*
* Verify you can change directory into this node.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
1106dc: 83 ec 0c sub $0xc,%esp
1106df: 56 push %esi
1106e0: 8b 45 f0 mov -0x10(%ebp),%eax
1106e3: ff 50 10 call *0x10(%eax)
1106e6: 83 c4 10 add $0x10,%esp
1106e9: 48 dec %eax
1106ea: 75 48 jne 110734 <chdir+0x9c>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
1106ec: 83 ec 0c sub $0xc,%esp
1106ef: a1 b0 5a 12 00 mov 0x125ab0,%eax
1106f4: 83 c0 04 add $0x4,%eax
1106f7: 50 push %eax
1106f8: e8 d3 7d ff ff call 1084d0 <rtems_filesystem_freenode>
rtems_filesystem_current = loc;
1106fd: 8b 3d b0 5a 12 00 mov 0x125ab0,%edi
110703: 83 c7 04 add $0x4,%edi
110706: b9 05 00 00 00 mov $0x5,%ecx
11070b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
11070d: 83 c4 10 add $0x10,%esp
110710: 31 c0 xor %eax,%eax
}
110712: 8d 65 f8 lea -0x8(%ebp),%esp
110715: 5e pop %esi
110716: 5f pop %edi
110717: c9 leave
110718: c3 ret
110719: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
11071c: e8 af 34 00 00 call 113bd0 <__errno>
110721: c7 00 0e 00 00 00 movl $0xe,(%eax)
110727: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
11072c: 8d 65 f8 lea -0x8(%ebp),%esp
11072f: 5e pop %esi
110730: 5f pop %edi
110731: c9 leave
110732: c3 ret
110733: 90 nop
/*
* Verify you can change directory into this node.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
110734: 83 ec 0c sub $0xc,%esp
110737: 56 push %esi
110738: e8 93 7d ff ff call 1084d0 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( ENOTDIR );
11073d: e8 8e 34 00 00 call 113bd0 <__errno>
110742: c7 00 14 00 00 00 movl $0x14,(%eax)
110748: 83 c4 10 add $0x10,%esp
11074b: b8 ff ff ff ff mov $0xffffffff,%eax
110750: eb 81 jmp 1106d3 <chdir+0x3b>
00108260 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
108260: 55 push %ebp
108261: 89 e5 mov %esp,%ebp
108263: 57 push %edi
108264: 56 push %esi
108265: 83 ec 20 sub $0x20,%esp
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) {
108268: 81 3d b0 5a 12 00 40 cmpl $0x127d40,0x125ab0
10826f: 7d 12 00
108272: 74 60 je 1082d4 <chroot+0x74>
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);
108274: 83 ec 0c sub $0xc,%esp
108277: ff 75 08 pushl 0x8(%ebp)
10827a: e8 19 84 00 00 call 110698 <chdir>
if (result) {
10827f: 83 c4 10 add $0x10,%esp
108282: 85 c0 test %eax,%eax
108284: 75 72 jne 1082f8 <chroot+0x98>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
108286: 83 ec 0c sub $0xc,%esp
108289: 6a 00 push $0x0
10828b: 8d 75 e4 lea -0x1c(%ebp),%esi
10828e: 56 push %esi
10828f: 6a 00 push $0x0
108291: 6a 01 push $0x1
108293: 68 b6 19 12 00 push $0x1219b6
108298: e8 5b 01 00 00 call 1083f8 <rtems_filesystem_evaluate_path>
10829d: 83 c4 20 add $0x20,%esp
1082a0: 85 c0 test %eax,%eax
1082a2: 75 54 jne 1082f8 <chroot+0x98> <== NEVER TAKEN
/* 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);
1082a4: 83 ec 0c sub $0xc,%esp
1082a7: a1 b0 5a 12 00 mov 0x125ab0,%eax
1082ac: 83 c0 18 add $0x18,%eax
1082af: 50 push %eax
1082b0: e8 1b 02 00 00 call 1084d0 <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
1082b5: 8b 3d b0 5a 12 00 mov 0x125ab0,%edi
1082bb: 83 c7 18 add $0x18,%edi
1082be: b9 05 00 00 00 mov $0x5,%ecx
1082c3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
1082c5: 83 c4 10 add $0x10,%esp
1082c8: 31 c0 xor %eax,%eax
}
1082ca: 8d 65 f8 lea -0x8(%ebp),%esp
1082cd: 5e pop %esi
1082ce: 5f pop %edi
1082cf: c9 leave
1082d0: c3 ret
1082d1: 8d 76 00 lea 0x0(%esi),%esi
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*/
1082d4: e8 a7 12 00 00 call 109580 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
1082d9: 81 3d b0 5a 12 00 40 cmpl $0x127d40,0x125ab0
1082e0: 7d 12 00
1082e3: 75 8f jne 108274 <chroot+0x14>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1082e5: e8 e6 b8 00 00 call 113bd0 <__errno>
1082ea: c7 00 86 00 00 00 movl $0x86,(%eax)
1082f0: 83 c8 ff or $0xffffffff,%eax
1082f3: eb d5 jmp 1082ca <chroot+0x6a>
1082f5: 8d 76 00 lea 0x0(%esi),%esi
}
/* 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 );
1082f8: e8 d3 b8 00 00 call 113bd0 <__errno>
1082fd: 89 c6 mov %eax,%esi
1082ff: e8 cc b8 00 00 call 113bd0 <__errno>
108304: 8b 00 mov (%eax),%eax
108306: 89 06 mov %eax,(%esi)
108308: b8 ff ff ff ff mov $0xffffffff,%eax
10830d: eb bb jmp 1082ca <chroot+0x6a>
0010b444 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
10b444: 55 push %ebp
10b445: 89 e5 mov %esp,%ebp
10b447: 83 ec 08 sub $0x8,%esp
10b44a: 8b 45 08 mov 0x8(%ebp),%eax
10b44d: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10b450: 85 d2 test %edx,%edx
10b452: 74 14 je 10b468 <clock_gettime+0x24>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10b454: 83 f8 01 cmp $0x1,%eax
10b457: 74 47 je 10b4a0 <clock_gettime+0x5c>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
10b459: 83 f8 04 cmp $0x4,%eax
10b45c: 74 32 je 10b490 <clock_gettime+0x4c> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
10b45e: 83 f8 02 cmp $0x2,%eax
10b461: 74 2d je 10b490 <clock_gettime+0x4c>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
10b463: 83 f8 03 cmp $0x3,%eax
10b466: 74 14 je 10b47c <clock_gettime+0x38>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10b468: e8 c3 8e 00 00 call 114330 <__errno>
10b46d: c7 00 16 00 00 00 movl $0x16,(%eax)
10b473: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10b478: c9 leave
10b479: c3 ret
10b47a: 66 90 xchg %ax,%ax
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
10b47c: e8 af 8e 00 00 call 114330 <__errno>
10b481: c7 00 58 00 00 00 movl $0x58,(%eax)
10b487: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b48c: c9 leave
10b48d: c3 ret
10b48e: 66 90 xchg %ax,%ax
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
10b490: 83 ec 0c sub $0xc,%esp
10b493: 52 push %edx
10b494: e8 ab 1e 00 00 call 10d344 <_TOD_Get_uptime_as_timespec>
return 0;
10b499: 83 c4 10 add $0x10,%esp
10b49c: 31 c0 xor %eax,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b49e: c9 leave
10b49f: c3 ret
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
10b4a0: 83 ec 0c sub $0xc,%esp
10b4a3: 52 push %edx
10b4a4: e8 3f 1e 00 00 call 10d2e8 <_TOD_Get>
return 0;
10b4a9: 83 c4 10 add $0x10,%esp
10b4ac: 31 c0 xor %eax,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b4ae: c9 leave
10b4af: c3 ret
0010b4b0 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
10b4b0: 55 push %ebp
10b4b1: 89 e5 mov %esp,%ebp
10b4b3: 83 ec 08 sub $0x8,%esp
10b4b6: 8b 45 08 mov 0x8(%ebp),%eax
10b4b9: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10b4bc: 85 d2 test %edx,%edx
10b4be: 74 0f je 10b4cf <clock_settime+0x1f> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10b4c0: 83 f8 01 cmp $0x1,%eax
10b4c3: 74 1f je 10b4e4 <clock_settime+0x34>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
10b4c5: 83 f8 02 cmp $0x2,%eax
10b4c8: 74 42 je 10b50c <clock_settime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
10b4ca: 83 f8 03 cmp $0x3,%eax
10b4cd: 74 3d je 10b50c <clock_settime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
10b4cf: e8 5c 8e 00 00 call 114330 <__errno>
10b4d4: c7 00 16 00 00 00 movl $0x16,(%eax)
10b4da: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10b4df: c9 leave
10b4e0: c3 ret
10b4e1: 8d 76 00 lea 0x0(%esi),%esi
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
10b4e4: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
10b4ea: 76 e3 jbe 10b4cf <clock_settime+0x1f>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b4ec: a1 70 95 12 00 mov 0x129570,%eax
10b4f1: 40 inc %eax
10b4f2: a3 70 95 12 00 mov %eax,0x129570
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
10b4f7: 83 ec 0c sub $0xc,%esp
10b4fa: 52 push %edx
10b4fb: e8 9c 1e 00 00 call 10d39c <_TOD_Set>
_Thread_Enable_dispatch();
10b500: e8 df 32 00 00 call 10e7e4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
10b505: 83 c4 10 add $0x10,%esp
10b508: 31 c0 xor %eax,%eax
}
10b50a: c9 leave
10b50b: c3 ret
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
10b50c: e8 1f 8e 00 00 call 114330 <__errno>
10b511: c7 00 58 00 00 00 movl $0x58,(%eax)
10b517: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b51c: c9 leave
10b51d: c3 ret
0010fc0c <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
10fc0c: 55 push %ebp
10fc0d: 89 e5 mov %esp,%ebp
10fc0f: 53 push %ebx
10fc10: 83 ec 14 sub $0x14,%esp
10fc13: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
10fc16: 3b 05 ac 31 12 00 cmp 0x1231ac,%eax
10fc1c: 73 46 jae 10fc64 <close+0x58>
iop = rtems_libio_iop(fd);
10fc1e: c1 e0 03 shl $0x3,%eax
10fc21: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
10fc28: 29 c3 sub %eax,%ebx
10fc2a: 03 1d e0 73 12 00 add 0x1273e0,%ebx
rtems_libio_check_is_open(iop);
10fc30: f6 43 15 01 testb $0x1,0x15(%ebx)
10fc34: 74 2e je 10fc64 <close+0x58>
rc = RTEMS_SUCCESSFUL;
rc = (*iop->pathinfo.handlers->close_h)( iop );
10fc36: 83 ec 0c sub $0xc,%esp
10fc39: 8b 43 20 mov 0x20(%ebx),%eax
10fc3c: 53 push %ebx
10fc3d: ff 50 04 call *0x4(%eax)
rtems_filesystem_freenode( &iop->pathinfo );
10fc40: 8d 53 18 lea 0x18(%ebx),%edx
10fc43: 89 14 24 mov %edx,(%esp)
10fc46: 89 45 f4 mov %eax,-0xc(%ebp)
10fc49: e8 52 84 ff ff call 1080a0 <rtems_filesystem_freenode>
rtems_libio_free( iop );
10fc4e: 89 1c 24 mov %ebx,(%esp)
10fc51: e8 26 02 00 00 call 10fe7c <rtems_libio_free>
return rc;
10fc56: 83 c4 10 add $0x10,%esp
10fc59: 8b 45 f4 mov -0xc(%ebp),%eax
}
10fc5c: 8b 5d fc mov -0x4(%ebp),%ebx
10fc5f: c9 leave
10fc60: c3 ret
10fc61: 8d 76 00 lea 0x0(%esi),%esi
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
10fc64: e8 cb 36 00 00 call 113334 <__errno>
10fc69: c7 00 09 00 00 00 movl $0x9,(%eax)
10fc6f: b8 ff ff ff ff mov $0xffffffff,%eax
10fc74: eb e6 jmp 10fc5c <close+0x50>
001081fc <ctermid>:
static char *ctermid_name = "/dev/console";
char *ctermid(
char *s
)
{
1081fc: 55 push %ebp
1081fd: 89 e5 mov %esp,%ebp
1081ff: 57 push %edi
108200: 56 push %esi
108201: 8b 45 08 mov 0x8(%ebp),%eax
if ( !s )
108204: 85 c0 test %eax,%eax
108206: 74 14 je 10821c <ctermid+0x20>
/*
* We have no way of knowing the length of the user provided buffer.
* It may not be large enough but there is no way to know that. :(
* So this is a potential buffer owerrun that we can do nothing about.
*/
strcpy( s, ctermid_name );
108208: be 4b d6 11 00 mov $0x11d64b,%esi
10820d: b9 0d 00 00 00 mov $0xd,%ecx
108212: 89 c7 mov %eax,%edi
108214: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
return s;
}
108216: 5e pop %esi
108217: 5f pop %edi
108218: c9 leave
108219: c3 ret
10821a: 66 90 xchg %ax,%ax
char *ctermid(
char *s
)
{
if ( !s )
return ctermid_name;
10821c: b8 4b d6 11 00 mov $0x11d64b,%eax
* It may not be large enough but there is no way to know that. :(
* So this is a potential buffer owerrun that we can do nothing about.
*/
strcpy( s, ctermid_name );
return s;
}
108221: 5e pop %esi
108222: 5f pop %edi
108223: c9 leave
108224: c3 ret
0010ee48 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
10ee48: 55 push %ebp
10ee49: 89 e5 mov %esp,%ebp
10ee4b: 57 push %edi
10ee4c: 56 push %esi
10ee4d: 53 push %ebx
10ee4e: 83 ec 1c sub $0x1c,%esp
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
10ee51: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp)
10ee58: 0f 85 96 00 00 00 jne 10eef4 <devFS_evaluate_path+0xac><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
10ee5e: 8b 45 14 mov 0x14(%ebp),%eax
10ee61: 8b 00 mov (%eax),%eax
10ee63: 89 45 e4 mov %eax,-0x1c(%ebp)
if (!device_name_table)
10ee66: 85 c0 test %eax,%eax
10ee68: 0f 84 98 00 00 00 je 10ef06 <devFS_evaluate_path+0xbe>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
10ee6e: 8b 15 b0 0c 12 00 mov 0x120cb0,%edx
10ee74: 89 55 e0 mov %edx,-0x20(%ebp)
10ee77: 85 d2 test %edx,%edx
10ee79: 74 38 je 10eeb3 <devFS_evaluate_path+0x6b><== NEVER TAKEN
10ee7b: 31 c0 xor %eax,%eax
10ee7d: 31 db xor %ebx,%ebx
if (!device_name_table[i].device_name)
10ee7f: 8d 04 80 lea (%eax,%eax,4),%eax
10ee82: 8b 55 e4 mov -0x1c(%ebp),%edx
10ee85: 8d 3c 82 lea (%edx,%eax,4),%edi
10ee88: 8b 37 mov (%edi),%esi
10ee8a: 85 f6 test %esi,%esi
10ee8c: 74 1d je 10eeab <devFS_evaluate_path+0x63>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
10ee8e: 50 push %eax
10ee8f: ff 75 0c pushl 0xc(%ebp)
10ee92: 56 push %esi
10ee93: ff 75 08 pushl 0x8(%ebp)
10ee96: e8 79 32 00 00 call 112114 <strncmp>
10ee9b: 83 c4 10 add $0x10,%esp
10ee9e: 85 c0 test %eax,%eax
10eea0: 75 09 jne 10eeab <devFS_evaluate_path+0x63>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
10eea2: 8b 45 0c mov 0xc(%ebp),%eax
10eea5: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1)
10eea9: 74 21 je 10eecc <devFS_evaluate_path+0x84><== ALWAYS TAKEN
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
10eeab: 43 inc %ebx
10eeac: 89 d8 mov %ebx,%eax
10eeae: 39 5d e0 cmp %ebx,-0x20(%ebp)
10eeb1: 77 cc ja 10ee7f <devFS_evaluate_path+0x37>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
10eeb3: e8 28 26 00 00 call 1114e0 <__errno>
10eeb8: c7 00 02 00 00 00 movl $0x2,(%eax)
10eebe: b8 ff ff ff ff mov $0xffffffff,%eax
}
10eec3: 8d 65 f4 lea -0xc(%ebp),%esp
10eec6: 5b pop %ebx
10eec7: 5e pop %esi
10eec8: 5f pop %edi
10eec9: c9 leave
10eeca: c3 ret
10eecb: 90 nop
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
10eecc: 8b 55 14 mov 0x14(%ebp),%edx
10eecf: 89 3a mov %edi,(%edx)
pathloc->handlers = &devFS_file_handlers;
10eed1: c7 42 08 00 2c 12 00 movl $0x122c00,0x8(%edx)
pathloc->ops = &devFS_ops;
10eed8: c7 42 0c a0 2b 12 00 movl $0x122ba0,0xc(%edx)
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
10eedf: a1 70 2d 12 00 mov 0x122d70,%eax
10eee4: 8b 40 28 mov 0x28(%eax),%eax
10eee7: 89 42 10 mov %eax,0x10(%edx)
return 0;
10eeea: 31 c0 xor %eax,%eax
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
10eeec: 8d 65 f4 lea -0xc(%ebp),%esp
10eeef: 5b pop %ebx
10eef0: 5e pop %esi
10eef1: 5f pop %edi
10eef2: c9 leave
10eef3: c3 ret
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
10eef4: e8 e7 25 00 00 call 1114e0 <__errno>
10eef9: c7 00 01 00 00 00 movl $0x1,(%eax)
10eeff: b8 ff ff ff ff mov $0xffffffff,%eax
10ef04: eb e6 jmp 10eeec <devFS_evaluate_path+0xa4>
/* 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 );
10ef06: e8 d5 25 00 00 call 1114e0 <__errno>
10ef0b: c7 00 0e 00 00 00 movl $0xe,(%eax)
10ef11: 83 c8 ff or $0xffffffff,%eax
10ef14: eb d6 jmp 10eeec <devFS_evaluate_path+0xa4>
00107ad0 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
107ad0: 55 push %ebp
107ad1: 89 e5 mov %esp,%ebp
107ad3: 83 ec 1c sub $0x1c,%esp
107ad6: 8b 55 08 mov 0x8(%ebp),%edx
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
107ad9: 8b 42 18 mov 0x18(%edx),%eax
args.iop = iop;
107adc: 89 55 e8 mov %edx,-0x18(%ebp)
args.command = command;
107adf: 8b 55 0c mov 0xc(%ebp),%edx
107ae2: 89 55 ec mov %edx,-0x14(%ebp)
args.buffer = buffer;
107ae5: 8b 55 10 mov 0x10(%ebp),%edx
107ae8: 89 55 f0 mov %edx,-0x10(%ebp)
status = rtems_io_control(
np->major,
np->minor,
(void *) &args
107aeb: 8d 55 e8 lea -0x18(%ebp),%edx
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
107aee: 52 push %edx
107aef: ff 70 0c pushl 0xc(%eax)
107af2: ff 70 08 pushl 0x8(%eax)
107af5: e8 22 40 00 00 call 10bb1c <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
107afa: 83 c4 10 add $0x10,%esp
107afd: 85 c0 test %eax,%eax
107aff: 75 07 jne 107b08 <devFS_ioctl+0x38>
return rtems_deviceio_errno(status);
return args.ioctl_return;
107b01: 8b 45 f4 mov -0xc(%ebp),%eax
}
107b04: c9 leave
107b05: c3 ret
107b06: 66 90 xchg %ax,%ax
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
107b08: 83 ec 0c sub $0xc,%esp
107b0b: 50 push %eax
107b0c: e8 17 74 00 00 call 10ef28 <rtems_deviceio_errno>
107b11: 83 c4 10 add $0x10,%esp
return args.ioctl_return;
}
107b14: c9 leave
107b15: c3 ret
00107914 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
107914: 55 push %ebp
107915: 89 e5 mov %esp,%ebp
107917: 57 push %edi
107918: 56 push %esi
107919: 53 push %ebx
10791a: 83 ec 1c sub $0x1c,%esp
10791d: 8b 7d 08 mov 0x8(%ebp),%edi
107920: 8b 4d 10 mov 0x10(%ebp),%ecx
107923: 8b 55 14 mov 0x14(%ebp),%edx
* 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') &&
107926: 80 3f 64 cmpb $0x64,(%edi)
107929: 0f 84 dd 00 00 00 je 107a0c <devFS_mknod+0xf8>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
10792f: 8b 45 0c mov 0xc(%ebp),%eax
107932: 25 00 f0 00 00 and $0xf000,%eax
107937: 3d 00 60 00 00 cmp $0x6000,%eax
10793c: 74 0b je 107949 <devFS_mknod+0x35>
10793e: 3d 00 20 00 00 cmp $0x2000,%eax
107943: 0f 85 e5 00 00 00 jne 107a2e <devFS_mknod+0x11a>
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
107949: 89 4d dc mov %ecx,-0x24(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
10794c: 89 55 d8 mov %edx,-0x28(%ebp)
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;
10794f: 8b 45 18 mov 0x18(%ebp),%eax
107952: 8b 30 mov (%eax),%esi
if (!device_name_table)
107954: 85 f6 test %esi,%esi
107956: 0f 84 f4 00 00 00 je 107a50 <devFS_mknod+0x13c>
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
10795c: 8b 15 b0 0c 12 00 mov 0x120cb0,%edx
107962: 85 d2 test %edx,%edx
107964: 0f 84 d6 00 00 00 je 107a40 <devFS_mknod+0x12c>
10796a: 31 c0 xor %eax,%eax
10796c: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
107973: 31 db xor %ebx,%ebx
107975: 89 7d e4 mov %edi,-0x1c(%ebp)
107978: 89 d7 mov %edx,%edi
10797a: eb 1a jmp 107996 <devFS_mknod+0x82>
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
10797c: 83 ec 08 sub $0x8,%esp
10797f: 50 push %eax
107980: ff 75 e4 pushl -0x1c(%ebp)
107983: e8 34 a7 00 00 call 1120bc <strcmp>
107988: 83 c4 10 add $0x10,%esp
10798b: 85 c0 test %eax,%eax
10798d: 74 65 je 1079f4 <devFS_mknod+0xe0>
/* 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++){
10798f: 43 inc %ebx
107990: 89 d8 mov %ebx,%eax
107992: 39 fb cmp %edi,%ebx
107994: 73 16 jae 1079ac <devFS_mknod+0x98>
if (device_name_table[i].device_name == NULL)
107996: 8d 04 80 lea (%eax,%eax,4),%eax
107999: 8b 04 86 mov (%esi,%eax,4),%eax
10799c: 85 c0 test %eax,%eax
10799e: 75 dc jne 10797c <devFS_mknod+0x68>
1079a0: 89 5d e0 mov %ebx,-0x20(%ebp)
/* 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++){
1079a3: 43 inc %ebx
1079a4: 89 d8 mov %ebx,%eax
1079a6: 39 fb cmp %edi,%ebx
1079a8: 72 ec jb 107996 <devFS_mknod+0x82>
1079aa: 66 90 xchg %ax,%ax
1079ac: 8b 7d e4 mov -0x1c(%ebp),%edi
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
1079af: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp)
1079b3: 0f 84 87 00 00 00 je 107a40 <devFS_mknod+0x12c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
1079b9: 9c pushf
1079ba: fa cli
1079bb: 5b pop %ebx
device_name_table[slot].device_name = (char *)path;
1079bc: 8b 55 e0 mov -0x20(%ebp),%edx
1079bf: 8d 04 92 lea (%edx,%edx,4),%eax
1079c2: 8d 14 86 lea (%esi,%eax,4),%edx
1079c5: 89 3a mov %edi,(%edx)
device_name_table[slot].device_name_length = strlen(path);
1079c7: 31 c0 xor %eax,%eax
1079c9: b9 ff ff ff ff mov $0xffffffff,%ecx
1079ce: f2 ae repnz scas %es:(%edi),%al
1079d0: f7 d1 not %ecx
1079d2: 49 dec %ecx
1079d3: 89 4a 04 mov %ecx,0x4(%edx)
device_name_table[slot].major = major;
1079d6: 8b 45 dc mov -0x24(%ebp),%eax
1079d9: 89 42 08 mov %eax,0x8(%edx)
device_name_table[slot].minor = minor;
1079dc: 8b 45 d8 mov -0x28(%ebp),%eax
1079df: 89 42 0c mov %eax,0xc(%edx)
device_name_table[slot].mode = mode;
1079e2: 8b 45 0c mov 0xc(%ebp),%eax
1079e5: 89 42 10 mov %eax,0x10(%edx)
_ISR_Enable(level);
1079e8: 53 push %ebx
1079e9: 9d popf
return 0;
1079ea: 31 c0 xor %eax,%eax
}
1079ec: 8d 65 f4 lea -0xc(%ebp),%esp
1079ef: 5b pop %ebx
1079f0: 5e pop %esi
1079f1: 5f pop %edi
1079f2: c9 leave
1079f3: c3 ret
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 );
1079f4: e8 e7 9a 00 00 call 1114e0 <__errno>
1079f9: c7 00 11 00 00 00 movl $0x11,(%eax)
1079ff: b8 ff ff ff ff mov $0xffffffff,%eax
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
107a04: 8d 65 f4 lea -0xc(%ebp),%esp
107a07: 5b pop %ebx
107a08: 5e pop %esi
107a09: 5f pop %edi
107a0a: c9 leave
107a0b: c3 ret
* 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') &&
107a0c: 80 7f 01 65 cmpb $0x65,0x1(%edi)
107a10: 0f 85 19 ff ff ff jne 10792f <devFS_mknod+0x1b> <== NEVER TAKEN
107a16: 80 7f 02 76 cmpb $0x76,0x2(%edi)
107a1a: 0f 85 0f ff ff ff jne 10792f <devFS_mknod+0x1b> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
107a20: 80 7f 03 00 cmpb $0x0,0x3(%edi)
107a24: 0f 85 05 ff ff ff jne 10792f <devFS_mknod+0x1b>
return 0;
107a2a: 31 c0 xor %eax,%eax
107a2c: eb be jmp 1079ec <devFS_mknod+0xd8>
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
107a2e: e8 ad 9a 00 00 call 1114e0 <__errno>
107a33: c7 00 16 00 00 00 movl $0x16,(%eax)
107a39: b8 ff ff ff ff mov $0xffffffff,%eax
107a3e: eb ac jmp 1079ec <devFS_mknod+0xd8>
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 );
107a40: e8 9b 9a 00 00 call 1114e0 <__errno>
107a45: c7 00 0c 00 00 00 movl $0xc,(%eax)
107a4b: 83 c8 ff or $0xffffffff,%eax
107a4e: eb 9c jmp 1079ec <devFS_mknod+0xd8>
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 );
107a50: e8 8b 9a 00 00 call 1114e0 <__errno>
107a55: c7 00 0e 00 00 00 movl $0xe,(%eax)
107a5b: 83 c8 ff or $0xffffffff,%eax
107a5e: eb 8c jmp 1079ec <devFS_mknod+0xd8>
00112728 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
112728: 55 push %ebp
112729: 89 e5 mov %esp,%ebp
11272b: 83 ec 1c sub $0x1c,%esp
11272e: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
112731: 89 45 e8 mov %eax,-0x18(%ebp)
args.command = command;
112734: 8b 55 0c mov 0xc(%ebp),%edx
112737: 89 55 ec mov %edx,-0x14(%ebp)
args.buffer = buffer;
11273a: 8b 55 10 mov 0x10(%ebp),%edx
11273d: 89 55 f0 mov %edx,-0x10(%ebp)
the_jnode = iop->pathinfo.node_access;
112740: 8b 40 18 mov 0x18(%eax),%eax
status = rtems_io_control(
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
112743: 8d 55 e8 lea -0x18(%ebp),%edx
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
112746: 52 push %edx
112747: ff 70 54 pushl 0x54(%eax)
11274a: ff 70 50 pushl 0x50(%eax)
11274d: e8 06 09 00 00 call 113058 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
112752: 83 c4 10 add $0x10,%esp
112755: 85 c0 test %eax,%eax
112757: 75 07 jne 112760 <device_ioctl+0x38>
return rtems_deviceio_errno(status);
return args.ioctl_return;
112759: 8b 45 f4 mov -0xc(%ebp),%eax
}
11275c: c9 leave
11275d: c3 ret
11275e: 66 90 xchg %ax,%ax
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
112760: 83 ec 0c sub $0xc,%esp
112763: 50 push %eax
112764: e8 3f 0b 00 00 call 1132a8 <rtems_deviceio_errno>
112769: 83 c4 10 add $0x10,%esp
return args.ioctl_return;
}
11276c: c9 leave
11276d: c3 ret
00108fa4 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
108fa4: 55 push %ebp
108fa5: 89 e5 mov %esp,%ebp
108fa7: 53 push %ebx
108fa8: 83 ec 04 sub $0x4,%esp
108fab: 89 c3 mov %eax,%ebx
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
108fad: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx
108fb3: 85 d2 test %edx,%edx
108fb5: 74 4d je 109004 <drainOutput+0x60>
rtems_interrupt_disable (level);
108fb7: 9c pushf
108fb8: fa cli
108fb9: 58 pop %eax
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
108fba: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
108fc0: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
108fc6: 39 d1 cmp %edx,%ecx
108fc8: 74 38 je 109002 <drainOutput+0x5e>
108fca: 66 90 xchg %ax,%ax
tty->rawOutBufState = rob_wait;
108fcc: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
108fd3: 00 00 00
rtems_interrupt_enable (level);
108fd6: 50 push %eax
108fd7: 9d popf
sc = rtems_semaphore_obtain(
108fd8: 50 push %eax
108fd9: 6a 00 push $0x0
108fdb: 6a 00 push $0x0
108fdd: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
108fe3: e8 c8 26 00 00 call 10b6b0 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
108fe8: 83 c4 10 add $0x10,%esp
108feb: 85 c0 test %eax,%eax
108fed: 75 1a jne 109009 <drainOutput+0x65> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
108fef: 9c pushf
108ff0: fa cli
108ff1: 58 pop %eax
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) {
108ff2: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
108ff8: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
108ffe: 39 d1 cmp %edx,%ecx
109000: 75 ca jne 108fcc <drainOutput+0x28> <== NEVER TAKEN
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
109002: 50 push %eax
109003: 9d popf
}
}
109004: 8b 5d fc mov -0x4(%ebp),%ebx
109007: c9 leave
109008: c3 ret
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
109009: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10900c: 50 push %eax <== NOT EXECUTED
10900d: e8 ee 2c 00 00 call 10bd00 <rtems_fatal_error_occurred><== NOT EXECUTED
00109d3c <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
109d3c: 55 push %ebp
109d3d: 89 e5 mov %esp,%ebp
109d3f: 53 push %ebx
109d40: 83 ec 24 sub $0x24,%esp
if ((tty->termios.c_lflag & ECHOCTL) &&
109d43: f6 42 3d 02 testb $0x2,0x3d(%edx)
109d47: 74 1b je 109d64 <echo+0x28> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
109d49: 0f b6 c8 movzbl %al,%ecx
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
109d4c: 8b 1d 94 52 12 00 mov 0x125294,%ebx
109d52: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1)
109d57: 74 0b je 109d64 <echo+0x28>
iscntrl(c) && (c != '\t') && (c != '\n')) {
109d59: 3c 09 cmp $0x9,%al
109d5b: 74 07 je 109d64 <echo+0x28>
109d5d: 3c 0a cmp $0xa,%al
109d5f: 75 13 jne 109d74 <echo+0x38>
109d61: 8d 76 00 lea 0x0(%esi),%esi
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
109d64: 0f b6 c0 movzbl %al,%eax
109d67: e8 94 fe ff ff call 109c00 <oproc>
}
}
109d6c: 8b 5d fc mov -0x4(%ebp),%ebx
109d6f: c9 leave
109d70: c3 ret
109d71: 8d 76 00 lea 0x0(%esi),%esi
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
109d74: c6 45 f6 5e movb $0x5e,-0xa(%ebp)
echobuf[1] = c ^ 0x40;
109d78: 83 f0 40 xor $0x40,%eax
109d7b: 88 45 f7 mov %al,-0x9(%ebp)
rtems_termios_puts (echobuf, 2, tty);
109d7e: 53 push %ebx
109d7f: 52 push %edx
109d80: 6a 02 push $0x2
109d82: 8d 45 f6 lea -0xa(%ebp),%eax
109d85: 50 push %eax
109d86: 89 55 e4 mov %edx,-0x1c(%ebp)
109d89: e8 3e fd ff ff call 109acc <rtems_termios_puts>
tty->column += 2;
109d8e: 8b 55 e4 mov -0x1c(%ebp),%edx
109d91: 83 42 28 02 addl $0x2,0x28(%edx)
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
109d95: 83 c4 10 add $0x10,%esp
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
}
}
109d98: 8b 5d fc mov -0x4(%ebp),%ebx
109d9b: c9 leave
109d9c: c3 ret
00108f54 <endgrent>:
void endgrent(void)
{
108f54: 55 push %ebp
108f55: 89 e5 mov %esp,%ebp
108f57: 83 ec 08 sub $0x8,%esp
if (group_fp != NULL)
108f5a: a1 c0 8a 12 00 mov 0x128ac0,%eax
108f5f: 85 c0 test %eax,%eax
108f61: 74 0c je 108f6f <endgrent+0x1b> <== NEVER TAKEN
fclose(group_fp);
108f63: 83 ec 0c sub $0xc,%esp
108f66: 50 push %eax
108f67: e8 70 b3 00 00 call 1142dc <fclose>
108f6c: 83 c4 10 add $0x10,%esp
}
108f6f: c9 leave
108f70: c3 ret
00108dfc <endpwent>:
void endpwent(void)
{
108dfc: 55 push %ebp
108dfd: 89 e5 mov %esp,%ebp
108dff: 83 ec 08 sub $0x8,%esp
if (passwd_fp != NULL)
108e02: a1 a8 8b 12 00 mov 0x128ba8,%eax
108e07: 85 c0 test %eax,%eax
108e09: 74 0c je 108e17 <endpwent+0x1b> <== NEVER TAKEN
fclose(passwd_fp);
108e0b: 83 ec 0c sub $0xc,%esp
108e0e: 50 push %eax
108e0f: e8 c8 b4 00 00 call 1142dc <fclose>
108e14: 83 c4 10 add $0x10,%esp
}
108e17: c9 leave
108e18: c3 ret
00109da0 <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)
{
109da0: 55 push %ebp
109da1: 89 e5 mov %esp,%ebp
109da3: 57 push %edi
109da4: 56 push %esi
109da5: 53 push %ebx
109da6: 83 ec 1c sub $0x1c,%esp
109da9: 89 c3 mov %eax,%ebx
109dab: 89 d7 mov %edx,%edi
if (tty->ccount == 0)
109dad: 8b 48 20 mov 0x20(%eax),%ecx
109db0: 85 c9 test %ecx,%ecx
109db2: 0f 84 84 00 00 00 je 109e3c <erase+0x9c>
return;
if (lineFlag) {
109db8: 85 d2 test %edx,%edx
109dba: 0f 85 84 00 00 00 jne 109e44 <erase+0xa4>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
109dc0: 8b 50 3c mov 0x3c(%eax),%edx
109dc3: 89 7d e4 mov %edi,-0x1c(%ebp)
109dc6: eb 1d jmp 109de5 <erase+0x45>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
109dc8: 80 e6 02 and $0x2,%dh <== NOT EXECUTED
109dcb: 0f 85 37 01 00 00 jne 109f08 <erase+0x168> <== NOT EXECUTED
109dd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
109dd4: 8b 75 e4 mov -0x1c(%ebp),%esi
109dd7: 85 f6 test %esi,%esi
109dd9: 74 61 je 109e3c <erase+0x9c> <== NEVER TAKEN
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
109ddb: 8b 4b 20 mov 0x20(%ebx),%ecx
109dde: 85 c9 test %ecx,%ecx
109de0: 74 5a je 109e3c <erase+0x9c>
}
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);
109de2: 8b 53 3c mov 0x3c(%ebx),%edx
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
109de5: 8b 7b 1c mov 0x1c(%ebx),%edi
109de8: 49 dec %ecx
109de9: 89 4b 20 mov %ecx,0x20(%ebx)
109dec: 8a 04 0f mov (%edi,%ecx,1),%al
if (tty->termios.c_lflag & ECHO) {
109def: f6 c2 08 test $0x8,%dl
109df2: 74 e0 je 109dd4 <erase+0x34> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
109df4: 8b 75 e4 mov -0x1c(%ebp),%esi
109df7: 85 f6 test %esi,%esi
109df9: 75 09 jne 109e04 <erase+0x64>
109dfb: f6 c2 10 test $0x10,%dl
109dfe: 0f 84 f0 00 00 00 je 109ef4 <erase+0x154> <== NEVER TAKEN
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
109e04: 3c 09 cmp $0x9,%al
109e06: 74 58 je 109e60 <erase+0xc0>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
109e08: 0f b6 c0 movzbl %al,%eax
109e0b: 8d 70 01 lea 0x1(%eax),%esi
109e0e: a1 94 52 12 00 mov 0x125294,%eax
109e13: f6 04 30 20 testb $0x20,(%eax,%esi,1)
109e17: 75 af jne 109dc8 <erase+0x28> <== NEVER TAKEN
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
109e19: 57 push %edi
109e1a: 53 push %ebx
109e1b: 6a 03 push $0x3
109e1d: 68 06 0c 12 00 push $0x120c06
109e22: e8 a5 fc ff ff call 109acc <rtems_termios_puts>
if (tty->column)
109e27: 8b 43 28 mov 0x28(%ebx),%eax
109e2a: 83 c4 10 add $0x10,%esp
109e2d: 85 c0 test %eax,%eax
109e2f: 74 a3 je 109dd4 <erase+0x34> <== NEVER TAKEN
tty->column--;
109e31: 48 dec %eax
109e32: 89 43 28 mov %eax,0x28(%ebx)
}
}
}
if (!lineFlag)
109e35: 8b 75 e4 mov -0x1c(%ebp),%esi
109e38: 85 f6 test %esi,%esi
109e3a: 75 9f jne 109ddb <erase+0x3b>
break;
}
}
109e3c: 8d 65 f4 lea -0xc(%ebp),%esp
109e3f: 5b pop %ebx
109e40: 5e pop %esi
109e41: 5f pop %edi
109e42: c9 leave
109e43: c3 ret
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
109e44: 8b 50 3c mov 0x3c(%eax),%edx
109e47: f6 c2 08 test $0x8,%dl
109e4a: 0f 84 94 00 00 00 je 109ee4 <erase+0x144> <== NEVER TAKEN
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
109e50: f6 c2 10 test $0x10,%dl
109e53: 0f 84 eb 00 00 00 je 109f44 <erase+0x1a4> <== NEVER TAKEN
109e59: 89 7d e4 mov %edi,-0x1c(%ebp)
109e5c: eb 87 jmp 109de5 <erase+0x45>
109e5e: 66 90 xchg %ax,%ax
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;
109e60: 8b 73 2c mov 0x2c(%ebx),%esi
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109e63: 85 c9 test %ecx,%ecx
109e65: 74 46 je 109ead <erase+0x10d>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
109e67: a1 94 52 12 00 mov 0x125294,%eax
109e6c: 89 45 dc mov %eax,-0x24(%ebp)
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
int col = tty->read_start_column;
int i = 0;
109e6f: 31 c0 xor %eax,%eax
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
109e71: 81 e2 00 02 00 00 and $0x200,%edx
109e77: 89 55 e0 mov %edx,-0x20(%ebp)
109e7a: 89 5d d8 mov %ebx,-0x28(%ebp)
109e7d: 8b 5d dc mov -0x24(%ebp),%ebx
109e80: eb 10 jmp 109e92 <erase+0xf2>
109e82: 66 90 xchg %ax,%ax
109e84: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
109e87: 85 d2 test %edx,%edx <== NOT EXECUTED
109e89: 74 03 je 109e8e <erase+0xee> <== NOT EXECUTED
col += 2;
109e8b: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109e8e: 39 c1 cmp %eax,%ecx
109e90: 74 18 je 109eaa <erase+0x10a> <== NEVER TAKEN
c = tty->cbuf[i++];
109e92: 8a 14 07 mov (%edi,%eax,1),%dl
109e95: 40 inc %eax
if (c == '\t') {
109e96: 80 fa 09 cmp $0x9,%dl
109e99: 74 41 je 109edc <erase+0x13c>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
109e9b: 0f b6 d2 movzbl %dl,%edx
109e9e: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1)
109ea3: 75 df jne 109e84 <erase+0xe4> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
} else {
col++;
109ea5: 46 inc %esi
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109ea6: 39 c1 cmp %eax,%ecx
109ea8: 75 e8 jne 109e92 <erase+0xf2>
109eaa: 8b 5d d8 mov -0x28(%ebp),%ebx
}
/*
* Back up over the tab
*/
while (tty->column > col) {
109ead: 3b 73 28 cmp 0x28(%ebx),%esi
109eb0: 0f 8d 1e ff ff ff jge 109dd4 <erase+0x34> <== NEVER TAKEN
109eb6: 66 90 xchg %ax,%ax
rtems_termios_puts ("\b", 1, tty);
109eb8: 52 push %edx
109eb9: 53 push %ebx
109eba: 6a 01 push $0x1
109ebc: 68 08 0c 12 00 push $0x120c08
109ec1: e8 06 fc ff ff call 109acc <rtems_termios_puts>
tty->column--;
109ec6: 8b 43 28 mov 0x28(%ebx),%eax
109ec9: 48 dec %eax
109eca: 89 43 28 mov %eax,0x28(%ebx)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
109ecd: 83 c4 10 add $0x10,%esp
109ed0: 39 f0 cmp %esi,%eax
109ed2: 7f e4 jg 109eb8 <erase+0x118>
109ed4: e9 fb fe ff ff jmp 109dd4 <erase+0x34>
109ed9: 8d 76 00 lea 0x0(%esi),%esi
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
109edc: 83 ce 07 or $0x7,%esi
109edf: 46 inc %esi
109ee0: eb ac jmp 109e8e <erase+0xee>
109ee2: 66 90 xchg %ax,%ax
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
109ee4: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
109eeb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109eee: 5b pop %ebx <== NOT EXECUTED
109eef: 5e pop %esi <== NOT EXECUTED
109ef0: 5f pop %edi <== NOT EXECUTED
109ef1: c9 leave <== NOT EXECUTED
109ef2: c3 ret <== NOT EXECUTED
109ef3: 90 nop <== 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);
109ef4: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED
109ef8: 89 da mov %ebx,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
109efa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109efd: 5b pop %ebx <== NOT EXECUTED
109efe: 5e pop %esi <== NOT EXECUTED
109eff: 5f pop %edi <== NOT EXECUTED
109f00: c9 leave <== 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);
109f01: e9 36 fe ff ff jmp 109d3c <echo> <== NOT EXECUTED
109f06: 66 90 xchg %ax,%ax <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
109f08: 50 push %eax <== NOT EXECUTED
109f09: 53 push %ebx <== NOT EXECUTED
109f0a: 6a 03 push $0x3 <== NOT EXECUTED
109f0c: 68 06 0c 12 00 push $0x120c06 <== NOT EXECUTED
109f11: e8 b6 fb ff ff call 109acc <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
109f16: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
109f19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109f1c: 85 c0 test %eax,%eax <== NOT EXECUTED
109f1e: 74 04 je 109f24 <erase+0x184> <== NOT EXECUTED
tty->column--;
109f20: 48 dec %eax <== NOT EXECUTED
109f21: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
109f24: a1 94 52 12 00 mov 0x125294,%eax <== NOT EXECUTED
109f29: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED
109f2d: 0f 84 e6 fe ff ff je 109e19 <erase+0x79> <== NOT EXECUTED
109f33: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED
109f37: 0f 85 dc fe ff ff jne 109e19 <erase+0x79> <== NOT EXECUTED
109f3d: e9 92 fe ff ff jmp 109dd4 <erase+0x34> <== NOT EXECUTED
109f42: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
109f44: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
109f4b: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED
109f4f: 89 da mov %ebx,%edx <== NOT EXECUTED
109f51: e8 e6 fd ff ff call 109d3c <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
109f56: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED
109f5a: 0f 84 dc fe ff ff je 109e3c <erase+0x9c> <== NOT EXECUTED
echo ('\n', tty);
109f60: 89 da mov %ebx,%edx <== NOT EXECUTED
109f62: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
109f67: eb 91 jmp 109efa <erase+0x15a> <== NOT EXECUTED
00108b30 <fchdir>:
#include <rtems/seterr.h>
int fchdir(
int fd
)
{
108b30: 55 push %ebp
108b31: 89 e5 mov %esp,%ebp
108b33: 57 push %edi
108b34: 56 push %esi
108b35: 53 push %ebx
108b36: 83 ec 4c sub $0x4c,%esp
108b39: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
108b3c: 3b 05 ec 45 12 00 cmp 0x1245ec,%eax
108b42: 0f 83 d0 00 00 00 jae 108c18 <fchdir+0xe8>
iop = rtems_libio_iop( fd );
108b48: c1 e0 03 shl $0x3,%eax
108b4b: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
108b52: 29 c3 sub %eax,%ebx
108b54: 03 1d 20 88 12 00 add 0x128820,%ebx
rtems_libio_check_is_open(iop);
108b5a: 8b 43 14 mov 0x14(%ebx),%eax
108b5d: f6 c4 01 test $0x1,%ah
108b60: 0f 84 b2 00 00 00 je 108c18 <fchdir+0xe8>
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
108b66: a8 02 test $0x2,%al
108b68: 0f 84 be 00 00 00 je 108c2c <fchdir+0xfc>
/*
* Verify you can change directory into this node.
*/
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
108b6e: 83 ec 0c sub $0xc,%esp
108b71: 8b 43 24 mov 0x24(%ebx),%eax
108b74: 83 c3 18 add $0x18,%ebx
108b77: 53 push %ebx
108b78: ff 50 10 call *0x10(%eax)
108b7b: 83 c4 10 add $0x10,%esp
108b7e: 48 dec %eax
108b7f: 75 67 jne 108be8 <fchdir+0xb8>
* but note the race condition. Threads who
* share their rtems_filesystem_current better
* be synchronized!
*/
saved = rtems_filesystem_current;
108b81: a1 f0 65 12 00 mov 0x1265f0,%eax
108b86: 8d 55 c0 lea -0x40(%ebp),%edx
108b89: 89 55 b4 mov %edx,-0x4c(%ebp)
108b8c: 8d 70 04 lea 0x4(%eax),%esi
108b8f: b9 05 00 00 00 mov $0x5,%ecx
108b94: 89 d7 mov %edx,%edi
108b96: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_current = iop->pathinfo;
108b98: 8d 78 04 lea 0x4(%eax),%edi
108b9b: b1 05 mov $0x5,%cl
108b9d: 89 de mov %ebx,%esi
108b9f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
108ba1: 83 ec 0c sub $0xc,%esp
108ba4: 6a 00 push $0x0
108ba6: 8d 75 d4 lea -0x2c(%ebp),%esi
108ba9: 56 push %esi
108baa: 6a 00 push $0x0
108bac: 6a 01 push $0x1
108bae: 68 d6 24 12 00 push $0x1224d6
108bb3: e8 a0 fe ff ff call 108a58 <rtems_filesystem_evaluate_path>
108bb8: 83 c4 20 add $0x20,%esp
108bbb: 85 c0 test %eax,%eax
108bbd: 75 3d jne 108bfc <fchdir+0xcc>
/* cloning failed; restore original and bail out */
rtems_filesystem_current = saved;
return -1;
}
/* release the old one */
rtems_filesystem_freenode( &saved );
108bbf: 83 ec 0c sub $0xc,%esp
108bc2: 8d 45 c0 lea -0x40(%ebp),%eax
108bc5: 50 push %eax
108bc6: e8 61 01 00 00 call 108d2c <rtems_filesystem_freenode>
rtems_filesystem_current = loc;
108bcb: 8b 3d f0 65 12 00 mov 0x1265f0,%edi
108bd1: 83 c7 04 add $0x4,%edi
108bd4: b9 05 00 00 00 mov $0x5,%ecx
108bd9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
108bdb: 83 c4 10 add $0x10,%esp
108bde: 31 c0 xor %eax,%eax
}
108be0: 8d 65 f4 lea -0xc(%ebp),%esp
108be3: 5b pop %ebx
108be4: 5e pop %esi
108be5: 5f pop %edi
108be6: c9 leave
108be7: c3 ret
* Verify you can change directory into this node.
*/
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_set_errno_and_return_minus_one( ENOTDIR );
108be8: e8 07 b6 00 00 call 1141f4 <__errno>
108bed: c7 00 14 00 00 00 movl $0x14,(%eax)
108bf3: b8 ff ff ff ff mov $0xffffffff,%eax
108bf8: eb e6 jmp 108be0 <fchdir+0xb0>
108bfa: 66 90 xchg %ax,%ax
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;
108bfc: 8b 3d f0 65 12 00 mov 0x1265f0,%edi
108c02: 83 c7 04 add $0x4,%edi
108c05: b9 05 00 00 00 mov $0x5,%ecx
108c0a: 8b 75 b4 mov -0x4c(%ebp),%esi
108c0d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return -1;
108c0f: b8 ff ff ff ff mov $0xffffffff,%eax
108c14: eb ca jmp 108be0 <fchdir+0xb0>
108c16: 66 90 xchg %ax,%ax
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);
108c18: e8 d7 b5 00 00 call 1141f4 <__errno>
108c1d: c7 00 09 00 00 00 movl $0x9,(%eax)
108c23: b8 ff ff ff ff mov $0xffffffff,%eax
108c28: eb b6 jmp 108be0 <fchdir+0xb0>
108c2a: 66 90 xchg %ax,%ax
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
108c2c: e8 c3 b5 00 00 call 1141f4 <__errno>
108c31: c7 00 16 00 00 00 movl $0x16,(%eax)
108c37: b8 ff ff ff ff mov $0xffffffff,%eax
108c3c: eb a2 jmp 108be0 <fchdir+0xb0>
00108c40 <fchmod>:
int fchmod(
int fd,
mode_t mode
)
{
108c40: 55 push %ebp
108c41: 89 e5 mov %esp,%ebp
108c43: 83 ec 08 sub $0x8,%esp
108c46: 8b 45 08 mov 0x8(%ebp),%eax
108c49: 8b 4d 0c mov 0xc(%ebp),%ecx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108c4c: 3b 05 ec 45 12 00 cmp 0x1245ec,%eax
108c52: 73 38 jae 108c8c <fchmod+0x4c>
iop = rtems_libio_iop( fd );
108c54: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
108c5b: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax
108c62: 29 d0 sub %edx,%eax
108c64: 03 05 20 88 12 00 add 0x128820,%eax
rtems_libio_check_is_open(iop);
108c6a: 8b 50 14 mov 0x14(%eax),%edx
108c6d: f6 c6 01 test $0x1,%dh
108c70: 74 1a je 108c8c <fchmod+0x4c>
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108c72: 83 e2 04 and $0x4,%edx
108c75: 74 29 je 108ca0 <fchmod+0x60>
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
108c77: 8b 50 20 mov 0x20(%eax),%edx
108c7a: 89 4d 0c mov %ecx,0xc(%ebp)
108c7d: 83 c0 18 add $0x18,%eax
108c80: 89 45 08 mov %eax,0x8(%ebp)
108c83: 8b 42 1c mov 0x1c(%edx),%eax
}
108c86: c9 leave
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
108c87: ff e0 jmp *%eax
108c89: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108c8c: e8 63 b5 00 00 call 1141f4 <__errno>
108c91: c7 00 09 00 00 00 movl $0x9,(%eax)
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
}
108c97: b8 ff ff ff ff mov $0xffffffff,%eax
108c9c: c9 leave
108c9d: c3 ret
108c9e: 66 90 xchg %ax,%ax
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108ca0: e8 4f b5 00 00 call 1141f4 <__errno>
108ca5: c7 00 16 00 00 00 movl $0x16,(%eax)
108cab: eb ea jmp 108c97 <fchmod+0x57>
00108ae0 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
108ae0: 55 push %ebp
108ae1: 89 e5 mov %esp,%ebp
108ae3: 57 push %edi
108ae4: 56 push %esi
108ae5: 53 push %ebx
108ae6: 83 ec 1c sub $0x1c,%esp
108ae9: 8b 5d 08 mov 0x8(%ebp),%ebx
108aec: 8b 55 0c mov 0xc(%ebp),%edx
int ret;
va_list ap;
va_start( ap, cmd );
108aef: 8d 7d 10 lea 0x10(%ebp),%edi
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
108af2: 8b 0d ec 4d 12 00 mov 0x124dec,%ecx
108af8: 39 cb cmp %ecx,%ebx
108afa: 0f 83 5c 01 00 00 jae 108c5c <fcntl+0x17c>
iop = rtems_libio_iop( fd );
108b00: a1 20 90 12 00 mov 0x129020,%eax
108b05: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
108b0c: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx
108b13: 29 f3 sub %esi,%ebx
108b15: 8d 1c 18 lea (%eax,%ebx,1),%ebx
rtems_libio_check_is_open(iop);
108b18: 8b 73 14 mov 0x14(%ebx),%esi
108b1b: f7 c6 00 01 00 00 test $0x100,%esi
108b21: 0f 84 35 01 00 00 je 108c5c <fcntl+0x17c>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
108b27: 83 fa 09 cmp $0x9,%edx
108b2a: 76 10 jbe 108b3c <fcntl+0x5c>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
108b2c: e8 73 b9 00 00 call 1144a4 <__errno>
108b31: c7 00 16 00 00 00 movl $0x16,(%eax)
108b37: eb 16 jmp 108b4f <fcntl+0x6f>
108b39: 8d 76 00 lea 0x0(%esi),%esi
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
108b3c: ff 24 95 f0 26 12 00 jmp *0x1226f0(,%edx,4)
108b43: 90 nop
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
108b44: e8 5b b9 00 00 call 1144a4 <__errno>
108b49: c7 00 86 00 00 00 movl $0x86,(%eax)
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
ret = -1;
108b4f: be ff ff ff ff mov $0xffffffff,%esi
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
108b54: 89 f0 mov %esi,%eax
108b56: 8d 65 f4 lea -0xc(%ebp),%esp
108b59: 5b pop %ebx
108b5a: 5e pop %esi
108b5b: 5f pop %edi
108b5c: c9 leave
108b5d: c3 ret
108b5e: 66 90 xchg %ax,%ax
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 ) );
108b60: 83 ec 0c sub $0xc,%esp
108b63: ff 37 pushl (%edi)
108b65: 89 55 e0 mov %edx,-0x20(%ebp)
108b68: e8 33 05 00 00 call 1090a0 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
108b6d: 25 01 02 00 00 and $0x201,%eax
108b72: 8b 4b 14 mov 0x14(%ebx),%ecx
108b75: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx
108b7b: 09 c8 or %ecx,%eax
108b7d: 89 43 14 mov %eax,0x14(%ebx)
108b80: 83 c4 10 add $0x10,%esp
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
108b83: 31 f6 xor %esi,%esi
108b85: 8b 55 e0 mov -0x20(%ebp),%edx
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
108b88: 83 ec 08 sub $0x8,%esp
108b8b: 8b 43 20 mov 0x20(%ebx),%eax
108b8e: 53 push %ebx
108b8f: 52 push %edx
108b90: ff 50 30 call *0x30(%eax)
108b93: 89 c3 mov %eax,%ebx
if (err) {
108b95: 83 c4 10 add $0x10,%esp
108b98: 85 c0 test %eax,%eax
108b9a: 74 b8 je 108b54 <fcntl+0x74> <== ALWAYS TAKEN
errno = err;
108b9c: e8 03 b9 00 00 call 1144a4 <__errno> <== NOT EXECUTED
108ba1: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
108ba3: eb aa jmp 108b4f <fcntl+0x6f> <== NOT EXECUTED
108ba5: 8d 76 00 lea 0x0(%esi),%esi <== 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 );
108ba8: 83 ec 0c sub $0xc,%esp
108bab: 56 push %esi
108bac: 89 55 e0 mov %edx,-0x20(%ebp)
108baf: e8 24 05 00 00 call 1090d8 <rtems_libio_to_fcntl_flags>
108bb4: 89 c6 mov %eax,%esi
108bb6: 83 c4 10 add $0x10,%esp
108bb9: 8b 55 e0 mov -0x20(%ebp),%edx
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
108bbc: 85 f6 test %esi,%esi
108bbe: 79 c8 jns 108b88 <fcntl+0xa8> <== ALWAYS TAKEN
108bc0: eb 92 jmp 108b54 <fcntl+0x74> <== NOT EXECUTED
108bc2: 66 90 xchg %ax,%ax <== 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 ) )
108bc4: 8b 07 mov (%edi),%eax
108bc6: 85 c0 test %eax,%eax
108bc8: 74 6a je 108c34 <fcntl+0x154>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
108bca: 81 ce 00 08 00 00 or $0x800,%esi
108bd0: 89 73 14 mov %esi,0x14(%ebx)
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
108bd3: 31 f6 xor %esi,%esi
108bd5: eb b1 jmp 108b88 <fcntl+0xa8>
108bd7: 90 nop
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);
108bd8: 31 c0 xor %eax,%eax
108bda: f7 c6 00 08 00 00 test $0x800,%esi
108be0: 0f 95 c0 setne %al
108be3: 89 c6 mov %eax,%esi
108be5: eb a1 jmp 108b88 <fcntl+0xa8>
108be7: 90 nop
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
108be8: 8b 3f mov (%edi),%edi
if ( fd2 )
108bea: 85 ff test %edi,%edi
108bec: 0f 84 82 00 00 00 je 108c74 <fcntl+0x194>
diop = rtems_libio_iop( fd2 );
108bf2: 39 f9 cmp %edi,%ecx
108bf4: 77 4e ja 108c44 <fcntl+0x164> <== ALWAYS TAKEN
108bf6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
108bfd: 31 ff xor %edi,%edi <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
108bff: 89 77 14 mov %esi,0x14(%edi)
diop->pathinfo = iop->pathinfo;
108c02: 83 c7 18 add $0x18,%edi
108c05: 8d 73 18 lea 0x18(%ebx),%esi
108c08: b9 05 00 00 00 mov $0x5,%ecx
108c0d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ret = (int) (diop - rtems_libio_iops);
108c0f: 8b 4d e4 mov -0x1c(%ebp),%ecx
108c12: 29 c1 sub %eax,%ecx
108c14: 89 c8 mov %ecx,%eax
108c16: c1 f8 03 sar $0x3,%eax
108c19: 8d 0c c0 lea (%eax,%eax,8),%ecx
108c1c: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108c1f: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108c22: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108c25: 89 ce mov %ecx,%esi
108c27: c1 e6 0f shl $0xf,%esi
108c2a: 01 f1 add %esi,%ecx
108c2c: 8d 34 c8 lea (%eax,%ecx,8),%esi
108c2f: f7 de neg %esi
108c31: eb 89 jmp 108bbc <fcntl+0xdc>
108c33: 90 nop
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
108c34: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi
108c3a: 89 73 14 mov %esi,0x14(%ebx)
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
108c3d: 31 f6 xor %esi,%esi
108c3f: e9 44 ff ff ff jmp 108b88 <fcntl+0xa8>
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
108c44: 8d 0c fd 00 00 00 00 lea 0x0(,%edi,8),%ecx
108c4b: 8d 3c cd 00 00 00 00 lea 0x0(,%ecx,8),%edi
108c52: 29 cf sub %ecx,%edi
108c54: 8d 3c 38 lea (%eax,%edi,1),%edi
108c57: 89 7d e4 mov %edi,-0x1c(%ebp)
108c5a: eb a3 jmp 108bff <fcntl+0x11f>
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108c5c: e8 43 b8 00 00 call 1144a4 <__errno>
108c61: c7 00 09 00 00 00 movl $0x9,(%eax)
108c67: be ff ff ff ff mov $0xffffffff,%esi
108c6c: e9 e3 fe ff ff jmp 108b54 <fcntl+0x74>
108c71: 8d 76 00 lea 0x0(%esi),%esi
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
108c74: 89 55 e0 mov %edx,-0x20(%ebp)
108c77: e8 a0 04 00 00 call 10911c <rtems_libio_allocate>
108c7c: 89 c7 mov %eax,%edi
if ( diop == 0 ) {
108c7e: 85 c0 test %eax,%eax
108c80: 8b 55 e0 mov -0x20(%ebp),%edx
108c83: 0f 84 c6 fe ff ff je 108b4f <fcntl+0x6f> <== NEVER TAKEN
108c89: 8b 73 14 mov 0x14(%ebx),%esi
108c8c: 89 45 e4 mov %eax,-0x1c(%ebp)
108c8f: a1 20 90 12 00 mov 0x129020,%eax
108c94: e9 66 ff ff ff jmp 108bff <fcntl+0x11f>
00108cbc <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
108cbc: 55 push %ebp
108cbd: 89 e5 mov %esp,%ebp
108cbf: 83 ec 08 sub $0x8,%esp
108cc2: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108cc5: 3b 05 ec 4d 12 00 cmp 0x124dec,%eax
108ccb: 73 2f jae 108cfc <fdatasync+0x40>
iop = rtems_libio_iop( fd );
108ccd: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
108cd4: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax
108cdb: 29 d0 sub %edx,%eax
108cdd: 03 05 20 90 12 00 add 0x129020,%eax
rtems_libio_check_is_open(iop);
108ce3: 8b 50 14 mov 0x14(%eax),%edx
108ce6: f6 c6 01 test $0x1,%dh
108ce9: 74 11 je 108cfc <fdatasync+0x40>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108ceb: 83 e2 04 and $0x4,%edx
108cee: 74 20 je 108d10 <fdatasync+0x54>
/*
* Now process the fdatasync().
*/
return (*iop->pathinfo.handlers->fdatasync_h)( iop );
108cf0: 8b 50 20 mov 0x20(%eax),%edx
108cf3: 89 45 08 mov %eax,0x8(%ebp)
108cf6: 8b 42 2c mov 0x2c(%edx),%eax
}
108cf9: c9 leave
/*
* Now process the fdatasync().
*/
return (*iop->pathinfo.handlers->fdatasync_h)( iop );
108cfa: ff e0 jmp *%eax
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108cfc: e8 a3 b7 00 00 call 1144a4 <__errno>
108d01: c7 00 09 00 00 00 movl $0x9,(%eax)
/*
* Now process the fdatasync().
*/
return (*iop->pathinfo.handlers->fdatasync_h)( iop );
}
108d07: b8 ff ff ff ff mov $0xffffffff,%eax
108d0c: c9 leave
108d0d: c3 ret
108d0e: 66 90 xchg %ax,%ax
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 );
108d10: e8 8f b7 00 00 call 1144a4 <__errno>
108d15: c7 00 16 00 00 00 movl $0x16,(%eax)
108d1b: eb ea jmp 108d07 <fdatasync+0x4b>
00111a5c <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
111a5c: 55 push %ebp
111a5d: 89 e5 mov %esp,%ebp
111a5f: 57 push %edi
111a60: 56 push %esi
111a61: 53 push %ebx
111a62: 83 ec 2c sub $0x2c,%esp
111a65: 8b 75 08 mov 0x8(%ebp),%esi
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
111a68: a1 ec 9b 12 00 mov 0x129bec,%eax
111a6d: 85 c0 test %eax,%eax
111a6f: 0f 84 8b 00 00 00 je 111b00 <fifo_open+0xa4>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
111a75: 53 push %ebx
111a76: 6a 00 push $0x0
111a78: 6a 00 push $0x0
111a7a: 50 push %eax
111a7b: e8 34 ba ff ff call 10d4b4 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
111a80: 83 c4 10 add $0x10,%esp
111a83: 85 c0 test %eax,%eax
111a85: 0f 85 4c 03 00 00 jne 111dd7 <fifo_open+0x37b> <== NEVER TAKEN
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
111a8b: 8b 1e mov (%esi),%ebx
if (pipe == NULL) {
111a8d: 85 db test %ebx,%ebx
111a8f: 0f 84 df 01 00 00 je 111c74 <fifo_open+0x218>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
111a95: 52 push %edx
111a96: 6a 00 push $0x0
111a98: 6a 00 push $0x0
111a9a: ff 73 28 pushl 0x28(%ebx)
111a9d: e8 12 ba ff ff call 10d4b4 <rtems_semaphore_obtain>
111aa2: 83 c4 10 add $0x10,%esp
111aa5: 83 f8 01 cmp $0x1,%eax
111aa8: 19 ff sbb %edi,%edi
111aaa: f7 d7 not %edi
111aac: 83 e7 fc and $0xfffffffc,%edi
err = -EINTR;
if (*pipep == NULL) {
111aaf: 8b 06 mov (%esi),%eax
111ab1: 85 c0 test %eax,%eax
111ab3: 0f 84 d7 02 00 00 je 111d90 <fifo_open+0x334>
else
*pipep = pipe;
}
out:
pipe_unlock();
111ab9: e8 aa fe ff ff call 111968 <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
111abe: 85 ff test %edi,%edi
111ac0: 75 32 jne 111af4 <fifo_open+0x98> <== NEVER TAKEN
return err;
pipe = *pipep;
111ac2: 8b 1e mov (%esi),%ebx
switch (LIBIO_ACCMODE(iop)) {
111ac4: 8b 55 0c mov 0xc(%ebp),%edx
111ac7: 8b 42 14 mov 0x14(%edx),%eax
111aca: 83 e0 06 and $0x6,%eax
111acd: 83 f8 04 cmp $0x4,%eax
111ad0: 74 6a je 111b3c <fifo_open+0xe0>
111ad2: 83 f8 06 cmp $0x6,%eax
111ad5: 0f 84 59 01 00 00 je 111c34 <fifo_open+0x1d8>
111adb: 83 f8 02 cmp $0x2,%eax
111ade: 0f 84 dc 00 00 00 je 111bc0 <fifo_open+0x164> <== ALWAYS TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
111ae4: 83 ec 0c sub $0xc,%esp
111ae7: ff 73 28 pushl 0x28(%ebx)
111aea: e8 c1 ba ff ff call 10d5b0 <rtems_semaphore_release>
return 0;
111aef: 83 c4 10 add $0x10,%esp
111af2: 31 ff xor %edi,%edi
out_error:
pipe_release(pipep, iop);
return err;
}
111af4: 89 f8 mov %edi,%eax
111af6: 8d 65 f4 lea -0xc(%ebp),%esp
111af9: 5b pop %ebx
111afa: 5e pop %esi
111afb: 5f pop %edi
111afc: c9 leave
111afd: c3 ret
111afe: 66 90 xchg %ax,%ax
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 );
111b00: 50 push %eax
111b01: 6a 00 push $0x0
111b03: 6a 00 push $0x0
111b05: ff 35 08 9e 12 00 pushl 0x129e08
111b0b: e8 a4 b9 ff ff call 10d4b4 <rtems_semaphore_obtain>
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
111b10: 83 c4 10 add $0x10,%esp
111b13: 8b 3d ec 9b 12 00 mov 0x129bec,%edi
111b19: 85 ff test %edi,%edi
111b1b: 0f 84 83 02 00 00 je 111da4 <fifo_open+0x348> <== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
111b21: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111b24: ff 35 08 9e 12 00 pushl 0x129e08 <== NOT EXECUTED
111b2a: e8 81 ba ff ff call 10d5b0 <rtems_semaphore_release><== NOT EXECUTED
111b2f: a1 ec 9b 12 00 mov 0x129bec,%eax <== NOT EXECUTED
111b34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111b37: e9 39 ff ff ff jmp 111a75 <fifo_open+0x19> <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
111b3c: ff 43 24 incl 0x24(%ebx)
if (pipe->Writers ++ == 0)
111b3f: 8b 43 14 mov 0x14(%ebx),%eax
111b42: 8d 50 01 lea 0x1(%eax),%edx
111b45: 89 53 14 mov %edx,0x14(%ebx)
111b48: 85 c0 test %eax,%eax
111b4a: 0f 84 c4 02 00 00 je 111e14 <fifo_open+0x3b8> <== ALWAYS TAKEN
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
111b50: 8b 4b 10 mov 0x10(%ebx),%ecx
111b53: 85 c9 test %ecx,%ecx
111b55: 75 8d jne 111ae4 <fifo_open+0x88>
111b57: 8b 55 0c mov 0xc(%ebp),%edx
111b5a: f6 42 14 01 testb $0x1,0x14(%edx)
111b5e: 0f 85 04 03 00 00 jne 111e68 <fifo_open+0x40c>
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
111b64: 8b 7b 20 mov 0x20(%ebx),%edi
111b67: eb 20 jmp 111b89 <fifo_open+0x12d>
111b69: 8d 76 00 lea 0x0(%esi),%esi
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
111b6c: 51 push %ecx
111b6d: 6a 00 push $0x0
111b6f: 6a 00 push $0x0
111b71: ff 73 28 pushl 0x28(%ebx)
111b74: e8 3b b9 ff ff call 10d4b4 <rtems_semaphore_obtain>
111b79: 83 c4 10 add $0x10,%esp
111b7c: 85 c0 test %eax,%eax
111b7e: 75 27 jne 111ba7 <fifo_open+0x14b> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
111b80: 39 7b 20 cmp %edi,0x20(%ebx)
111b83: 0f 85 5b ff ff ff jne 111ae4 <fifo_open+0x88> <== ALWAYS TAKEN
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
111b89: 83 ec 0c sub $0xc,%esp
111b8c: ff 73 28 pushl 0x28(%ebx)
111b8f: e8 1c ba ff ff call 10d5b0 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
111b94: 58 pop %eax
111b95: 5a pop %edx
111b96: 6a 00 push $0x0
111b98: ff 73 30 pushl 0x30(%ebx)
111b9b: e8 c4 1c 00 00 call 113864 <rtems_barrier_wait>
111ba0: 83 c4 10 add $0x10,%esp
111ba3: 85 c0 test %eax,%eax
111ba5: 74 c5 je 111b6c <fifo_open+0x110> <== ALWAYS TAKEN
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
111ba7: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
111bac: 83 ec 08 sub $0x8,%esp
111baf: ff 75 0c pushl 0xc(%ebp)
111bb2: 56 push %esi
111bb3: e8 c8 fd ff ff call 111980 <pipe_release>
return err;
111bb8: 83 c4 10 add $0x10,%esp
111bbb: e9 34 ff ff ff jmp 111af4 <fifo_open+0x98>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
111bc0: ff 43 20 incl 0x20(%ebx)
if (pipe->Readers ++ == 0)
111bc3: 8b 43 10 mov 0x10(%ebx),%eax
111bc6: 8d 50 01 lea 0x1(%eax),%edx
111bc9: 89 53 10 mov %edx,0x10(%ebx)
111bcc: 85 c0 test %eax,%eax
111bce: 0f 84 10 02 00 00 je 111de4 <fifo_open+0x388> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
111bd4: 8b 7b 14 mov 0x14(%ebx),%edi
111bd7: 85 ff test %edi,%edi
111bd9: 0f 85 05 ff ff ff jne 111ae4 <fifo_open+0x88>
/* Not an error */
if (LIBIO_NODELAY(iop))
111bdf: 8b 45 0c mov 0xc(%ebp),%eax
111be2: f6 40 14 01 testb $0x1,0x14(%eax)
111be6: 0f 85 f8 fe ff ff jne 111ae4 <fifo_open+0x88>
break;
prevCounter = pipe->writerCounter;
111bec: 8b 7b 24 mov 0x24(%ebx),%edi
111bef: eb 20 jmp 111c11 <fifo_open+0x1b5>
111bf1: 8d 76 00 lea 0x0(%esi),%esi
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
111bf4: 50 push %eax
111bf5: 6a 00 push $0x0
111bf7: 6a 00 push $0x0
111bf9: ff 73 28 pushl 0x28(%ebx)
111bfc: e8 b3 b8 ff ff call 10d4b4 <rtems_semaphore_obtain>
111c01: 83 c4 10 add $0x10,%esp
111c04: 85 c0 test %eax,%eax
111c06: 75 9f jne 111ba7 <fifo_open+0x14b> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->writerCounter);
111c08: 39 7b 24 cmp %edi,0x24(%ebx)
111c0b: 0f 85 d3 fe ff ff jne 111ae4 <fifo_open+0x88> <== ALWAYS TAKEN
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
111c11: 83 ec 0c sub $0xc,%esp
111c14: ff 73 28 pushl 0x28(%ebx)
111c17: e8 94 b9 ff ff call 10d5b0 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
111c1c: 5a pop %edx
111c1d: 59 pop %ecx
111c1e: 6a 00 push $0x0
111c20: ff 73 2c pushl 0x2c(%ebx)
111c23: e8 3c 1c 00 00 call 113864 <rtems_barrier_wait>
111c28: 83 c4 10 add $0x10,%esp
111c2b: 85 c0 test %eax,%eax
111c2d: 74 c5 je 111bf4 <fifo_open+0x198> <== ALWAYS TAKEN
111c2f: e9 73 ff ff ff jmp 111ba7 <fifo_open+0x14b> <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
111c34: ff 43 20 incl 0x20(%ebx)
if (pipe->Readers ++ == 0)
111c37: 8b 43 10 mov 0x10(%ebx),%eax
111c3a: 8d 50 01 lea 0x1(%eax),%edx
111c3d: 89 53 10 mov %edx,0x10(%ebx)
111c40: 85 c0 test %eax,%eax
111c42: 0f 84 b4 01 00 00 je 111dfc <fifo_open+0x3a0> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
111c48: ff 43 24 incl 0x24(%ebx)
if (pipe->Writers ++ == 0)
111c4b: 8b 43 14 mov 0x14(%ebx),%eax
111c4e: 8d 50 01 lea 0x1(%eax),%edx
111c51: 89 53 14 mov %edx,0x14(%ebx)
111c54: 85 c0 test %eax,%eax
111c56: 0f 85 88 fe ff ff jne 111ae4 <fifo_open+0x88> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
111c5c: 83 ec 08 sub $0x8,%esp
111c5f: 8d 45 e4 lea -0x1c(%ebp),%eax
111c62: 50 push %eax
111c63: ff 73 2c pushl 0x2c(%ebx)
111c66: e8 95 1b 00 00 call 113800 <rtems_barrier_release>
111c6b: 83 c4 10 add $0x10,%esp
111c6e: e9 71 fe ff ff jmp 111ae4 <fifo_open+0x88>
111c73: 90 nop
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
111c74: 83 ec 0c sub $0xc,%esp
111c77: 6a 34 push $0x34
111c79: e8 22 84 ff ff call 10a0a0 <malloc>
111c7e: 89 c3 mov %eax,%ebx
111c80: 89 45 d4 mov %eax,-0x2c(%ebp)
if (pipe == NULL)
111c83: 83 c4 10 add $0x10,%esp
111c86: 85 c0 test %eax,%eax
111c88: 0f 84 32 02 00 00 je 111ec0 <fifo_open+0x464>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
111c8e: b9 34 00 00 00 mov $0x34,%ecx
111c93: 31 c0 xor %eax,%eax
111c95: 89 df mov %ebx,%edi
111c97: f3 aa rep stos %al,%es:(%edi)
pipe->Size = PIPE_BUF;
111c99: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx)
pipe->Buffer = malloc(pipe->Size);
111ca0: 83 ec 0c sub $0xc,%esp
111ca3: 68 00 02 00 00 push $0x200
111ca8: e8 f3 83 ff ff call 10a0a0 <malloc>
111cad: 89 03 mov %eax,(%ebx)
if (! pipe->Buffer)
111caf: 83 c4 10 add $0x10,%esp
111cb2: 85 c0 test %eax,%eax
111cb4: 0f 84 f8 01 00 00 je 111eb2 <fifo_open+0x456> <== NEVER TAKEN
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
111cba: 8d 43 2c lea 0x2c(%ebx),%eax
111cbd: 50 push %eax
111cbe: 6a 00 push $0x0
111cc0: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'r', c),
111cc2: 0f be 05 b4 7b 12 00 movsbl 0x127bb4,%eax
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
111cc9: 0d 00 72 49 50 or $0x50497200,%eax
111cce: 50 push %eax
111ccf: e8 b0 19 00 00 call 113684 <rtems_barrier_create>
111cd4: 83 c4 10 add $0x10,%esp
111cd7: 85 c0 test %eax,%eax
111cd9: 0f 85 c3 01 00 00 jne 111ea2 <fifo_open+0x446>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
111cdf: 8d 43 30 lea 0x30(%ebx),%eax
111ce2: 50 push %eax
111ce3: 6a 00 push $0x0
111ce5: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'w', c),
111ce7: 0f be 05 b4 7b 12 00 movsbl 0x127bb4,%eax
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
111cee: 0d 00 77 49 50 or $0x50497700,%eax
111cf3: 50 push %eax
111cf4: e8 8b 19 00 00 call 113684 <rtems_barrier_create>
111cf9: 83 c4 10 add $0x10,%esp
111cfc: 85 c0 test %eax,%eax
111cfe: 0f 85 8d 01 00 00 jne 111e91 <fifo_open+0x435>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
111d04: 83 ec 0c sub $0xc,%esp
111d07: 8d 43 28 lea 0x28(%ebx),%eax
111d0a: 50 push %eax
111d0b: 6a 00 push $0x0
111d0d: 6a 10 push $0x10
111d0f: 6a 01 push $0x1
rtems_build_name ('P', 'I', 's', c), 1,
111d11: 0f be 05 b4 7b 12 00 movsbl 0x127bb4,%eax
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
111d18: 0d 00 73 49 50 or $0x50497300,%eax
111d1d: 50 push %eax
111d1e: e8 15 b5 ff ff call 10d238 <rtems_semaphore_create>
111d23: 83 c4 20 add $0x20,%esp
111d26: 85 c0 test %eax,%eax
111d28: 0f 85 52 01 00 00 jne 111e80 <fifo_open+0x424>
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
_Objects_Get( &_Barrier_Information, id, location );
111d2e: 51 push %ecx
/* 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
111d2f: 8d 7d e0 lea -0x20(%ebp),%edi
111d32: 57 push %edi
111d33: ff 73 2c pushl 0x2c(%ebx)
111d36: 68 a0 a9 12 00 push $0x12a9a0
111d3b: e8 c4 ce ff ff call 10ec04 <_Objects_Get>
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
111d40: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax)
_Thread_Enable_dispatch();
111d47: e8 9c d9 ff ff call 10f6e8 <_Thread_Enable_dispatch>
111d4c: 83 c4 0c add $0xc,%esp
111d4f: 57 push %edi
111d50: ff 73 30 pushl 0x30(%ebx)
111d53: 68 a0 a9 12 00 push $0x12a9a0
111d58: e8 a7 ce ff ff call 10ec04 <_Objects_Get>
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
111d5d: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax)
_Thread_Enable_dispatch();
111d64: e8 7f d9 ff ff call 10f6e8 <_Thread_Enable_dispatch>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
111d69: a0 b4 7b 12 00 mov 0x127bb4,%al
111d6e: 8d 50 01 lea 0x1(%eax),%edx
111d71: 88 15 b4 7b 12 00 mov %dl,0x127bb4
111d77: 83 c4 10 add $0x10,%esp
111d7a: 3c 7a cmp $0x7a,%al
111d7c: 0f 85 13 fd ff ff jne 111a95 <fifo_open+0x39>
c = 'a';
111d82: c6 05 b4 7b 12 00 61 movb $0x61,0x127bb4
111d89: e9 07 fd ff ff jmp 111a95 <fifo_open+0x39>
111d8e: 66 90 xchg %ax,%ax
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
111d90: 85 ff test %edi,%edi
111d92: 0f 85 94 00 00 00 jne 111e2c <fifo_open+0x3d0> <== NEVER TAKEN
pipe_free(pipe);
else
*pipep = pipe;
111d98: 89 1e mov %ebx,(%esi)
}
out:
pipe_unlock();
111d9a: e8 c9 fb ff ff call 111968 <pipe_unlock>
111d9f: e9 1e fd ff ff jmp 111ac2 <fifo_open+0x66>
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
sc = rtems_semaphore_create(
111da4: 83 ec 0c sub $0xc,%esp
111da7: 68 ec 9b 12 00 push $0x129bec
111dac: 6a 00 push $0x0
111dae: 6a 54 push $0x54
111db0: 6a 01 push $0x1
111db2: 68 45 50 49 50 push $0x50495045
111db7: e8 7c b4 ff ff call 10d238 <rtems_semaphore_create>
111dbc: 89 c3 mov %eax,%ebx
111dbe: 83 c4 14 add $0x14,%esp
111dc1: ff 35 08 9e 12 00 pushl 0x129e08
111dc7: e8 e4 b7 ff ff call 10d5b0 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
111dcc: 83 c4 10 add $0x10,%esp
111dcf: 85 db test %ebx,%ebx
111dd1: 0f 84 f0 00 00 00 je 111ec7 <fifo_open+0x46b>
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
111dd7: bf f4 ff ff ff mov $0xfffffff4,%edi
111ddc: e9 13 fd ff ff jmp 111af4 <fifo_open+0x98>
111de1: 8d 76 00 lea 0x0(%esi),%esi
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
111de4: 83 ec 08 sub $0x8,%esp
111de7: 8d 45 e4 lea -0x1c(%ebp),%eax
111dea: 50 push %eax
111deb: ff 73 30 pushl 0x30(%ebx)
111dee: e8 0d 1a 00 00 call 113800 <rtems_barrier_release>
111df3: 83 c4 10 add $0x10,%esp
111df6: e9 d9 fd ff ff jmp 111bd4 <fifo_open+0x178>
111dfb: 90 nop
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
111dfc: 83 ec 08 sub $0x8,%esp
111dff: 8d 45 e4 lea -0x1c(%ebp),%eax
111e02: 50 push %eax
111e03: ff 73 30 pushl 0x30(%ebx)
111e06: e8 f5 19 00 00 call 113800 <rtems_barrier_release>
111e0b: 83 c4 10 add $0x10,%esp
111e0e: e9 35 fe ff ff jmp 111c48 <fifo_open+0x1ec>
111e13: 90 nop
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
111e14: 83 ec 08 sub $0x8,%esp
111e17: 8d 45 e4 lea -0x1c(%ebp),%eax
111e1a: 50 push %eax
111e1b: ff 73 2c pushl 0x2c(%ebx)
111e1e: e8 dd 19 00 00 call 113800 <rtems_barrier_release>
111e23: 83 c4 10 add $0x10,%esp
111e26: e9 25 fd ff ff jmp 111b50 <fifo_open+0xf4>
111e2b: 90 nop
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
111e2c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111e2f: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
111e32: e8 39 19 00 00 call 113770 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
111e37: 59 pop %ecx <== NOT EXECUTED
111e38: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
111e3b: e8 30 19 00 00 call 113770 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
111e40: 5a pop %edx <== NOT EXECUTED
111e41: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
111e44: e8 c7 b5 ff ff call 10d410 <rtems_semaphore_delete><== NOT EXECUTED
free(pipe->Buffer);
111e49: 58 pop %eax <== NOT EXECUTED
111e4a: ff 33 pushl (%ebx) <== NOT EXECUTED
111e4c: e8 5f 7b ff ff call 1099b0 <free> <== NOT EXECUTED
free(pipe);
111e51: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
111e54: e8 57 7b ff ff call 1099b0 <free> <== NOT EXECUTED
111e59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
else
*pipep = pipe;
}
out:
pipe_unlock();
111e5c: e8 07 fb ff ff call 111968 <pipe_unlock>
111e61: e9 8e fc ff ff jmp 111af4 <fifo_open+0x98>
111e66: 66 90 xchg %ax,%ax
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
111e68: 83 ec 0c sub $0xc,%esp
111e6b: ff 73 28 pushl 0x28(%ebx)
111e6e: e8 3d b7 ff ff call 10d5b0 <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
111e73: 83 c4 10 add $0x10,%esp
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
err = -ENXIO;
111e76: bf fa ff ff ff mov $0xfffffffa,%edi
goto out_error;
111e7b: e9 2c fd ff ff jmp 111bac <fifo_open+0x150>
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
111e80: 83 ec 0c sub $0xc,%esp
111e83: 8b 45 d4 mov -0x2c(%ebp),%eax
111e86: ff 70 30 pushl 0x30(%eax)
111e89: e8 e2 18 00 00 call 113770 <rtems_barrier_delete>
111e8e: 83 c4 10 add $0x10,%esp
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
111e91: 83 ec 0c sub $0xc,%esp
111e94: 8b 55 d4 mov -0x2c(%ebp),%edx
111e97: ff 72 2c pushl 0x2c(%edx)
111e9a: e8 d1 18 00 00 call 113770 <rtems_barrier_delete>
111e9f: 83 c4 10 add $0x10,%esp
err_rbar:
free(pipe->Buffer);
111ea2: 83 ec 0c sub $0xc,%esp
111ea5: 8b 45 d4 mov -0x2c(%ebp),%eax
111ea8: ff 30 pushl (%eax)
111eaa: e8 01 7b ff ff call 1099b0 <free>
111eaf: 83 c4 10 add $0x10,%esp
err_buf:
free(pipe);
111eb2: 83 ec 0c sub $0xc,%esp
111eb5: ff 75 d4 pushl -0x2c(%ebp)
111eb8: e8 f3 7a ff ff call 1099b0 <free>
111ebd: 83 c4 10 add $0x10,%esp
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
111ec0: bf f4 ff ff ff mov $0xfffffff4,%edi
111ec5: eb 95 jmp 111e5c <fifo_open+0x400>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
111ec7: a1 ec 9b 12 00 mov 0x129bec,%eax
111ecc: e9 a4 fb ff ff jmp 111a75 <fifo_open+0x19>
0010ff9c <find_handler>:
const char *type;
rtems_filesystem_fsmount_me_t mount_h;
} find_arg;
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
10ff9c: 55 push %ebp
10ff9d: 89 e5 mov %esp,%ebp
10ff9f: 56 push %esi
10ffa0: 53 push %ebx
10ffa1: 8b 75 08 mov 0x8(%ebp),%esi
10ffa4: 8b 5d 0c mov 0xc(%ebp),%ebx
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
10ffa7: 83 ec 08 sub $0x8,%esp
10ffaa: ff 33 pushl (%ebx)
10ffac: ff 36 pushl (%esi)
10ffae: e8 f9 3f 00 00 call 113fac <strcmp>
10ffb3: 83 c4 10 add $0x10,%esp
10ffb6: 85 c0 test %eax,%eax
10ffb8: 75 12 jne 10ffcc <find_handler+0x30>
return false;
} else {
fa->mount_h = entry->mount_h;
10ffba: 8b 46 04 mov 0x4(%esi),%eax
10ffbd: 89 43 04 mov %eax,0x4(%ebx)
return true;
10ffc0: b0 01 mov $0x1,%al
}
}
10ffc2: 8d 65 f8 lea -0x8(%ebp),%esp
10ffc5: 5b pop %ebx
10ffc6: 5e pop %esi
10ffc7: c9 leave
10ffc8: c3 ret
10ffc9: 8d 76 00 lea 0x0(%esi),%esi
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
return false;
10ffcc: 31 c0 xor %eax,%eax
} else {
fa->mount_h = entry->mount_h;
return true;
}
}
10ffce: 8d 65 f8 lea -0x8(%ebp),%esp
10ffd1: 5b pop %ebx
10ffd2: 5e pop %esi
10ffd3: c9 leave
10ffd4: c3 ret
00108d20 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
108d20: 55 push %ebp
108d21: 89 e5 mov %esp,%ebp
108d23: 83 ec 08 sub $0x8,%esp
108d26: 8b 45 08 mov 0x8(%ebp),%eax
108d29: 8b 55 0c mov 0xc(%ebp),%edx
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
108d2c: 3b 05 ec 4d 12 00 cmp 0x124dec,%eax
108d32: 0f 83 ac 00 00 00 jae 108de4 <fpathconf+0xc4>
iop = rtems_libio_iop(fd);
108d38: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx
108d3f: 8d 04 cd 00 00 00 00 lea 0x0(,%ecx,8),%eax
108d46: 29 c8 sub %ecx,%eax
108d48: 03 05 20 90 12 00 add 0x129020,%eax
rtems_libio_check_is_open(iop);
108d4e: 8b 48 14 mov 0x14(%eax),%ecx
108d51: f6 c5 01 test $0x1,%ch
108d54: 0f 84 8a 00 00 00 je 108de4 <fpathconf+0xc4> <== NEVER TAKEN
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
108d5a: 83 e1 02 and $0x2,%ecx
108d5d: 74 08 je 108d67 <fpathconf+0x47>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
108d5f: 8b 40 28 mov 0x28(%eax),%eax
switch ( name ) {
108d62: 83 fa 0b cmp $0xb,%edx
108d65: 76 15 jbe 108d7c <fpathconf+0x5c>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
108d67: e8 38 b7 00 00 call 1144a4 <__errno>
108d6c: c7 00 16 00 00 00 movl $0x16,(%eax)
108d72: b8 ff ff ff ff mov $0xffffffff,%eax
break;
}
return return_value;
}
108d77: c9 leave
108d78: c3 ret
108d79: 8d 76 00 lea 0x0(%esi),%esi
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
108d7c: ff 24 95 18 27 12 00 jmp *0x122718(,%edx,4)
108d83: 90 nop
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
108d84: 8b 40 5c mov 0x5c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108d87: c9 leave
108d88: c3 ret
108d89: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
108d8c: 8b 40 50 mov 0x50(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108d8f: c9 leave
108d90: c3 ret
108d91: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
108d94: 8b 40 64 mov 0x64(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108d97: c9 leave
108d98: c3 ret
108d99: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
108d9c: 8b 40 58 mov 0x58(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108d9f: c9 leave
108da0: c3 ret
108da1: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
108da4: 8b 40 54 mov 0x54(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108da7: c9 leave
108da8: c3 ret
108da9: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
108dac: 8b 40 4c mov 0x4c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108daf: c9 leave
108db0: c3 ret
108db1: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
108db4: 8b 40 48 mov 0x48(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108db7: c9 leave
108db8: c3 ret
108db9: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
108dbc: 8b 40 44 mov 0x44(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108dbf: c9 leave
108dc0: c3 ret
108dc1: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
108dc4: 8b 40 40 mov 0x40(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108dc7: c9 leave
108dc8: c3 ret
108dc9: 8d 76 00 lea 0x0(%esi),%esi
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
108dcc: 8b 40 3c mov 0x3c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108dcf: c9 leave
108dd0: c3 ret
108dd1: 8d 76 00 lea 0x0(%esi),%esi
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
108dd4: 8b 40 38 mov 0x38(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108dd7: c9 leave
108dd8: c3 ret
108dd9: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
108ddc: 8b 40 60 mov 0x60(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108ddf: c9 leave
108de0: c3 ret
108de1: 8d 76 00 lea 0x0(%esi),%esi
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);
108de4: e8 bb b6 00 00 call 1144a4 <__errno>
108de9: c7 00 09 00 00 00 movl $0x9,(%eax)
108def: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108df4: c9 leave
108df5: c3 ret
001080b4 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
1080b4: 55 push %ebp
1080b5: 89 e5 mov %esp,%ebp
1080b7: 53 push %ebx
1080b8: 83 ec 04 sub $0x4,%esp
1080bb: 8b 5d 08 mov 0x8(%ebp),%ebx
MSBUMP(free_calls, 1);
1080be: ff 05 0c 74 12 00 incl 0x12740c
if ( !ptr )
1080c4: 85 db test %ebx,%ebx
1080c6: 74 4b je 108113 <free+0x5f>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1080c8: 83 3d 20 77 12 00 03 cmpl $0x3,0x127720
1080cf: 74 47 je 108118 <free+0x64> <== ALWAYS TAKEN
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
1080d1: a1 a8 57 12 00 mov 0x1257a8,%eax
1080d6: 85 c0 test %eax,%eax
1080d8: 74 0a je 1080e4 <free+0x30>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
1080da: 83 ec 0c sub $0xc,%esp
1080dd: 53 push %ebx
1080de: ff 50 08 call *0x8(%eax)
1080e1: 83 c4 10 add $0x10,%esp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
1080e4: 83 ec 08 sub $0x8,%esp
1080e7: 53 push %ebx
1080e8: ff 35 b8 31 12 00 pushl 0x1231b8
1080ee: e8 55 50 00 00 call 10d148 <_Protected_heap_Free>
1080f3: 83 c4 10 add $0x10,%esp
1080f6: 84 c0 test %al,%al
1080f8: 75 19 jne 108113 <free+0x5f>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
1080fa: a1 b8 31 12 00 mov 0x1231b8,%eax
*/
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",
1080ff: ff 70 1c pushl 0x1c(%eax)
108102: ff 70 18 pushl 0x18(%eax)
108105: 53 push %ebx
108106: 68 10 0b 12 00 push $0x120b10
10810b: e8 8c 0d 00 00 call 108e9c <printk>
108110: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
108113: 8b 5d fc mov -0x4(%ebp),%ebx
108116: c9 leave
108117: c3 ret
/*
* 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() ) {
108118: e8 3b 01 00 00 call 108258 <malloc_is_system_state_OK>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
10811d: 84 c0 test %al,%al
10811f: 75 b0 jne 1080d1 <free+0x1d>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
108121: 89 5d 08 mov %ebx,0x8(%ebp)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
108124: 8b 5d fc mov -0x4(%ebp),%ebx
108127: c9 leave
/*
* 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);
108128: e9 97 01 00 00 jmp 1082c4 <malloc_deferred_free>
00109540 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
109540: 55 push %ebp
109541: 89 e5 mov %esp,%ebp
109543: 53 push %ebx
109544: 83 ec 04 sub $0x4,%esp
109547: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
10954a: 81 fb 40 7d 12 00 cmp $0x127d40,%ebx
109550: 74 26 je 109578 <free_user_env+0x38> <== NEVER TAKEN
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
109552: 83 ec 0c sub $0xc,%esp
109555: 8d 43 04 lea 0x4(%ebx),%eax
109558: 50 push %eax
109559: e8 72 ef ff ff call 1084d0 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &env->root_directory);
10955e: 8d 43 18 lea 0x18(%ebx),%eax
109561: 89 04 24 mov %eax,(%esp)
109564: e8 67 ef ff ff call 1084d0 <rtems_filesystem_freenode>
free(env);
109569: 83 c4 10 add $0x10,%esp
10956c: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10956f: 8b 5d fc mov -0x4(%ebp),%ebx
109572: c9 leave
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
109573: e9 6c ef ff ff jmp 1084e4 <free>
}
}
109578: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10957b: c9 leave <== NOT EXECUTED
10957c: c3 ret <== NOT EXECUTED
0011e7bc <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
11e7bc: 55 push %ebp
11e7bd: 89 e5 mov %esp,%ebp
11e7bf: 57 push %edi
11e7c0: 53 push %ebx
11e7c1: 8b 45 08 mov 0x8(%ebp),%eax
11e7c4: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
11e7c7: 85 db test %ebx,%ebx
11e7c9: 74 55 je 11e820 <fstat+0x64>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
11e7cb: 3b 05 ac 31 12 00 cmp 0x1231ac,%eax
11e7d1: 73 39 jae 11e80c <fstat+0x50>
11e7d3: c1 e0 03 shl $0x3,%eax
11e7d6: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
11e7dd: 29 c2 sub %eax,%edx
11e7df: 03 15 e0 73 12 00 add 0x1273e0,%edx
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
11e7e5: f6 42 15 01 testb $0x1,0x15(%edx)
11e7e9: 74 21 je 11e80c <fstat+0x50>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
11e7eb: b9 48 00 00 00 mov $0x48,%ecx
11e7f0: 31 c0 xor %eax,%eax
11e7f2: 89 df mov %ebx,%edi
11e7f4: f3 aa rep stos %al,%es:(%edi)
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
11e7f6: 8b 42 20 mov 0x20(%edx),%eax
11e7f9: 89 5d 0c mov %ebx,0xc(%ebp)
11e7fc: 83 c2 18 add $0x18,%edx
11e7ff: 89 55 08 mov %edx,0x8(%ebp)
11e802: 8b 40 18 mov 0x18(%eax),%eax
}
11e805: 5b pop %ebx
11e806: 5f pop %edi
11e807: c9 leave
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
11e808: ff e0 jmp *%eax
11e80a: 66 90 xchg %ax,%ax
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
11e80c: e8 23 4b ff ff call 113334 <__errno>
11e811: c7 00 09 00 00 00 movl $0x9,(%eax)
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
}
11e817: b8 ff ff ff ff mov $0xffffffff,%eax
11e81c: 5b pop %ebx
11e81d: 5f pop %edi
11e81e: c9 leave
11e81f: c3 ret
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
11e820: e8 0f 4b ff ff call 113334 <__errno>
11e825: c7 00 0e 00 00 00 movl $0xe,(%eax)
11e82b: eb ea jmp 11e817 <fstat+0x5b>
00108f14 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
108f14: 55 push %ebp
108f15: 89 e5 mov %esp,%ebp
108f17: 83 ec 08 sub $0x8,%esp
108f1a: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108f1d: 3b 05 ec 4d 12 00 cmp 0x124dec,%eax
108f23: 73 2f jae 108f54 <fsync+0x40>
iop = rtems_libio_iop( fd );
108f25: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
108f2c: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax
108f33: 29 d0 sub %edx,%eax
108f35: 03 05 20 90 12 00 add 0x129020,%eax
rtems_libio_check_is_open(iop);
108f3b: 8b 50 14 mov 0x14(%eax),%edx
108f3e: f6 c6 01 test $0x1,%dh
108f41: 74 11 je 108f54 <fsync+0x40>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108f43: 83 e2 04 and $0x4,%edx
108f46: 74 20 je 108f68 <fsync+0x54>
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
108f48: 8b 50 20 mov 0x20(%eax),%edx
108f4b: 89 45 08 mov %eax,0x8(%ebp)
108f4e: 8b 42 28 mov 0x28(%edx),%eax
}
108f51: c9 leave
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
108f52: ff e0 jmp *%eax
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108f54: e8 4b b5 00 00 call 1144a4 <__errno>
108f59: c7 00 09 00 00 00 movl $0x9,(%eax)
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
}
108f5f: b8 ff ff ff ff mov $0xffffffff,%eax
108f64: c9 leave
108f65: c3 ret
108f66: 66 90 xchg %ax,%ax
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 );
108f68: e8 37 b5 00 00 call 1144a4 <__errno>
108f6d: c7 00 16 00 00 00 movl $0x16,(%eax)
108f73: eb ea jmp 108f5f <fsync+0x4b>
0010fc8c <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
10fc8c: 55 push %ebp
10fc8d: 89 e5 mov %esp,%ebp
10fc8f: 57 push %edi
10fc90: 56 push %esi
10fc91: 53 push %ebx
10fc92: 83 ec 3c sub $0x3c,%esp
10fc95: 8b 45 08 mov 0x8(%ebp),%eax
10fc98: 8b 55 0c mov 0xc(%ebp),%edx
10fc9b: 8b 4d 10 mov 0x10(%ebp),%ecx
10fc9e: 89 55 c0 mov %edx,-0x40(%ebp)
10fca1: 89 4d c4 mov %ecx,-0x3c(%ebp)
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
10fca4: 3b 05 ac 31 12 00 cmp 0x1231ac,%eax
10fcaa: 73 58 jae 10fd04 <ftruncate+0x78>
iop = rtems_libio_iop( fd );
10fcac: c1 e0 03 shl $0x3,%eax
10fcaf: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
10fcb6: 29 c3 sub %eax,%ebx
10fcb8: 03 1d e0 73 12 00 add 0x1273e0,%ebx
rtems_libio_check_is_open(iop);
10fcbe: f6 43 15 01 testb $0x1,0x15(%ebx)
10fcc2: 74 40 je 10fd04 <ftruncate+0x78>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
10fcc4: 8d 7d d4 lea -0x2c(%ebp),%edi
10fcc7: 8d 73 18 lea 0x18(%ebx),%esi
10fcca: b9 05 00 00 00 mov $0x5,%ecx
10fccf: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
10fcd1: 83 ec 0c sub $0xc,%esp
10fcd4: 8d 45 d4 lea -0x2c(%ebp),%eax
10fcd7: 50 push %eax
10fcd8: 8b 45 e0 mov -0x20(%ebp),%eax
10fcdb: ff 50 10 call *0x10(%eax)
10fcde: 83 c4 10 add $0x10,%esp
10fce1: 48 dec %eax
10fce2: 74 46 je 10fd2a <ftruncate+0x9e>
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
10fce4: f6 43 14 04 testb $0x4,0x14(%ebx)
10fce8: 74 2e je 10fd18 <ftruncate+0x8c>
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
10fcea: 50 push %eax
10fceb: 8b 43 20 mov 0x20(%ebx),%eax
10fcee: ff 75 c4 pushl -0x3c(%ebp)
10fcf1: ff 75 c0 pushl -0x40(%ebp)
10fcf4: 53 push %ebx
10fcf5: ff 50 20 call *0x20(%eax)
10fcf8: 83 c4 10 add $0x10,%esp
}
10fcfb: 8d 65 f4 lea -0xc(%ebp),%esp
10fcfe: 5b pop %ebx
10fcff: 5e pop %esi
10fd00: 5f pop %edi
10fd01: c9 leave
10fd02: c3 ret
10fd03: 90 nop
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);
10fd04: e8 2b 36 00 00 call 113334 <__errno>
10fd09: c7 00 09 00 00 00 movl $0x9,(%eax)
10fd0f: b8 ff ff ff ff mov $0xffffffff,%eax
10fd14: eb e5 jmp 10fcfb <ftruncate+0x6f>
10fd16: 66 90 xchg %ax,%ax
loc = iop->pathinfo;
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 );
10fd18: e8 17 36 00 00 call 113334 <__errno>
10fd1d: c7 00 16 00 00 00 movl $0x16,(%eax)
10fd23: b8 ff ff ff ff mov $0xffffffff,%eax
10fd28: eb d1 jmp 10fcfb <ftruncate+0x6f>
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
10fd2a: e8 05 36 00 00 call 113334 <__errno>
10fd2f: c7 00 15 00 00 00 movl $0x15,(%eax)
10fd35: b8 ff ff ff ff mov $0xffffffff,%eax
10fd3a: eb bf jmp 10fcfb <ftruncate+0x6f>
001082f0 <getchark>:
#include <rtems.h>
#include <rtems/bspIo.h>
int getchark(void)
{
1082f0: 55 push %ebp
1082f1: 89 e5 mov %esp,%ebp
1082f3: 83 ec 08 sub $0x8,%esp
if ( BSP_poll_char )
1082f6: a1 6c 36 12 00 mov 0x12366c,%eax
1082fb: 85 c0 test %eax,%eax
1082fd: 74 05 je 108304 <getchark+0x14>
return (*BSP_poll_char)();
return -1;
}
1082ff: c9 leave
#include <rtems/bspIo.h>
int getchark(void)
{
if ( BSP_poll_char )
return (*BSP_poll_char)();
108300: ff e0 jmp *%eax
108302: 66 90 xchg %ax,%ax
return -1;
}
108304: b8 ff ff ff ff mov $0xffffffff,%eax
108309: c9 leave
10830a: c3 ret
001201a0 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
1201a0: 55 push %ebp
1201a1: 89 e5 mov %esp,%ebp
1201a3: 57 push %edi
1201a4: 56 push %esi
1201a5: 53 push %ebx
1201a6: 83 ec 2c sub $0x2c,%esp
1201a9: 8b 45 08 mov 0x8(%ebp),%eax
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
1201ac: 3b 05 cc 5c 12 00 cmp 0x125ccc,%eax
1201b2: 73 4c jae 120200 <getdents+0x60> <== NEVER TAKEN
1201b4: c1 e0 03 shl $0x3,%eax
1201b7: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
1201be: 29 c3 sub %eax,%ebx
1201c0: 03 1d 20 a0 12 00 add 0x12a020,%ebx
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
1201c6: 8d 7d d4 lea -0x2c(%ebp),%edi
1201c9: 8d 73 18 lea 0x18(%ebx),%esi
1201cc: b9 05 00 00 00 mov $0x5,%ecx
1201d1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
1201d3: 83 ec 0c sub $0xc,%esp
1201d6: 8d 45 d4 lea -0x2c(%ebp),%eax
1201d9: 50 push %eax
1201da: 8b 45 e0 mov -0x20(%ebp),%eax
1201dd: ff 50 10 call *0x10(%eax)
1201e0: 83 c4 10 add $0x10,%esp
1201e3: 48 dec %eax
1201e4: 75 1e jne 120204 <getdents+0x64>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
1201e6: 50 push %eax
1201e7: 8b 43 20 mov 0x20(%ebx),%eax
1201ea: ff 75 10 pushl 0x10(%ebp)
1201ed: ff 75 0c pushl 0xc(%ebp)
1201f0: 53 push %ebx
1201f1: ff 50 08 call *0x8(%eax)
1201f4: 83 c4 10 add $0x10,%esp
}
1201f7: 8d 65 f4 lea -0xc(%ebp),%esp
1201fa: 5b pop %ebx
1201fb: 5e pop %esi
1201fc: 5f pop %edi
1201fd: c9 leave
1201fe: c3 ret
1201ff: 90 nop
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
120200: 31 db xor %ebx,%ebx
120202: eb c2 jmp 1201c6 <getdents+0x26> <== NOT EXECUTED
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
120204: e8 5b 41 ff ff call 114364 <__errno>
120209: c7 00 14 00 00 00 movl $0x14,(%eax)
12020f: b8 ff ff ff ff mov $0xffffffff,%eax
120214: eb e1 jmp 1201f7 <getdents+0x57>
00108b24 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
108b24: 55 push %ebp
108b25: 89 e5 mov %esp,%ebp
108b27: 57 push %edi
108b28: 56 push %esi
108b29: 53 push %ebx
108b2a: 83 ec 1c sub $0x1c,%esp
108b2d: 89 c3 mov %eax,%ebx
108b2f: 89 55 e4 mov %edx,-0x1c(%ebp)
108b32: 89 ce mov %ecx,%esi
FILE *fp;
int match;
init_etc_passwd_group();
108b34: e8 eb fe ff ff call 108a24 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL)
108b39: 83 ec 08 sub $0x8,%esp
108b3c: 68 d2 0f 12 00 push $0x120fd2
108b41: 68 b9 24 12 00 push $0x1224b9
108b46: e8 95 be 00 00 call 1149e0 <fopen>
108b4b: 89 c7 mov %eax,%edi
108b4d: 83 c4 10 add $0x10,%esp
108b50: 85 c0 test %eax,%eax
108b52: 75 22 jne 108b76 <getgr_r+0x52>
108b54: e9 8b 00 00 00 jmp 108be4 <getgr_r+0xc0>
108b59: 8d 76 00 lea 0x0(%esi),%esi
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
goto error_einval;
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
108b5c: 83 ec 08 sub $0x8,%esp
108b5f: 53 push %ebx
108b60: ff 36 pushl (%esi)
108b62: e8 f5 cc 00 00 call 11585c <strcmp>
108b67: 83 c4 10 add $0x10,%esp
108b6a: 85 c0 test %eax,%eax
108b6c: 0f 94 c0 sete %al
108b6f: 0f b6 c0 movzbl %al,%eax
} else {
match = (grp->gr_gid == gid);
}
if (match) {
108b72: 85 c0 test %eax,%eax
108b74: 75 2e jne 108ba4 <getgr_r+0x80>
if ((fp = fopen("/etc/group", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
108b76: 83 ec 0c sub $0xc,%esp
108b79: ff 75 0c pushl 0xc(%ebp)
108b7c: 8b 4d 08 mov 0x8(%ebp),%ecx
108b7f: 89 f2 mov %esi,%edx
108b81: 89 f8 mov %edi,%eax
108b83: e8 88 fc ff ff call 108810 <scangr>
108b88: 83 c4 10 add $0x10,%esp
108b8b: 85 c0 test %eax,%eax
108b8d: 74 31 je 108bc0 <getgr_r+0x9c>
goto error_einval;
if (name) {
108b8f: 85 db test %ebx,%ebx
108b91: 75 c9 jne 108b5c <getgr_r+0x38>
match = (strcmp(grp->gr_name, name) == 0);
} else {
match = (grp->gr_gid == gid);
108b93: 0f b7 46 08 movzwl 0x8(%esi),%eax
108b97: 3b 45 e4 cmp -0x1c(%ebp),%eax
108b9a: 0f 94 c0 sete %al
108b9d: 0f b6 c0 movzbl %al,%eax
}
if (match) {
108ba0: 85 c0 test %eax,%eax
108ba2: 74 d2 je 108b76 <getgr_r+0x52>
fclose(fp);
108ba4: 83 ec 0c sub $0xc,%esp
108ba7: 57 push %edi
108ba8: e8 2f b7 00 00 call 1142dc <fclose>
*result = grp;
108bad: 8b 45 10 mov 0x10(%ebp),%eax
108bb0: 89 30 mov %esi,(%eax)
return 0;
108bb2: 83 c4 10 add $0x10,%esp
108bb5: 31 c0 xor %eax,%eax
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
}
108bb7: 8d 65 f4 lea -0xc(%ebp),%esp
108bba: 5b pop %ebx
108bbb: 5e pop %esi
108bbc: 5f pop %edi
108bbd: c9 leave
108bbe: c3 ret
108bbf: 90 nop
*result = grp;
return 0;
}
}
error_einval:
fclose(fp);
108bc0: 83 ec 0c sub $0xc,%esp
108bc3: 57 push %edi
108bc4: e8 13 b7 00 00 call 1142dc <fclose>
rtems_set_errno_and_return_minus_one( EINVAL );
108bc9: e8 b6 b5 00 00 call 114184 <__errno>
108bce: c7 00 16 00 00 00 movl $0x16,(%eax)
108bd4: 83 c4 10 add $0x10,%esp
108bd7: b8 ff ff ff ff mov $0xffffffff,%eax
}
108bdc: 8d 65 f4 lea -0xc(%ebp),%esp
108bdf: 5b pop %ebx
108be0: 5e pop %esi
108be1: 5f pop %edi
108be2: c9 leave
108be3: c3 ret
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
108be4: e8 9b b5 00 00 call 114184 <__errno>
108be9: c7 00 16 00 00 00 movl $0x16,(%eax)
108bef: 83 c8 ff or $0xffffffff,%eax
108bf2: eb c3 jmp 108bb7 <getgr_r+0x93>
00108e48 <getgrnam>:
}
struct group *getgrnam(
const char *name
)
{
108e48: 55 push %ebp
108e49: 89 e5 mov %esp,%ebp
108e4b: 83 ec 24 sub $0x24,%esp
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
108e4e: 8d 45 f4 lea -0xc(%ebp),%eax
108e51: 50 push %eax
108e52: 68 c8 00 00 00 push $0xc8
108e57: 68 e0 8a 12 00 push $0x128ae0
108e5c: 68 c4 8a 12 00 push $0x128ac4
108e61: ff 75 08 pushl 0x8(%ebp)
108e64: e8 b3 ff ff ff call 108e1c <getgrnam_r>
108e69: 83 c4 20 add $0x20,%esp
108e6c: 85 c0 test %eax,%eax
108e6e: 75 08 jne 108e78 <getgrnam+0x30>
return NULL;
return p;
108e70: 8b 45 f4 mov -0xc(%ebp),%eax
}
108e73: c9 leave
108e74: c3 ret
108e75: 8d 76 00 lea 0x0(%esi),%esi
)
{
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
return NULL;
108e78: 31 c0 xor %eax,%eax
return p;
}
108e7a: c9 leave
108e7b: c3 ret
0010b234 <getitimer>:
int getitimer(
int which,
struct itimerval *value
)
{
10b234: 55 push %ebp
10b235: 89 e5 mov %esp,%ebp
10b237: 83 ec 08 sub $0x8,%esp
if ( !value )
10b23a: 8b 45 0c mov 0xc(%ebp),%eax
10b23d: 85 c0 test %eax,%eax
10b23f: 74 2f je 10b270 <getitimer+0x3c>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
10b241: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b245: 76 15 jbe 10b25c <getitimer+0x28>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b247: e8 08 88 00 00 call 113a54 <__errno>
10b24c: c7 00 16 00 00 00 movl $0x16,(%eax)
}
10b252: b8 ff ff ff ff mov $0xffffffff,%eax
10b257: c9 leave
10b258: c3 ret
10b259: 8d 76 00 lea 0x0(%esi),%esi
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
10b25c: e8 f3 87 00 00 call 113a54 <__errno>
10b261: c7 00 58 00 00 00 movl $0x58,(%eax)
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b267: b8 ff ff ff ff mov $0xffffffff,%eax
10b26c: c9 leave
10b26d: c3 ret
10b26e: 66 90 xchg %ax,%ax
int which,
struct itimerval *value
)
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
10b270: e8 df 87 00 00 call 113a54 <__errno>
10b275: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b27b: eb d5 jmp 10b252 <getitimer+0x1e>
001085e8 <getlogin_r>:
*/
int getlogin_r(
char *name,
size_t namesize
)
{
1085e8: 55 push %ebp
1085e9: 89 e5 mov %esp,%ebp
1085eb: 53 push %ebx
1085ec: 83 ec 04 sub $0x4,%esp
1085ef: 8b 5d 08 mov 0x8(%ebp),%ebx
struct passwd *pw;
char *pname;
if ( !name )
1085f2: 85 db test %ebx,%ebx
1085f4: 74 42 je 108638 <getlogin_r+0x50>
return EFAULT;
if ( namesize < LOGIN_NAME_MAX )
1085f6: 83 7d 0c 08 cmpl $0x8,0xc(%ebp)
1085fa: 77 0c ja 108608 <getlogin_r+0x20>
return ERANGE;
1085fc: b8 22 00 00 00 mov $0x22,%eax
if ( pw )
pname = pw->pw_name;
strncpy( name, pname, LOGIN_NAME_MAX );
return 0;
}
108601: 8b 5d fc mov -0x4(%ebp),%ebx
108604: c9 leave
108605: c3 ret
108606: 66 90 xchg %ax,%ax
return ERANGE;
/* Set the pointer to a default name */
pname = "";
pw = getpwuid(getuid());
108608: e8 e7 09 00 00 call 108ff4 <getuid>
10860d: 83 ec 0c sub $0xc,%esp
108610: 0f b7 c0 movzwl %ax,%eax
108613: 50 push %eax
108614: e8 37 07 00 00 call 108d50 <getpwuid>
if ( pw )
108619: 83 c4 10 add $0x10,%esp
10861c: 85 c0 test %eax,%eax
10861e: 74 20 je 108640 <getlogin_r+0x58>
pname = pw->pw_name;
108620: 8b 00 mov (%eax),%eax
strncpy( name, pname, LOGIN_NAME_MAX );
108622: 52 push %edx
108623: 6a 09 push $0x9
108625: 50 push %eax
108626: 53 push %ebx
108627: e8 b0 d3 00 00 call 1159dc <strncpy>
return 0;
10862c: 83 c4 10 add $0x10,%esp
10862f: 31 c0 xor %eax,%eax
}
108631: 8b 5d fc mov -0x4(%ebp),%ebx
108634: c9 leave
108635: c3 ret
108636: 66 90 xchg %ax,%ax
{
struct passwd *pw;
char *pname;
if ( !name )
return EFAULT;
108638: b8 0e 00 00 00 mov $0xe,%eax
10863d: eb c2 jmp 108601 <getlogin_r+0x19>
10863f: 90 nop
if ( namesize < LOGIN_NAME_MAX )
return ERANGE;
/* Set the pointer to a default name */
pname = "";
108640: b8 09 26 12 00 mov $0x122609,%eax
108645: eb db jmp 108622 <getlogin_r+0x3a>
00108bf4 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
108bf4: 55 push %ebp
108bf5: 89 e5 mov %esp,%ebp
108bf7: 57 push %edi
108bf8: 56 push %esi
108bf9: 53 push %ebx
108bfa: 83 ec 1c sub $0x1c,%esp
108bfd: 89 c3 mov %eax,%ebx
108bff: 89 55 e4 mov %edx,-0x1c(%ebp)
108c02: 89 ce mov %ecx,%esi
FILE *fp;
int match;
init_etc_passwd_group();
108c04: e8 1b fe ff ff call 108a24 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL)
108c09: 83 ec 08 sub $0x8,%esp
108c0c: 68 d2 0f 12 00 push $0x120fd2
108c11: 68 ad 24 12 00 push $0x1224ad
108c16: e8 c5 bd 00 00 call 1149e0 <fopen>
108c1b: 89 c7 mov %eax,%edi
108c1d: 83 c4 10 add $0x10,%esp
108c20: 85 c0 test %eax,%eax
108c22: 75 22 jne 108c46 <getpw_r+0x52>
108c24: e9 8b 00 00 00 jmp 108cb4 <getpw_r+0xc0>
108c29: 8d 76 00 lea 0x0(%esi),%esi
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize))
goto error_einval;
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
108c2c: 83 ec 08 sub $0x8,%esp
108c2f: 53 push %ebx
108c30: ff 36 pushl (%esi)
108c32: e8 25 cc 00 00 call 11585c <strcmp>
108c37: 83 c4 10 add $0x10,%esp
108c3a: 85 c0 test %eax,%eax
108c3c: 0f 94 c0 sete %al
108c3f: 0f b6 c0 movzbl %al,%eax
} else {
match = (pwd->pw_uid == uid);
}
if (match) {
108c42: 85 c0 test %eax,%eax
108c44: 75 2e jne 108c74 <getpw_r+0x80>
if ((fp = fopen("/etc/passwd", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize))
108c46: 83 ec 0c sub $0xc,%esp
108c49: ff 75 0c pushl 0xc(%ebp)
108c4c: 8b 4d 08 mov 0x8(%ebp),%ecx
108c4f: 89 f2 mov %esi,%edx
108c51: 89 f8 mov %edi,%eax
108c53: e8 d0 fc ff ff call 108928 <scanpw>
108c58: 83 c4 10 add $0x10,%esp
108c5b: 85 c0 test %eax,%eax
108c5d: 74 31 je 108c90 <getpw_r+0x9c>
goto error_einval;
if (name) {
108c5f: 85 db test %ebx,%ebx
108c61: 75 c9 jne 108c2c <getpw_r+0x38>
match = (strcmp(pwd->pw_name, name) == 0);
} else {
match = (pwd->pw_uid == uid);
108c63: 0f b7 46 08 movzwl 0x8(%esi),%eax
108c67: 3b 45 e4 cmp -0x1c(%ebp),%eax
108c6a: 0f 94 c0 sete %al
108c6d: 0f b6 c0 movzbl %al,%eax
}
if (match) {
108c70: 85 c0 test %eax,%eax
108c72: 74 d2 je 108c46 <getpw_r+0x52>
fclose(fp);
108c74: 83 ec 0c sub $0xc,%esp
108c77: 57 push %edi
108c78: e8 5f b6 00 00 call 1142dc <fclose>
*result = pwd;
108c7d: 8b 45 10 mov 0x10(%ebp),%eax
108c80: 89 30 mov %esi,(%eax)
return 0;
108c82: 83 c4 10 add $0x10,%esp
108c85: 31 c0 xor %eax,%eax
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
}
108c87: 8d 65 f4 lea -0xc(%ebp),%esp
108c8a: 5b pop %ebx
108c8b: 5e pop %esi
108c8c: 5f pop %edi
108c8d: c9 leave
108c8e: c3 ret
108c8f: 90 nop
*result = pwd;
return 0;
}
}
error_einval:
fclose(fp);
108c90: 83 ec 0c sub $0xc,%esp
108c93: 57 push %edi
108c94: e8 43 b6 00 00 call 1142dc <fclose>
rtems_set_errno_and_return_minus_one( EINVAL );
108c99: e8 e6 b4 00 00 call 114184 <__errno>
108c9e: c7 00 16 00 00 00 movl $0x16,(%eax)
108ca4: 83 c4 10 add $0x10,%esp
108ca7: b8 ff ff ff ff mov $0xffffffff,%eax
}
108cac: 8d 65 f4 lea -0xc(%ebp),%esp
108caf: 5b pop %ebx
108cb0: 5e pop %esi
108cb1: 5f pop %edi
108cb2: c9 leave
108cb3: c3 ret
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/passwd", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
108cb4: e8 cb b4 00 00 call 114184 <__errno>
108cb9: c7 00 16 00 00 00 movl $0x16,(%eax)
108cbf: 83 c8 ff or $0xffffffff,%eax
108cc2: eb c3 jmp 108c87 <getpw_r+0x93>
00108cf0 <getpwnam>:
}
struct passwd *getpwnam(
const char *name
)
{
108cf0: 55 push %ebp
108cf1: 89 e5 mov %esp,%ebp
108cf3: 83 ec 24 sub $0x24,%esp
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
108cf6: 8d 45 f4 lea -0xc(%ebp),%eax
108cf9: 50 push %eax
108cfa: 68 c8 00 00 00 push $0xc8
108cff: 68 e0 8b 12 00 push $0x128be0
108d04: 68 ac 8b 12 00 push $0x128bac
108d09: ff 75 08 pushl 0x8(%ebp)
108d0c: e8 b3 ff ff ff call 108cc4 <getpwnam_r>
108d11: 83 c4 20 add $0x20,%esp
108d14: 85 c0 test %eax,%eax
108d16: 75 08 jne 108d20 <getpwnam+0x30>
return NULL;
return p;
108d18: 8b 45 f4 mov -0xc(%ebp),%eax
}
108d1b: c9 leave
108d1c: c3 ret
108d1d: 8d 76 00 lea 0x0(%esi),%esi
)
{
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
return NULL;
108d20: 31 c0 xor %eax,%eax
return p;
}
108d22: c9 leave
108d23: c3 ret
00112784 <imfs_dir_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
112784: 55 push %ebp
112785: 89 e5 mov %esp,%ebp
112787: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
11278a: 8b 50 18 mov 0x18(%eax),%edx
11278d: 83 7a 4c 01 cmpl $0x1,0x4c(%edx)
112791: 74 09 je 11279c <imfs_dir_open+0x18> <== ALWAYS TAKEN
return -1; /* It wasn't a directory --> return error */
112793: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
iop->offset = 0;
return 0;
}
112798: c9 leave <== NOT EXECUTED
112799: c3 ret <== NOT EXECUTED
11279a: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
11279c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
1127a3: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
return 0;
1127aa: 31 c0 xor %eax,%eax
}
1127ac: c9 leave
1127ad: c3 ret
001127b0 <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
1127b0: 55 push %ebp
1127b1: 89 e5 mov %esp,%ebp
1127b3: 57 push %edi
1127b4: 56 push %esi
1127b5: 53 push %ebx
1127b6: 81 ec 4c 01 00 00 sub $0x14c,%esp
int current_entry;
int first_entry;
int last_entry;
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
1127bc: 8b 55 08 mov 0x8(%ebp),%edx
1127bf: 8b 42 18 mov 0x18(%edx),%eax
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
1127c2: 8b 58 50 mov 0x50(%eax),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
1127c5: 83 c0 54 add $0x54,%eax
1127c8: 89 85 cc fe ff ff mov %eax,-0x134(%ebp)
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
1127ce: 39 c3 cmp %eax,%ebx
1127d0: 0f 84 2a 01 00 00 je 112900 <imfs_dir_read+0x150>
/* Move to the first of the desired directory entries */
the_node = rtems_chain_first( the_chain );
bytes_transferred = 0;
first_entry = iop->offset;
1127d6: 8b 42 0c mov 0xc(%edx),%eax
1127d9: 89 85 d4 fe ff ff mov %eax,-0x12c(%ebp)
/* 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);
1127df: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx
1127e4: 8b 45 10 mov 0x10(%ebp),%eax
1127e7: f7 e2 mul %edx
1127e9: c1 ea 08 shr $0x8,%edx
1127ec: 89 d0 mov %edx,%eax
1127ee: c1 e0 04 shl $0x4,%eax
1127f1: c1 e2 08 shl $0x8,%edx
1127f4: 8d 14 10 lea (%eax,%edx,1),%edx
1127f7: 03 95 d4 fe ff ff add -0x12c(%ebp),%edx
1127fd: 89 95 d0 fe ff ff mov %edx,-0x130(%ebp)
/* The directory was not empty so try to move to the desired entry in chain*/
for (
112803: 85 d2 test %edx,%edx
112805: 0f 8e f5 00 00 00 jle 112900 <imfs_dir_read+0x150> <== NEVER TAKEN
11280b: 31 d2 xor %edx,%edx
11280d: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp)
112814: 00 00 00
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 );
112817: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax
11281d: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp)
112823: eb 23 jmp 112848 <imfs_dir_read+0x98>
112825: 8d 76 00 lea 0x0(%esi),%esi
);
iop->offset = iop->offset + sizeof(struct dirent);
bytes_transferred = bytes_transferred + sizeof( struct dirent );
}
the_node = the_node->next;
112828: 8b 1b mov (%ebx),%ebx
* 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(
11282a: 81 c2 10 01 00 00 add $0x110,%edx
/* 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 (
112830: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp)
112836: 0f 8e b4 00 00 00 jle 1128f0 <imfs_dir_read+0x140> <== NEVER TAKEN
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
11283c: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx
112842: 0f 84 a8 00 00 00 je 1128f0 <imfs_dir_read+0x140>
/* entry in the read */
return bytes_transferred; /* Indicate that there are no more */
/* entries to return */
}
if( current_entry >= first_entry ) {
112848: 39 95 d4 fe ff ff cmp %edx,-0x12c(%ebp)
11284e: 7f d8 jg 112828 <imfs_dir_read+0x78>
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
112850: 89 95 dc fe ff ff mov %edx,-0x124(%ebp)
112856: 89 d0 mov %edx,%eax
112858: c1 f8 1f sar $0x1f,%eax
11285b: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp)
tmp_dirent.d_reclen = sizeof( struct dirent );
112861: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp)
112868: 10 01
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
11286a: 8b 43 38 mov 0x38(%ebx),%eax
11286d: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp)
tmp_dirent.d_namlen = strlen( the_jnode->name );
112873: 8d 73 0c lea 0xc(%ebx),%esi
112876: 31 c0 xor %eax,%eax
112878: b9 ff ff ff ff mov $0xffffffff,%ecx
11287d: 89 f7 mov %esi,%edi
11287f: f2 ae repnz scas %es:(%edi),%al
112881: f7 d1 not %ecx
112883: 49 dec %ecx
112884: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp)
strcpy( tmp_dirent.d_name, the_jnode->name );
11288b: 83 ec 08 sub $0x8,%esp
11288e: 56 push %esi
11288f: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax
112895: 50 push %eax
112896: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp)
11289c: e8 63 17 00 00 call 114004 <strcpy>
memcpy(
1128a1: 8b 45 0c mov 0xc(%ebp),%eax
1128a4: 03 85 c8 fe ff ff add -0x138(%ebp),%eax
1128aa: b9 44 00 00 00 mov $0x44,%ecx
1128af: 89 c7 mov %eax,%edi
1128b1: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi
1128b7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
1128b9: 8b 45 08 mov 0x8(%ebp),%eax
1128bc: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax)
1128c3: 83 50 10 00 adcl $0x0,0x10(%eax)
bytes_transferred = bytes_transferred + sizeof( struct dirent );
1128c7: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp)
1128ce: 01 00 00
1128d1: 83 c4 10 add $0x10,%esp
1128d4: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx
}
the_node = the_node->next;
1128da: 8b 1b mov (%ebx),%ebx
* 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(
1128dc: 81 c2 10 01 00 00 add $0x110,%edx
/* 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 (
1128e2: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp)
1128e8: 0f 8f 4e ff ff ff jg 11283c <imfs_dir_read+0x8c> <== NEVER TAKEN
1128ee: 66 90 xchg %ax,%ax
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
1128f0: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax
1128f6: 8d 65 f4 lea -0xc(%ebp),%esp
1128f9: 5b pop %ebx
1128fa: 5e pop %esi
1128fb: 5f pop %edi
1128fc: c9 leave
1128fd: c3 ret
1128fe: 66 90 xchg %ax,%ax
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
return 0;
112900: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp)
112907: 00 00 00
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
11290a: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax
112910: 8d 65 f4 lea -0xc(%ebp),%esp
112913: 5b pop %ebx
112914: 5e pop %esi
112915: 5f pop %edi
112916: c9 leave
112917: c3 ret
00112a48 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
112a48: 55 push %ebp
112a49: 89 e5 mov %esp,%ebp
112a4b: 53 push %ebx
112a4c: 83 ec 04 sub $0x4,%esp
112a4f: 8b 45 0c mov 0xc(%ebp),%eax
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
112a52: 8b 18 mov (%eax),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
112a54: 8d 53 54 lea 0x54(%ebx),%edx
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
112a57: 39 53 50 cmp %edx,0x50(%ebx)
112a5a: 75 44 jne 112aa0 <imfs_dir_rmnod+0x58>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
112a5c: 8b 40 10 mov 0x10(%eax),%eax
112a5f: 3b 58 1c cmp 0x1c(%eax),%ebx
112a62: 74 24 je 112a88 <imfs_dir_rmnod+0x40>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
112a64: 8b 4b 5c mov 0x5c(%ebx),%ecx
112a67: 85 c9 test %ecx,%ecx
112a69: 75 1d jne 112a88 <imfs_dir_rmnod+0x40> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
112a6b: 83 ec 0c sub $0xc,%esp
112a6e: 53 push %ebx
112a6f: e8 78 cf ff ff call 10f9ec <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
112a74: 89 1c 24 mov %ebx,(%esp)
112a77: e8 b4 cf ff ff call 10fa30 <IMFS_check_node_remove>
return 0;
112a7c: 83 c4 10 add $0x10,%esp
112a7f: 31 c0 xor %eax,%eax
}
112a81: 8b 5d fc mov -0x4(%ebp),%ebx
112a84: c9 leave
112a85: c3 ret
112a86: 66 90 xchg %ax,%ax
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
112a88: e8 a7 08 00 00 call 113334 <__errno>
112a8d: c7 00 10 00 00 00 movl $0x10,(%eax)
112a93: b8 ff ff ff ff mov $0xffffffff,%eax
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
112a98: 8b 5d fc mov -0x4(%ebp),%ebx
112a9b: c9 leave
112a9c: c3 ret
112a9d: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
112aa0: e8 8f 08 00 00 call 113334 <__errno>
112aa5: c7 00 5a 00 00 00 movl $0x5a,(%eax)
112aab: b8 ff ff ff ff mov $0xffffffff,%eax
112ab0: eb cf jmp 112a81 <imfs_dir_rmnod+0x39>
00108a24 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
108a24: 55 push %ebp
108a25: 89 e5 mov %esp,%ebp
108a27: 53 push %ebx
108a28: 83 ec 04 sub $0x4,%esp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
108a2b: 80 3d a8 8c 12 00 00 cmpb $0x0,0x128ca8
108a32: 74 08 je 108a3c <init_etc_passwd_group+0x18>
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
108a34: 8b 5d fc mov -0x4(%ebp),%ebx
108a37: c9 leave
108a38: c3 ret
108a39: 8d 76 00 lea 0x0(%esi),%esi
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
108a3c: c6 05 a8 8c 12 00 01 movb $0x1,0x128ca8
mkdir("/etc", 0777);
108a43: 83 ec 08 sub $0x8,%esp
108a46: 68 ff 01 00 00 push $0x1ff
108a4b: 68 a8 24 12 00 push $0x1224a8
108a50: e8 37 08 00 00 call 10928c <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
108a55: 59 pop %ecx
108a56: 5b pop %ebx
108a57: 68 d2 0f 12 00 push $0x120fd2
108a5c: 68 ad 24 12 00 push $0x1224ad
108a61: e8 7a bf 00 00 call 1149e0 <fopen>
108a66: 83 c4 10 add $0x10,%esp
108a69: 85 c0 test %eax,%eax
108a6b: 74 77 je 108ae4 <init_etc_passwd_group+0xc0>
fclose(fp);
108a6d: 83 ec 0c sub $0xc,%esp
108a70: 50 push %eax
108a71: e8 66 b8 00 00 call 1142dc <fclose>
108a76: 83 c4 10 add $0x10,%esp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
108a79: 83 ec 08 sub $0x8,%esp
108a7c: 68 d2 0f 12 00 push $0x120fd2
108a81: 68 b9 24 12 00 push $0x1224b9
108a86: e8 55 bf 00 00 call 1149e0 <fopen>
108a8b: 83 c4 10 add $0x10,%esp
108a8e: 85 c0 test %eax,%eax
108a90: 74 12 je 108aa4 <init_etc_passwd_group+0x80>
fclose(fp);
108a92: 83 ec 0c sub $0xc,%esp
108a95: 50 push %eax
108a96: e8 41 b8 00 00 call 1142dc <fclose>
108a9b: 83 c4 10 add $0x10,%esp
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
108a9e: 8b 5d fc mov -0x4(%ebp),%ebx
108aa1: c9 leave
108aa2: c3 ret
108aa3: 90 nop
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
108aa4: 83 ec 08 sub $0x8,%esp
108aa7: 68 b4 0e 12 00 push $0x120eb4
108aac: 68 b9 24 12 00 push $0x1224b9
108ab1: e8 2a bf 00 00 call 1149e0 <fopen>
108ab6: 89 c3 mov %eax,%ebx
108ab8: 83 c4 10 add $0x10,%esp
108abb: 85 c0 test %eax,%eax
108abd: 0f 84 71 ff ff ff je 108a34 <init_etc_passwd_group+0x10><== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
108ac3: 50 push %eax
108ac4: 6a 2a push $0x2a
108ac6: 6a 01 push $0x1
108ac8: 68 2c 25 12 00 push $0x12252c
108acd: e8 e2 c6 00 00 call 1151b4 <fwrite>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
108ad2: 89 1c 24 mov %ebx,(%esp)
108ad5: e8 02 b8 00 00 call 1142dc <fclose>
108ada: 83 c4 10 add $0x10,%esp
108add: e9 52 ff ff ff jmp 108a34 <init_etc_passwd_group+0x10>
108ae2: 66 90 xchg %ax,%ax
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
108ae4: 83 ec 08 sub $0x8,%esp
108ae7: 68 b4 0e 12 00 push $0x120eb4
108aec: 68 ad 24 12 00 push $0x1224ad
108af1: e8 ea be 00 00 call 1149e0 <fopen>
108af6: 89 c3 mov %eax,%ebx
108af8: 83 c4 10 add $0x10,%esp
108afb: 85 c0 test %eax,%eax
108afd: 0f 84 76 ff ff ff je 108a79 <init_etc_passwd_group+0x55><== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
108b03: 50 push %eax
108b04: 6a 66 push $0x66
108b06: 6a 01 push $0x1
108b08: 68 c4 24 12 00 push $0x1224c4
108b0d: e8 a2 c6 00 00 call 1151b4 <fwrite>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
108b12: 89 1c 24 mov %ebx,(%esp)
108b15: e8 c2 b7 00 00 call 1142dc <fclose>
108b1a: 83 c4 10 add $0x10,%esp
108b1d: e9 57 ff ff ff jmp 108a79 <init_etc_passwd_group+0x55>
00109f6c <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
109f6c: 55 push %ebp
109f6d: 89 e5 mov %esp,%ebp
109f6f: 56 push %esi
109f70: 53 push %ebx
109f71: 89 d6 mov %edx,%esi
109f73: 88 c3 mov %al,%bl
if (tty->termios.c_iflag & ISTRIP)
109f75: 8b 42 30 mov 0x30(%edx),%eax
109f78: a8 20 test $0x20,%al
109f7a: 74 03 je 109f7f <iproc+0x13> <== ALWAYS TAKEN
c &= 0x7f;
109f7c: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
109f7f: f6 c4 02 test $0x2,%ah
109f82: 74 18 je 109f9c <iproc+0x30>
c = tolower (c);
109f84: 0f b6 db movzbl %bl,%ebx
109f87: 8b 15 94 52 12 00 mov 0x125294,%edx
109f8d: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx
109f92: 83 e2 03 and $0x3,%edx
109f95: 4a dec %edx
109f96: 0f 84 9c 00 00 00 je 10a038 <iproc+0xcc>
if (c == '\r') {
109f9c: 80 fb 0d cmp $0xd,%bl
109f9f: 74 33 je 109fd4 <iproc+0x68>
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)) {
109fa1: 80 fb 0a cmp $0xa,%bl
109fa4: 0f 84 86 00 00 00 je 10a030 <iproc+0xc4>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
109faa: 84 db test %bl,%bl
109fac: 75 3a jne 109fe8 <iproc+0x7c> <== ALWAYS TAKEN
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
109fae: 8b 46 20 mov 0x20(%esi),%eax
109fb1: 8b 15 a0 51 12 00 mov 0x1251a0,%edx
109fb7: 4a dec %edx
109fb8: 39 d0 cmp %edx,%eax
109fba: 7d 1c jge 109fd8 <iproc+0x6c> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
109fbc: f6 46 3c 08 testb $0x8,0x3c(%esi)
109fc0: 75 7e jne 10a040 <iproc+0xd4> <== ALWAYS TAKEN
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
109fc2: 8b 56 1c mov 0x1c(%esi),%edx
109fc5: 88 1c 02 mov %bl,(%edx,%eax,1)
109fc8: 40 inc %eax
109fc9: 89 46 20 mov %eax,0x20(%esi)
}
return 0;
109fcc: 31 c0 xor %eax,%eax
}
109fce: 5b pop %ebx
109fcf: 5e pop %esi
109fd0: c9 leave
109fd1: c3 ret
109fd2: 66 90 xchg %ax,%ax
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
109fd4: a8 80 test $0x80,%al
109fd6: 74 08 je 109fe0 <iproc+0x74> <== ALWAYS TAKEN
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
109fd8: 31 c0 xor %eax,%eax
}
109fda: 5b pop %ebx <== NOT EXECUTED
109fdb: 5e pop %esi <== NOT EXECUTED
109fdc: c9 leave <== NOT EXECUTED
109fdd: c3 ret <== NOT EXECUTED
109fde: 66 90 xchg %ax,%ax <== NOT EXECUTED
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
109fe0: f6 c4 01 test $0x1,%ah
109fe3: 74 03 je 109fe8 <iproc+0x7c> <== NEVER TAKEN
c = '\n';
109fe5: b3 0a mov $0xa,%bl
109fe7: 90 nop
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
109fe8: 8b 46 3c mov 0x3c(%esi),%eax
109feb: a8 02 test $0x2,%al
109fed: 74 bf je 109fae <iproc+0x42>
if (c == tty->termios.c_cc[VERASE]) {
109fef: 38 5e 43 cmp %bl,0x43(%esi)
109ff2: 0f 84 b0 00 00 00 je 10a0a8 <iproc+0x13c>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
109ff8: 38 5e 44 cmp %bl,0x44(%esi)
109ffb: 74 63 je 10a060 <iproc+0xf4>
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
109ffd: 38 5e 45 cmp %bl,0x45(%esi)
10a000: 0f 84 96 00 00 00 je 10a09c <iproc+0x130> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
10a006: 80 fb 0a cmp $0xa,%bl
10a009: 74 69 je 10a074 <iproc+0x108>
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]) ||
10a00b: 38 5e 4c cmp %bl,0x4c(%esi)
10a00e: 74 05 je 10a015 <iproc+0xa9> <== NEVER TAKEN
10a010: 38 5e 51 cmp %bl,0x51(%esi)
10a013: 75 99 jne 109fae <iproc+0x42> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
10a015: a8 08 test $0x8,%al <== NOT EXECUTED
10a017: 75 3b jne 10a054 <iproc+0xe8> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
10a019: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
10a01c: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED
10a01f: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED
10a022: 40 inc %eax <== NOT EXECUTED
10a023: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
return 1;
10a026: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10a02b: eb a1 jmp 109fce <iproc+0x62> <== NOT EXECUTED
10a02d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
10a030: a8 40 test $0x40,%al
10a032: 74 b4 je 109fe8 <iproc+0x7c> <== ALWAYS TAKEN
c = '\r';
10a034: b3 0d mov $0xd,%bl <== NOT EXECUTED
10a036: eb b0 jmp 109fe8 <iproc+0x7c> <== NOT EXECUTED
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
10a038: 83 c3 20 add $0x20,%ebx
10a03b: e9 5c ff ff ff jmp 109f9c <iproc+0x30>
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
10a040: 0f b6 c3 movzbl %bl,%eax
10a043: 89 f2 mov %esi,%edx
10a045: e8 f2 fc ff ff call 109d3c <echo>
10a04a: 8b 46 20 mov 0x20(%esi),%eax
10a04d: e9 70 ff ff ff jmp 109fc2 <iproc+0x56>
10a052: 66 90 xchg %ax,%ax
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
10a054: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
10a057: 89 f2 mov %esi,%edx <== NOT EXECUTED
10a059: e8 de fc ff ff call 109d3c <echo> <== NOT EXECUTED
10a05e: eb b9 jmp 10a019 <iproc+0xad> <== 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);
10a060: ba 01 00 00 00 mov $0x1,%edx
10a065: 89 f0 mov %esi,%eax
10a067: e8 34 fd ff ff call 109da0 <erase>
return 0;
10a06c: 31 c0 xor %eax,%eax
10a06e: e9 5b ff ff ff jmp 109fce <iproc+0x62>
10a073: 90 nop
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
10a074: a8 48 test $0x48,%al
10a076: 74 0c je 10a084 <iproc+0x118> <== NEVER TAKEN
echo (c, tty);
10a078: 89 f2 mov %esi,%edx
10a07a: b8 0a 00 00 00 mov $0xa,%eax
10a07f: e8 b8 fc ff ff call 109d3c <echo>
tty->cbuf[tty->ccount++] = c;
10a084: 8b 46 20 mov 0x20(%esi),%eax
10a087: 8b 56 1c mov 0x1c(%esi),%edx
10a08a: c6 04 02 0a movb $0xa,(%edx,%eax,1)
10a08e: 40 inc %eax
10a08f: 89 46 20 mov %eax,0x20(%esi)
return 1;
10a092: b8 01 00 00 00 mov $0x1,%eax
10a097: e9 32 ff ff ff jmp 109fce <iproc+0x62>
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
10a09c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10a0a1: e9 28 ff ff ff jmp 109fce <iproc+0x62> <== NOT EXECUTED
10a0a6: 66 90 xchg %ax,%ax <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
10a0a8: 31 d2 xor %edx,%edx
10a0aa: 89 f0 mov %esi,%eax
10a0ac: e8 ef fc ff ff call 109da0 <erase>
return 0;
10a0b1: 31 c0 xor %eax,%eax
10a0b3: e9 16 ff ff ff jmp 109fce <iproc+0x62>
00124190 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
124190: 55 push %ebp
124191: 89 e5 mov %esp,%ebp
124193: 57 push %edi
124194: 56 push %esi
124195: 53 push %ebx
124196: 83 ec 3c sub $0x3c,%esp
124199: 8b 75 0c mov 0xc(%ebp),%esi
12419c: 8b 7d 10 mov 0x10(%ebp),%edi
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
12419f: e8 00 fd ff ff call 123ea4 <getpid>
1241a4: 3b 45 08 cmp 0x8(%ebp),%eax
1241a7: 0f 85 3f 02 00 00 jne 1243ec <killinfo+0x25c>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
1241ad: 85 f6 test %esi,%esi
1241af: 0f 84 4c 02 00 00 je 124401 <killinfo+0x271>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
1241b5: 8d 4e ff lea -0x1(%esi),%ecx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
1241b8: 83 f9 1f cmp $0x1f,%ecx
1241bb: 0f 87 40 02 00 00 ja 124401 <killinfo+0x271>
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 )
1241c1: 8d 04 76 lea (%esi,%esi,2),%eax
1241c4: 83 3c 85 e8 e8 12 00 cmpl $0x1,0x12e8e8(,%eax,4)
1241cb: 01
1241cc: 0f 84 e6 01 00 00 je 1243b8 <killinfo+0x228>
/*
* 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 ) )
1241d2: 83 fe 08 cmp $0x8,%esi
1241d5: 0f 84 c9 00 00 00 je 1242a4 <killinfo+0x114>
1241db: 83 fe 04 cmp $0x4,%esi
1241de: 0f 84 c0 00 00 00 je 1242a4 <killinfo+0x114>
1241e4: 83 fe 0b cmp $0xb,%esi
1241e7: 0f 84 b7 00 00 00 je 1242a4 <killinfo+0x114>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
1241ed: bb 01 00 00 00 mov $0x1,%ebx
1241f2: d3 e3 shl %cl,%ebx
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
1241f4: 89 75 dc mov %esi,-0x24(%ebp)
siginfo->si_code = SI_USER;
1241f7: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
if ( !value ) {
1241fe: 85 ff test %edi,%edi
124200: 0f 84 ba 01 00 00 je 1243c0 <killinfo+0x230>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
124206: 8b 07 mov (%edi),%eax
124208: 89 45 e4 mov %eax,-0x1c(%ebp)
12420b: a1 90 e2 12 00 mov 0x12e290,%eax
124210: 40 inc %eax
124211: a3 90 e2 12 00 mov %eax,0x12e290
/*
* 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;
124216: 8b 0d 78 e8 12 00 mov 0x12e878,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
12421c: 8b 81 ec 00 00 00 mov 0xec(%ecx),%eax
124222: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
124228: f7 d0 not %eax
12422a: 85 c3 test %eax,%ebx
12422c: 75 34 jne 124262 <killinfo+0xd2>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
12422e: a1 80 ea 12 00 mov 0x12ea80,%eax
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
124233: 3d 84 ea 12 00 cmp $0x12ea84,%eax
124238: 75 1b jne 124255 <killinfo+0xc5>
12423a: e9 81 00 00 00 jmp 1242c0 <killinfo+0x130>
12423f: 90 nop
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
124240: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx
124246: f7 d2 not %edx
124248: 85 d3 test %edx,%ebx
12424a: 75 16 jne 124262 <killinfo+0xd2>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
12424c: 8b 00 mov (%eax),%eax
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
12424e: 3d 84 ea 12 00 cmp $0x12ea84,%eax
124253: 74 6b je 1242c0 <killinfo+0x130> <== ALWAYS TAKEN
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
124255: 89 c1 mov %eax,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
124257: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
12425d: 85 58 30 test %ebx,0x30(%eax)
124260: 74 de je 124240 <killinfo+0xb0>
/*
* 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 ) ) {
124262: 50 push %eax
mask = signo_to_mask( sig );
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
124263: 8d 45 dc lea -0x24(%ebp),%eax
/*
* 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 ) ) {
124266: 50 push %eax
124267: 56 push %esi
124268: 51 push %ecx
124269: e8 d6 01 00 00 call 124444 <_POSIX_signals_Unblock_thread>
12426e: 83 c4 10 add $0x10,%esp
124271: 84 c0 test %al,%al
124273: 75 1f jne 124294 <killinfo+0x104>
/*
* 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 );
124275: 83 ec 0c sub $0xc,%esp
124278: 53 push %ebx
124279: e8 b2 01 00 00 call 124430 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
12427e: 8d 1c 76 lea (%esi,%esi,2),%ebx
124281: c1 e3 02 shl $0x2,%ebx
124284: 83 c4 10 add $0x10,%esp
124287: 83 bb e0 e8 12 00 02 cmpl $0x2,0x12e8e0(%ebx)
12428e: 0f 84 e4 00 00 00 je 124378 <killinfo+0x1e8>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
124294: e8 63 e7 fe ff call 1129fc <_Thread_Enable_dispatch>
return 0;
124299: 31 c0 xor %eax,%eax
}
12429b: 8d 65 f4 lea -0xc(%ebp),%esp
12429e: 5b pop %ebx
12429f: 5e pop %esi
1242a0: 5f pop %edi
1242a1: c9 leave
1242a2: c3 ret
1242a3: 90 nop
* 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 );
1242a4: e8 7b 03 00 00 call 124624 <pthread_self>
1242a9: 83 ec 08 sub $0x8,%esp
1242ac: 56 push %esi
1242ad: 50 push %eax
1242ae: e8 b1 02 00 00 call 124564 <pthread_kill>
1242b3: 83 c4 10 add $0x10,%esp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
1242b6: 8d 65 f4 lea -0xc(%ebp),%esp
1242b9: 5b pop %ebx
1242ba: 5e pop %esi
1242bb: 5f pop %edi
1242bc: c9 leave
1242bd: c3 ret
1242be: 66 90 xchg %ax,%ax
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
1242c0: 0f b6 05 34 9e 12 00 movzbl 0x129e34,%eax
1242c7: 40 inc %eax
1242c8: 89 45 d4 mov %eax,-0x2c(%ebp)
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
1242cb: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
1242d2: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp)
1242d9: 89 5d d0 mov %ebx,-0x30(%ebp)
1242dc: 89 75 c0 mov %esi,-0x40(%ebp)
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
1242df: 8b 55 cc mov -0x34(%ebp),%edx
1242e2: 8b 04 95 68 e2 12 00 mov 0x12e268(,%edx,4),%eax
1242e9: 85 c0 test %eax,%eax
1242eb: 74 68 je 124355 <killinfo+0x1c5> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
1242ed: 8b 40 04 mov 0x4(%eax),%eax
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
1242f0: 0f b7 70 10 movzwl 0x10(%eax),%esi
object_table = the_info->local_table;
1242f4: 8b 78 1c mov 0x1c(%eax),%edi
for ( index = 1 ; index <= maximum ; index++ ) {
1242f7: 85 f6 test %esi,%esi
1242f9: 74 5a je 124355 <killinfo+0x1c5>
1242fb: b8 01 00 00 00 mov $0x1,%eax
the_thread = (Thread_Control *) object_table[ index ];
124300: 8b 14 87 mov (%edi,%eax,4),%edx
if ( !the_thread )
124303: 85 d2 test %edx,%edx
124305: 74 49 je 124350 <killinfo+0x1c0>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
124307: 8b 4a 14 mov 0x14(%edx),%ecx
12430a: 3b 4d d4 cmp -0x2c(%ebp),%ecx
12430d: 77 41 ja 124350 <killinfo+0x1c0>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
12430f: 8b 9a ec 00 00 00 mov 0xec(%edx),%ebx
124315: 8b 9b d0 00 00 00 mov 0xd0(%ebx),%ebx
12431b: f7 d3 not %ebx
12431d: 85 5d d0 test %ebx,-0x30(%ebp)
124320: 74 2e je 124350 <killinfo+0x1c0>
*
* 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 ) {
124322: 3b 4d d4 cmp -0x2c(%ebp),%ecx
124325: 72 21 jb 124348 <killinfo+0x1b8>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
124327: 8b 5d c8 mov -0x38(%ebp),%ebx
12432a: 85 db test %ebx,%ebx
12432c: 74 22 je 124350 <killinfo+0x1c0> <== NEVER TAKEN
12432e: 8b 5d c8 mov -0x38(%ebp),%ebx
124331: 8b 5b 10 mov 0x10(%ebx),%ebx
124334: 89 5d c4 mov %ebx,-0x3c(%ebp)
124337: 85 db test %ebx,%ebx
124339: 74 15 je 124350 <killinfo+0x1c0> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
12433b: 8b 5a 10 mov 0x10(%edx),%ebx
12433e: 85 db test %ebx,%ebx
124340: 0f 85 86 00 00 00 jne 1243cc <killinfo+0x23c>
124346: 66 90 xchg %ax,%ax
124348: 89 4d d4 mov %ecx,-0x2c(%ebp)
12434b: 89 55 c8 mov %edx,-0x38(%ebp)
12434e: 66 90 xchg %ax,%ax
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
124350: 40 inc %eax
124351: 39 c6 cmp %eax,%esi
124353: 73 ab jae 124300 <killinfo+0x170>
* + 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++) {
124355: ff 45 cc incl -0x34(%ebp)
124358: 83 7d cc 04 cmpl $0x4,-0x34(%ebp)
12435c: 75 81 jne 1242df <killinfo+0x14f>
12435e: 8b 5d d0 mov -0x30(%ebp),%ebx
124361: 8b 75 c0 mov -0x40(%ebp),%esi
}
}
}
}
if ( interested ) {
124364: 8b 55 c8 mov -0x38(%ebp),%edx
124367: 85 d2 test %edx,%edx
124369: 0f 84 06 ff ff ff je 124275 <killinfo+0xe5>
12436f: 8b 4d c8 mov -0x38(%ebp),%ecx
124372: e9 eb fe ff ff jmp 124262 <killinfo+0xd2>
124377: 90 nop
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
124378: 83 ec 0c sub $0xc,%esp
12437b: 68 60 ea 12 00 push $0x12ea60
124380: e8 f3 cc fe ff call 111078 <_Chain_Get>
if ( !psiginfo ) {
124385: 83 c4 10 add $0x10,%esp
124388: 85 c0 test %eax,%eax
12438a: 0f 84 86 00 00 00 je 124416 <killinfo+0x286>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
124390: 8d 78 08 lea 0x8(%eax),%edi
124393: 8d 75 dc lea -0x24(%ebp),%esi
124396: b9 03 00 00 00 mov $0x3,%ecx
12439b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
12439d: 83 ec 08 sub $0x8,%esp
1243a0: 50 push %eax
1243a1: 81 c3 00 eb 12 00 add $0x12eb00,%ebx
1243a7: 53 push %ebx
1243a8: e8 8f cc fe ff call 11103c <_Chain_Append>
1243ad: 83 c4 10 add $0x10,%esp
1243b0: e9 df fe ff ff jmp 124294 <killinfo+0x104>
1243b5: 8d 76 00 lea 0x0(%esi),%esi
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
1243b8: 31 c0 xor %eax,%eax
1243ba: e9 f7 fe ff ff jmp 1242b6 <killinfo+0x126>
1243bf: 90 nop
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
1243c0: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
1243c7: e9 3f fe ff ff jmp 12420b <killinfo+0x7b>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
1243cc: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp)
1243d3: 0f 85 77 ff ff ff jne 124350 <killinfo+0x1c0>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
1243d9: 81 e3 00 00 00 10 and $0x10000000,%ebx
1243df: 0f 84 6b ff ff ff je 124350 <killinfo+0x1c0>
1243e5: e9 5e ff ff ff jmp 124348 <killinfo+0x1b8>
1243ea: 66 90 xchg %ax,%ax
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
1243ec: e8 eb 40 ff ff call 1184dc <__errno>
1243f1: c7 00 03 00 00 00 movl $0x3,(%eax)
1243f7: b8 ff ff ff ff mov $0xffffffff,%eax
1243fc: e9 b5 fe ff ff jmp 1242b6 <killinfo+0x126>
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
124401: e8 d6 40 ff ff call 1184dc <__errno>
124406: c7 00 16 00 00 00 movl $0x16,(%eax)
12440c: b8 ff ff ff ff mov $0xffffffff,%eax
124411: e9 a0 fe ff ff jmp 1242b6 <killinfo+0x126>
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();
124416: e8 e1 e5 fe ff call 1129fc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
12441b: e8 bc 40 ff ff call 1184dc <__errno>
124420: c7 00 0b 00 00 00 movl $0xb,(%eax)
124426: 83 c8 ff or $0xffffffff,%eax
124429: e9 88 fe ff ff jmp 1242b6 <killinfo+0x126>
0011e984 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
11e984: 55 push %ebp
11e985: 89 e5 mov %esp,%ebp
11e987: 53 push %ebx
11e988: 83 ec 04 sub $0x4,%esp
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
11e98b: 83 3d 20 77 12 00 03 cmpl $0x3,0x127720
11e992: 74 08 je 11e99c <libc_wrapup+0x18> <== ALWAYS TAKEN
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
}
11e994: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
11e997: c9 leave <== NOT EXECUTED
11e998: c3 ret <== NOT EXECUTED
11e999: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
11e99c: 8b 1d e0 16 12 00 mov 0x1216e0,%ebx
11e9a2: 39 1d a0 52 12 00 cmp %ebx,0x1252a0
11e9a8: 74 12 je 11e9bc <libc_wrapup+0x38>
_wrapup_reent(_global_impure_ptr);
11e9aa: 83 ec 0c sub $0xc,%esp
11e9ad: 53 push %ebx
11e9ae: e8 f5 05 00 00 call 11efa8 <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
11e9b3: 89 1d a0 52 12 00 mov %ebx,0x1252a0
11e9b9: 83 c4 10 add $0x10,%esp
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
11e9bc: 83 ec 0c sub $0xc,%esp
11e9bf: ff 73 04 pushl 0x4(%ebx)
11e9c2: e8 c5 4a ff ff call 11348c <fclose>
fclose (stdout);
11e9c7: 5a pop %edx
11e9c8: a1 a0 52 12 00 mov 0x1252a0,%eax
11e9cd: ff 70 08 pushl 0x8(%eax)
11e9d0: e8 b7 4a ff ff call 11348c <fclose>
fclose (stderr);
11e9d5: 58 pop %eax
11e9d6: a1 a0 52 12 00 mov 0x1252a0,%eax
11e9db: ff 70 0c pushl 0xc(%eax)
11e9de: e8 a9 4a ff ff call 11348c <fclose>
11e9e3: 83 c4 10 add $0x10,%esp
}
11e9e6: 8b 5d fc mov -0x4(%ebp),%ebx
11e9e9: c9 leave
11e9ea: c3 ret
0010b568 <link>:
int link(
const char *existing,
const char *new
)
{
10b568: 55 push %ebp
10b569: 89 e5 mov %esp,%ebp
10b56b: 57 push %edi
10b56c: 56 push %esi
10b56d: 53 push %ebx
10b56e: 83 ec 58 sub $0x58,%esp
10b571: 8b 55 08 mov 0x8(%ebp),%edx
10b574: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
10b577: 31 c0 xor %eax,%eax
10b579: b9 ff ff ff ff mov $0xffffffff,%ecx
10b57e: 89 d7 mov %edx,%edi
10b580: f2 ae repnz scas %es:(%edi),%al
10b582: f7 d1 not %ecx
10b584: 49 dec %ecx
10b585: 6a 01 push $0x1
10b587: 8d 75 cc lea -0x34(%ebp),%esi
10b58a: 56 push %esi
10b58b: 6a 00 push $0x0
10b58d: 51 push %ecx
10b58e: 52 push %edx
10b58f: e8 28 f9 ff ff call 10aebc <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
10b594: 83 c4 20 add $0x20,%esp
10b597: 85 c0 test %eax,%eax
10b599: 74 0d je 10b5a8 <link+0x40>
return -1;
10b59b: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
10b5a0: 8d 65 f4 lea -0xc(%ebp),%esp
10b5a3: 5b pop %ebx
10b5a4: 5e pop %esi
10b5a5: 5f pop %edi
10b5a6: c9 leave
10b5a7: c3 ret
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
10b5a8: 52 push %edx
10b5a9: 8d 7d b8 lea -0x48(%ebp),%edi
10b5ac: 57 push %edi
10b5ad: 8d 45 e4 lea -0x1c(%ebp),%eax
10b5b0: 50 push %eax
10b5b1: 53 push %ebx
10b5b2: e8 f5 12 00 00 call 10c8ac <rtems_filesystem_get_start_loc>
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
10b5b7: 83 c4 0c add $0xc,%esp
10b5ba: 8d 45 e0 lea -0x20(%ebp),%eax
10b5bd: 50 push %eax
10b5be: 57 push %edi
10b5bf: 03 5d e4 add -0x1c(%ebp),%ebx
10b5c2: 53 push %ebx
10b5c3: 8b 45 c4 mov -0x3c(%ebp),%eax
10b5c6: ff 50 04 call *0x4(%eax)
if ( result != 0 ) {
10b5c9: 83 c4 10 add $0x10,%esp
10b5cc: 85 c0 test %eax,%eax
10b5ce: 75 61 jne 10b631 <link+0xc9>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
10b5d0: 8b 45 dc mov -0x24(%ebp),%eax
10b5d3: 39 45 c8 cmp %eax,-0x38(%ebp)
10b5d6: 75 30 jne 10b608 <link+0xa0>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
10b5d8: 50 push %eax
10b5d9: ff 75 e0 pushl -0x20(%ebp)
10b5dc: 57 push %edi
10b5dd: 56 push %esi
10b5de: 8b 45 c4 mov -0x3c(%ebp),%eax
10b5e1: ff 50 08 call *0x8(%eax)
rtems_filesystem_freenode( &existing_loc );
10b5e4: 89 34 24 mov %esi,(%esp)
10b5e7: 89 45 b4 mov %eax,-0x4c(%ebp)
10b5ea: e8 81 fb ff ff call 10b170 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &parent_loc );
10b5ef: 89 3c 24 mov %edi,(%esp)
10b5f2: e8 79 fb ff ff call 10b170 <rtems_filesystem_freenode>
return result;
10b5f7: 83 c4 10 add $0x10,%esp
10b5fa: 8b 45 b4 mov -0x4c(%ebp),%eax
}
10b5fd: 8d 65 f4 lea -0xc(%ebp),%esp
10b600: 5b pop %ebx
10b601: 5e pop %esi
10b602: 5f pop %edi
10b603: c9 leave
10b604: c3 ret
10b605: 8d 76 00 lea 0x0(%esi),%esi
* 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 );
10b608: 83 ec 0c sub $0xc,%esp
10b60b: 56 push %esi
10b60c: e8 5f fb ff ff call 10b170 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &parent_loc );
10b611: 89 3c 24 mov %edi,(%esp)
10b614: e8 57 fb ff ff call 10b170 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
10b619: e8 56 b9 00 00 call 116f74 <__errno>
10b61e: c7 00 12 00 00 00 movl $0x12,(%eax)
10b624: 83 c4 10 add $0x10,%esp
10b627: b8 ff ff ff ff mov $0xffffffff,%eax
10b62c: e9 6f ff ff ff jmp 10b5a0 <link+0x38>
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
10b631: 83 ec 0c sub $0xc,%esp
10b634: 56 push %esi
10b635: e8 36 fb ff ff call 10b170 <rtems_filesystem_freenode>
return -1;
10b63a: 83 c4 10 add $0x10,%esp
10b63d: b8 ff ff ff ff mov $0xffffffff,%eax
10b642: e9 59 ff ff ff jmp 10b5a0 <link+0x38>
0011e85c <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
11e85c: 55 push %ebp
11e85d: 89 e5 mov %esp,%ebp
11e85f: 57 push %edi
11e860: 56 push %esi
11e861: 53 push %ebx
11e862: 83 ec 1c sub $0x1c,%esp
11e865: 8b 5d 08 mov 0x8(%ebp),%ebx
11e868: 8b 55 0c mov 0xc(%ebp),%edx
11e86b: 8b 4d 10 mov 0x10(%ebp),%ecx
11e86e: 8b 45 14 mov 0x14(%ebp),%eax
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
11e871: 3b 1d ac 31 12 00 cmp 0x1231ac,%ebx
11e877: 0f 83 b3 00 00 00 jae 11e930 <lseek+0xd4> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11e87d: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
11e884: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx
11e88b: 29 f3 sub %esi,%ebx
11e88d: 03 1d e0 73 12 00 add 0x1273e0,%ebx
rtems_libio_check_is_open(iop);
11e893: f6 43 15 01 testb $0x1,0x15(%ebx)
11e897: 0f 84 93 00 00 00 je 11e930 <lseek+0xd4> <== NEVER TAKEN
/*
* Now process the lseek().
*/
old_offset = iop->offset;
11e89d: 8b 73 0c mov 0xc(%ebx),%esi
11e8a0: 8b 7b 10 mov 0x10(%ebx),%edi
11e8a3: 89 75 e0 mov %esi,-0x20(%ebp)
11e8a6: 89 7d e4 mov %edi,-0x1c(%ebp)
switch ( whence ) {
11e8a9: 83 f8 01 cmp $0x1,%eax
11e8ac: 74 6e je 11e91c <lseek+0xc0>
11e8ae: 83 f8 02 cmp $0x2,%eax
11e8b1: 74 35 je 11e8e8 <lseek+0x8c>
11e8b3: 85 c0 test %eax,%eax
11e8b5: 75 45 jne 11e8fc <lseek+0xa0>
case SEEK_SET:
iop->offset = offset;
11e8b7: 89 53 0c mov %edx,0xc(%ebx)
11e8ba: 89 4b 10 mov %ecx,0x10(%ebx)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
11e8bd: 8b 73 20 mov 0x20(%ebx),%esi
11e8c0: 50 push %eax
11e8c1: 51 push %ecx
11e8c2: 52 push %edx
11e8c3: 53 push %ebx
11e8c4: ff 56 14 call *0x14(%esi)
if ( status == (off_t) -1 )
11e8c7: 83 c4 10 add $0x10,%esp
11e8ca: 89 c1 mov %eax,%ecx
11e8cc: 21 d1 and %edx,%ecx
11e8ce: 41 inc %ecx
11e8cf: 75 0c jne 11e8dd <lseek+0x81>
iop->offset = old_offset;
11e8d1: 8b 75 e0 mov -0x20(%ebp),%esi
11e8d4: 8b 7d e4 mov -0x1c(%ebp),%edi
11e8d7: 89 73 0c mov %esi,0xc(%ebx)
11e8da: 89 7b 10 mov %edi,0x10(%ebx)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
11e8dd: 8d 65 f4 lea -0xc(%ebp),%esp
11e8e0: 5b pop %ebx
11e8e1: 5e pop %esi
11e8e2: 5f pop %edi
11e8e3: c9 leave
11e8e4: c3 ret
11e8e5: 8d 76 00 lea 0x0(%esi),%esi
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
11e8e8: 89 d6 mov %edx,%esi
11e8ea: 89 cf mov %ecx,%edi
11e8ec: 03 73 04 add 0x4(%ebx),%esi
11e8ef: 13 7b 08 adc 0x8(%ebx),%edi
11e8f2: 89 73 0c mov %esi,0xc(%ebx)
11e8f5: 89 7b 10 mov %edi,0x10(%ebx)
break;
11e8f8: eb c3 jmp 11e8bd <lseek+0x61>
11e8fa: 66 90 xchg %ax,%ax
default:
rtems_set_errno_and_return_minus_one( EINVAL );
11e8fc: e8 33 4a ff ff call 113334 <__errno>
11e901: c7 00 16 00 00 00 movl $0x16,(%eax)
11e907: b8 ff ff ff ff mov $0xffffffff,%eax
11e90c: ba ff ff ff ff mov $0xffffffff,%edx
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
11e911: 8d 65 f4 lea -0xc(%ebp),%esp
11e914: 5b pop %ebx
11e915: 5e pop %esi
11e916: 5f pop %edi
11e917: c9 leave
11e918: c3 ret
11e919: 8d 76 00 lea 0x0(%esi),%esi
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
11e91c: 8b 75 e0 mov -0x20(%ebp),%esi
11e91f: 8b 7d e4 mov -0x1c(%ebp),%edi
11e922: 01 d6 add %edx,%esi
11e924: 11 cf adc %ecx,%edi
11e926: 89 73 0c mov %esi,0xc(%ebx)
11e929: 89 7b 10 mov %edi,0x10(%ebx)
break;
11e92c: eb 8f jmp 11e8bd <lseek+0x61>
11e92e: 66 90 xchg %ax,%ax
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
11e930: e8 ff 49 ff ff call 113334 <__errno>
11e935: c7 00 09 00 00 00 movl $0x9,(%eax)
11e93b: b8 ff ff ff ff mov $0xffffffff,%eax
11e940: ba ff ff ff ff mov $0xffffffff,%edx
11e945: eb 96 jmp 11e8dd <lseek+0x81>
00109eac <lstat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
109eac: 55 push %ebp
109ead: 89 e5 mov %esp,%ebp
109eaf: 57 push %edi
109eb0: 56 push %esi
109eb1: 53 push %ebx
109eb2: 83 ec 3c sub $0x3c,%esp
109eb5: 8b 55 08 mov 0x8(%ebp),%edx
109eb8: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
109ebb: 85 f6 test %esi,%esi
109ebd: 74 65 je 109f24 <lstat+0x78>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
109ebf: b9 ff ff ff ff mov $0xffffffff,%ecx
109ec4: 89 d7 mov %edx,%edi
109ec6: 31 c0 xor %eax,%eax
109ec8: f2 ae repnz scas %es:(%edi),%al
109eca: f7 d1 not %ecx
109ecc: 49 dec %ecx
109ecd: 83 ec 0c sub $0xc,%esp
109ed0: 6a 00 push $0x0
109ed2: 8d 5d d4 lea -0x2c(%ebp),%ebx
109ed5: 53 push %ebx
109ed6: 6a 00 push $0x0
109ed8: 51 push %ecx
109ed9: 52 push %edx
109eda: e8 e5 f9 ff ff call 1098c4 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
109edf: 83 c4 20 add $0x20,%esp
109ee2: 85 c0 test %eax,%eax
109ee4: 74 0e je 109ef4 <lstat+0x48>
return -1;
109ee6: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
109eeb: 8d 65 f4 lea -0xc(%ebp),%esp
109eee: 5b pop %ebx
109eef: 5e pop %esi
109ef0: 5f pop %edi
109ef1: c9 leave
109ef2: c3 ret
109ef3: 90 nop
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
109ef4: b9 48 00 00 00 mov $0x48,%ecx
109ef9: 89 f7 mov %esi,%edi
109efb: f3 aa rep stos %al,%es:(%edi)
status = (*loc.handlers->fstat_h)( &loc, buf );
109efd: 83 ec 08 sub $0x8,%esp
109f00: 56 push %esi
109f01: 53 push %ebx
109f02: 8b 45 dc mov -0x24(%ebp),%eax
109f05: ff 50 18 call *0x18(%eax)
rtems_filesystem_freenode( &loc );
109f08: 89 1c 24 mov %ebx,(%esp)
109f0b: 89 45 c4 mov %eax,-0x3c(%ebp)
109f0e: e8 89 fa ff ff call 10999c <rtems_filesystem_freenode>
return status;
109f13: 83 c4 10 add $0x10,%esp
109f16: 8b 45 c4 mov -0x3c(%ebp),%eax
}
109f19: 8d 65 f4 lea -0xc(%ebp),%esp
109f1c: 5b pop %ebx
109f1d: 5e pop %esi
109f1e: 5f pop %edi
109f1f: c9 leave
109f20: c3 ret
109f21: 8d 76 00 lea 0x0(%esi),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
109f24: e8 eb b5 00 00 call 115514 <__errno>
109f29: c7 00 0e 00 00 00 movl $0xe,(%eax)
109f2f: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
109f34: 8d 65 f4 lea -0xc(%ebp),%esp
109f37: 5b pop %ebx
109f38: 5e pop %esi
109f39: 5f pop %edi
109f3a: c9 leave
109f3b: c3 ret
00108388 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
108388: 55 push %ebp
108389: 89 e5 mov %esp,%ebp
10838b: 56 push %esi
10838c: 53 push %ebx
10838d: 8b 75 08 mov 0x8(%ebp),%esi
void *return_this;
MSBUMP(malloc_calls, 1);
108390: ff 05 04 74 12 00 incl 0x127404
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
108396: e8 fd fe ff ff call 108298 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
10839b: 85 f6 test %esi,%esi
10839d: 74 5d je 1083fc <malloc+0x74>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
10839f: 83 3d 20 77 12 00 03 cmpl $0x3,0x127720
1083a6: 74 48 je 1083f0 <malloc+0x68>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
1083a8: 6a 00 push $0x0
1083aa: 6a 00 push $0x0
1083ac: 56 push %esi
1083ad: ff 35 b8 31 12 00 pushl 0x1231b8
1083b3: e8 58 4d 00 00 call 10d110 <_Protected_heap_Allocate_aligned_with_boundary>
1083b8: 89 c3 mov %eax,%ebx
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
1083ba: 83 c4 10 add $0x10,%esp
1083bd: 85 c0 test %eax,%eax
1083bf: 74 47 je 108408 <malloc+0x80>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
1083c1: a1 b0 57 12 00 mov 0x1257b0,%eax
1083c6: 85 c0 test %eax,%eax
1083c8: 74 0a je 1083d4 <malloc+0x4c>
(*rtems_malloc_dirty_helper)( return_this, size );
1083ca: 83 ec 08 sub $0x8,%esp
1083cd: 56 push %esi
1083ce: 53 push %ebx
1083cf: ff d0 call *%eax
1083d1: 83 c4 10 add $0x10,%esp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
1083d4: a1 a8 57 12 00 mov 0x1257a8,%eax
1083d9: 85 c0 test %eax,%eax
1083db: 74 0a je 1083e7 <malloc+0x5f>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
1083dd: 83 ec 0c sub $0xc,%esp
1083e0: 53 push %ebx
1083e1: ff 50 04 call *0x4(%eax)
1083e4: 83 c4 10 add $0x10,%esp
return return_this;
}
1083e7: 89 d8 mov %ebx,%eax
1083e9: 8d 65 f8 lea -0x8(%ebp),%esp
1083ec: 5b pop %ebx
1083ed: 5e pop %esi
1083ee: c9 leave
1083ef: c3 ret
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
1083f0: e8 63 fe ff ff call 108258 <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1083f5: 84 c0 test %al,%al
1083f7: 75 af jne 1083a8 <malloc+0x20> <== ALWAYS TAKEN
1083f9: 8d 76 00 lea 0x0(%esi),%esi
!malloc_is_system_state_OK() )
return NULL;
1083fc: 31 db xor %ebx,%ebx
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
1083fe: 89 d8 mov %ebx,%eax
108400: 8d 65 f8 lea -0x8(%ebp),%esp
108403: 5b pop %ebx
108404: 5e pop %esi
108405: c9 leave
108406: c3 ret
108407: 90 nop
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
108408: a1 ac 57 12 00 mov 0x1257ac,%eax
10840d: 85 c0 test %eax,%eax
10840f: 74 12 je 108423 <malloc+0x9b>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
108411: 83 ec 0c sub $0xc,%esp
108414: 56 push %esi
108415: ff 50 04 call *0x4(%eax)
if ( !return_this ) {
108418: 83 c4 10 add $0x10,%esp
10841b: 85 c0 test %eax,%eax
10841d: 74 04 je 108423 <malloc+0x9b>
10841f: 89 c3 mov %eax,%ebx
108421: eb 9e jmp 1083c1 <malloc+0x39>
errno = ENOMEM;
108423: e8 0c af 00 00 call 113334 <__errno>
108428: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
10842e: eb b7 jmp 1083e7 <malloc+0x5f>
001082fc <malloc_get_statistics>:
#include "malloc_p.h"
int malloc_get_statistics(
rtems_malloc_statistics_t *stats
)
{
1082fc: 55 push %ebp
1082fd: 89 e5 mov %esp,%ebp
1082ff: 57 push %edi
108300: 56 push %esi
108301: 53 push %ebx
108302: 83 ec 0c sub $0xc,%esp
108305: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !stats )
108308: 85 db test %ebx,%ebx
10830a: 74 38 je 108344 <malloc_get_statistics+0x48>
return -1;
_RTEMS_Lock_allocator();
10830c: 83 ec 0c sub $0xc,%esp
10830f: ff 35 fc 75 12 00 pushl 0x1275fc
108315: e8 7a 3c 00 00 call 10bf94 <_API_Mutex_Lock>
*stats = rtems_malloc_statistics;
10831a: be c0 73 12 00 mov $0x1273c0,%esi
10831f: b9 0b 00 00 00 mov $0xb,%ecx
108324: 89 df mov %ebx,%edi
108326: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_RTEMS_Unlock_allocator();
108328: 58 pop %eax
108329: ff 35 fc 75 12 00 pushl 0x1275fc
10832f: e8 a8 3c 00 00 call 10bfdc <_API_Mutex_Unlock>
return 0;
108334: 83 c4 10 add $0x10,%esp
108337: 31 c0 xor %eax,%eax
}
108339: 8d 65 f4 lea -0xc(%ebp),%esp
10833c: 5b pop %ebx
10833d: 5e pop %esi
10833e: 5f pop %edi
10833f: c9 leave
108340: c3 ret
108341: 8d 76 00 lea 0x0(%esi),%esi
int malloc_get_statistics(
rtems_malloc_statistics_t *stats
)
{
if ( !stats )
return -1;
108344: b8 ff ff ff ff mov $0xffffffff,%eax
_RTEMS_Lock_allocator();
*stats = rtems_malloc_statistics;
_RTEMS_Unlock_allocator();
return 0;
}
108349: 8d 65 f4 lea -0xc(%ebp),%esp
10834c: 5b pop %ebx
10834d: 5e pop %esi
10834e: 5f pop %edi
10834f: c9 leave
108350: c3 ret
0010871c <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
10871c: 55 push %ebp
10871d: 89 e5 mov %esp,%ebp
10871f: 56 push %esi
108720: 53 push %ebx
108721: 8b 75 08 mov 0x8(%ebp),%esi
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
108724: 8b 0d 2c 7c 12 00 mov 0x127c2c,%ecx
if ( sbrk_amount == 0 )
10872a: 85 c9 test %ecx,%ecx
10872c: 75 0a jne 108738 <malloc_sbrk_extend_and_allocate+0x1c><== ALWAYS TAKEN
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
if ( starting_address == (void*) -1 )
return (void *) 0;
10872e: 31 c0 xor %eax,%eax
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
108730: 8d 65 f8 lea -0x8(%ebp),%esp
108733: 5b pop %ebx
108734: 5e pop %esi
108735: c9 leave
108736: c3 ret
108737: 90 nop
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
108738: 8d 04 0e lea (%esi,%ecx,1),%eax
10873b: 31 d2 xor %edx,%edx
10873d: f7 f1 div %ecx
10873f: 89 c3 mov %eax,%ebx
108741: 0f af d9 imul %ecx,%ebx
starting_address = (void *) sbrk(the_size);
108744: 83 ec 0c sub $0xc,%esp
108747: 53 push %ebx
108748: e8 0f 7d ff ff call 10045c <sbrk>
if ( starting_address == (void*) -1 )
10874d: 83 c4 10 add $0x10,%esp
108750: 83 f8 ff cmp $0xffffffff,%eax
108753: 74 d9 je 10872e <malloc_sbrk_extend_and_allocate+0x12>
return (void *) 0;
if ( !_Protected_heap_Extend(
108755: 52 push %edx
108756: 53 push %ebx
108757: 50 push %eax
108758: ff 35 58 38 12 00 pushl 0x123858
10875e: e8 61 4d 00 00 call 10d4c4 <_Protected_heap_Extend>
108763: 83 c4 10 add $0x10,%esp
108766: 84 c0 test %al,%al
108768: 74 1b je 108785 <malloc_sbrk_extend_and_allocate+0x69>
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
10876a: 01 1d 00 7c 12 00 add %ebx,0x127c00
108770: 6a 00 push $0x0
108772: 6a 00 push $0x0
108774: 56 push %esi
108775: ff 35 58 38 12 00 pushl 0x123858
10877b: e8 0c 4d 00 00 call 10d48c <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
108780: 83 c4 10 add $0x10,%esp
108783: eb ab jmp 108730 <malloc_sbrk_extend_and_allocate+0x14>
if ( starting_address == (void*) -1 )
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
108785: 83 ec 0c sub $0xc,%esp
108788: f7 db neg %ebx
10878a: 53 push %ebx
10878b: e8 cc 7c ff ff call 10045c <sbrk>
errno = ENOMEM;
108790: e8 07 b2 00 00 call 11399c <__errno>
108795: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
10879b: 83 c4 10 add $0x10,%esp
10879e: 31 c0 xor %eax,%eax
1087a0: eb 8e jmp 108730 <malloc_sbrk_extend_and_allocate+0x14>
00111ed0 <memfile_free_blocks_in_table>:
*/
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
111ed0: 55 push %ebp
111ed1: 89 e5 mov %esp,%ebp
111ed3: 57 push %edi
111ed4: 56 push %esi
111ed5: 53 push %ebx
111ed6: 83 ec 0c sub $0xc,%esp
111ed9: 8b 7d 0c mov 0xc(%ebp),%edi
IMFS_assert( block_table );
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
111edc: 8b 45 08 mov 0x8(%ebp),%eax
111edf: 8b 30 mov (%eax),%esi
for ( i=0 ; i<entries ; i++ ) {
111ee1: 85 ff test %edi,%edi
111ee3: 7e 27 jle 111f0c <memfile_free_blocks_in_table+0x3c><== NEVER TAKEN
111ee5: 31 db xor %ebx,%ebx
111ee7: 90 nop
if ( b[i] ) {
111ee8: 8b 04 9e mov (%esi,%ebx,4),%eax
111eeb: 85 c0 test %eax,%eax
111eed: 74 13 je 111f02 <memfile_free_blocks_in_table+0x32>
memfile_free_block( b[i] );
111eef: 83 ec 0c sub $0xc,%esp
111ef2: 50 push %eax
111ef3: e8 bc ff ff ff call 111eb4 <memfile_free_block>
b[i] = 0;
111ef8: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4)
111eff: 83 c4 10 add $0x10,%esp
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
111f02: 43 inc %ebx
111f03: 39 df cmp %ebx,%edi
111f05: 7f e1 jg 111ee8 <memfile_free_blocks_in_table+0x18>
111f07: 8b 45 08 mov 0x8(%ebp),%eax
111f0a: 8b 30 mov (%eax),%esi
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
111f0c: 83 ec 0c sub $0xc,%esp
111f0f: 56 push %esi
111f10: e8 9f ff ff ff call 111eb4 <memfile_free_block>
*block_table = 0;
111f15: 8b 45 08 mov 0x8(%ebp),%eax
111f18: c7 00 00 00 00 00 movl $0x0,(%eax)
111f1e: 83 c4 10 add $0x10,%esp
}
111f21: 8d 65 f4 lea -0xc(%ebp),%esp
111f24: 5b pop %ebx
111f25: 5e pop %esi
111f26: 5f pop %edi
111f27: c9 leave
111f28: c3 ret
00112458 <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
112458: 55 push %ebp
112459: 89 e5 mov %esp,%ebp
11245b: 53 push %ebx
11245c: 83 ec 14 sub $0x14,%esp
11245f: 8b 4d 08 mov 0x8(%ebp),%ecx
112462: 8b 45 0c mov 0xc(%ebp),%eax
112465: 8b 55 10 mov 0x10(%ebp),%edx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
112468: 8b 59 18 mov 0x18(%ecx),%ebx
* 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 )
11246b: 39 53 54 cmp %edx,0x54(%ebx)
11246e: 7f 19 jg 112489 <memfile_ftruncate+0x31><== NEVER TAKEN
112470: 7d 12 jge 112484 <memfile_ftruncate+0x2c><== ALWAYS TAKEN
return IMFS_memfile_extend( the_jnode, length );
112472: 51 push %ecx
112473: 52 push %edx
112474: 50 push %eax
112475: 53 push %ebx
112476: e8 39 fc ff ff call 1120b4 <IMFS_memfile_extend>
11247b: 83 c4 10 add $0x10,%esp
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
11247e: 8b 5d fc mov -0x4(%ebp),%ebx
112481: c9 leave
112482: c3 ret
112483: 90 nop
* 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 )
112484: 39 43 50 cmp %eax,0x50(%ebx)
112487: 72 e9 jb 112472 <memfile_ftruncate+0x1a>
/*
* 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;
112489: 89 43 50 mov %eax,0x50(%ebx)
11248c: 89 53 54 mov %edx,0x54(%ebx)
iop->size = the_jnode->info.file.size;
11248f: 89 41 04 mov %eax,0x4(%ecx)
112492: 89 51 08 mov %edx,0x8(%ecx)
IMFS_update_atime( the_jnode );
112495: 83 ec 08 sub $0x8,%esp
112498: 6a 00 push $0x0
11249a: 8d 45 f0 lea -0x10(%ebp),%eax
11249d: 50 push %eax
11249e: e8 8d 5c ff ff call 108130 <gettimeofday>
1124a3: 8b 45 f0 mov -0x10(%ebp),%eax
1124a6: 89 43 40 mov %eax,0x40(%ebx)
return 0;
1124a9: 83 c4 10 add $0x10,%esp
1124ac: 31 c0 xor %eax,%eax
}
1124ae: 8b 5d fc mov -0x4(%ebp),%ebx
1124b1: c9 leave
1124b2: c3 ret
001124b4 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
1124b4: 55 push %ebp
1124b5: 89 e5 mov %esp,%ebp
1124b7: 57 push %edi
1124b8: 56 push %esi
1124b9: 53 push %ebx
1124ba: 83 ec 0c sub $0xc,%esp
1124bd: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
1124c0: 8b 73 18 mov 0x18(%ebx),%esi
if (the_jnode->type == IMFS_LINEAR_FILE) {
1124c3: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
1124c7: 74 2f je 1124f8 <memfile_lseek+0x44>
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 ))
1124c9: 57 push %edi
1124ca: ff 73 10 pushl 0x10(%ebx)
1124cd: ff 73 0c pushl 0xc(%ebx)
1124d0: 56 push %esi
1124d1: e8 de fb ff ff call 1120b4 <IMFS_memfile_extend>
1124d6: 83 c4 10 add $0x10,%esp
1124d9: 85 c0 test %eax,%eax
1124db: 75 45 jne 112522 <memfile_lseek+0x6e>
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
1124dd: 8b 46 50 mov 0x50(%esi),%eax
1124e0: 8b 56 54 mov 0x54(%esi),%edx
1124e3: 89 43 04 mov %eax,0x4(%ebx)
1124e6: 89 53 08 mov %edx,0x8(%ebx)
1124e9: 8b 43 0c mov 0xc(%ebx),%eax
1124ec: 8b 53 10 mov 0x10(%ebx),%edx
}
return iop->offset;
}
1124ef: 8d 65 f4 lea -0xc(%ebp),%esp
1124f2: 5b pop %ebx
1124f3: 5e pop %esi
1124f4: 5f pop %edi
1124f5: c9 leave
1124f6: c3 ret
1124f7: 90 nop
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
1124f8: 8b 43 0c mov 0xc(%ebx),%eax
1124fb: 8b 53 10 mov 0x10(%ebx),%edx
1124fe: 8b 7e 50 mov 0x50(%esi),%edi
112501: 8b 4e 54 mov 0x54(%esi),%ecx
112504: 39 ca cmp %ecx,%edx
112506: 7c e7 jl 1124ef <memfile_lseek+0x3b> <== NEVER TAKEN
112508: 7e 12 jle 11251c <memfile_lseek+0x68> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
11250a: 89 7b 0c mov %edi,0xc(%ebx) <== NOT EXECUTED
11250d: 89 4b 10 mov %ecx,0x10(%ebx) <== NOT EXECUTED
112510: 89 f8 mov %edi,%eax <== NOT EXECUTED
112512: 89 ca mov %ecx,%edx <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
112514: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112517: 5b pop %ebx <== NOT EXECUTED
112518: 5e pop %esi <== NOT EXECUTED
112519: 5f pop %edi <== NOT EXECUTED
11251a: c9 leave <== NOT EXECUTED
11251b: c3 ret <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
11251c: 39 f8 cmp %edi,%eax
11251e: 76 cf jbe 1124ef <memfile_lseek+0x3b> <== ALWAYS TAKEN
112520: eb e8 jmp 11250a <memfile_lseek+0x56> <== NOT EXECUTED
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 );
112522: e8 0d 0e 00 00 call 113334 <__errno>
112527: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11252d: b8 ff ff ff ff mov $0xffffffff,%eax
112532: ba ff ff ff ff mov $0xffffffff,%edx
112537: eb b6 jmp 1124ef <memfile_lseek+0x3b>
001123b0 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
1123b0: 55 push %ebp
1123b1: 89 e5 mov %esp,%ebp
1123b3: 56 push %esi
1123b4: 53 push %ebx
1123b5: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
1123b8: 8b 73 18 mov 0x18(%ebx),%esi
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
1123bb: 8b 43 14 mov 0x14(%ebx),%eax
1123be: a9 04 02 00 00 test $0x204,%eax
1123c3: 74 06 je 1123cb <memfile_open+0x1b>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
1123c5: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
1123c9: 74 2d je 1123f8 <memfile_open+0x48> <== NEVER TAKEN
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))
1123cb: 8b 56 50 mov 0x50(%esi),%edx
1123ce: 8b 4e 54 mov 0x54(%esi),%ecx
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
1123d1: f6 c4 02 test $0x2,%ah
1123d4: 75 12 jne 1123e8 <memfile_open+0x38>
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
1123d6: 89 53 04 mov %edx,0x4(%ebx)
1123d9: 89 4b 08 mov %ecx,0x8(%ebx)
return 0;
1123dc: 31 c0 xor %eax,%eax
}
1123de: 8d 65 f8 lea -0x8(%ebp),%esp
1123e1: 5b pop %ebx
1123e2: 5e pop %esi
1123e3: c9 leave
1123e4: c3 ret
1123e5: 8d 76 00 lea 0x0(%esi),%esi
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
1123e8: 89 53 0c mov %edx,0xc(%ebx)
1123eb: 89 4b 10 mov %ecx,0x10(%ebx)
1123ee: 8b 56 50 mov 0x50(%esi),%edx
1123f1: 8b 4e 54 mov 0x54(%esi),%ecx
1123f4: eb e0 jmp 1123d6 <memfile_open+0x26>
1123f6: 66 90 xchg %ax,%ax
/*
* 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;
1123f8: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
1123fb: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
1123fe: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED
the_jnode->info.file.size = 0;
112405: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED
11240c: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
112413: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
11241a: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
112421: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED
if ((count != 0)
112428: 85 c0 test %eax,%eax <== NOT EXECUTED
11242a: 75 09 jne 112435 <memfile_open+0x85> <== NOT EXECUTED
11242c: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
11242f: 31 d2 xor %edx,%edx <== NOT EXECUTED
112431: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
112433: eb 9c jmp 1123d1 <memfile_open+0x21> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
112435: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112438: 50 push %eax <== NOT EXECUTED
112439: 52 push %edx <== NOT EXECUTED
11243a: 6a 00 push $0x0 <== NOT EXECUTED
11243c: 6a 00 push $0x0 <== NOT EXECUTED
11243e: 56 push %esi <== NOT EXECUTED
11243f: e8 88 fd ff ff call 1121cc <IMFS_memfile_write> <== NOT EXECUTED
112444: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
112447: 40 inc %eax <== NOT EXECUTED
112448: 74 08 je 112452 <memfile_open+0xa2> <== NOT EXECUTED
11244a: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
11244d: e9 79 ff ff ff jmp 1123cb <memfile_open+0x1b> <== NOT EXECUTED
return -1;
112452: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
112455: eb 87 jmp 1123de <memfile_open+0x2e> <== NOT EXECUTED
0010844c <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
10844c: 55 push %ebp
10844d: 89 e5 mov %esp,%ebp
10844f: 57 push %edi
108450: 56 push %esi
108451: 53 push %ebx
108452: 83 ec 3c sub $0x3c,%esp
108455: 8b 7d 08 mov 0x8(%ebp),%edi
108458: 8b 5d 0c mov 0xc(%ebp),%ebx
10845b: 8b 55 10 mov 0x10(%ebp),%edx
10845e: 8b 4d 14 mov 0x14(%ebp),%ecx
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) ) )
108461: f6 c7 f0 test $0xf0,%bh
108464: 75 1a jne 108480 <mknod+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
108466: e8 c9 ae 00 00 call 113334 <__errno>
10846b: c7 00 16 00 00 00 movl $0x16,(%eax)
108471: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
108476: 8d 65 f4 lea -0xc(%ebp),%esp
108479: 5b pop %ebx
10847a: 5e pop %esi
10847b: 5f pop %edi
10847c: c9 leave
10847d: c3 ret
10847e: 66 90 xchg %ax,%ax
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 );
108480: 50 push %eax
108481: 8d 75 cc lea -0x34(%ebp),%esi
108484: 56 push %esi
108485: 8d 45 e4 lea -0x1c(%ebp),%eax
108488: 50 push %eax
108489: 57 push %edi
10848a: 89 55 c4 mov %edx,-0x3c(%ebp)
10848d: 89 4d c0 mov %ecx,-0x40(%ebp)
108490: e8 1f 0a 00 00 call 108eb4 <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
108495: 83 c4 0c add $0xc,%esp
108498: 8d 45 e0 lea -0x20(%ebp),%eax
10849b: 50 push %eax
10849c: 56 push %esi
10849d: 03 7d e4 add -0x1c(%ebp),%edi
1084a0: 57 push %edi
1084a1: 8b 45 d8 mov -0x28(%ebp),%eax
1084a4: ff 50 04 call *0x4(%eax)
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
1084a7: 83 c4 10 add $0x10,%esp
1084aa: 85 c0 test %eax,%eax
1084ac: 8b 55 c4 mov -0x3c(%ebp),%edx
1084af: 8b 4d c0 mov -0x40(%ebp),%ecx
1084b2: 74 10 je 1084c4 <mknod+0x78>
return -1;
1084b4: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
1084b9: 8d 65 f4 lea -0xc(%ebp),%esp
1084bc: 5b pop %ebx
1084bd: 5e pop %esi
1084be: 5f pop %edi
1084bf: c9 leave
1084c0: c3 ret
1084c1: 8d 76 00 lea 0x0(%esi),%esi
&name_start
);
if ( result != 0 )
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
1084c4: 83 ec 0c sub $0xc,%esp
1084c7: 56 push %esi
1084c8: 51 push %ecx
1084c9: 52 push %edx
1084ca: 53 push %ebx
1084cb: ff 75 e0 pushl -0x20(%ebp)
1084ce: 8b 45 d8 mov -0x28(%ebp),%eax
1084d1: ff 50 14 call *0x14(%eax)
rtems_filesystem_freenode( &temp_loc );
1084d4: 83 c4 14 add $0x14,%esp
1084d7: 56 push %esi
1084d8: 89 45 c4 mov %eax,-0x3c(%ebp)
1084db: e8 c0 fb ff ff call 1080a0 <rtems_filesystem_freenode>
return result;
1084e0: 83 c4 10 add $0x10,%esp
1084e3: 8b 45 c4 mov -0x3c(%ebp),%eax
}
1084e6: 8d 65 f4 lea -0xc(%ebp),%esp
1084e9: 5b pop %ebx
1084ea: 5e pop %esi
1084eb: 5f pop %edi
1084ec: c9 leave
1084ed: c3 ret
00108574 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
108574: 55 push %ebp
108575: 89 e5 mov %esp,%ebp
108577: 57 push %edi
108578: 56 push %esi
108579: 53 push %ebx
10857a: 83 ec 4c sub $0x4c,%esp
10857d: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
108580: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
108584: 0f 87 36 02 00 00 ja 1087c0 <mount+0x24c>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
10858a: 83 ec 0c sub $0xc,%esp
10858d: 56 push %esi
10858e: e8 e9 7a 00 00 call 11007c <rtems_filesystem_get_mount_handler>
108593: 89 45 b8 mov %eax,-0x48(%ebp)
if ( !mount_h )
108596: 83 c4 10 add $0x10,%esp
108599: 85 c0 test %eax,%eax
10859b: 0f 84 1f 02 00 00 je 1087c0 <mount+0x24c>
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
1085a1: 8b 45 0c mov 0xc(%ebp),%eax
1085a4: 85 c0 test %eax,%eax
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
1085a6: 0f 95 45 b7 setne -0x49(%ebp)
1085aa: 0f 84 e8 01 00 00 je 108798 <mount+0x224>
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
1085b0: 31 c0 xor %eax,%eax
1085b2: b9 ff ff ff ff mov $0xffffffff,%ecx
1085b7: 8b 7d 0c mov 0xc(%ebp),%edi
1085ba: f2 ae repnz scas %es:(%edi),%al
1085bc: f7 d1 not %ecx
1085be: 8d 41 ff lea -0x1(%ecx),%eax
1085c1: 89 45 ac mov %eax,-0x54(%ebp)
1085c4: 89 4d bc mov %ecx,-0x44(%ebp)
1085c7: 8b 55 0c mov 0xc(%ebp),%edx
1085ca: 89 55 b0 mov %edx,-0x50(%ebp)
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
1085cd: ba ff ff ff ff mov $0xffffffff,%edx
1085d2: 31 c0 xor %eax,%eax
1085d4: 89 d1 mov %edx,%ecx
1085d6: 89 f7 mov %esi,%edi
1085d8: f2 ae repnz scas %es:(%edi),%al
1085da: f7 d1 not %ecx
1085dc: 89 4d c4 mov %ecx,-0x3c(%ebp)
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
1085df: 8b 7d 08 mov 0x8(%ebp),%edi
1085e2: 85 ff test %edi,%edi
1085e4: 0f 84 ca 01 00 00 je 1087b4 <mount+0x240>
1085ea: 89 d1 mov %edx,%ecx
1085ec: 8b 7d 08 mov 0x8(%ebp),%edi
1085ef: f2 ae repnz scas %es:(%edi),%al
1085f1: f7 d1 not %ecx
1085f3: 89 4d c0 mov %ecx,-0x40(%ebp)
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
1085f6: 83 ec 08 sub $0x8,%esp
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
1085f9: 8b 55 bc mov -0x44(%ebp),%edx
1085fc: 8b 7d c4 mov -0x3c(%ebp),%edi
1085ff: 8d 44 3a 74 lea 0x74(%edx,%edi,1),%eax
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
108603: 03 45 c0 add -0x40(%ebp),%eax
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
108606: 50 push %eax
108607: 6a 01 push $0x1
108609: e8 16 f9 ff ff call 107f24 <calloc>
10860e: 89 c3 mov %eax,%ebx
if ( mt_entry != NULL ) {
108610: 83 c4 10 add $0x10,%esp
108613: 85 c0 test %eax,%eax
108615: 0f 84 65 01 00 00 je 108780 <mount+0x20c> <== NEVER TAKEN
char *str = (char *) mt_entry + sizeof( *mt_entry );
10861b: 8d 40 74 lea 0x74(%eax),%eax
memcpy( str, filesystemtype, filesystemtype_size );
10861e: 89 c7 mov %eax,%edi
108620: 8b 4d c4 mov -0x3c(%ebp),%ecx
108623: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
108625: 89 fa mov %edi,%edx
mt_entry->type = str;
108627: 89 43 6c mov %eax,0x6c(%ebx)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
10862a: 8b 75 08 mov 0x8(%ebp),%esi
10862d: 8b 4d c0 mov -0x40(%ebp),%ecx
108630: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
108632: 89 f8 mov %edi,%eax
mt_entry->dev = str;
108634: 89 53 70 mov %edx,0x70(%ebx)
str += source_size;
memcpy( str, target, target_size );
108637: 8b 75 b0 mov -0x50(%ebp),%esi
10863a: 8b 4d bc mov -0x44(%ebp),%ecx
10863d: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
mt_entry->target = str;
10863f: 89 43 68 mov %eax,0x68(%ebx)
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
108642: 89 5b 2c mov %ebx,0x2c(%ebx)
mt_entry->options = options;
108645: 8b 45 14 mov 0x14(%ebp),%eax
108648: 89 43 30 mov %eax,0x30(%ebx)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
10864b: 8d 7b 38 lea 0x38(%ebx),%edi
10864e: be 60 0b 12 00 mov $0x120b60,%esi
108653: b1 0c mov $0xc,%cl
108655: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
108657: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
10865b: 0f 85 83 00 00 00 jne 1086e4 <mount+0x170>
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
108661: 81 3d 84 50 12 00 88 cmpl $0x125088,0x125084
108668: 50 12 00
10866b: 0f 85 67 01 00 00 jne 1087d8 <mount+0x264> <== NEVER TAKEN
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
108671: 31 f6 xor %esi,%esi
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
108673: 83 ec 08 sub $0x8,%esp
108676: ff 75 18 pushl 0x18(%ebp)
108679: 53 push %ebx
10867a: ff 55 b8 call *-0x48(%ebp)
10867d: 83 c4 10 add $0x10,%esp
108680: 85 c0 test %eax,%eax
108682: 0f 85 74 01 00 00 jne 1087fc <mount+0x288>
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 );
108688: 56 push %esi
108689: 6a 00 push $0x0
10868b: 6a 00 push $0x0
10868d: ff 35 e8 73 12 00 pushl 0x1273e8
108693: e8 18 30 00 00 call 10b6b0 <rtems_semaphore_obtain>
108698: 5a pop %edx
108699: 59 pop %ecx
10869a: 53 push %ebx
10869b: 68 84 50 12 00 push $0x125084
1086a0: e8 37 39 00 00 call 10bfdc <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
1086a5: 58 pop %eax
1086a6: ff 35 e8 73 12 00 pushl 0x1273e8
1086ac: e8 fb 30 00 00 call 10b7ac <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
1086b1: 83 c4 10 add $0x10,%esp
1086b4: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
1086b8: 74 0a je 1086c4 <mount+0x150>
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
1086ba: 31 c0 xor %eax,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
1086bc: 8d 65 f4 lea -0xc(%ebp),%esp
1086bf: 5b pop %ebx
1086c0: 5e pop %esi
1086c1: 5f pop %edi
1086c2: c9 leave
1086c3: c3 ret
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
1086c4: 8b 3d b0 51 12 00 mov 0x1251b0,%edi
1086ca: 83 c7 18 add $0x18,%edi
1086cd: 8d 73 1c lea 0x1c(%ebx),%esi
1086d0: b9 05 00 00 00 mov $0x5,%ecx
1086d5: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
1086d7: 31 c0 xor %eax,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
1086d9: 8d 65 f4 lea -0xc(%ebp),%esp
1086dc: 5b pop %ebx
1086dd: 5e pop %esi
1086de: 5f pop %edi
1086df: c9 leave
1086e0: c3 ret
1086e1: 8d 76 00 lea 0x0(%esi),%esi
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
1086e4: 83 ec 0c sub $0xc,%esp
1086e7: 6a 01 push $0x1
1086e9: 8d 75 d4 lea -0x2c(%ebp),%esi
1086ec: 56 push %esi
1086ed: 6a 07 push $0x7
1086ef: ff 75 ac pushl -0x54(%ebp)
1086f2: ff 75 0c pushl 0xc(%ebp)
1086f5: e8 ce f8 ff ff call 107fc8 <rtems_filesystem_evaluate_path>
1086fa: 83 c4 20 add $0x20,%esp
1086fd: 40 inc %eax
1086fe: 0f 84 df 00 00 00 je 1087e3 <mount+0x26f> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
108704: 83 ec 0c sub $0xc,%esp
108707: 56 push %esi
108708: 8b 45 e0 mov -0x20(%ebp),%eax
10870b: ff 50 10 call *0x10(%eax)
10870e: 83 c4 10 add $0x10,%esp
108711: 48 dec %eax
108712: 0f 85 0c 01 00 00 jne 108824 <mount+0x2b0>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
108718: 83 ec 08 sub $0x8,%esp
10871b: ff 75 d4 pushl -0x2c(%ebp)
10871e: 68 f0 84 10 00 push $0x1084f0
108723: e8 dc fd ff ff call 108504 <rtems_filesystem_mount_iterate>
108728: 83 c4 10 add $0x10,%esp
10872b: 84 c0 test %al,%al
10872d: 0f 85 01 01 00 00 jne 108834 <mount+0x2c0>
* 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.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
108733: 8b 45 d4 mov -0x2c(%ebp),%eax
108736: 89 43 08 mov %eax,0x8(%ebx)
mt_entry->mt_point_node.handlers = loc.handlers;
108739: 8b 45 dc mov -0x24(%ebp),%eax
10873c: 89 43 10 mov %eax,0x10(%ebx)
mt_entry->mt_point_node.ops = loc.ops;
10873f: 8b 45 e0 mov -0x20(%ebp),%eax
108742: 89 43 14 mov %eax,0x14(%ebx)
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
108745: 8b 55 e4 mov -0x1c(%ebp),%edx
108748: 89 53 18 mov %edx,0x18(%ebx)
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
10874b: 83 ec 0c sub $0xc,%esp
10874e: 53 push %ebx
10874f: ff 50 20 call *0x20(%eax)
108752: 83 c4 10 add $0x10,%esp
108755: 85 c0 test %eax,%eax
108757: 0f 84 16 ff ff ff je 108673 <mount+0xff> <== ALWAYS TAKEN
return 0;
cleanup_and_bail:
free( mt_entry );
10875d: 83 ec 0c sub $0xc,%esp
108760: 53 push %ebx
108761: e8 4e f9 ff ff call 1080b4 <free>
108766: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
108769: 83 ec 0c sub $0xc,%esp
10876c: 56 push %esi
10876d: e8 2e f9 ff ff call 1080a0 <rtems_filesystem_freenode>
108772: 83 c4 10 add $0x10,%esp
return -1;
108775: b8 ff ff ff ff mov $0xffffffff,%eax
10877a: e9 3d ff ff ff jmp 1086bc <mount+0x148>
10877f: 90 nop
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
108780: e8 af ab 00 00 call 113334 <__errno> <== NOT EXECUTED
108785: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10878b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
108790: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108793: 5b pop %ebx <== NOT EXECUTED
108794: 5e pop %esi <== NOT EXECUTED
108795: 5f pop %edi <== NOT EXECUTED
108796: c9 leave <== NOT EXECUTED
108797: c3 ret <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
108798: c7 45 bc 02 00 00 00 movl $0x2,-0x44(%ebp)
10879f: c7 45 ac 01 00 00 00 movl $0x1,-0x54(%ebp)
1087a6: c7 45 b0 07 0b 12 00 movl $0x120b07,-0x50(%ebp)
1087ad: e9 1b fe ff ff jmp 1085cd <mount+0x59>
1087b2: 66 90 xchg %ax,%ax
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
1087b4: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp)
1087bb: e9 36 fe ff ff jmp 1085f6 <mount+0x82>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
1087c0: e8 6f ab 00 00 call 113334 <__errno>
1087c5: c7 00 16 00 00 00 movl $0x16,(%eax)
1087cb: b8 ff ff ff ff mov $0xffffffff,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
1087d0: 8d 65 f4 lea -0xc(%ebp),%esp
1087d3: 5b pop %ebx
1087d4: 5e pop %esi
1087d5: 5f pop %edi
1087d6: c9 leave
1087d7: c3 ret
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
1087d8: e8 57 ab 00 00 call 113334 <__errno> <== NOT EXECUTED
1087dd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
1087e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1087e6: 53 push %ebx <== NOT EXECUTED
1087e7: e8 c8 f8 ff ff call 1080b4 <free> <== NOT EXECUTED
1087ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
1087ef: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1087f4: e9 c3 fe ff ff jmp 1086bc <mount+0x148> <== NOT EXECUTED
1087f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
1087fc: 83 ec 0c sub $0xc,%esp
1087ff: 53 push %ebx
108800: 8b 45 e0 mov -0x20(%ebp),%eax
108803: ff 50 28 call *0x28(%eax)
return 0;
cleanup_and_bail:
free( mt_entry );
108806: 89 1c 24 mov %ebx,(%esp)
108809: e8 a6 f8 ff ff call 1080b4 <free>
if ( loc_to_free )
10880e: 83 c4 10 add $0x10,%esp
108811: 85 f6 test %esi,%esi
108813: 0f 85 50 ff ff ff jne 108769 <mount+0x1f5> <== ALWAYS TAKEN
rtems_filesystem_freenode( loc_to_free );
return -1;
108819: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10881e: e9 99 fe ff ff jmp 1086bc <mount+0x148> <== NOT EXECUTED
108823: 90 nop <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
108824: e8 0b ab 00 00 call 113334 <__errno>
108829: c7 00 14 00 00 00 movl $0x14,(%eax)
goto cleanup_and_bail;
10882f: e9 29 ff ff ff jmp 10875d <mount+0x1e9>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
108834: e8 fb aa 00 00 call 113334 <__errno>
108839: c7 00 10 00 00 00 movl $0x10,(%eax)
goto cleanup_and_bail;
10883f: e9 19 ff ff ff jmp 10875d <mount+0x1e9>
00108b68 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
108b68: 55 push %ebp
108b69: 89 e5 mov %esp,%ebp
108b6b: 57 push %edi
108b6c: 56 push %esi
108b6d: 53 push %ebx
108b6e: 83 ec 1c sub $0x1c,%esp
108b71: 8b 45 08 mov 0x8(%ebp),%eax
108b74: 89 45 e4 mov %eax,-0x1c(%ebp)
108b77: 8b 5d 0c mov 0xc(%ebp),%ebx
108b7a: 8b 75 10 mov 0x10(%ebp),%esi
108b7d: 8b 7d 14 mov 0x14(%ebp),%edi
108b80: 8b 45 18 mov 0x18(%ebp),%eax
108b83: 89 45 e0 mov %eax,-0x20(%ebp)
int rv = -1;
if (target != NULL) {
108b86: 85 db test %ebx,%ebx
108b88: 74 3f je 108bc9 <mount_and_make_target_path+0x61>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
108b8a: 83 ec 08 sub $0x8,%esp
108b8d: 68 ff 01 00 00 push $0x1ff
108b92: 53 push %ebx
108b93: e8 08 0a 00 00 call 1095a0 <rtems_mkdir>
if (rv == 0) {
108b98: 83 c4 10 add $0x10,%esp
108b9b: 85 c0 test %eax,%eax
108b9d: 74 09 je 108ba8 <mount_and_make_target_path+0x40><== ALWAYS TAKEN
} else {
errno = EINVAL;
}
return rv;
}
108b9f: 8d 65 f4 lea -0xc(%ebp),%esp
108ba2: 5b pop %ebx
108ba3: 5e pop %esi
108ba4: 5f pop %edi
108ba5: c9 leave
108ba6: c3 ret
108ba7: 90 nop
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
108ba8: 8b 45 e0 mov -0x20(%ebp),%eax
108bab: 89 45 18 mov %eax,0x18(%ebp)
108bae: 89 7d 14 mov %edi,0x14(%ebp)
108bb1: 89 75 10 mov %esi,0x10(%ebp)
108bb4: 89 5d 0c mov %ebx,0xc(%ebp)
108bb7: 8b 45 e4 mov -0x1c(%ebp),%eax
108bba: 89 45 08 mov %eax,0x8(%ebp)
} else {
errno = EINVAL;
}
return rv;
}
108bbd: 8d 65 f4 lea -0xc(%ebp),%esp
108bc0: 5b pop %ebx
108bc1: 5e pop %esi
108bc2: 5f pop %edi
108bc3: c9 leave
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
108bc4: e9 97 00 00 00 jmp 108c60 <mount>
options,
data
);
}
} else {
errno = EINVAL;
108bc9: e8 3a ae 00 00 call 113a08 <__errno>
108bce: c7 00 16 00 00 00 movl $0x16,(%eax)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
108bd4: b8 ff ff ff ff mov $0xffffffff,%eax
108bd9: eb c4 jmp 108b9f <mount_and_make_target_path+0x37>
0010fb04 <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
10fb04: 55 push %ebp
10fb05: 89 e5 mov %esp,%ebp
10fb07: 57 push %edi
10fb08: 56 push %esi
10fb09: 53 push %ebx
10fb0a: 83 ec 2c sub $0x2c,%esp
10fb0d: 8b 75 0c mov 0xc(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10fb10: a1 90 fa 12 00 mov 0x12fa90,%eax
10fb15: 40 inc %eax
10fb16: a3 90 fa 12 00 mov %eax,0x12fa90
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10fb1b: 89 f0 mov %esi,%eax
10fb1d: 25 00 02 00 00 and $0x200,%eax
10fb22: 89 45 d4 mov %eax,-0x2c(%ebp)
10fb25: 0f 85 c9 00 00 00 jne 10fbf4 <mq_open+0xf0>
/* struct mq_attr attr */
)
{
va_list arg;
mode_t mode;
struct mq_attr *attr = NULL;
10fb2b: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
_Objects_Allocate( &_POSIX_Message_queue_Information_fds );
10fb32: 83 ec 0c sub $0xc,%esp
10fb35: 68 00 00 13 00 push $0x130000
10fb3a: e8 61 2c 00 00 call 1127a0 <_Objects_Allocate>
10fb3f: 89 c3 mov %eax,%ebx
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 ) {
10fb41: 83 c4 10 add $0x10,%esp
10fb44: 85 c0 test %eax,%eax
10fb46: 0f 84 b4 00 00 00 je 10fc00 <mq_open+0xfc>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
10fb4c: 89 70 14 mov %esi,0x14(%eax)
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
10fb4f: 83 ec 08 sub $0x8,%esp
10fb52: 8d 45 e4 lea -0x1c(%ebp),%eax
10fb55: 50 push %eax
10fb56: ff 75 08 pushl 0x8(%ebp)
10fb59: e8 92 69 00 00 call 1164f0 <_POSIX_Message_queue_Name_to_id>
10fb5e: 89 c7 mov %eax,%edi
* 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 ) {
10fb60: 83 c4 10 add $0x10,%esp
10fb63: 85 c0 test %eax,%eax
10fb65: 75 59 jne 10fbc0 <mq_open+0xbc>
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10fb67: 81 e6 00 0a 00 00 and $0xa00,%esi
10fb6d: 81 fe 00 0a 00 00 cmp $0xa00,%esi
10fb73: 0f 84 a7 00 00 00 je 10fc20 <mq_open+0x11c>
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
_Objects_Get( &_POSIX_Message_queue_Information, id, location );
10fb79: 50 push %eax
/*
* 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 );
10fb7a: 8d 45 dc lea -0x24(%ebp),%eax
10fb7d: 50 push %eax
10fb7e: ff 75 e4 pushl -0x1c(%ebp)
10fb81: 68 60 fe 12 00 push $0x12fe60
10fb86: e8 cd 30 00 00 call 112c58 <_Objects_Get>
10fb8b: 89 45 e0 mov %eax,-0x20(%ebp)
the_mq->open_count += 1;
10fb8e: ff 40 18 incl 0x18(%eax)
the_mq_fd->Queue = the_mq;
10fb91: 89 43 10 mov %eax,0x10(%ebx)
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
10fb94: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10fb98: a1 1c 00 13 00 mov 0x13001c,%eax
10fb9d: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
10fba0: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
10fba7: e8 e0 3b 00 00 call 11378c <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10fbac: e8 db 3b 00 00 call 11378c <_Thread_Enable_dispatch>
return (mqd_t)the_mq_fd->Object.id;
10fbb1: 8b 43 08 mov 0x8(%ebx),%eax
10fbb4: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fbb7: 8d 65 f4 lea -0xc(%ebp),%esp
10fbba: 5b pop %ebx
10fbbb: 5e pop %esi
10fbbc: 5f pop %edi
10fbbd: c9 leave
10fbbe: c3 ret
10fbbf: 90 nop
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) ) ) {
10fbc0: 83 f8 02 cmp $0x2,%eax
10fbc3: 0f 84 87 00 00 00 je 10fc50 <mq_open+0x14c>
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 );
10fbc9: 83 ec 08 sub $0x8,%esp
10fbcc: 53 push %ebx
10fbcd: 68 00 00 13 00 push $0x130000
10fbd2: e8 41 2f 00 00 call 112b18 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
10fbd7: e8 b0 3b 00 00 call 11378c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
10fbdc: e8 db 9c 00 00 call 1198bc <__errno>
10fbe1: 89 38 mov %edi,(%eax)
10fbe3: 83 c4 10 add $0x10,%esp
10fbe6: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fbeb: 8d 65 f4 lea -0xc(%ebp),%esp
10fbee: 5b pop %ebx
10fbef: 5e pop %esi
10fbf0: 5f pop %edi
10fbf1: c9 leave
10fbf2: c3 ret
10fbf3: 90 nop
_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 * );
10fbf4: 8b 45 14 mov 0x14(%ebp),%eax
10fbf7: 89 45 d0 mov %eax,-0x30(%ebp)
10fbfa: e9 33 ff ff ff jmp 10fb32 <mq_open+0x2e>
10fbff: 90 nop
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
_Thread_Enable_dispatch();
10fc00: e8 87 3b 00 00 call 11378c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
10fc05: e8 b2 9c 00 00 call 1198bc <__errno>
10fc0a: c7 00 17 00 00 00 movl $0x17,(%eax)
10fc10: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fc15: 8d 65 f4 lea -0xc(%ebp),%esp
10fc18: 5b pop %ebx
10fc19: 5e pop %esi
10fc1a: 5f pop %edi
10fc1b: c9 leave
10fc1c: c3 ret
10fc1d: 8d 76 00 lea 0x0(%esi),%esi
10fc20: 83 ec 08 sub $0x8,%esp
10fc23: 53 push %ebx
10fc24: 68 00 00 13 00 push $0x130000
10fc29: e8 ea 2e 00 00 call 112b18 <_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();
10fc2e: e8 59 3b 00 00 call 11378c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
10fc33: e8 84 9c 00 00 call 1198bc <__errno>
10fc38: c7 00 11 00 00 00 movl $0x11,(%eax)
10fc3e: 83 c4 10 add $0x10,%esp
10fc41: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fc46: 8d 65 f4 lea -0xc(%ebp),%esp
10fc49: 5b pop %ebx
10fc4a: 5e pop %esi
10fc4b: 5f pop %edi
10fc4c: c9 leave
10fc4d: c3 ret
10fc4e: 66 90 xchg %ax,%ax
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) ) ) {
10fc50: 8b 55 d4 mov -0x2c(%ebp),%edx
10fc53: 85 d2 test %edx,%edx
10fc55: 0f 84 6e ff ff ff je 10fbc9 <mq_open+0xc5>
/*
* 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(
10fc5b: 8d 45 e0 lea -0x20(%ebp),%eax
10fc5e: 50 push %eax
10fc5f: ff 75 d0 pushl -0x30(%ebp)
10fc62: 6a 01 push $0x1
10fc64: ff 75 08 pushl 0x8(%ebp)
10fc67: e8 fc 66 00 00 call 116368 <_POSIX_Message_queue_Create_support>
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
10fc6c: 83 c4 10 add $0x10,%esp
10fc6f: 40 inc %eax
10fc70: 74 26 je 10fc98 <mq_open+0x194>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
10fc72: 8b 45 e0 mov -0x20(%ebp),%eax
10fc75: 89 43 10 mov %eax,0x10(%ebx)
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
10fc78: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10fc7c: a1 1c 00 13 00 mov 0x13001c,%eax
10fc81: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
10fc84: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
10fc8b: e8 fc 3a 00 00 call 11378c <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
10fc90: 8b 43 08 mov 0x8(%ebx),%eax
10fc93: e9 1f ff ff ff jmp 10fbb7 <mq_open+0xb3>
10fc98: 83 ec 08 sub $0x8,%esp
10fc9b: 53 push %ebx
10fc9c: 68 00 00 13 00 push $0x130000
10fca1: e8 72 2e 00 00 call 112b18 <_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();
10fca6: e8 e1 3a 00 00 call 11378c <_Thread_Enable_dispatch>
return (mqd_t) -1;
10fcab: 83 c4 10 add $0x10,%esp
10fcae: b8 ff ff ff ff mov $0xffffffff,%eax
10fcb3: e9 ff fe ff ff jmp 10fbb7 <mq_open+0xb3>
001088a8 <newlib_create_hook>:
*/
bool newlib_create_hook(
rtems_tcb *current_task __attribute__((unused)),
rtems_tcb *creating_task
)
{
1088a8: 55 push %ebp
1088a9: 89 e5 mov %esp,%ebp
1088ab: 57 push %edi
1088ac: 56 push %esi
1088ad: 53 push %ebx
1088ae: 83 ec 0c sub $0xc,%esp
struct _reent *ptr;
if (_Thread_libc_reent == 0)
1088b1: a1 20 76 12 00 mov 0x127620,%eax
1088b6: 85 c0 test %eax,%eax
1088b8: 0f 84 52 02 00 00 je 108b10 <newlib_create_hook+0x268>
ptr = (struct _reent *) calloc(1, sizeof(struct _reent));
#else
/* It is OK to allocate from the workspace because these
* hooks run with thread dispatching disabled.
*/
ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent));
1088be: 83 ec 0c sub $0xc,%esp
1088c1: 68 24 04 00 00 push $0x424
1088c6: e8 95 60 00 00 call 10e960 <_Workspace_Allocate>
1088cb: 89 c2 mov %eax,%edx
#endif
if (ptr) {
1088cd: 83 c4 10 add $0x10,%esp
1088d0: 85 c0 test %eax,%eax
1088d2: 0f 84 2c 02 00 00 je 108b04 <newlib_create_hook+0x25c>
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
1088d8: c7 00 00 00 00 00 movl $0x0,(%eax)
1088de: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx
1088e4: 89 58 04 mov %ebx,0x4(%eax)
1088e7: 8d 80 54 03 00 00 lea 0x354(%eax),%eax
1088ed: 89 42 08 mov %eax,0x8(%edx)
1088f0: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax
1088f6: 89 42 0c mov %eax,0xc(%edx)
1088f9: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
108900: 8d 72 14 lea 0x14(%edx),%esi
108903: 31 c0 xor %eax,%eax
108905: b9 19 00 00 00 mov $0x19,%ecx
10890a: 89 f7 mov %esi,%edi
10890c: f3 aa rep stos %al,%es:(%edi)
10890e: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
108915: c7 42 34 8a 08 12 00 movl $0x12088a,0x34(%edx)
10891c: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
108923: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx)
10892a: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx)
108931: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx)
108938: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx)
10893f: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx)
108946: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
10894d: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
108954: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx)
10895b: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx)
108962: c6 42 60 00 movb $0x0,0x60(%edx)
108966: 8d 72 7c lea 0x7c(%edx),%esi
108969: b1 24 mov $0x24,%cl
10896b: 89 f7 mov %esi,%edi
10896d: f3 aa rep stos %al,%es:(%edi)
10896f: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx)
108976: 00 00 00
108979: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx)
108980: 00 00 00
108983: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx)
10898a: 00 00 00
10898d: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx)
108994: 0e 33
108996: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx)
10899d: cd ab
10899f: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx)
1089a6: 34 12
1089a8: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx)
1089af: 6d e6
1089b1: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx)
1089b8: ec de
1089ba: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx)
1089c1: 05 00
1089c3: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx)
1089ca: 0b 00
1089cc: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx)
1089d3: 00 00 00
1089d6: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx)
1089dd: 00 00 00
1089e0: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx)
1089e7: 00 00 00
1089ea: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx)
1089f1: 00 00 00
1089f4: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx)
1089fb: 00 00 00
1089fe: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx)
108a05: 00 00 00
108a08: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx)
108a0f: 00 00 00
108a12: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx)
108a19: 00 00 00
108a1c: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx)
108a23: 00 00 00
108a26: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx)
108a2d: 00 00 00
108a30: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx)
108a37: 00 00 00
108a3a: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx)
108a41: 00 00 00
108a44: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx)
108a4b: 00 00 00
108a4e: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx)
108a55: 00 00 00
108a58: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx)
108a5f: 00 00 00
108a62: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx)
108a69: 00 00 00
108a6c: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx)
108a73: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx)
108a7a: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx)
108a81: 00 00 00
108a84: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx)
108a8b: 00 00 00
108a8e: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx)
108a95: 00 00 00
108a98: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx)
108a9f: 00 00 00
108aa2: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx)
108aa9: 00 00 00
108aac: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx)
108ab3: 00 00 00
108ab6: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx)
108abd: 00 00 00
108ac0: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx)
108ac7: 00 00 00
108aca: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx)
108ad1: 00 00 00
108ad4: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx)
108adb: 00 00 00
108ade: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx)
108ae5: 00 00 00
108ae8: 66 b9 38 01 mov $0x138,%cx
108aec: 89 df mov %ebx,%edi
108aee: f3 aa rep stos %al,%es:(%edi)
creating_task->libc_reent = ptr;
108af0: 8b 45 0c mov 0xc(%ebp),%eax
108af3: 89 90 e4 00 00 00 mov %edx,0xe4(%eax)
return TRUE;
108af9: b0 01 mov $0x1,%al
}
return FALSE;
}
108afb: 8d 65 f4 lea -0xc(%ebp),%esp
108afe: 5b pop %ebx
108aff: 5e pop %esi
108b00: 5f pop %edi
108b01: c9 leave
108b02: c3 ret
108b03: 90 nop
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
creating_task->libc_reent = ptr;
return TRUE;
}
return FALSE;
108b04: 31 c0 xor %eax,%eax
}
108b06: 8d 65 f4 lea -0xc(%ebp),%esp
108b09: 5b pop %ebx
108b0a: 5e pop %esi
108b0b: 5f pop %edi
108b0c: c9 leave
108b0d: c3 ret
108b0e: 66 90 xchg %ax,%ax
{
struct _reent *ptr;
if (_Thread_libc_reent == 0)
{
_REENT = _global_impure_ptr;
108b10: a1 e0 16 12 00 mov 0x1216e0,%eax
108b15: a3 a0 52 12 00 mov %eax,0x1252a0
RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent (
struct _reent **libc_reent
)
{
_Thread_libc_reent = libc_reent;
108b1a: c7 05 20 76 12 00 a0 movl $0x1252a0,0x127620
108b21: 52 12 00
108b24: e9 95 fd ff ff jmp 1088be <newlib_create_hook+0x16>
00108b2c <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
108b2c: 55 push %ebp
108b2d: 89 e5 mov %esp,%ebp
108b2f: 57 push %edi
108b30: 56 push %esi
108b31: 53 push %ebx
108b32: 83 ec 0c sub $0xc,%esp
108b35: 8b 7d 08 mov 0x8(%ebp),%edi
108b38: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
108b3b: 39 df cmp %ebx,%edi
108b3d: 74 55 je 108b94 <newlib_delete_hook+0x68>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
108b3f: 8b b3 e4 00 00 00 mov 0xe4(%ebx),%esi
}
if (ptr && ptr != _global_impure_ptr) {
108b45: 85 f6 test %esi,%esi
108b47: 74 21 je 108b6a <newlib_delete_hook+0x3e><== NEVER TAKEN
108b49: 3b 35 e0 16 12 00 cmp 0x1216e0,%esi
108b4f: 74 19 je 108b6a <newlib_delete_hook+0x3e>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
108b51: 83 ec 08 sub $0x8,%esp
108b54: 68 4c 88 10 00 push $0x10884c
108b59: 56 push %esi
108b5a: e8 bd af 00 00 call 113b1c <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
108b5f: 89 34 24 mov %esi,(%esp)
108b62: e8 15 5e 00 00 call 10e97c <_Workspace_Free>
108b67: 83 c4 10 add $0x10,%esp
#endif
}
deleted_task->libc_reent = NULL;
108b6a: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
108b71: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
108b74: 39 df cmp %ebx,%edi
108b76: 74 08 je 108b80 <newlib_delete_hook+0x54>
_REENT = 0;
}
}
108b78: 8d 65 f4 lea -0xc(%ebp),%esp
108b7b: 5b pop %ebx
108b7c: 5e pop %esi
108b7d: 5f pop %edi
108b7e: c9 leave
108b7f: c3 ret
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
108b80: c7 05 a0 52 12 00 00 movl $0x0,0x1252a0
108b87: 00 00 00
}
}
108b8a: 8d 65 f4 lea -0xc(%ebp),%esp
108b8d: 5b pop %ebx
108b8e: 5e pop %esi
108b8f: 5f pop %edi
108b90: c9 leave
108b91: c3 ret
108b92: 66 90 xchg %ax,%ax
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
108b94: 8b 35 a0 52 12 00 mov 0x1252a0,%esi
108b9a: eb a9 jmp 108b45 <newlib_delete_hook+0x19>
0010884c <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
10884c: 55 push %ebp
10884d: 89 e5 mov %esp,%ebp
10884f: 53 push %ebx
108850: 83 ec 10 sub $0x10,%esp
108853: 8b 5d 08 mov 0x8(%ebp),%ebx
switch ( fileno(fp) ) {
108856: 53 push %ebx
108857: e8 ac ae 00 00 call 113708 <fileno>
10885c: 83 c4 10 add $0x10,%esp
10885f: 83 f8 02 cmp $0x2,%eax
108862: 76 14 jbe 108878 <newlib_free_buffers+0x2c><== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
108864: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108867: 53 push %ebx <== NOT EXECUTED
108868: e8 1f ac 00 00 call 11348c <fclose> <== NOT EXECUTED
10886d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
108870: 31 c0 xor %eax,%eax
108872: 8b 5d fc mov -0x4(%ebp),%ebx
108875: c9 leave
108876: c3 ret
108877: 90 nop
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
108878: f6 43 0c 80 testb $0x80,0xc(%ebx)
10887c: 74 f2 je 108870 <newlib_free_buffers+0x24><== ALWAYS TAKEN
free( fp->_bf._base );
10887e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108881: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108884: e8 2b f8 ff ff call 1080b4 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
108889: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
10888f: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
108895: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
10889c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
10889f: 31 c0 xor %eax,%eax <== NOT EXECUTED
1088a1: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1088a4: c9 leave <== NOT EXECUTED
1088a5: c3 ret <== NOT EXECUTED
00107cc4 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
107cc4: 55 push %ebp
107cc5: 89 e5 mov %esp,%ebp
107cc7: 53 push %ebx
107cc8: 83 ec 04 sub $0x4,%esp
107ccb: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_device_driver status;
if ( !initialized ) {
107cce: 80 3d 20 41 12 00 00 cmpb $0x0,0x124120
107cd5: 74 09 je 107ce0 <null_initialize+0x1c>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
107cd7: 31 c0 xor %eax,%eax
107cd9: 8b 5d fc mov -0x4(%ebp),%ebx
107cdc: c9 leave
107cdd: c3 ret
107cde: 66 90 xchg %ax,%ax
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
107ce0: c6 05 20 41 12 00 01 movb $0x1,0x124120
status = rtems_io_register_name(
107ce7: 50 push %eax
107ce8: 6a 00 push $0x0
107cea: 53 push %ebx
107ceb: 68 fa d0 11 00 push $0x11d0fa
107cf0: e8 7b 01 00 00 call 107e70 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
107cf5: 83 c4 10 add $0x10,%esp
107cf8: 85 c0 test %eax,%eax
107cfa: 75 0d jne 107d09 <null_initialize+0x45>
rtems_fatal_error_occurred(status);
NULL_major = major;
107cfc: 89 1d 60 44 12 00 mov %ebx,0x124460
}
return RTEMS_SUCCESSFUL;
}
107d02: 31 c0 xor %eax,%eax
107d04: 8b 5d fc mov -0x4(%ebp),%ebx
107d07: c9 leave
107d08: c3 ret
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
107d09: 83 ec 0c sub $0xc,%esp
107d0c: 50 push %eax
107d0d: e8 ba 41 00 00 call 10becc <rtems_fatal_error_occurred>
00108bfc <open>:
int open(
const char *pathname,
int flags,
...
)
{
108bfc: 55 push %ebp
108bfd: 89 e5 mov %esp,%ebp
108bff: 57 push %edi
108c00: 56 push %esi
108c01: 53 push %ebx
108c02: 83 ec 4c sub $0x4c,%esp
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
108c05: 8b 45 0c mov 0xc(%ebp),%eax
108c08: 40 inc %eax
if ( ( status & _FREAD ) == _FREAD )
108c09: 89 c3 mov %eax,%ebx
108c0b: 83 e3 01 and $0x1,%ebx
eval_flags |= RTEMS_LIBIO_PERMS_READ;
108c0e: f7 db neg %ebx
108c10: 83 e3 04 and $0x4,%ebx
if ( ( status & _FWRITE ) == _FWRITE )
108c13: a8 02 test $0x2,%al
108c15: 74 03 je 108c1a <open+0x1e>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
108c17: 83 cb 02 or $0x2,%ebx
va_start(ap, flags);
mode = va_arg( ap, int );
108c1a: 8b 45 10 mov 0x10(%ebp),%eax
108c1d: 89 45 c4 mov %eax,-0x3c(%ebp)
* 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();
108c20: e8 b3 71 00 00 call 10fdd8 <rtems_libio_allocate>
108c25: 89 c2 mov %eax,%edx
if ( iop == 0 ) {
108c27: 85 c0 test %eax,%eax
108c29: 0f 84 c5 00 00 00 je 108cf4 <open+0xf8>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
108c2f: 31 f6 xor %esi,%esi
108c31: b9 ff ff ff ff mov $0xffffffff,%ecx
108c36: 8b 7d 08 mov 0x8(%ebp),%edi
108c39: 89 f0 mov %esi,%eax
108c3b: f2 ae repnz scas %es:(%edi),%al
108c3d: f7 d1 not %ecx
108c3f: 49 dec %ecx
108c40: 83 ec 0c sub $0xc,%esp
108c43: 6a 01 push $0x1
108c45: 8d 45 d4 lea -0x2c(%ebp),%eax
108c48: 89 45 b4 mov %eax,-0x4c(%ebp)
108c4b: 50 push %eax
108c4c: 53 push %ebx
108c4d: 51 push %ecx
108c4e: ff 75 08 pushl 0x8(%ebp)
108c51: 89 55 c0 mov %edx,-0x40(%ebp)
108c54: e8 6f f3 ff ff call 107fc8 <rtems_filesystem_evaluate_path>
108c59: 89 c3 mov %eax,%ebx
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
108c5b: 83 c4 20 add $0x20,%esp
108c5e: 83 f8 ff cmp $0xffffffff,%eax
108c61: 8b 55 c0 mov -0x40(%ebp),%edx
108c64: 0f 84 de 00 00 00 je 108d48 <open+0x14c>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
108c6a: 8b 45 0c mov 0xc(%ebp),%eax
108c6d: 25 00 0a 00 00 and $0xa00,%eax
108c72: 3d 00 0a 00 00 cmp $0xa00,%eax
108c77: 0f 84 8b 00 00 00 je 108d08 <open+0x10c>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
108c7d: 8b 5a 14 mov 0x14(%edx),%ebx
108c80: 83 ec 0c sub $0xc,%esp
108c83: ff 75 0c pushl 0xc(%ebp)
108c86: 89 55 c0 mov %edx,-0x40(%ebp)
108c89: e8 ce 70 00 00 call 10fd5c <rtems_libio_fcntl_flags>
108c8e: 09 d8 or %ebx,%eax
108c90: 8b 55 c0 mov -0x40(%ebp),%edx
108c93: 89 42 14 mov %eax,0x14(%edx)
iop->pathinfo = loc;
108c96: 8d 7a 18 lea 0x18(%edx),%edi
108c99: b9 05 00 00 00 mov $0x5,%ecx
108c9e: 8b 75 b4 mov -0x4c(%ebp),%esi
108ca1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
108ca3: 8b 42 20 mov 0x20(%edx),%eax
108ca6: ff 75 c4 pushl -0x3c(%ebp)
108ca9: ff 75 0c pushl 0xc(%ebp)
108cac: ff 75 08 pushl 0x8(%ebp)
108caf: 52 push %edx
108cb0: ff 10 call *(%eax)
if ( rc ) {
108cb2: 83 c4 20 add $0x20,%esp
108cb5: 85 c0 test %eax,%eax
108cb7: 8b 55 c0 mov -0x40(%ebp),%edx
108cba: 75 78 jne 108d34 <open+0x138>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
108cbc: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
108cc3: 0f 85 9f 00 00 00 jne 108d68 <open+0x16c>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
108cc9: 2b 15 e0 73 12 00 sub 0x1273e0,%edx
108ccf: c1 fa 03 sar $0x3,%edx
108cd2: 8d 04 d2 lea (%edx,%edx,8),%eax
108cd5: 8d 04 c2 lea (%edx,%eax,8),%eax
108cd8: 8d 04 c2 lea (%edx,%eax,8),%eax
108cdb: 8d 04 c2 lea (%edx,%eax,8),%eax
108cde: 89 c1 mov %eax,%ecx
108ce0: c1 e1 0f shl $0xf,%ecx
108ce3: 01 c8 add %ecx,%eax
108ce5: 8d 04 c2 lea (%edx,%eax,8),%eax
108ce8: f7 d8 neg %eax
}
108cea: 8d 65 f4 lea -0xc(%ebp),%esp
108ced: 5b pop %ebx
108cee: 5e pop %esi
108cef: 5f pop %edi
108cf0: c9 leave
108cf1: c3 ret
108cf2: 66 90 xchg %ax,%ax
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
108cf4: bb 17 00 00 00 mov $0x17,%ebx
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 );
108cf9: e8 36 a6 00 00 call 113334 <__errno>
108cfe: 89 18 mov %ebx,(%eax)
108d00: b8 ff ff ff ff mov $0xffffffff,%eax
108d05: eb e3 jmp 108cea <open+0xee>
108d07: 90 nop
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
loc_to_free = &loc;
108d08: 8d 75 d4 lea -0x2c(%ebp),%esi
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
108d0b: bb 11 00 00 00 mov $0x11,%ebx
*/
done:
va_end(ap);
if ( rc ) {
if ( iop )
108d10: 85 d2 test %edx,%edx
108d12: 74 0c je 108d20 <open+0x124>
rtems_libio_free( iop );
108d14: 83 ec 0c sub $0xc,%esp
108d17: 52 push %edx
108d18: e8 5f 71 00 00 call 10fe7c <rtems_libio_free>
108d1d: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
108d20: 85 f6 test %esi,%esi
108d22: 74 d5 je 108cf9 <open+0xfd>
rtems_filesystem_freenode( loc_to_free );
108d24: 83 ec 0c sub $0xc,%esp
108d27: 56 push %esi
108d28: e8 73 f3 ff ff call 1080a0 <rtems_filesystem_freenode>
108d2d: 83 c4 10 add $0x10,%esp
108d30: eb c7 jmp 108cf9 <open+0xfd>
108d32: 66 90 xchg %ax,%ax
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
108d34: e8 fb a5 00 00 call 113334 <__errno>
108d39: 8b 18 mov (%eax),%ebx
rc = EEXIST;
loc_to_free = &loc;
goto done;
}
loc_to_free = &loc;
108d3b: 8d 75 d4 lea -0x2c(%ebp),%esi
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
goto done;
108d3e: 8b 55 c0 mov -0x40(%ebp),%edx
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
108d41: 85 db test %ebx,%ebx
108d43: 74 84 je 108cc9 <open+0xcd> <== NEVER TAKEN
108d45: eb c9 jmp 108d10 <open+0x114>
108d47: 90 nop
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
108d48: e8 e7 a5 00 00 call 113334 <__errno>
108d4d: 83 38 02 cmpl $0x2,(%eax)
108d50: 8b 55 c0 mov -0x40(%ebp),%edx
108d53: 0f 84 9b 00 00 00 je 108df4 <open+0x1f8>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
108d59: e8 d6 a5 00 00 call 113334 <__errno>
108d5e: 8b 18 mov (%eax),%ebx
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
108d60: 31 f6 xor %esi,%esi
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
goto done;
108d62: 8b 55 c0 mov -0x40(%ebp),%edx
108d65: eb da jmp 108d41 <open+0x145>
108d67: 90 nop
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
108d68: 51 push %ecx
108d69: 6a 00 push $0x0
108d6b: 6a 00 push $0x0
108d6d: 89 d0 mov %edx,%eax
108d6f: 2b 05 e0 73 12 00 sub 0x1273e0,%eax
108d75: c1 f8 03 sar $0x3,%eax
108d78: 8d 0c c0 lea (%eax,%eax,8),%ecx
108d7b: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108d7e: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108d81: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108d84: 89 cb mov %ecx,%ebx
108d86: c1 e3 0f shl $0xf,%ebx
108d89: 01 d9 add %ebx,%ecx
108d8b: 8d 04 c8 lea (%eax,%ecx,8),%eax
108d8e: f7 d8 neg %eax
108d90: 50 push %eax
108d91: 89 55 c0 mov %edx,-0x40(%ebp)
108d94: e8 f3 6e 00 00 call 10fc8c <ftruncate>
108d99: 89 c3 mov %eax,%ebx
if ( rc ) {
108d9b: 83 c4 10 add $0x10,%esp
108d9e: 85 c0 test %eax,%eax
108da0: 8b 55 c0 mov -0x40(%ebp),%edx
108da3: 0f 84 20 ff ff ff je 108cc9 <open+0xcd>
if(errno) rc = errno;
108da9: e8 86 a5 00 00 call 113334 <__errno>
108dae: 8b 00 mov (%eax),%eax
108db0: 85 c0 test %eax,%eax
108db2: 8b 55 c0 mov -0x40(%ebp),%edx
108db5: 0f 85 b2 00 00 00 jne 108e6d <open+0x271> <== ALWAYS TAKEN
close( iop - rtems_libio_iops );
108dbb: 83 ec 0c sub $0xc,%esp
108dbe: 2b 15 e0 73 12 00 sub 0x1273e0,%edx
108dc4: c1 fa 03 sar $0x3,%edx
108dc7: 8d 04 d2 lea (%edx,%edx,8),%eax
108dca: 8d 04 c2 lea (%edx,%eax,8),%eax
108dcd: 8d 04 c2 lea (%edx,%eax,8),%eax
108dd0: 8d 04 c2 lea (%edx,%eax,8),%eax
108dd3: 89 c1 mov %eax,%ecx
108dd5: c1 e1 0f shl $0xf,%ecx
108dd8: 01 c8 add %ecx,%eax
108dda: 8d 04 c2 lea (%edx,%eax,8),%eax
108ddd: f7 d8 neg %eax
108ddf: 50 push %eax
108de0: e8 27 6e 00 00 call 10fc0c <close>
108de5: 83 c4 10 add $0x10,%esp
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
108de8: 31 f6 xor %esi,%esi
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
/* those are released by close(): */
iop = 0;
108dea: 31 d2 xor %edx,%edx
108dec: e9 50 ff ff ff jmp 108d41 <open+0x145>
108df1: 8d 76 00 lea 0x0(%esi),%esi
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
108df4: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
108dfb: 75 0f jne 108e0c <open+0x210>
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
108dfd: 31 f6 xor %esi,%esi
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
108dff: bb 02 00 00 00 mov $0x2,%ebx
108e04: e9 07 ff ff ff jmp 108d10 <open+0x114>
108e09: 8d 76 00 lea 0x0(%esi),%esi
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
108e0c: 6a 00 push $0x0
108e0e: 6a 00 push $0x0
108e10: 8b 45 c4 mov -0x3c(%ebp),%eax
108e13: 80 cc 80 or $0x80,%ah
108e16: 50 push %eax
108e17: ff 75 08 pushl 0x8(%ebp)
108e1a: 89 55 c0 mov %edx,-0x40(%ebp)
108e1d: e8 2a f6 ff ff call 10844c <mknod>
if ( rc ) {
108e22: 83 c4 10 add $0x10,%esp
108e25: 85 c0 test %eax,%eax
108e27: 8b 55 c0 mov -0x40(%ebp),%edx
108e2a: 0f 85 29 ff ff ff jne 108d59 <open+0x15d> <== NEVER TAKEN
/*
* After we do the mknod(), we have to evaluate the path to get the
* "loc" structure needed to actually have the file itself open.
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
108e30: 89 d9 mov %ebx,%ecx
108e32: 8b 7d 08 mov 0x8(%ebp),%edi
108e35: 89 f0 mov %esi,%eax
108e37: f2 ae repnz scas %es:(%edi),%al
108e39: f7 d1 not %ecx
108e3b: 49 dec %ecx
108e3c: 83 ec 0c sub $0xc,%esp
108e3f: 6a 01 push $0x1
108e41: 8d 45 d4 lea -0x2c(%ebp),%eax
108e44: 50 push %eax
108e45: 6a 00 push $0x0
108e47: 51 push %ecx
108e48: ff 75 08 pushl 0x8(%ebp)
108e4b: 89 55 c0 mov %edx,-0x40(%ebp)
108e4e: e8 75 f1 ff ff call 107fc8 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
108e53: 83 c4 20 add $0x20,%esp
108e56: 85 c0 test %eax,%eax
108e58: 8b 55 c0 mov -0x40(%ebp),%edx
108e5b: 0f 84 1c fe ff ff je 108c7d <open+0x81> <== ALWAYS TAKEN
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
108e61: 31 f6 xor %esi,%esi
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
108e63: bb 0d 00 00 00 mov $0xd,%ebx <== NOT EXECUTED
108e68: e9 a3 fe ff ff jmp 108d10 <open+0x114> <== NOT EXECUTED
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
108e6d: e8 c2 a4 00 00 call 113334 <__errno>
108e72: 8b 18 mov (%eax),%ebx
108e74: 8b 55 c0 mov -0x40(%ebp),%edx
108e77: e9 3f ff ff ff jmp 108dbb <open+0x1bf>
00109c00 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
109c00: 55 push %ebp
109c01: 89 e5 mov %esp,%ebp
109c03: 56 push %esi
109c04: 53 push %ebx
109c05: 83 ec 10 sub $0x10,%esp
109c08: 88 45 f4 mov %al,-0xc(%ebp)
int i;
if (tty->termios.c_oflag & OPOST) {
109c0b: 8b 4a 34 mov 0x34(%edx),%ecx
109c0e: f6 c1 01 test $0x1,%cl
109c11: 74 31 je 109c44 <oproc+0x44> <== NEVER TAKEN
switch (c) {
109c13: 3c 09 cmp $0x9,%al
109c15: 0f 84 b1 00 00 00 je 109ccc <oproc+0xcc>
109c1b: 76 3f jbe 109c5c <oproc+0x5c> <== NEVER TAKEN
109c1d: 3c 0a cmp $0xa,%al
109c1f: 74 4f je 109c70 <oproc+0x70>
109c21: 3c 0d cmp $0xd,%al
109c23: 74 7f je 109ca4 <oproc+0xa4> <== NEVER TAKEN
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
109c25: 83 e1 02 and $0x2,%ecx
109c28: 0f 85 c6 00 00 00 jne 109cf4 <oproc+0xf4> <== NEVER TAKEN
109c2e: 8b 0d 94 52 12 00 mov 0x125294,%ecx
c = toupper(c);
if (!iscntrl(c))
109c34: 0f b6 c0 movzbl %al,%eax
109c37: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1)
109c3c: 75 06 jne 109c44 <oproc+0x44> <== NEVER TAKEN
tty->column++;
109c3e: ff 42 28 incl 0x28(%edx)
109c41: 8d 76 00 lea 0x0(%esi),%esi
break;
}
}
rtems_termios_puts (&c, 1, tty);
109c44: 53 push %ebx
109c45: 52 push %edx
109c46: 6a 01 push $0x1
109c48: 8d 45 f4 lea -0xc(%ebp),%eax
109c4b: 50 push %eax
109c4c: e8 7b fe ff ff call 109acc <rtems_termios_puts>
109c51: 83 c4 10 add $0x10,%esp
}
109c54: 8d 65 f8 lea -0x8(%ebp),%esp
109c57: 5b pop %ebx
109c58: 5e pop %esi
109c59: c9 leave
109c5a: c3 ret
109c5b: 90 nop
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
109c5c: 3c 08 cmp $0x8,%al <== NOT EXECUTED
109c5e: 75 c5 jne 109c25 <oproc+0x25> <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
109c60: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
109c63: 85 c0 test %eax,%eax <== NOT EXECUTED
109c65: 7e dd jle 109c44 <oproc+0x44> <== NOT EXECUTED
tty->column--;
109c67: 48 dec %eax <== NOT EXECUTED
109c68: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED
109c6b: eb d7 jmp 109c44 <oproc+0x44> <== NOT EXECUTED
109c6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
109c70: f6 c1 20 test $0x20,%cl
109c73: 74 07 je 109c7c <oproc+0x7c> <== ALWAYS TAKEN
tty->column = 0;
109c75: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
109c7c: 83 e1 04 and $0x4,%ecx
109c7f: 74 c3 je 109c44 <oproc+0x44> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
109c81: 51 push %ecx
109c82: 52 push %edx
109c83: 6a 01 push $0x1
109c85: 68 04 0c 12 00 push $0x120c04
109c8a: 89 55 f0 mov %edx,-0x10(%ebp)
109c8d: e8 3a fe ff ff call 109acc <rtems_termios_puts>
tty->column = 0;
109c92: 8b 55 f0 mov -0x10(%ebp),%edx
109c95: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx)
109c9c: 83 c4 10 add $0x10,%esp
109c9f: eb a3 jmp 109c44 <oproc+0x44>
109ca1: 8d 76 00 lea 0x0(%esi),%esi
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
109ca4: f6 c1 10 test $0x10,%cl <== NOT EXECUTED
109ca7: 74 07 je 109cb0 <oproc+0xb0> <== NOT EXECUTED
109ca9: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
109cac: 85 c0 test %eax,%eax <== NOT EXECUTED
109cae: 74 a4 je 109c54 <oproc+0x54> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
109cb0: f6 c1 08 test $0x8,%cl <== NOT EXECUTED
109cb3: 74 09 je 109cbe <oproc+0xbe> <== NOT EXECUTED
c = '\n';
109cb5: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
109cb9: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED
109cbc: 74 86 je 109c44 <oproc+0x44> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
109cbe: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED
break;
109cc5: e9 7a ff ff ff jmp 109c44 <oproc+0x44> <== NOT EXECUTED
109cca: 66 90 xchg %ax,%ax <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
109ccc: 8b 5a 28 mov 0x28(%edx),%ebx
109ccf: 89 de mov %ebx,%esi
109cd1: 83 e6 07 and $0x7,%esi
109cd4: b8 08 00 00 00 mov $0x8,%eax
109cd9: 29 f0 sub %esi,%eax
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
109cdb: 81 e1 00 18 00 00 and $0x1800,%ecx
109ce1: 81 f9 00 18 00 00 cmp $0x1800,%ecx
109ce7: 74 37 je 109d20 <oproc+0x120> <== ALWAYS TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
109ce9: 01 d8 add %ebx,%eax <== NOT EXECUTED
109ceb: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED
break;
109cee: e9 51 ff ff ff jmp 109c44 <oproc+0x44> <== NOT EXECUTED
109cf3: 90 nop <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
109cf4: 8b 0d 94 52 12 00 mov 0x125294,%ecx <== NOT EXECUTED
109cfa: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
109cfd: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED
109d02: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED
109d05: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED
109d08: 74 0e je 109d18 <oproc+0x118> <== NOT EXECUTED
109d0a: 89 c3 mov %eax,%ebx <== NOT EXECUTED
109d0c: 88 d8 mov %bl,%al <== NOT EXECUTED
109d0e: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED
109d11: e9 1e ff ff ff jmp 109c34 <oproc+0x34> <== NOT EXECUTED
109d16: 66 90 xchg %ax,%ax <== NOT EXECUTED
109d18: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED
109d1b: eb ef jmp 109d0c <oproc+0x10c> <== NOT EXECUTED
109d1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
109d20: 8d 1c 18 lea (%eax,%ebx,1),%ebx
109d23: 89 5a 28 mov %ebx,0x28(%edx)
rtems_termios_puts ( " ", i, tty);
109d26: 56 push %esi
109d27: 52 push %edx
109d28: 50 push %eax
109d29: 68 9c 07 12 00 push $0x12079c
109d2e: e8 99 fd ff ff call 109acc <rtems_termios_puts>
return;
109d33: 83 c4 10 add $0x10,%esp
109d36: e9 19 ff ff ff jmp 109c54 <oproc+0x54>
0010a038 <pathconf>:
long pathconf(
const char *path,
int name
)
{
10a038: 55 push %ebp
10a039: 89 e5 mov %esp,%ebp
10a03b: 56 push %esi
10a03c: 53 push %ebx
int status;
int fd;
fd = open( path, O_RDONLY );
10a03d: 83 ec 08 sub $0x8,%esp
10a040: 6a 00 push $0x0
10a042: ff 75 08 pushl 0x8(%ebp)
10a045: e8 4e fd ff ff call 109d98 <open>
10a04a: 89 c3 mov %eax,%ebx
if ( fd == -1 )
10a04c: 83 c4 10 add $0x10,%esp
10a04f: 83 f8 ff cmp $0xffffffff,%eax
10a052: 74 24 je 10a078 <pathconf+0x40>
return -1;
status = fpathconf( fd, name );
10a054: 83 ec 08 sub $0x8,%esp
10a057: ff 75 0c pushl 0xc(%ebp)
10a05a: 50 push %eax
10a05b: e8 c0 ec ff ff call 108d20 <fpathconf>
10a060: 89 c6 mov %eax,%esi
(void) close( fd );
10a062: 89 1c 24 mov %ebx,(%esp)
10a065: e8 56 e8 ff ff call 1088c0 <close>
return status;
10a06a: 83 c4 10 add $0x10,%esp
}
10a06d: 89 f0 mov %esi,%eax
10a06f: 8d 65 f8 lea -0x8(%ebp),%esp
10a072: 5b pop %ebx
10a073: 5e pop %esi
10a074: c9 leave
10a075: c3 ret
10a076: 66 90 xchg %ax,%ax
int status;
int fd;
fd = open( path, O_RDONLY );
if ( fd == -1 )
return -1;
10a078: be ff ff ff ff mov $0xffffffff,%esi
status = fpathconf( fd, name );
(void) close( fd );
return status;
}
10a07d: 89 f0 mov %esi,%eax
10a07f: 8d 65 f8 lea -0x8(%ebp),%esp
10a082: 5b pop %ebx
10a083: 5e pop %esi
10a084: c9 leave
10a085: c3 ret
00110d48 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
110d48: 55 push %ebp
110d49: 89 e5 mov %esp,%ebp
110d4b: 57 push %edi
110d4c: 56 push %esi
110d4d: 53 push %ebx
110d4e: 83 ec 24 sub $0x24,%esp
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
110d51: 68 ff 01 00 00 push $0x1ff
110d56: 68 4c 2d 12 00 push $0x122d4c
110d5b: e8 4c 17 00 00 call 1124ac <rtems_mkdir>
110d60: 83 c4 10 add $0x10,%esp
110d63: 85 c0 test %eax,%eax
110d65: 74 0d je 110d74 <pipe_create+0x2c> <== ALWAYS TAKEN
return -1;
110d67: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
110d6c: 8d 65 f4 lea -0xc(%ebp),%esp
110d6f: 5b pop %ebx
110d70: 5e pop %esi
110d71: 5f pop %edi
110d72: c9 leave
110d73: c3 ret
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
110d74: 8d 5d d9 lea -0x27(%ebp),%ebx
110d77: be 51 2d 12 00 mov $0x122d51,%esi
110d7c: b9 0a 00 00 00 mov $0xa,%ecx
110d81: 89 df mov %ebx,%edi
110d83: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
110d85: 0f b7 05 2c 8e 12 00 movzwl 0x128e2c,%eax
110d8c: 8d 50 01 lea 0x1(%eax),%edx
110d8f: 66 89 15 2c 8e 12 00 mov %dx,0x128e2c
110d96: 51 push %ecx
110d97: 50 push %eax
110d98: 68 5c 2d 12 00 push $0x122d5c
110d9d: 8d 45 e3 lea -0x1d(%ebp),%eax
110da0: 50 push %eax
110da1: e8 c6 4a 00 00 call 11586c <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
110da6: 58 pop %eax
110da7: 5a pop %edx
110da8: 68 80 01 00 00 push $0x180
110dad: 53 push %ebx
110dae: e8 41 14 00 00 call 1121f4 <mkfifo>
110db3: 83 c4 10 add $0x10,%esp
110db6: 85 c0 test %eax,%eax
110db8: 0f 85 a6 00 00 00 jne 110e64 <pipe_create+0x11c>
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);
110dbe: 83 ec 08 sub $0x8,%esp
110dc1: 68 00 40 00 00 push $0x4000
110dc6: 53 push %ebx
110dc7: e8 e4 90 ff ff call 109eb0 <open>
110dcc: 8b 55 08 mov 0x8(%ebp),%edx
110dcf: 89 02 mov %eax,(%edx)
if (filsdes[0] < 0) {
110dd1: 83 c4 10 add $0x10,%esp
110dd4: 85 c0 test %eax,%eax
110dd6: 78 58 js 110e30 <pipe_create+0xe8>
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]);
110dd8: 3b 05 cc 4d 12 00 cmp 0x124dcc,%eax
110dde: 72 3c jb 110e1c <pipe_create+0xd4> <== ALWAYS TAKEN
110de0: 31 d2 xor %edx,%edx <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
110de2: 83 62 14 fe andl $0xfffffffe,0x14(%edx)
filsdes[1] = open(fifopath, O_WRONLY);
110de6: 83 ec 08 sub $0x8,%esp
110de9: 6a 01 push $0x1
110deb: 53 push %ebx
110dec: e8 bf 90 ff ff call 109eb0 <open>
110df1: 8b 55 08 mov 0x8(%ebp),%edx
110df4: 89 42 04 mov %eax,0x4(%edx)
if (filsdes[1] < 0) {
110df7: 83 c4 10 add $0x10,%esp
110dfa: 85 c0 test %eax,%eax
110dfc: 78 4a js 110e48 <pipe_create+0x100>
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
110dfe: 31 f6 xor %esi,%esi
if (filsdes[1] < 0) {
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
110e00: 83 ec 0c sub $0xc,%esp
110e03: 53 push %ebx
110e04: e8 f3 b0 ff ff call 10befc <unlink>
110e09: 83 c4 10 add $0x10,%esp
}
if(err != 0)
110e0c: 85 f6 test %esi,%esi
110e0e: 75 63 jne 110e73 <pipe_create+0x12b>
rtems_set_errno_and_return_minus_one(err);
return 0;
110e10: 31 c0 xor %eax,%eax
}
110e12: 8d 65 f4 lea -0xc(%ebp),%esp
110e15: 5b pop %ebx
110e16: 5e pop %esi
110e17: 5f pop %edi
110e18: c9 leave
110e19: c3 ret
110e1a: 66 90 xchg %ax,%ax
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]);
110e1c: c1 e0 03 shl $0x3,%eax
110e1f: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
110e26: 29 c2 sub %eax,%edx
110e28: 03 15 60 90 12 00 add 0x129060,%edx
110e2e: eb b2 jmp 110de2 <pipe_create+0x9a>
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
110e30: e8 9f 40 00 00 call 114ed4 <__errno>
110e35: 8b 30 mov (%eax),%esi
/* 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);
110e37: 83 ec 0c sub $0xc,%esp
110e3a: 53 push %ebx
110e3b: e8 bc b0 ff ff call 10befc <unlink>
110e40: 83 c4 10 add $0x10,%esp
110e43: eb c7 jmp 110e0c <pipe_create+0xc4>
110e45: 8d 76 00 lea 0x0(%esi),%esi
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
110e48: e8 87 40 00 00 call 114ed4 <__errno>
110e4d: 8b 30 mov (%eax),%esi
close(filsdes[0]);
110e4f: 83 ec 0c sub $0xc,%esp
110e52: 8b 45 08 mov 0x8(%ebp),%eax
110e55: ff 30 pushl (%eax)
110e57: e8 bc 80 ff ff call 108f18 <close>
110e5c: 83 c4 10 add $0x10,%esp
110e5f: eb 9f jmp 110e00 <pipe_create+0xb8>
110e61: 8d 76 00 lea 0x0(%esi),%esi
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){
110e64: e8 6b 40 00 00 call 114ed4 <__errno>
return -1;
110e69: b8 ff ff ff ff mov $0xffffffff,%eax
110e6e: e9 f9 fe ff ff jmp 110d6c <pipe_create+0x24>
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
110e73: e8 5c 40 00 00 call 114ed4 <__errno>
110e78: 89 30 mov %esi,(%eax)
110e7a: b8 ff ff ff ff mov $0xffffffff,%eax
110e7f: e9 e8 fe ff ff jmp 110d6c <pipe_create+0x24>
00112294 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
112294: 55 push %ebp
112295: 89 e5 mov %esp,%ebp
112297: 56 push %esi
112298: 53 push %ebx
112299: 8b 75 08 mov 0x8(%ebp),%esi
11229c: 8b 5d 10 mov 0x10(%ebp),%ebx
if (cmd == FIONREAD) {
11229f: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp)
1122a6: 74 0c je 1122b4 <pipe_ioctl+0x20>
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
1122a8: b8 ea ff ff ff mov $0xffffffea,%eax
}
1122ad: 8d 65 f8 lea -0x8(%ebp),%esp
1122b0: 5b pop %ebx
1122b1: 5e pop %esi
1122b2: c9 leave
1122b3: c3 ret
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
1122b4: 85 db test %ebx,%ebx
1122b6: 75 07 jne 1122bf <pipe_ioctl+0x2b>
return -EFAULT;
1122b8: b8 f2 ff ff ff mov $0xfffffff2,%eax
1122bd: eb ee jmp 1122ad <pipe_ioctl+0x19>
if (! PIPE_LOCK(pipe))
1122bf: 50 push %eax
1122c0: 6a 00 push $0x0
1122c2: 6a 00 push $0x0
1122c4: ff 76 28 pushl 0x28(%esi)
1122c7: e8 e8 b1 ff ff call 10d4b4 <rtems_semaphore_obtain>
1122cc: 83 c4 10 add $0x10,%esp
1122cf: 85 c0 test %eax,%eax
1122d1: 74 07 je 1122da <pipe_ioctl+0x46> <== ALWAYS TAKEN
return -EINTR;
1122d3: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED
1122d8: eb d3 jmp 1122ad <pipe_ioctl+0x19> <== NOT EXECUTED
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
1122da: 8b 46 0c mov 0xc(%esi),%eax
1122dd: 89 03 mov %eax,(%ebx)
PIPE_UNLOCK(pipe);
1122df: 83 ec 0c sub $0xc,%esp
1122e2: ff 76 28 pushl 0x28(%esi)
1122e5: e8 c6 b2 ff ff call 10d5b0 <rtems_semaphore_release>
return 0;
1122ea: 83 c4 10 add $0x10,%esp
1122ed: 31 c0 xor %eax,%eax
1122ef: eb bc jmp 1122ad <pipe_ioctl+0x19>
00111ed4 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
111ed4: 55 push %ebp
111ed5: 89 e5 mov %esp,%ebp
111ed7: 57 push %edi
111ed8: 56 push %esi
111ed9: 53 push %ebx
111eda: 83 ec 30 sub $0x30,%esp
111edd: 8b 5d 08 mov 0x8(%ebp),%ebx
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
111ee0: 6a 00 push $0x0
111ee2: 6a 00 push $0x0
111ee4: ff 73 28 pushl 0x28(%ebx)
111ee7: e8 c8 b5 ff ff call 10d4b4 <rtems_semaphore_obtain>
111eec: 83 c4 10 add $0x10,%esp
111eef: 85 c0 test %eax,%eax
111ef1: 0f 85 b1 00 00 00 jne 111fa8 <pipe_read+0xd4> <== NEVER TAKEN
return -EINTR;
while (read < count) {
111ef7: 8b 55 10 mov 0x10(%ebp),%edx
111efa: 85 d2 test %edx,%edx
111efc: 0f 84 82 01 00 00 je 112084 <pipe_read+0x1b0> <== NEVER TAKEN
111f02: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
111f09: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
while (PIPE_EMPTY(pipe)) {
111f10: 8b 53 0c mov 0xc(%ebx),%edx
111f13: 85 d2 test %edx,%edx
111f15: 0f 85 a1 00 00 00 jne 111fbc <pipe_read+0xe8>
/* Not an error */
if (pipe->Writers == 0)
111f1b: 8b 43 14 mov 0x14(%ebx),%eax
111f1e: 85 c0 test %eax,%eax
111f20: 0f 84 06 01 00 00 je 11202c <pipe_read+0x158>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
111f26: 8b 45 14 mov 0x14(%ebp),%eax
111f29: f6 40 14 01 testb $0x1,0x14(%eax)
111f2d: 0f 85 01 01 00 00 jne 112034 <pipe_read+0x160>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
111f33: ff 43 18 incl 0x18(%ebx)
PIPE_UNLOCK(pipe);
111f36: 83 ec 0c sub $0xc,%esp
111f39: ff 73 28 pushl 0x28(%ebx)
111f3c: e8 6f b6 ff ff call 10d5b0 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
111f41: 5e pop %esi
111f42: 5f pop %edi
111f43: 6a 00 push $0x0
111f45: ff 73 2c pushl 0x2c(%ebx)
111f48: e8 17 19 00 00 call 113864 <rtems_barrier_wait>
111f4d: 83 c4 0c add $0xc,%esp
111f50: 83 f8 01 cmp $0x1,%eax
111f53: 19 f6 sbb %esi,%esi
111f55: f7 d6 not %esi
111f57: 83 e6 fc and $0xfffffffc,%esi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
111f5a: 6a 00 push $0x0
111f5c: 6a 00 push $0x0
111f5e: ff 73 28 pushl 0x28(%ebx)
111f61: e8 4e b5 ff ff call 10d4b4 <rtems_semaphore_obtain>
111f66: 83 c4 10 add $0x10,%esp
111f69: 85 c0 test %eax,%eax
111f6b: 0f 85 cf 00 00 00 jne 112040 <pipe_read+0x16c> <== NEVER TAKEN
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
111f71: ff 4b 18 decl 0x18(%ebx)
if (ret != 0)
111f74: 85 f6 test %esi,%esi
111f76: 74 98 je 111f10 <pipe_read+0x3c> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
111f78: 83 ec 0c sub $0xc,%esp
111f7b: ff 73 28 pushl 0x28(%ebx)
111f7e: e8 2d b6 ff ff call 10d5b0 <rtems_semaphore_release>
111f83: 83 c4 10 add $0x10,%esp
out_nolock:
if (read > 0)
111f86: 8b 55 d4 mov -0x2c(%ebp),%edx
111f89: 85 d2 test %edx,%edx
111f8b: 7e 0b jle 111f98 <pipe_read+0xc4>
return read;
return ret;
}
111f8d: 8b 45 d4 mov -0x2c(%ebp),%eax
111f90: 8d 65 f4 lea -0xc(%ebp),%esp
111f93: 5b pop %ebx
111f94: 5e pop %esi
111f95: 5f pop %edi
111f96: c9 leave
111f97: c3 ret
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
111f98: 89 75 d4 mov %esi,-0x2c(%ebp)
}
111f9b: 8b 45 d4 mov -0x2c(%ebp),%eax
111f9e: 8d 65 f4 lea -0xc(%ebp),%esp
111fa1: 5b pop %ebx
111fa2: 5e pop %esi
111fa3: 5f pop %edi
111fa4: c9 leave
111fa5: c3 ret
111fa6: 66 90 xchg %ax,%ax
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
111fa8: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
111faf: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
111fb2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111fb5: 5b pop %ebx <== NOT EXECUTED
111fb6: 5e pop %esi <== NOT EXECUTED
111fb7: 5f pop %edi <== NOT EXECUTED
111fb8: c9 leave <== NOT EXECUTED
111fb9: c3 ret <== NOT EXECUTED
111fba: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
111fbc: 8b 45 10 mov 0x10(%ebp),%eax
111fbf: 2b 45 d0 sub -0x30(%ebp),%eax
111fc2: 89 55 cc mov %edx,-0x34(%ebp)
111fc5: 39 c2 cmp %eax,%edx
111fc7: 76 03 jbe 111fcc <pipe_read+0xf8>
111fc9: 89 45 cc mov %eax,-0x34(%ebp)
chunk1 = pipe->Size - pipe->Start;
111fcc: 8b 73 08 mov 0x8(%ebx),%esi
111fcf: 8b 43 04 mov 0x4(%ebx),%eax
111fd2: 29 f0 sub %esi,%eax
if (chunk > chunk1) {
111fd4: 39 45 cc cmp %eax,-0x34(%ebp)
111fd7: 7f 71 jg 11204a <pipe_read+0x176>
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);
111fd9: 8b 45 0c mov 0xc(%ebp),%eax
111fdc: 03 45 d0 add -0x30(%ebp),%eax
111fdf: 03 33 add (%ebx),%esi
111fe1: 89 c7 mov %eax,%edi
111fe3: 8b 4d cc mov -0x34(%ebp),%ecx
111fe6: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
pipe->Start += chunk;
111fe8: 8b 45 cc mov -0x34(%ebp),%eax
111feb: 03 43 08 add 0x8(%ebx),%eax
pipe->Start %= pipe->Size;
111fee: 31 d2 xor %edx,%edx
111ff0: f7 73 04 divl 0x4(%ebx)
111ff3: 89 53 08 mov %edx,0x8(%ebx)
pipe->Length -= chunk;
111ff6: 8b 43 0c mov 0xc(%ebx),%eax
111ff9: 2b 45 cc sub -0x34(%ebp),%eax
111ffc: 89 43 0c mov %eax,0xc(%ebx)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
111fff: 85 c0 test %eax,%eax
112001: 75 07 jne 11200a <pipe_read+0x136>
pipe->Start = 0;
112003: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
if (pipe->waitingWriters > 0)
11200a: 8b 4b 1c mov 0x1c(%ebx),%ecx
11200d: 85 c9 test %ecx,%ecx
11200f: 75 5f jne 112070 <pipe_read+0x19c>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
112011: 8b 45 cc mov -0x34(%ebp),%eax
112014: 01 45 d4 add %eax,-0x2c(%ebp)
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
112017: 8b 45 d4 mov -0x2c(%ebp),%eax
11201a: 89 45 d0 mov %eax,-0x30(%ebp)
11201d: 8b 45 10 mov 0x10(%ebp),%eax
112020: 39 45 d4 cmp %eax,-0x2c(%ebp)
112023: 0f 82 e7 fe ff ff jb 111f10 <pipe_read+0x3c> <== NEVER TAKEN
112029: 8d 76 00 lea 0x0(%esi),%esi
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
11202c: 31 f6 xor %esi,%esi
11202e: e9 45 ff ff ff jmp 111f78 <pipe_read+0xa4>
112033: 90 nop
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
112034: be f5 ff ff ff mov $0xfffffff5,%esi
112039: e9 3a ff ff ff jmp 111f78 <pipe_read+0xa4>
11203e: 66 90 xchg %ax,%ax
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
112040: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
112045: e9 3c ff ff ff jmp 111f86 <pipe_read+0xb2> <== 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);
11204a: 8b 55 0c mov 0xc(%ebp),%edx
11204d: 03 55 d0 add -0x30(%ebp),%edx
112050: 03 33 add (%ebx),%esi
112052: 89 d7 mov %edx,%edi
112054: 89 c1 mov %eax,%ecx
112056: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
112058: 8b 55 d0 mov -0x30(%ebp),%edx
11205b: 01 c2 add %eax,%edx
11205d: 03 55 0c add 0xc(%ebp),%edx
112060: 8b 4d cc mov -0x34(%ebp),%ecx
112063: 29 c1 sub %eax,%ecx
112065: 8b 33 mov (%ebx),%esi
112067: 89 d7 mov %edx,%edi
112069: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
11206b: e9 78 ff ff ff jmp 111fe8 <pipe_read+0x114>
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
112070: 83 ec 08 sub $0x8,%esp
112073: 8d 45 e4 lea -0x1c(%ebp),%eax
112076: 50 push %eax
112077: ff 73 30 pushl 0x30(%ebx)
11207a: e8 81 17 00 00 call 113800 <rtems_barrier_release>
11207f: 83 c4 10 add $0x10,%esp
112082: eb 8d jmp 112011 <pipe_read+0x13d>
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
112084: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
11208b: 31 f6 xor %esi,%esi <== NOT EXECUTED
11208d: e9 e6 fe ff ff jmp 111f78 <pipe_read+0xa4> <== NOT EXECUTED
00111980 <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
111980: 55 push %ebp
111981: 89 e5 mov %esp,%ebp
111983: 57 push %edi
111984: 56 push %esi
111985: 53 push %ebx
111986: 83 ec 1c sub $0x1c,%esp
111989: 8b 7d 08 mov 0x8(%ebp),%edi
pipe_control_t *pipe = *pipep;
11198c: 8b 1f mov (%edi),%ebx
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
11198e: 8b 45 0c mov 0xc(%ebp),%eax
111991: 8b 40 14 mov 0x14(%eax),%eax
111994: 89 c6 mov %eax,%esi
111996: 83 e6 06 and $0x6,%esi
if (mode & LIBIO_FLAGS_READ)
111999: a8 02 test $0x2,%al
11199b: 74 03 je 1119a0 <pipe_release+0x20>
pipe->Readers --;
11199d: ff 4b 10 decl 0x10(%ebx)
if (mode & LIBIO_FLAGS_WRITE)
1119a0: f7 c6 04 00 00 00 test $0x4,%esi
1119a6: 74 03 je 1119ab <pipe_release+0x2b>
pipe->Writers --;
1119a8: ff 4b 14 decl 0x14(%ebx)
PIPE_UNLOCK(pipe);
1119ab: 83 ec 0c sub $0xc,%esp
1119ae: ff 73 28 pushl 0x28(%ebx)
1119b1: e8 fa bb ff ff call 10d5b0 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
1119b6: 83 c4 10 add $0x10,%esp
1119b9: 8b 53 10 mov 0x10(%ebx),%edx
1119bc: 85 d2 test %edx,%edx
1119be: 74 2c je 1119ec <pipe_release+0x6c>
*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)
1119c0: 8b 43 14 mov 0x14(%ebx),%eax
1119c3: 85 c0 test %eax,%eax
1119c5: 75 17 jne 1119de <pipe_release+0x5e> <== NEVER TAKEN
1119c7: 83 fe 02 cmp $0x2,%esi
1119ca: 74 12 je 1119de <pipe_release+0x5e> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
1119cc: 83 ec 08 sub $0x8,%esp
1119cf: 8d 45 e4 lea -0x1c(%ebp),%eax
1119d2: 50 push %eax
1119d3: ff 73 2c pushl 0x2c(%ebx)
1119d6: e8 25 1e 00 00 call 113800 <rtems_barrier_release>
1119db: 83 c4 10 add $0x10,%esp
pipe_unlock();
1119de: e8 85 ff ff ff call 111968 <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
1119e3: 8d 65 f4 lea -0xc(%ebp),%esp
1119e6: 5b pop %ebx
1119e7: 5e pop %esi
1119e8: 5f pop %edi
1119e9: c9 leave
1119ea: c3 ret
1119eb: 90 nop
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
1119ec: 8b 43 14 mov 0x14(%ebx),%eax
1119ef: 85 c0 test %eax,%eax
1119f1: 74 25 je 111a18 <pipe_release+0x98>
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
1119f3: 83 fe 04 cmp $0x4,%esi
1119f6: 74 e6 je 1119de <pipe_release+0x5e> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
1119f8: 83 ec 08 sub $0x8,%esp
1119fb: 8d 45 e4 lea -0x1c(%ebp),%eax
1119fe: 50 push %eax
1119ff: ff 73 30 pushl 0x30(%ebx)
111a02: e8 f9 1d 00 00 call 113800 <rtems_barrier_release>
111a07: 83 c4 10 add $0x10,%esp
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
111a0a: e8 59 ff ff ff call 111968 <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
111a0f: 8d 65 f4 lea -0xc(%ebp),%esp
111a12: 5b pop %ebx
111a13: 5e pop %esi
111a14: 5f pop %edi
111a15: c9 leave
111a16: c3 ret
111a17: 90 nop
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
111a18: 83 ec 0c sub $0xc,%esp
111a1b: ff 73 2c pushl 0x2c(%ebx)
111a1e: e8 4d 1d 00 00 call 113770 <rtems_barrier_delete>
rtems_barrier_delete(pipe->writeBarrier);
111a23: 5e pop %esi
111a24: ff 73 30 pushl 0x30(%ebx)
111a27: e8 44 1d 00 00 call 113770 <rtems_barrier_delete>
rtems_semaphore_delete(pipe->Semaphore);
111a2c: 59 pop %ecx
111a2d: ff 73 28 pushl 0x28(%ebx)
111a30: e8 db b9 ff ff call 10d410 <rtems_semaphore_delete>
free(pipe->Buffer);
111a35: 5a pop %edx
111a36: ff 33 pushl (%ebx)
111a38: e8 73 7f ff ff call 1099b0 <free>
free(pipe);
111a3d: 89 1c 24 mov %ebx,(%esp)
111a40: e8 6b 7f ff ff call 1099b0 <free>
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
111a45: c7 07 00 00 00 00 movl $0x0,(%edi)
111a4b: 83 c4 10 add $0x10,%esp
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
111a4e: e8 15 ff ff ff call 111968 <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
111a53: 8d 65 f4 lea -0xc(%ebp),%esp
111a56: 5b pop %ebx
111a57: 5e pop %esi
111a58: 5f pop %edi
111a59: c9 leave
111a5a: c3 ret
00112094 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
112094: 55 push %ebp
112095: 89 e5 mov %esp,%ebp
112097: 57 push %edi
112098: 56 push %esi
112099: 53 push %ebx
11209a: 83 ec 2c sub $0x2c,%esp
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
11209d: 8b 75 10 mov 0x10(%ebp),%esi
1120a0: 85 f6 test %esi,%esi
1120a2: 75 0c jne 1120b0 <pipe_write+0x1c> <== ALWAYS TAKEN
return 0;
1120a4: 31 db xor %ebx,%ebx
#endif
if (written > 0)
return written;
return ret;
}
1120a6: 89 d8 mov %ebx,%eax
1120a8: 8d 65 f4 lea -0xc(%ebp),%esp
1120ab: 5b pop %ebx
1120ac: 5e pop %esi
1120ad: 5f pop %edi
1120ae: c9 leave
1120af: c3 ret
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
1120b0: 53 push %ebx
1120b1: 6a 00 push $0x0
1120b3: 6a 00 push $0x0
1120b5: 8b 45 08 mov 0x8(%ebp),%eax
1120b8: ff 70 28 pushl 0x28(%eax)
1120bb: e8 f4 b3 ff ff call 10d4b4 <rtems_semaphore_obtain>
1120c0: 83 c4 10 add $0x10,%esp
1120c3: 85 c0 test %eax,%eax
1120c5: 0f 85 1d 01 00 00 jne 1121e8 <pipe_write+0x154> <== NEVER TAKEN
return -EINTR;
if (pipe->Readers == 0) {
1120cb: 8b 45 08 mov 0x8(%ebp),%eax
1120ce: 8b 48 10 mov 0x10(%eax),%ecx
1120d1: 85 c9 test %ecx,%ecx
1120d3: 0f 84 50 01 00 00 je 112229 <pipe_write+0x195>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
1120d9: 8b 48 04 mov 0x4(%eax),%ecx
1120dc: 39 4d 10 cmp %ecx,0x10(%ebp)
1120df: 0f 87 3a 01 00 00 ja 11221f <pipe_write+0x18b> <== NEVER TAKEN
1120e5: 8b 7d 10 mov 0x10(%ebp),%edi
1120e8: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
1120ef: 31 db xor %ebx,%ebx
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
1120f1: 89 5d d4 mov %ebx,-0x2c(%ebp)
1120f4: 8b 5d 08 mov 0x8(%ebp),%ebx
/* 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) {
1120f7: 8b 43 0c mov 0xc(%ebx),%eax
1120fa: 89 ca mov %ecx,%edx
1120fc: 29 c2 sub %eax,%edx
1120fe: 39 fa cmp %edi,%edx
112100: 73 6f jae 112171 <pipe_write+0xdd>
if (LIBIO_NODELAY(iop)) {
112102: 8b 45 14 mov 0x14(%ebp),%eax
112105: f6 40 14 01 testb $0x1,0x14(%eax)
112109: 0f 85 47 01 00 00 jne 112256 <pipe_write+0x1c2>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
11210f: ff 43 1c incl 0x1c(%ebx)
PIPE_UNLOCK(pipe);
112112: 83 ec 0c sub $0xc,%esp
112115: ff 73 28 pushl 0x28(%ebx)
112118: e8 93 b4 ff ff call 10d5b0 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
11211d: 58 pop %eax
11211e: 5a pop %edx
11211f: 6a 00 push $0x0
112121: ff 73 30 pushl 0x30(%ebx)
112124: e8 3b 17 00 00 call 113864 <rtems_barrier_wait>
112129: 83 c4 0c add $0xc,%esp
11212c: 83 f8 01 cmp $0x1,%eax
11212f: 19 f6 sbb %esi,%esi
112131: f7 d6 not %esi
112133: 83 e6 fc and $0xfffffffc,%esi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
112136: 6a 00 push $0x0
112138: 6a 00 push $0x0
11213a: ff 73 28 pushl 0x28(%ebx)
11213d: e8 72 b3 ff ff call 10d4b4 <rtems_semaphore_obtain>
112142: 83 c4 10 add $0x10,%esp
112145: 85 c0 test %eax,%eax
112147: 0f 85 ff 00 00 00 jne 11224c <pipe_write+0x1b8> <== NEVER TAKEN
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
11214d: ff 4b 1c decl 0x1c(%ebx)
if (ret != 0)
112150: 85 f6 test %esi,%esi
112152: 0f 85 ef 00 00 00 jne 112247 <pipe_write+0x1b3> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
112158: 8b 73 10 mov 0x10(%ebx),%esi
11215b: 85 f6 test %esi,%esi
11215d: 0f 84 8f 00 00 00 je 1121f2 <pipe_write+0x15e> <== NEVER TAKEN
112163: 8b 4b 04 mov 0x4(%ebx),%ecx
/* 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) {
112166: 8b 43 0c mov 0xc(%ebx),%eax
112169: 89 ca mov %ecx,%edx
11216b: 29 c2 sub %eax,%edx
11216d: 39 fa cmp %edi,%edx
11216f: 72 91 jb 112102 <pipe_write+0x6e> <== NEVER TAKEN
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
112171: 8b 75 10 mov 0x10(%ebp),%esi
112174: 2b 75 d0 sub -0x30(%ebp),%esi
112177: 89 55 cc mov %edx,-0x34(%ebp)
11217a: 39 f2 cmp %esi,%edx
11217c: 76 03 jbe 112181 <pipe_write+0xed>
11217e: 89 75 cc mov %esi,-0x34(%ebp)
chunk1 = pipe->Size - PIPE_WSTART(pipe);
112181: 03 43 08 add 0x8(%ebx),%eax
112184: 31 d2 xor %edx,%edx
112186: f7 f1 div %ecx
112188: 89 c8 mov %ecx,%eax
11218a: 29 d0 sub %edx,%eax
if (chunk > chunk1) {
11218c: 39 45 cc cmp %eax,-0x34(%ebp)
11218f: 0f 8e cb 00 00 00 jle 112260 <pipe_write+0x1cc>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
112195: 03 13 add (%ebx),%edx
112197: 8b 75 0c mov 0xc(%ebp),%esi
11219a: 03 75 d0 add -0x30(%ebp),%esi
11219d: 89 d7 mov %edx,%edi
11219f: 89 c1 mov %eax,%ecx
1121a1: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
1121a3: 8b 13 mov (%ebx),%edx
1121a5: 8b 4d cc mov -0x34(%ebp),%ecx
1121a8: 29 c1 sub %eax,%ecx
1121aa: 03 45 d0 add -0x30(%ebp),%eax
1121ad: 8b 75 0c mov 0xc(%ebp),%esi
1121b0: 01 c6 add %eax,%esi
1121b2: 89 d7 mov %edx,%edi
1121b4: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
1121b6: 8b 45 cc mov -0x34(%ebp),%eax
1121b9: 01 43 0c add %eax,0xc(%ebx)
if (pipe->waitingReaders > 0)
1121bc: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
1121c0: 0f 85 ae 00 00 00 jne 112274 <pipe_write+0x1e0>
PIPE_WAKEUPREADERS(pipe);
written += chunk;
1121c6: 8b 45 cc mov -0x34(%ebp),%eax
1121c9: 01 45 d4 add %eax,-0x2c(%ebp)
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
1121cc: 8b 45 d4 mov -0x2c(%ebp),%eax
1121cf: 89 45 d0 mov %eax,-0x30(%ebp)
1121d2: 39 45 10 cmp %eax,0x10(%ebp)
1121d5: 0f 86 af 00 00 00 jbe 11228a <pipe_write+0x1f6> <== ALWAYS TAKEN
1121db: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
written += chunk;
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
1121de: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
1121e3: e9 0f ff ff ff jmp 1120f7 <pipe_write+0x63> <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
1121e8: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED
1121ed: e9 b4 fe ff ff jmp 1120a6 <pipe_write+0x12> <== NOT EXECUTED
1121f2: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
1121f5: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
1121fa: 83 ec 0c sub $0xc,%esp
1121fd: 8b 45 08 mov 0x8(%ebp),%eax
112200: ff 70 28 pushl 0x28(%eax)
112203: e8 a8 b3 ff ff call 10d5b0 <rtems_semaphore_release>
112208: 83 c4 10 add $0x10,%esp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
11220b: 83 fe e0 cmp $0xffffffe0,%esi
11220e: 74 22 je 112232 <pipe_write+0x19e>
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
112210: 85 db test %ebx,%ebx
112212: 0f 8f 8e fe ff ff jg 1120a6 <pipe_write+0x12>
112218: 89 f3 mov %esi,%ebx
11221a: e9 87 fe ff ff jmp 1120a6 <pipe_write+0x12>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
11221f: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
112224: e9 bf fe ff ff jmp 1120e8 <pipe_write+0x54> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
112229: be e0 ff ff ff mov $0xffffffe0,%esi
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
11222e: 31 db xor %ebx,%ebx
112230: eb c8 jmp 1121fa <pipe_write+0x166>
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
112232: e8 39 08 00 00 call 112a70 <getpid>
112237: 83 ec 08 sub $0x8,%esp
11223a: 6a 0d push $0xd
11223c: 50 push %eax
11223d: e8 32 0b 00 00 call 112d74 <kill>
112242: 83 c4 10 add $0x10,%esp
112245: eb c9 jmp 112210 <pipe_write+0x17c>
112247: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
11224a: eb ae jmp 1121fa <pipe_write+0x166> <== NOT EXECUTED
11224c: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
11224f: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
112254: eb ba jmp 112210 <pipe_write+0x17c> <== NOT EXECUTED
112256: 8b 5d d4 mov -0x2c(%ebp),%ebx
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
112259: be f5 ff ff ff mov $0xfffffff5,%esi
11225e: eb 9a jmp 1121fa <pipe_write+0x166>
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);
112260: 03 13 add (%ebx),%edx
112262: 8b 75 0c mov 0xc(%ebp),%esi
112265: 03 75 d0 add -0x30(%ebp),%esi
112268: 89 d7 mov %edx,%edi
11226a: 8b 4d cc mov -0x34(%ebp),%ecx
11226d: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
11226f: e9 42 ff ff ff jmp 1121b6 <pipe_write+0x122>
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
112274: 51 push %ecx
112275: 51 push %ecx
112276: 8d 45 e4 lea -0x1c(%ebp),%eax
112279: 50 push %eax
11227a: ff 73 2c pushl 0x2c(%ebx)
11227d: e8 7e 15 00 00 call 113800 <rtems_barrier_release>
112282: 83 c4 10 add $0x10,%esp
112285: e9 3c ff ff ff jmp 1121c6 <pipe_write+0x132>
11228a: 8b 5d d4 mov -0x2c(%ebp),%ebx
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
11228d: 31 f6 xor %esi,%esi
11228f: e9 66 ff ff ff jmp 1121fa <pipe_write+0x166>
0010bacc <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
10bacc: 55 push %ebp
10bacd: 89 e5 mov %esp,%ebp
10bacf: 53 push %ebx
10bad0: 83 ec 04 sub $0x4,%esp
10bad3: 8b 45 0c mov 0xc(%ebp),%eax
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
10bad6: ff 05 e8 dc 12 00 incl 0x12dce8
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
10badc: 8d 50 ff lea -0x1(%eax),%edx
10badf: 85 c2 test %eax,%edx
10bae1: 75 05 jne 10bae8 <posix_memalign+0x1c> <== NEVER TAKEN
10bae3: 83 f8 03 cmp $0x3,%eax
10bae6: 77 0c ja 10baf4 <posix_memalign+0x28>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
10bae8: b8 16 00 00 00 mov $0x16,%eax
10baed: 5a pop %edx
10baee: 5b pop %ebx
10baef: c9 leave
10baf0: c3 ret
10baf1: 8d 76 00 lea 0x0(%esi),%esi
10baf4: 59 pop %ecx
10baf5: 5b pop %ebx
10baf6: c9 leave
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
10baf7: e9 78 01 00 00 jmp 10bc74 <rtems_memalign>
0011093c <pthread_attr_destroy>:
#include <rtems/system.h>
int pthread_attr_destroy(
pthread_attr_t *attr
)
{
11093c: 55 push %ebp
11093d: 89 e5 mov %esp,%ebp
11093f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
110942: 85 c0 test %eax,%eax
110944: 74 12 je 110958 <pthread_attr_destroy+0x1c>
110946: 8b 10 mov (%eax),%edx
110948: 85 d2 test %edx,%edx
11094a: 74 0c je 110958 <pthread_attr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
11094c: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
110952: 31 c0 xor %eax,%eax
}
110954: c9 leave
110955: c3 ret
110956: 66 90 xchg %ax,%ax
int pthread_attr_destroy(
pthread_attr_t *attr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
110958: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
11095d: c9 leave
11095e: c3 ret
00110a88 <pthread_attr_getstack>:
int pthread_attr_getstack(
const pthread_attr_t *attr,
void **stackaddr,
size_t *stacksize
)
{
110a88: 55 push %ebp
110a89: 89 e5 mov %esp,%ebp
110a8b: 53 push %ebx
110a8c: 8b 45 08 mov 0x8(%ebp),%eax
110a8f: 8b 55 0c mov 0xc(%ebp),%edx
110a92: 8b 4d 10 mov 0x10(%ebp),%ecx
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
110a95: 85 c0 test %eax,%eax
110a97: 74 1f je 110ab8 <pthread_attr_getstack+0x30>
110a99: 8b 18 mov (%eax),%ebx
110a9b: 85 db test %ebx,%ebx
110a9d: 74 19 je 110ab8 <pthread_attr_getstack+0x30>
110a9f: 85 d2 test %edx,%edx
110aa1: 74 15 je 110ab8 <pthread_attr_getstack+0x30>
110aa3: 85 c9 test %ecx,%ecx
110aa5: 74 11 je 110ab8 <pthread_attr_getstack+0x30>
return EINVAL;
*stackaddr = attr->stackaddr;
110aa7: 8b 58 04 mov 0x4(%eax),%ebx
110aaa: 89 1a mov %ebx,(%edx)
*stacksize = attr->stacksize;
110aac: 8b 40 08 mov 0x8(%eax),%eax
110aaf: 89 01 mov %eax,(%ecx)
return 0;
110ab1: 31 c0 xor %eax,%eax
}
110ab3: 5b pop %ebx
110ab4: c9 leave
110ab5: c3 ret
110ab6: 66 90 xchg %ax,%ax
void **stackaddr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
return EINVAL;
110ab8: b8 16 00 00 00 mov $0x16,%eax
*stackaddr = attr->stackaddr;
*stacksize = attr->stacksize;
return 0;
}
110abd: 5b pop %ebx
110abe: c9 leave
110abf: c3 ret
00110b3c <pthread_attr_setguardsize>:
int pthread_attr_setguardsize(
pthread_attr_t *attr,
size_t guardsize
)
{
110b3c: 55 push %ebp
110b3d: 89 e5 mov %esp,%ebp
110b3f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
110b42: 85 c0 test %eax,%eax
110b44: 74 12 je 110b58 <pthread_attr_setguardsize+0x1c>
110b46: 8b 10 mov (%eax),%edx
110b48: 85 d2 test %edx,%edx
110b4a: 74 0c je 110b58 <pthread_attr_setguardsize+0x1c>
return EINVAL;
attr->guardsize = guardsize;
110b4c: 8b 55 0c mov 0xc(%ebp),%edx
110b4f: 89 50 34 mov %edx,0x34(%eax)
return 0;
110b52: 31 c0 xor %eax,%eax
}
110b54: c9 leave
110b55: c3 ret
110b56: 66 90 xchg %ax,%ax
pthread_attr_t *attr,
size_t guardsize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
110b58: b8 16 00 00 00 mov $0x16,%eax
attr->guardsize = guardsize;
return 0;
}
110b5d: c9 leave
110b5e: c3 ret
00111b4c <pthread_attr_setinheritsched>:
int pthread_attr_setinheritsched(
pthread_attr_t *attr,
int inheritsched
)
{
111b4c: 55 push %ebp
111b4d: 89 e5 mov %esp,%ebp
111b4f: 8b 45 08 mov 0x8(%ebp),%eax
111b52: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
111b55: 85 c0 test %eax,%eax
111b57: 74 1f je 111b78 <pthread_attr_setinheritsched+0x2c>
111b59: 8b 08 mov (%eax),%ecx
111b5b: 85 c9 test %ecx,%ecx
111b5d: 74 19 je 111b78 <pthread_attr_setinheritsched+0x2c>
return EINVAL;
switch ( inheritsched ) {
111b5f: 8d 4a ff lea -0x1(%edx),%ecx
111b62: 83 f9 01 cmp $0x1,%ecx
111b65: 76 09 jbe 111b70 <pthread_attr_setinheritsched+0x24>
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
return 0;
default:
return ENOTSUP;
111b67: b8 86 00 00 00 mov $0x86,%eax
}
}
111b6c: c9 leave
111b6d: c3 ret
111b6e: 66 90 xchg %ax,%ax
return EINVAL;
switch ( inheritsched ) {
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
111b70: 89 50 10 mov %edx,0x10(%eax)
return 0;
111b73: 31 c0 xor %eax,%eax
default:
return ENOTSUP;
}
}
111b75: c9 leave
111b76: c3 ret
111b77: 90 nop
pthread_attr_t *attr,
int inheritsched
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
111b78: b8 16 00 00 00 mov $0x16,%eax
return 0;
default:
return ENOTSUP;
}
}
111b7d: c9 leave
111b7e: c3 ret
00110b94 <pthread_attr_setschedparam>:
int pthread_attr_setschedparam(
pthread_attr_t *attr,
const struct sched_param *param
)
{
110b94: 55 push %ebp
110b95: 89 e5 mov %esp,%ebp
110b97: 57 push %edi
110b98: 56 push %esi
110b99: 8b 7d 08 mov 0x8(%ebp),%edi
110b9c: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized || !param )
110b9f: 85 ff test %edi,%edi
110ba1: 74 1d je 110bc0 <pthread_attr_setschedparam+0x2c>
110ba3: 8b 07 mov (%edi),%eax
110ba5: 85 c0 test %eax,%eax
110ba7: 74 17 je 110bc0 <pthread_attr_setschedparam+0x2c>
110ba9: 85 f6 test %esi,%esi
110bab: 74 13 je 110bc0 <pthread_attr_setschedparam+0x2c>
return EINVAL;
attr->schedparam = *param;
110bad: 83 c7 18 add $0x18,%edi
110bb0: b9 07 00 00 00 mov $0x7,%ecx
110bb5: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
110bb7: 31 c0 xor %eax,%eax
}
110bb9: 5e pop %esi
110bba: 5f pop %edi
110bbb: c9 leave
110bbc: c3 ret
110bbd: 8d 76 00 lea 0x0(%esi),%esi
pthread_attr_t *attr,
const struct sched_param *param
)
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
110bc0: b8 16 00 00 00 mov $0x16,%eax
attr->schedparam = *param;
return 0;
}
110bc5: 5e pop %esi
110bc6: 5f pop %edi
110bc7: c9 leave
110bc8: c3 ret
00110bcc <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
110bcc: 55 push %ebp
110bcd: 89 e5 mov %esp,%ebp
110bcf: 8b 45 08 mov 0x8(%ebp),%eax
110bd2: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
110bd5: 85 c0 test %eax,%eax
110bd7: 74 23 je 110bfc <pthread_attr_setschedpolicy+0x30>
110bd9: 8b 08 mov (%eax),%ecx
110bdb: 85 c9 test %ecx,%ecx
110bdd: 74 1d je 110bfc <pthread_attr_setschedpolicy+0x30>
return EINVAL;
switch ( policy ) {
110bdf: 85 d2 test %edx,%edx
110be1: 78 0a js 110bed <pthread_attr_setschedpolicy+0x21>
110be3: 83 fa 02 cmp $0x2,%edx
110be6: 7e 0c jle 110bf4 <pthread_attr_setschedpolicy+0x28>
110be8: 83 fa 04 cmp $0x4,%edx
110beb: 74 07 je 110bf4 <pthread_attr_setschedpolicy+0x28><== ALWAYS TAKEN
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
110bed: b8 86 00 00 00 mov $0x86,%eax
}
}
110bf2: c9 leave
110bf3: c3 ret
switch ( policy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
110bf4: 89 50 14 mov %edx,0x14(%eax)
return 0;
110bf7: 31 c0 xor %eax,%eax
default:
return ENOTSUP;
}
}
110bf9: c9 leave
110bfa: c3 ret
110bfb: 90 nop
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
110bfc: b8 16 00 00 00 mov $0x16,%eax
return 0;
default:
return ENOTSUP;
}
}
110c01: c9 leave
110c02: c3 ret
00110c04 <pthread_attr_setscope>:
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
110c04: 55 push %ebp
110c05: 89 e5 mov %esp,%ebp
110c07: 8b 45 08 mov 0x8(%ebp),%eax
110c0a: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
110c0d: 85 c0 test %eax,%eax
110c0f: 74 1a je 110c2b <pthread_attr_setscope+0x27>
110c11: 8b 08 mov (%eax),%ecx
110c13: 85 c9 test %ecx,%ecx
110c15: 74 14 je 110c2b <pthread_attr_setscope+0x27>
return EINVAL;
switch ( contentionscope ) {
110c17: 85 d2 test %edx,%edx
110c19: 75 0d jne 110c28 <pthread_attr_setscope+0x24>
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
110c1b: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
return 0;
110c22: 31 c0 xor %eax,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
110c24: c9 leave
110c25: c3 ret
110c26: 66 90 xchg %ax,%ax
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
110c28: 4a dec %edx
110c29: 74 09 je 110c34 <pthread_attr_setscope+0x30>
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
default:
return EINVAL;
110c2b: b8 16 00 00 00 mov $0x16,%eax
}
}
110c30: c9 leave
110c31: c3 ret
110c32: 66 90 xchg %ax,%ax
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
return 0;
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
110c34: b8 86 00 00 00 mov $0x86,%eax
default:
return EINVAL;
}
}
110c39: c9 leave
110c3a: c3 ret
00110c60 <pthread_attr_setstack>:
int pthread_attr_setstack(
pthread_attr_t *attr,
void *stackaddr,
size_t stacksize
)
{
110c60: 55 push %ebp
110c61: 89 e5 mov %esp,%ebp
110c63: 8b 45 08 mov 0x8(%ebp),%eax
110c66: 8b 55 10 mov 0x10(%ebp),%edx
if ( !attr || !attr->is_initialized )
110c69: 85 c0 test %eax,%eax
110c6b: 74 27 je 110c94 <pthread_attr_setstack+0x34>
110c6d: 8b 08 mov (%eax),%ecx
110c6f: 85 c9 test %ecx,%ecx
110c71: 74 21 je 110c94 <pthread_attr_setstack+0x34>
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
110c73: 8b 0d f8 db 12 00 mov 0x12dbf8,%ecx
110c79: d1 e1 shl %ecx
110c7b: 39 d1 cmp %edx,%ecx
110c7d: 77 0d ja 110c8c <pthread_attr_setstack+0x2c>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
110c7f: 89 50 08 mov %edx,0x8(%eax)
attr->stackaddr = stackaddr;
110c82: 8b 55 0c mov 0xc(%ebp),%edx
110c85: 89 50 04 mov %edx,0x4(%eax)
return 0;
110c88: 31 c0 xor %eax,%eax
}
110c8a: c9 leave
110c8b: c3 ret
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
110c8c: 89 48 08 mov %ecx,0x8(%eax)
110c8f: eb f1 jmp 110c82 <pthread_attr_setstack+0x22>
110c91: 8d 76 00 lea 0x0(%esi),%esi
void *stackaddr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
110c94: b8 16 00 00 00 mov $0x16,%eax
else
attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
return 0;
}
110c99: c9 leave
110c9a: c3 ret
00110c3c <pthread_attr_setstackaddr>:
int pthread_attr_setstackaddr(
pthread_attr_t *attr,
void *stackaddr
)
{
110c3c: 55 push %ebp
110c3d: 89 e5 mov %esp,%ebp
110c3f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
110c42: 85 c0 test %eax,%eax
110c44: 74 12 je 110c58 <pthread_attr_setstackaddr+0x1c>
110c46: 8b 10 mov (%eax),%edx
110c48: 85 d2 test %edx,%edx
110c4a: 74 0c je 110c58 <pthread_attr_setstackaddr+0x1c>
return EINVAL;
attr->stackaddr = stackaddr;
110c4c: 8b 55 0c mov 0xc(%ebp),%edx
110c4f: 89 50 04 mov %edx,0x4(%eax)
return 0;
110c52: 31 c0 xor %eax,%eax
}
110c54: c9 leave
110c55: c3 ret
110c56: 66 90 xchg %ax,%ax
pthread_attr_t *attr,
void *stackaddr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
110c58: b8 16 00 00 00 mov $0x16,%eax
attr->stackaddr = stackaddr;
return 0;
}
110c5d: c9 leave
110c5e: c3 ret
00111b80 <pthread_attr_setstacksize>:
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
111b80: 55 push %ebp
111b81: 89 e5 mov %esp,%ebp
111b83: 8b 45 08 mov 0x8(%ebp),%eax
111b86: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
111b89: 85 c0 test %eax,%eax
111b8b: 74 23 je 111bb0 <pthread_attr_setstacksize+0x30>
111b8d: 8b 08 mov (%eax),%ecx
111b8f: 85 c9 test %ecx,%ecx
111b91: 74 1d je 111bb0 <pthread_attr_setstacksize+0x30>
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
111b93: 8b 0d 78 45 12 00 mov 0x124578,%ecx
111b99: d1 e1 shl %ecx
111b9b: 39 d1 cmp %edx,%ecx
111b9d: 77 09 ja 111ba8 <pthread_attr_setstacksize+0x28>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
111b9f: 89 50 08 mov %edx,0x8(%eax)
return 0;
111ba2: 31 c0 xor %eax,%eax
}
111ba4: c9 leave
111ba5: c3 ret
111ba6: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
111ba8: 89 48 08 mov %ecx,0x8(%eax)
else
attr->stacksize = stacksize;
return 0;
111bab: 31 c0 xor %eax,%eax
}
111bad: c9 leave
111bae: c3 ret
111baf: 90 nop
pthread_attr_t *attr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
111bb0: b8 16 00 00 00 mov $0x16,%eax
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
return 0;
}
111bb5: c9 leave
111bb6: c3 ret
0010b98c <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
10b98c: 55 push %ebp
10b98d: 89 e5 mov %esp,%ebp
10b98f: 57 push %edi
10b990: 56 push %esi
10b991: 53 push %ebx
10b992: 83 ec 2c sub $0x2c,%esp
10b995: 8b 5d 08 mov 0x8(%ebp),%ebx
10b998: 8b 7d 0c mov 0xc(%ebp),%edi
10b99b: 8b 75 10 mov 0x10(%ebp),%esi
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
10b99e: 85 db test %ebx,%ebx
10b9a0: 0f 84 82 00 00 00 je 10ba28 <pthread_barrier_init+0x9c>
return EINVAL;
if ( count == 0 )
10b9a6: 85 f6 test %esi,%esi
10b9a8: 74 7e je 10ba28 <pthread_barrier_init+0x9c>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10b9aa: 85 ff test %edi,%edi
10b9ac: 0f 84 92 00 00 00 je 10ba44 <pthread_barrier_init+0xb8>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10b9b2: 8b 17 mov (%edi),%edx
10b9b4: 85 d2 test %edx,%edx
10b9b6: 74 70 je 10ba28 <pthread_barrier_init+0x9c>
return EINVAL;
switch ( the_attr->process_shared ) {
10b9b8: 8b 47 04 mov 0x4(%edi),%eax
10b9bb: 85 c0 test %eax,%eax
10b9bd: 75 69 jne 10ba28 <pthread_barrier_init+0x9c><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10b9bf: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_attributes.maximum_count = count;
10b9c6: 89 75 e4 mov %esi,-0x1c(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b9c9: a1 d0 8c 12 00 mov 0x128cd0,%eax
10b9ce: 40 inc %eax
10b9cf: a3 d0 8c 12 00 mov %eax,0x128cd0
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
_Objects_Allocate( &_POSIX_Barrier_Information );
10b9d4: 83 ec 0c sub $0xc,%esp
10b9d7: 68 20 91 12 00 push $0x129120
10b9dc: e8 03 21 00 00 call 10dae4 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
10b9e1: 83 c4 10 add $0x10,%esp
10b9e4: 85 c0 test %eax,%eax
10b9e6: 74 50 je 10ba38 <pthread_barrier_init+0xac>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10b9e8: 83 ec 08 sub $0x8,%esp
10b9eb: 8d 55 e0 lea -0x20(%ebp),%edx
10b9ee: 52 push %edx
10b9ef: 8d 50 10 lea 0x10(%eax),%edx
10b9f2: 52 push %edx
10b9f3: 89 45 d4 mov %eax,-0x2c(%ebp)
10b9f6: e8 dd 16 00 00 call 10d0d8 <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10b9fb: 8b 45 d4 mov -0x2c(%ebp),%eax
10b9fe: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10ba01: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10ba04: 8b 0d 3c 91 12 00 mov 0x12913c,%ecx
10ba0a: 89 04 b1 mov %eax,(%ecx,%esi,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10ba0d: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
10ba14: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10ba16: e8 35 30 00 00 call 10ea50 <_Thread_Enable_dispatch>
return 0;
10ba1b: 83 c4 10 add $0x10,%esp
10ba1e: 31 c0 xor %eax,%eax
}
10ba20: 8d 65 f4 lea -0xc(%ebp),%esp
10ba23: 5b pop %ebx
10ba24: 5e pop %esi
10ba25: 5f pop %edi
10ba26: c9 leave
10ba27: c3 ret
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10ba28: b8 16 00 00 00 mov $0x16,%eax
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10ba2d: 8d 65 f4 lea -0xc(%ebp),%esp
10ba30: 5b pop %ebx
10ba31: 5e pop %esi
10ba32: 5f pop %edi
10ba33: c9 leave
10ba34: c3 ret
10ba35: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
10ba38: e8 13 30 00 00 call 10ea50 <_Thread_Enable_dispatch>
return EAGAIN;
10ba3d: b8 0b 00 00 00 mov $0xb,%eax
10ba42: eb e9 jmp 10ba2d <pthread_barrier_init+0xa1>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
10ba44: 83 ec 0c sub $0xc,%esp
10ba47: 8d 7d d8 lea -0x28(%ebp),%edi
10ba4a: 57 push %edi
10ba4b: e8 7c fe ff ff call 10b8cc <pthread_barrierattr_init>
10ba50: 83 c4 10 add $0x10,%esp
10ba53: e9 5a ff ff ff jmp 10b9b2 <pthread_barrier_init+0x26>
0010ba58 <pthread_barrier_wait>:
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
10ba58: 55 push %ebp
10ba59: 89 e5 mov %esp,%ebp
10ba5b: 83 ec 18 sub $0x18,%esp
10ba5e: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
10ba61: 85 c0 test %eax,%eax
10ba63: 74 4f je 10bab4 <pthread_barrier_wait+0x5c>
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
pthread_barrier_t *barrier,
Objects_Locations *location
)
{
return (POSIX_Barrier_Control *) _Objects_Get(
10ba65: 51 push %ecx
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
10ba66: 8d 55 f4 lea -0xc(%ebp),%edx
10ba69: 52 push %edx
10ba6a: ff 30 pushl (%eax)
10ba6c: 68 20 91 12 00 push $0x129120
10ba71: e8 26 25 00 00 call 10df9c <_Objects_Get>
switch ( location ) {
10ba76: 83 c4 10 add $0x10,%esp
10ba79: 8b 55 f4 mov -0xc(%ebp),%edx
10ba7c: 85 d2 test %edx,%edx
10ba7e: 75 34 jne 10bab4 <pthread_barrier_wait+0x5c>
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
10ba80: 83 ec 0c sub $0xc,%esp
10ba83: 6a 00 push $0x0
10ba85: 6a 00 push $0x0
10ba87: 6a 01 push $0x1
10ba89: ff 70 08 pushl 0x8(%eax)
10ba8c: 83 c0 10 add $0x10,%eax
10ba8f: 50 push %eax
10ba90: e8 77 16 00 00 call 10d10c <_CORE_barrier_Wait>
the_barrier->Object.id,
true,
0,
NULL
);
_Thread_Enable_dispatch();
10ba95: 83 c4 20 add $0x20,%esp
10ba98: e8 b3 2f 00 00 call 10ea50 <_Thread_Enable_dispatch>
return _POSIX_Barrier_Translate_core_barrier_return_code(
10ba9d: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code );
10baa0: a1 b8 92 12 00 mov 0x1292b8,%eax
true,
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_Barrier_Translate_core_barrier_return_code(
10baa5: ff 70 34 pushl 0x34(%eax)
10baa8: e8 e7 5b 00 00 call 111694 <_POSIX_Barrier_Translate_core_barrier_return_code>
10baad: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10bab0: c9 leave
10bab1: c3 ret
10bab2: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10bab4: b8 16 00 00 00 mov $0x16,%eax
}
10bab9: c9 leave
10baba: c3 ret
0010b884 <pthread_barrierattr_destroy>:
*/
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
10b884: 55 push %ebp
10b885: 89 e5 mov %esp,%ebp
10b887: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10b88a: 85 c0 test %eax,%eax
10b88c: 74 12 je 10b8a0 <pthread_barrierattr_destroy+0x1c>
10b88e: 8b 10 mov (%eax),%edx
10b890: 85 d2 test %edx,%edx
10b892: 74 0c je 10b8a0 <pthread_barrierattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10b894: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10b89a: 31 c0 xor %eax,%eax
}
10b89c: c9 leave
10b89d: c3 ret
10b89e: 66 90 xchg %ax,%ax
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
10b8a0: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10b8a5: c9 leave
10b8a6: c3 ret
0010b134 <pthread_cancel>:
*/
int pthread_cancel(
pthread_t thread
)
{
10b134: 55 push %ebp
10b135: 89 e5 mov %esp,%ebp
10b137: 83 ec 18 sub $0x18,%esp
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
10b13a: a1 54 8e 12 00 mov 0x128e54,%eax
10b13f: 85 c0 test %eax,%eax
10b141: 74 09 je 10b14c <pthread_cancel+0x18>
return EPROTO;
10b143: b8 47 00 00 00 mov $0x47,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b148: c9 leave
10b149: c3 ret
10b14a: 66 90 xchg %ax,%ax
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
_Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
10b14c: 51 push %ecx
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _POSIX_Threads_Get( thread, &location );
10b14d: 8d 45 f4 lea -0xc(%ebp),%eax
10b150: 50 push %eax
10b151: ff 75 08 pushl 0x8(%ebp)
10b154: 68 40 8b 12 00 push $0x128b40
10b159: e8 32 21 00 00 call 10d290 <_Objects_Get>
switch ( location ) {
10b15e: 83 c4 10 add $0x10,%esp
10b161: 8b 55 f4 mov -0xc(%ebp),%edx
10b164: 85 d2 test %edx,%edx
10b166: 75 20 jne 10b188 <pthread_cancel+0x54>
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
thread_support->cancelation_requested = 1;
10b168: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
10b16e: c7 82 e0 00 00 00 01 movl $0x1,0xe0(%edx)
10b175: 00 00 00
/* This enables dispatch implicitly */
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread );
10b178: 83 ec 0c sub $0xc,%esp
10b17b: 50 push %eax
10b17c: e8 5b 55 00 00 call 1106dc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
return 0;
10b181: 83 c4 10 add $0x10,%esp
10b184: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b186: c9 leave
10b187: c3 ret
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b188: b8 16 00 00 00 mov $0x16,%eax
}
10b18d: c9 leave
10b18e: c3 ret
0010af94 <pthread_cleanup_pop>:
*/
void pthread_cleanup_pop(
int execute
)
{
10af94: 55 push %ebp
10af95: 89 e5 mov %esp,%ebp
10af97: 57 push %edi
10af98: 56 push %esi
10af99: 53 push %ebx
10af9a: 83 ec 0c sub $0xc,%esp
10af9d: 8b 5d 08 mov 0x8(%ebp),%ebx
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10afa0: a1 38 7f 12 00 mov 0x127f38,%eax
10afa5: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10afab: 8b 15 50 79 12 00 mov 0x127950,%edx
10afb1: 42 inc %edx
10afb2: 89 15 50 79 12 00 mov %edx,0x127950
* ensure that we do not get prempted and deleted while we are holding
* memory that needs to be freed.
*/
_Thread_Disable_dispatch();
_ISR_Disable( level );
10afb8: 9c pushf
10afb9: fa cli
10afba: 5e pop %esi
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10afbb: 8d 90 e8 00 00 00 lea 0xe8(%eax),%edx
if ( _Chain_Is_empty( handler_stack ) ) {
10afc1: 39 90 e4 00 00 00 cmp %edx,0xe4(%eax)
10afc7: 74 47 je 10b010 <pthread_cleanup_pop+0x7c>
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
10afc9: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10afcf: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
10afd1: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10afd4: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
10afd7: 89 0a mov %ecx,(%edx)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
10afd9: 56 push %esi
10afda: 9d popf
10afdb: 8b 70 08 mov 0x8(%eax),%esi
10afde: 8b 78 0c mov 0xc(%eax),%edi
tmp_handler = *handler;
_Workspace_Free( handler );
10afe1: 83 ec 0c sub $0xc,%esp
10afe4: 50 push %eax
10afe5: e8 3a 3a 00 00 call 10ea24 <_Workspace_Free>
_Thread_Enable_dispatch();
10afea: e8 b5 29 00 00 call 10d9a4 <_Thread_Enable_dispatch>
if ( execute )
10afef: 83 c4 10 add $0x10,%esp
10aff2: 85 db test %ebx,%ebx
10aff4: 75 0a jne 10b000 <pthread_cleanup_pop+0x6c>
(*tmp_handler.routine)( tmp_handler.arg );
}
10aff6: 8d 65 f4 lea -0xc(%ebp),%esp
10aff9: 5b pop %ebx
10affa: 5e pop %esi
10affb: 5f pop %edi
10affc: c9 leave
10affd: c3 ret
10affe: 66 90 xchg %ax,%ax
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10b000: 89 7d 08 mov %edi,0x8(%ebp)
10b003: 89 f0 mov %esi,%eax
}
10b005: 8d 65 f4 lea -0xc(%ebp),%esp
10b008: 5b pop %ebx
10b009: 5e pop %esi
10b00a: 5f pop %edi
10b00b: c9 leave
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10b00c: ff e0 jmp *%eax
10b00e: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
10b010: e8 8f 29 00 00 call 10d9a4 <_Thread_Enable_dispatch>
_ISR_Enable( level );
10b015: 56 push %esi
10b016: 9d popf
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
}
10b017: 8d 65 f4 lea -0xc(%ebp),%esp
10b01a: 5b pop %ebx
10b01b: 5e pop %esi
10b01c: 5f pop %edi
10b01d: c9 leave
10b01e: c3 ret
0010b360 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
10b360: 55 push %ebp
10b361: 89 e5 mov %esp,%ebp
10b363: 56 push %esi
10b364: 53 push %ebx
10b365: 8b 5d 08 mov 0x8(%ebp),%ebx
10b368: 8b 75 0c mov 0xc(%ebp),%esi
/*
* 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 )
10b36b: 85 db test %ebx,%ebx
10b36d: 74 4d je 10b3bc <pthread_cleanup_push+0x5c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b36f: a1 f0 8f 12 00 mov 0x128ff0,%eax
10b374: 40 inc %eax
10b375: a3 f0 8f 12 00 mov %eax,0x128ff0
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
10b37a: 83 ec 0c sub $0xc,%esp
10b37d: 6a 10 push $0x10
10b37f: e8 00 42 00 00 call 10f584 <_Workspace_Allocate>
if ( handler ) {
10b384: 83 c4 10 add $0x10,%esp
10b387: 85 c0 test %eax,%eax
10b389: 74 25 je 10b3b0 <pthread_cleanup_push+0x50><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b38b: 8b 15 d8 95 12 00 mov 0x1295d8,%edx
handler_stack = &thread_support->Cancellation_Handlers;
10b391: 8b 92 ec 00 00 00 mov 0xec(%edx),%edx
10b397: 81 c2 e4 00 00 00 add $0xe4,%edx
handler->routine = routine;
10b39d: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
10b3a0: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
10b3a3: 83 ec 08 sub $0x8,%esp
10b3a6: 50 push %eax
10b3a7: 52 push %edx
10b3a8: e8 c3 17 00 00 call 10cb70 <_Chain_Append>
10b3ad: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
}
10b3b0: 8d 65 f8 lea -0x8(%ebp),%esp
10b3b3: 5b pop %ebx
10b3b4: 5e pop %esi
10b3b5: c9 leave
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
10b3b6: e9 d5 30 00 00 jmp 10e490 <_Thread_Enable_dispatch>
10b3bb: 90 nop
}
10b3bc: 8d 65 f8 lea -0x8(%ebp),%esp
10b3bf: 5b pop %ebx
10b3c0: 5e pop %esi
10b3c1: c9 leave
10b3c2: c3 ret
0010c054 <pthread_cond_destroy>:
*/
int pthread_cond_destroy(
pthread_cond_t *cond
)
{
10c054: 55 push %ebp
10c055: 89 e5 mov %esp,%ebp
10c057: 53 push %ebx
10c058: 83 ec 1c sub $0x1c,%esp
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c05b: 8d 45 f4 lea -0xc(%ebp),%eax
10c05e: 50 push %eax
10c05f: ff 75 08 pushl 0x8(%ebp)
10c062: e8 65 00 00 00 call 10c0cc <_POSIX_Condition_variables_Get>
10c067: 89 c3 mov %eax,%ebx
switch ( location ) {
10c069: 83 c4 10 add $0x10,%esp
10c06c: 8b 4d f4 mov -0xc(%ebp),%ecx
10c06f: 85 c9 test %ecx,%ecx
10c071: 75 25 jne 10c098 <pthread_cond_destroy+0x44>
case OBJECTS_LOCAL:
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
10c073: 83 ec 0c sub $0xc,%esp
10c076: 8d 40 18 lea 0x18(%eax),%eax
10c079: 50 push %eax
10c07a: e8 c1 3d 00 00 call 10fe40 <_Thread_queue_First>
10c07f: 83 c4 10 add $0x10,%esp
10c082: 85 c0 test %eax,%eax
10c084: 74 1e je 10c0a4 <pthread_cond_destroy+0x50>
_Thread_Enable_dispatch();
10c086: e8 9d 36 00 00 call 10f728 <_Thread_Enable_dispatch>
return EBUSY;
10c08b: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c090: 8b 5d fc mov -0x4(%ebp),%ebx
10c093: c9 leave
10c094: c3 ret
10c095: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c098: b8 16 00 00 00 mov $0x16,%eax
}
10c09d: 8b 5d fc mov -0x4(%ebp),%ebx
10c0a0: c9 leave
10c0a1: c3 ret
10c0a2: 66 90 xchg %ax,%ax
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close(
10c0a4: 83 ec 08 sub $0x8,%esp
10c0a7: 53 push %ebx
10c0a8: 68 a0 a1 12 00 push $0x12a1a0
10c0ad: e8 86 27 00 00 call 10e838 <_Objects_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
POSIX_Condition_variables_Control *the_condition_variable
)
{
_Objects_Free(
10c0b2: 58 pop %eax
10c0b3: 5a pop %edx
10c0b4: 53 push %ebx
10c0b5: 68 a0 a1 12 00 push $0x12a1a0
10c0ba: e8 75 2a 00 00 call 10eb34 <_Objects_Free>
&_POSIX_Condition_variables_Information,
&the_cond->Object
);
_POSIX_Condition_variables_Free( the_cond );
_Thread_Enable_dispatch();
10c0bf: e8 64 36 00 00 call 10f728 <_Thread_Enable_dispatch>
return 0;
10c0c4: 83 c4 10 add $0x10,%esp
10c0c7: 31 c0 xor %eax,%eax
10c0c9: eb d2 jmp 10c09d <pthread_cond_destroy+0x49>
0010c120 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10c120: 55 push %ebp
10c121: 89 e5 mov %esp,%ebp
10c123: 53 push %ebx
10c124: 83 ec 14 sub $0x14,%esp
10c127: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10c12a: 85 db test %ebx,%ebx
10c12c: 0f 84 86 00 00 00 je 10c1b8 <pthread_cond_init+0x98>
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10c132: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10c136: 74 06 je 10c13e <pthread_cond_init+0x1e><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10c138: 8b 03 mov (%ebx),%eax
10c13a: 85 c0 test %eax,%eax
10c13c: 75 0a jne 10c148 <pthread_cond_init+0x28>
return EINVAL;
10c13e: b8 16 00 00 00 mov $0x16,%eax
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10c143: 8b 5d fc mov -0x4(%ebp),%ebx
10c146: c9 leave
10c147: c3 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c148: a1 b0 9c 12 00 mov 0x129cb0,%eax
10c14d: 40 inc %eax
10c14e: a3 b0 9c 12 00 mov %eax,0x129cb0
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
_Objects_Allocate( &_POSIX_Condition_variables_Information );
10c153: 83 ec 0c sub $0xc,%esp
10c156: 68 a0 a1 12 00 push $0x12a1a0
10c15b: e8 5c 26 00 00 call 10e7bc <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10c160: 83 c4 10 add $0x10,%esp
10c163: 85 c0 test %eax,%eax
10c165: 74 5d je 10c1c4 <pthread_cond_init+0xa4>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
10c167: 8b 53 04 mov 0x4(%ebx),%edx
10c16a: 89 50 10 mov %edx,0x10(%eax)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c16d: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
_Thread_queue_Initialize(
10c174: 6a 74 push $0x74
10c176: 68 00 08 00 10 push $0x10000800
10c17b: 6a 00 push $0x0
10c17d: 8d 50 18 lea 0x18(%eax),%edx
10c180: 52 push %edx
10c181: 89 45 f4 mov %eax,-0xc(%ebp)
10c184: e8 33 3d 00 00 call 10febc <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c189: 8b 45 f4 mov -0xc(%ebp),%eax
10c18c: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10c18f: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c192: 8b 0d bc a1 12 00 mov 0x12a1bc,%ecx
10c198: 89 04 99 mov %eax,(%ecx,%ebx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10c19b: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10c1a2: 8b 45 08 mov 0x8(%ebp),%eax
10c1a5: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c1a7: e8 7c 35 00 00 call 10f728 <_Thread_Enable_dispatch>
return 0;
10c1ac: 83 c4 10 add $0x10,%esp
10c1af: 31 c0 xor %eax,%eax
}
10c1b1: 8b 5d fc mov -0x4(%ebp),%ebx
10c1b4: c9 leave
10c1b5: c3 ret
10c1b6: 66 90 xchg %ax,%ax
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Condition_variables_Default_attributes;
10c1b8: bb 3c 33 12 00 mov $0x12333c,%ebx
10c1bd: e9 70 ff ff ff jmp 10c132 <pthread_cond_init+0x12>
10c1c2: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
10c1c4: e8 5f 35 00 00 call 10f728 <_Thread_Enable_dispatch>
return ENOMEM;
10c1c9: b8 0c 00 00 00 mov $0xc,%eax
10c1ce: e9 70 ff ff ff jmp 10c143 <pthread_cond_init+0x23>
0010bfb0 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10bfb0: 55 push %ebp
10bfb1: 89 e5 mov %esp,%ebp
10bfb3: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10bfb6: 85 c0 test %eax,%eax
10bfb8: 74 12 je 10bfcc <pthread_condattr_destroy+0x1c>
10bfba: 8b 10 mov (%eax),%edx
10bfbc: 85 d2 test %edx,%edx
10bfbe: 74 0c je 10bfcc <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
10bfc0: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10bfc6: 31 c0 xor %eax,%eax
}
10bfc8: c9 leave
10bfc9: c3 ret
10bfca: 66 90 xchg %ax,%ax
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
10bfcc: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10bfd1: c9 leave
10bfd2: c3 ret
0010bfd4 <pthread_condattr_getpshared>:
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
10bfd4: 55 push %ebp
10bfd5: 89 e5 mov %esp,%ebp
10bfd7: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10bfda: 85 c0 test %eax,%eax
10bfdc: 74 0e je 10bfec <pthread_condattr_getpshared+0x18>
return EINVAL;
*pshared = attr->process_shared;
10bfde: 8b 50 04 mov 0x4(%eax),%edx
10bfe1: 8b 45 0c mov 0xc(%ebp),%eax
10bfe4: 89 10 mov %edx,(%eax)
return 0;
10bfe6: 31 c0 xor %eax,%eax
}
10bfe8: c9 leave
10bfe9: c3 ret
10bfea: 66 90 xchg %ax,%ax
const pthread_condattr_t *attr,
int *pshared
)
{
if ( !attr )
return EINVAL;
10bfec: b8 16 00 00 00 mov $0x16,%eax
*pshared = attr->process_shared;
return 0;
}
10bff1: c9 leave
10bff2: c3 ret
0010bff4 <pthread_condattr_init>:
*/
int pthread_condattr_init(
pthread_condattr_t *attr
)
{
10bff4: 55 push %ebp
10bff5: 89 e5 mov %esp,%ebp
10bff7: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10bffa: 85 c0 test %eax,%eax
10bffc: 74 16 je 10c014 <pthread_condattr_init+0x20><== NEVER TAKEN
return EINVAL;
*attr = _POSIX_Condition_variables_Default_attributes;
10bffe: 8b 15 3c 33 12 00 mov 0x12333c,%edx
10c004: 8b 0d 40 33 12 00 mov 0x123340,%ecx
10c00a: 89 10 mov %edx,(%eax)
10c00c: 89 48 04 mov %ecx,0x4(%eax)
return 0;
10c00f: 31 c0 xor %eax,%eax
}
10c011: c9 leave
10c012: c3 ret
10c013: 90 nop
int pthread_condattr_init(
pthread_condattr_t *attr
)
{
if ( !attr )
return EINVAL;
10c014: b8 16 00 00 00 mov $0x16,%eax
*attr = _POSIX_Condition_variables_Default_attributes;
return 0;
}
10c019: c9 leave
10c01a: c3 ret
0010c01c <pthread_condattr_setpshared>:
int pthread_condattr_setpshared(
pthread_condattr_t *attr,
int pshared
)
{
10c01c: 55 push %ebp
10c01d: 89 e5 mov %esp,%ebp
10c01f: 8b 45 08 mov 0x8(%ebp),%eax
10c022: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10c025: 85 c0 test %eax,%eax
10c027: 74 05 je 10c02e <pthread_condattr_setpshared+0x12>
return EINVAL;
switch ( pshared ) {
10c029: 83 fa 01 cmp $0x1,%edx
10c02c: 76 0a jbe 10c038 <pthread_condattr_setpshared+0x1c>
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10c02e: b8 16 00 00 00 mov $0x16,%eax
}
}
10c033: c9 leave
10c034: c3 ret
10c035: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10c038: 89 50 04 mov %edx,0x4(%eax)
return 0;
10c03b: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10c03d: c9 leave
10c03e: c3 ret
0010b6c8 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10b6c8: 55 push %ebp
10b6c9: 89 e5 mov %esp,%ebp
10b6cb: 57 push %edi
10b6cc: 56 push %esi
10b6cd: 53 push %ebx
10b6ce: 83 ec 5c sub $0x5c,%esp
10b6d1: 8b 5d 0c mov 0xc(%ebp),%ebx
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
10b6d4: 8b 75 10 mov 0x10(%ebp),%esi
10b6d7: 85 f6 test %esi,%esi
10b6d9: 0f 84 8d 01 00 00 je 10b86c <pthread_create+0x1a4>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10b6df: 85 db test %ebx,%ebx
10b6e1: 74 65 je 10b748 <pthread_create+0x80>
if ( !the_attr->is_initialized )
10b6e3: 8b 0b mov (%ebx),%ecx
10b6e5: 85 c9 test %ecx,%ecx
10b6e7: 74 1e je 10b707 <pthread_create+0x3f>
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
10b6e9: 8b 53 04 mov 0x4(%ebx),%edx
10b6ec: 85 d2 test %edx,%edx
10b6ee: 74 0a je 10b6fa <pthread_create+0x32>
10b6f0: a1 78 45 12 00 mov 0x124578,%eax
10b6f5: 39 43 08 cmp %eax,0x8(%ebx)
10b6f8: 72 0d jb 10b707 <pthread_create+0x3f>
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
10b6fa: 8b 43 10 mov 0x10(%ebx),%eax
10b6fd: 83 f8 01 cmp $0x1,%eax
10b700: 74 4e je 10b750 <pthread_create+0x88>
10b702: 83 f8 02 cmp $0x2,%eax
10b705: 74 11 je 10b718 <pthread_create+0x50>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
10b707: ba 16 00 00 00 mov $0x16,%edx
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10b70c: 89 d0 mov %edx,%eax
10b70e: 8d 65 f4 lea -0xc(%ebp),%esp
10b711: 5b pop %ebx
10b712: 5e pop %esi
10b713: 5f pop %edi
10b714: c9 leave
10b715: c3 ret
10b716: 66 90 xchg %ax,%ax
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
10b718: 8b 4b 14 mov 0x14(%ebx),%ecx
10b71b: 89 4d b0 mov %ecx,-0x50(%ebp)
schedparam = the_attr->schedparam;
10b71e: 8d 45 c4 lea -0x3c(%ebp),%eax
10b721: 89 45 b4 mov %eax,-0x4c(%ebp)
10b724: 8d 73 18 lea 0x18(%ebx),%esi
10b727: b9 07 00 00 00 mov $0x7,%ecx
10b72c: 89 c7 mov %eax,%edi
10b72e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
10b730: 8b 43 0c mov 0xc(%ebx),%eax
10b733: 85 c0 test %eax,%eax
10b735: 74 49 je 10b780 <pthread_create+0xb8> <== ALWAYS TAKEN
return ENOTSUP;
10b737: ba 86 00 00 00 mov $0x86,%edx
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10b73c: 89 d0 mov %edx,%eax
10b73e: 8d 65 f4 lea -0xc(%ebp),%esp
10b741: 5b pop %ebx
10b742: 5e pop %esi
10b743: 5f pop %edi
10b744: c9 leave
10b745: c3 ret
10b746: 66 90 xchg %ax,%ax
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10b748: bb e0 1e 12 00 mov $0x121ee0,%ebx
10b74d: eb 94 jmp 10b6e3 <pthread_create+0x1b>
10b74f: 90 nop
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b750: a1 18 8e 12 00 mov 0x128e18,%eax
10b755: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi
schedpolicy = api->schedpolicy;
10b75b: 8b 8e 84 00 00 00 mov 0x84(%esi),%ecx
10b761: 89 4d b0 mov %ecx,-0x50(%ebp)
schedparam = api->schedparam;
10b764: 8d 45 c4 lea -0x3c(%ebp),%eax
10b767: 89 45 b4 mov %eax,-0x4c(%ebp)
10b76a: 81 c6 88 00 00 00 add $0x88,%esi
10b770: b9 07 00 00 00 mov $0x7,%ecx
10b775: 89 c7 mov %eax,%edi
10b777: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
10b779: 8b 43 0c mov 0xc(%ebx),%eax
10b77c: 85 c0 test %eax,%eax
10b77e: 75 b7 jne 10b737 <pthread_create+0x6f>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10b780: 83 ec 0c sub $0xc,%esp
10b783: ff 75 c4 pushl -0x3c(%ebp)
10b786: e8 95 62 00 00 call 111a20 <_POSIX_Priority_Is_valid>
10b78b: 83 c4 10 add $0x10,%esp
10b78e: 84 c0 test %al,%al
10b790: 0f 84 71 ff ff ff je 10b707 <pthread_create+0x3f> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
10b796: 8b 7d c4 mov -0x3c(%ebp),%edi
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10b799: 0f b6 35 7c 45 12 00 movzbl 0x12457c,%esi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
10b7a0: 8d 45 e0 lea -0x20(%ebp),%eax
10b7a3: 50 push %eax
10b7a4: 8d 45 e4 lea -0x1c(%ebp),%eax
10b7a7: 50 push %eax
10b7a8: ff 75 b4 pushl -0x4c(%ebp)
10b7ab: ff 75 b0 pushl -0x50(%ebp)
10b7ae: e8 89 62 00 00 call 111a3c <_POSIX_Thread_Translate_sched_param>
10b7b3: 89 c2 mov %eax,%edx
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
10b7b5: 83 c4 10 add $0x10,%esp
10b7b8: 85 c0 test %eax,%eax
10b7ba: 0f 85 4c ff ff ff jne 10b70c <pthread_create+0x44>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10b7c0: 83 ec 0c sub $0xc,%esp
10b7c3: ff 35 1c 89 12 00 pushl 0x12891c
10b7c9: 89 45 a0 mov %eax,-0x60(%ebp)
10b7cc: e8 bf 17 00 00 call 10cf90 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
10b7d1: c7 04 24 00 8b 12 00 movl $0x128b00,(%esp)
10b7d8: e8 df 21 00 00 call 10d9bc <_Objects_Allocate>
10b7dd: 89 45 ac mov %eax,-0x54(%ebp)
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
10b7e0: 83 c4 10 add $0x10,%esp
10b7e3: 85 c0 test %eax,%eax
10b7e5: 8b 55 a0 mov -0x60(%ebp),%edx
10b7e8: 0f 84 0f 01 00 00 je 10b8fd <pthread_create+0x235>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
10b7ee: 8b 4d e0 mov -0x20(%ebp),%ecx
10b7f1: 8b 45 e4 mov -0x1c(%ebp),%eax
10b7f4: 89 45 a4 mov %eax,-0x5c(%ebp)
10b7f7: 8b 43 08 mov 0x8(%ebx),%eax
10b7fa: 89 45 a8 mov %eax,-0x58(%ebp)
10b7fd: a1 78 45 12 00 mov 0x124578,%eax
10b802: d1 e0 shl %eax
10b804: 3b 45 a8 cmp -0x58(%ebp),%eax
10b807: 73 03 jae 10b80c <pthread_create+0x144>
10b809: 8b 45 a8 mov -0x58(%ebp),%eax
10b80c: 83 ec 04 sub $0x4,%esp
10b80f: 6a 00 push $0x0
10b811: 6a 00 push $0x0
10b813: 51 push %ecx
10b814: ff 75 a4 pushl -0x5c(%ebp)
10b817: 6a 01 push $0x1
10b819: 81 e6 ff 00 00 00 and $0xff,%esi
10b81f: 29 fe sub %edi,%esi
10b821: 56 push %esi
10b822: 6a 01 push $0x1
10b824: 50 push %eax
10b825: ff 73 04 pushl 0x4(%ebx)
10b828: ff 75 ac pushl -0x54(%ebp)
10b82b: 68 00 8b 12 00 push $0x128b00
10b830: 89 55 a0 mov %edx,-0x60(%ebp)
10b833: e8 88 31 00 00 call 10e9c0 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
10b838: 83 c4 30 add $0x30,%esp
10b83b: 84 c0 test %al,%al
10b83d: 8b 55 a0 mov -0x60(%ebp),%edx
10b840: 75 34 jne 10b876 <pthread_create+0x1ae>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
10b842: 83 ec 08 sub $0x8,%esp
10b845: ff 75 ac pushl -0x54(%ebp)
10b848: 68 00 8b 12 00 push $0x128b00
10b84d: e8 e2 24 00 00 call 10dd34 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
10b852: 59 pop %ecx
10b853: ff 35 1c 89 12 00 pushl 0x12891c
10b859: e8 7a 17 00 00 call 10cfd8 <_API_Mutex_Unlock>
return EAGAIN;
10b85e: 83 c4 10 add $0x10,%esp
10b861: ba 0b 00 00 00 mov $0xb,%edx
10b866: e9 a1 fe ff ff jmp 10b70c <pthread_create+0x44>
10b86b: 90 nop
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
10b86c: ba 0e 00 00 00 mov $0xe,%edx
10b871: e9 96 fe ff ff jmp 10b70c <pthread_create+0x44>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10b876: 8b 4d ac mov -0x54(%ebp),%ecx
10b879: 8b 89 ec 00 00 00 mov 0xec(%ecx),%ecx
10b87f: 89 4d a8 mov %ecx,-0x58(%ebp)
api->Attributes = *the_attr;
10b882: b9 10 00 00 00 mov $0x10,%ecx
10b887: 8b 7d a8 mov -0x58(%ebp),%edi
10b88a: 89 de mov %ebx,%esi
10b88c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
10b88e: 8b 43 3c mov 0x3c(%ebx),%eax
10b891: 8b 4d a8 mov -0x58(%ebp),%ecx
10b894: 89 41 40 mov %eax,0x40(%ecx)
api->schedpolicy = schedpolicy;
10b897: 8b 45 b0 mov -0x50(%ebp),%eax
10b89a: 89 81 84 00 00 00 mov %eax,0x84(%ecx)
api->schedparam = schedparam;
10b8a0: 89 cf mov %ecx,%edi
10b8a2: 81 c7 88 00 00 00 add $0x88,%edi
10b8a8: b9 07 00 00 00 mov $0x7,%ecx
10b8ad: 8b 75 b4 mov -0x4c(%ebp),%esi
10b8b0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
10b8b2: 83 ec 0c sub $0xc,%esp
10b8b5: 6a 00 push $0x0
10b8b7: ff 75 14 pushl 0x14(%ebp)
10b8ba: ff 75 10 pushl 0x10(%ebp)
10b8bd: 6a 01 push $0x1
10b8bf: ff 75 ac pushl -0x54(%ebp)
10b8c2: 89 55 a0 mov %edx,-0x60(%ebp)
10b8c5: e8 6e 3a 00 00 call 10f338 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
10b8ca: 83 c4 20 add $0x20,%esp
10b8cd: 83 7d b0 04 cmpl $0x4,-0x50(%ebp)
10b8d1: 8b 55 a0 mov -0x60(%ebp),%edx
10b8d4: 74 42 je 10b918 <pthread_create+0x250>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
10b8d6: 8b 45 ac mov -0x54(%ebp),%eax
10b8d9: 8b 48 08 mov 0x8(%eax),%ecx
10b8dc: 8b 45 08 mov 0x8(%ebp),%eax
10b8df: 89 08 mov %ecx,(%eax)
_RTEMS_Unlock_allocator();
10b8e1: 83 ec 0c sub $0xc,%esp
10b8e4: ff 35 1c 89 12 00 pushl 0x12891c
10b8ea: 89 55 a0 mov %edx,-0x60(%ebp)
10b8ed: e8 e6 16 00 00 call 10cfd8 <_API_Mutex_Unlock>
return 0;
10b8f2: 83 c4 10 add $0x10,%esp
10b8f5: 8b 55 a0 mov -0x60(%ebp),%edx
10b8f8: e9 0f fe ff ff jmp 10b70c <pthread_create+0x44>
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10b8fd: 83 ec 0c sub $0xc,%esp
10b900: ff 35 1c 89 12 00 pushl 0x12891c
10b906: e8 cd 16 00 00 call 10cfd8 <_API_Mutex_Unlock>
return EAGAIN;
10b90b: 83 c4 10 add $0x10,%esp
10b90e: ba 0b 00 00 00 mov $0xb,%edx
10b913: e9 f4 fd ff ff jmp 10b70c <pthread_create+0x44>
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10b918: 83 ec 0c sub $0xc,%esp
&api->Sporadic_timer,
_Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
10b91b: 8b 45 a8 mov -0x58(%ebp),%eax
10b91e: 05 90 00 00 00 add $0x90,%eax
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10b923: 50 push %eax
10b924: e8 ab 3b 00 00 call 10f4d4 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b929: 8b 4d a8 mov -0x58(%ebp),%ecx
10b92c: 89 81 b4 00 00 00 mov %eax,0xb4(%ecx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b932: 58 pop %eax
10b933: 5a pop %edx
10b934: 89 c8 mov %ecx,%eax
10b936: 05 a8 00 00 00 add $0xa8,%eax
10b93b: 50 push %eax
10b93c: 68 3c 89 12 00 push $0x12893c
10b941: e8 be 3e 00 00 call 10f804 <_Watchdog_Insert>
10b946: 83 c4 10 add $0x10,%esp
10b949: 8b 55 a0 mov -0x60(%ebp),%edx
10b94c: eb 88 jmp 10b8d6 <pthread_create+0x20e>
00112e98 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
112e98: 55 push %ebp
112e99: 89 e5 mov %esp,%ebp
112e9b: 83 ec 10 sub $0x10,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
112e9e: ff 75 08 pushl 0x8(%ebp)
112ea1: ff 35 38 7b 12 00 pushl 0x127b38
112ea7: e8 88 ff ff ff call 112e34 <_POSIX_Thread_Exit>
112eac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
112eaf: c9 leave <== NOT EXECUTED
112eb0: c3 ret <== NOT EXECUTED
0010d8c0 <pthread_getschedparam>:
int pthread_getschedparam(
pthread_t thread,
int *policy,
struct sched_param *param
)
{
10d8c0: 55 push %ebp
10d8c1: 89 e5 mov %esp,%ebp
10d8c3: 57 push %edi
10d8c4: 56 push %esi
10d8c5: 53 push %ebx
10d8c6: 83 ec 1c sub $0x1c,%esp
10d8c9: 8b 7d 0c mov 0xc(%ebp),%edi
10d8cc: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
10d8cf: 85 ff test %edi,%edi
10d8d1: 74 69 je 10d93c <pthread_getschedparam+0x7c>
10d8d3: 85 db test %ebx,%ebx
10d8d5: 74 65 je 10d93c <pthread_getschedparam+0x7c>
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
_Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
10d8d7: 51 push %ecx
return EINVAL;
the_thread = _POSIX_Threads_Get( thread, &location );
10d8d8: 8d 45 e4 lea -0x1c(%ebp),%eax
10d8db: 50 push %eax
10d8dc: ff 75 08 pushl 0x8(%ebp)
10d8df: 68 40 b8 12 00 push $0x12b840
10d8e4: e8 0f 24 00 00 call 10fcf8 <_Objects_Get>
switch ( location ) {
10d8e9: 83 c4 10 add $0x10,%esp
10d8ec: 8b 55 e4 mov -0x1c(%ebp),%edx
10d8ef: 85 d2 test %edx,%edx
10d8f1: 75 39 jne 10d92c <pthread_getschedparam+0x6c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10d8f3: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi
if ( policy )
*policy = api->schedpolicy;
10d8f9: 8b 96 84 00 00 00 mov 0x84(%esi),%edx
10d8ff: 89 17 mov %edx,(%edi)
if ( param ) {
*param = api->schedparam;
10d901: 81 c6 88 00 00 00 add $0x88,%esi
10d907: b9 07 00 00 00 mov $0x7,%ecx
10d90c: 89 df mov %ebx,%edi
10d90e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10d910: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx
10d917: 2b 50 14 sub 0x14(%eax),%edx
10d91a: 89 13 mov %edx,(%ebx)
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
10d91c: e8 8b 2e 00 00 call 1107ac <_Thread_Enable_dispatch>
return 0;
10d921: 31 c0 xor %eax,%eax
break;
}
return ESRCH;
}
10d923: 8d 65 f4 lea -0xc(%ebp),%esp
10d926: 5b pop %ebx
10d927: 5e pop %esi
10d928: 5f pop %edi
10d929: c9 leave
10d92a: c3 ret
10d92b: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10d92c: b8 03 00 00 00 mov $0x3,%eax
}
10d931: 8d 65 f4 lea -0xc(%ebp),%esp
10d934: 5b pop %ebx
10d935: 5e pop %esi
10d936: 5f pop %edi
10d937: c9 leave
10d938: c3 ret
10d939: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
return EINVAL;
10d93c: b8 16 00 00 00 mov $0x16,%eax
break;
}
return ESRCH;
}
10d941: 8d 65 f4 lea -0xc(%ebp),%esp
10d944: 5b pop %ebx
10d945: 5e pop %esi
10d946: 5f pop %edi
10d947: c9 leave
10d948: c3 ret
0010b6a8 <pthread_getspecific>:
*/
void *pthread_getspecific(
pthread_key_t key
)
{
10b6a8: 55 push %ebp
10b6a9: 89 e5 mov %esp,%ebp
10b6ab: 83 ec 2c sub $0x2c,%esp
uint32_t api;
uint32_t index;
Objects_Locations location;
void *key_data;
the_key = _POSIX_Keys_Get( key, &location );
10b6ae: 8d 45 f4 lea -0xc(%ebp),%eax
pthread_key_t id,
Objects_Locations *location
)
{
return (POSIX_Keys_Control *)
_Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location );
10b6b1: 50 push %eax
10b6b2: ff 75 08 pushl 0x8(%ebp)
10b6b5: 68 20 8a 12 00 push $0x128a20
10b6ba: e8 ad 25 00 00 call 10dc6c <_Objects_Get>
switch ( location ) {
10b6bf: 83 c4 10 add $0x10,%esp
10b6c2: 8b 55 f4 mov -0xc(%ebp),%edx
10b6c5: 85 d2 test %edx,%edx
10b6c7: 75 2b jne 10b6f4 <pthread_getspecific+0x4c>
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
10b6c9: 8b 15 58 8b 12 00 mov 0x128b58,%edx
10b6cf: 8b 4a 08 mov 0x8(%edx),%ecx
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10b6d2: 89 ca mov %ecx,%edx
10b6d4: c1 ea 18 shr $0x18,%edx
10b6d7: 83 e2 07 and $0x7,%edx
index = _Objects_Get_index( _Thread_Executing->Object.id );
10b6da: 0f b7 c9 movzwl %cx,%ecx
key_data = (void *) the_key->Values[ api ][ index ];
10b6dd: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax
10b6e1: 8b 04 88 mov (%eax,%ecx,4),%eax
_Thread_Enable_dispatch();
10b6e4: 89 45 e4 mov %eax,-0x1c(%ebp)
10b6e7: e8 34 30 00 00 call 10e720 <_Thread_Enable_dispatch>
return key_data;
10b6ec: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return NULL;
}
10b6ef: c9 leave
10b6f0: c3 ret
10b6f1: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return NULL;
10b6f4: 31 c0 xor %eax,%eax
}
10b6f6: c9 leave
10b6f7: c3 ret
00111104 <pthread_join>:
int pthread_join(
pthread_t thread,
void **value_ptr
)
{
111104: 55 push %ebp
111105: 89 e5 mov %esp,%ebp
111107: 53 push %ebx
111108: 83 ec 18 sub $0x18,%esp
11110b: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
void *return_pointer;
the_thread = _POSIX_Threads_Get( thread, &location );
11110e: 8d 45 f4 lea -0xc(%ebp),%eax
111111: 50 push %eax
111112: ff 75 08 pushl 0x8(%ebp)
111115: 68 20 22 13 00 push $0x132220
11111a: e8 19 24 00 00 call 113538 <_Objects_Get>
switch ( location ) {
11111f: 83 c4 10 add $0x10,%esp
111122: 8b 55 f4 mov -0xc(%ebp),%edx
111125: 85 d2 test %edx,%edx
111127: 74 0b je 111134 <pthread_join+0x30>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
111129: b8 03 00 00 00 mov $0x3,%eax
}
11112e: 8b 5d fc mov -0x4(%ebp),%ebx
111131: c9 leave
111132: c3 ret
111133: 90 nop
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
111134: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
11113a: 8b 4a 40 mov 0x40(%edx),%ecx
11113d: 85 c9 test %ecx,%ecx
11113f: 74 43 je 111184 <pthread_join+0x80>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
111141: 8b 0d 38 25 13 00 mov 0x132538,%ecx
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
111147: 39 c8 cmp %ecx,%eax
111149: 74 49 je 111194 <pthread_join+0x90>
/*
* Put ourself on the threads join list
*/
_Thread_Executing->Wait.return_argument = &return_pointer;
11114b: 8d 45 f0 lea -0x10(%ebp),%eax
11114e: 89 41 28 mov %eax,0x28(%ecx)
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;
111151: c7 42 74 01 00 00 00 movl $0x1,0x74(%edx)
_Thread_queue_Enter_critical_section( &api->Join_List );
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
111158: 50 push %eax
111159: 68 f4 47 11 00 push $0x1147f4
11115e: 6a 00 push $0x0
111160: 83 c2 44 add $0x44,%edx
111163: 52 push %edx
111164: e8 5f 33 00 00 call 1144c8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
111169: e8 7e 2e 00 00 call 113fec <_Thread_Enable_dispatch>
if ( value_ptr )
11116e: 83 c4 10 add $0x10,%esp
111171: 85 db test %ebx,%ebx
111173: 74 2b je 1111a0 <pthread_join+0x9c>
*value_ptr = return_pointer;
111175: 8b 45 f0 mov -0x10(%ebp),%eax
111178: 89 03 mov %eax,(%ebx)
return 0;
11117a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
11117c: 8b 5d fc mov -0x4(%ebp),%ebx
11117f: c9 leave
111180: c3 ret
111181: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
_Thread_Enable_dispatch();
111184: e8 63 2e 00 00 call 113fec <_Thread_Enable_dispatch>
return EINVAL;
111189: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
11118e: 8b 5d fc mov -0x4(%ebp),%ebx
111191: c9 leave
111192: c3 ret
111193: 90 nop
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
_Thread_Enable_dispatch();
111194: e8 53 2e 00 00 call 113fec <_Thread_Enable_dispatch>
return EDEADLK;
111199: b8 2d 00 00 00 mov $0x2d,%eax
11119e: eb 8e jmp 11112e <pthread_join+0x2a>
_Thread_Enable_dispatch();
if ( value_ptr )
*value_ptr = return_pointer;
return 0;
1111a0: 31 c0 xor %eax,%eax
1111a2: eb 8a jmp 11112e <pthread_join+0x2a>
0010b534 <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
10b534: 55 push %ebp
10b535: 89 e5 mov %esp,%ebp
10b537: 57 push %edi
10b538: 56 push %esi
10b539: 53 push %ebx
10b53a: 83 ec 28 sub $0x28,%esp
10b53d: a1 70 85 12 00 mov 0x128570,%eax
10b542: 40 inc %eax
10b543: a3 70 85 12 00 mov %eax,0x128570
* the inactive chain of free keys control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
10b548: 68 20 8a 12 00 push $0x128a20
10b54d: e8 62 22 00 00 call 10d7b4 <_Objects_Allocate>
10b552: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
10b554: 83 c4 10 add $0x10,%esp
10b557: 85 c0 test %eax,%eax
10b559: 74 79 je 10b5d4 <pthread_key_create+0xa0>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
10b55b: 8b 45 0c mov 0xc(%ebp),%eax
10b55e: 89 46 10 mov %eax,0x10(%esi)
* This is a bit more complex than one might initially expect because
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) {
10b561: bb 01 00 00 00 mov $0x1,%ebx
the_key->Values[ the_api ] = NULL;
10b566: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4)
10b56d: 00
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
10b56e: 8b 04 9d 48 85 12 00 mov 0x128548(,%ebx,4),%eax
10b575: 8b 40 04 mov 0x4(%eax),%eax
10b578: 0f b7 40 10 movzwl 0x10(%eax),%eax
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
10b57c: 8d 0c 85 04 00 00 00 lea 0x4(,%eax,4),%ecx
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
10b583: 83 ec 0c sub $0xc,%esp
10b586: 51 push %ecx
10b587: 89 4d e4 mov %ecx,-0x1c(%ebp)
10b58a: e8 fd 42 00 00 call 10f88c <_Workspace_Allocate>
if ( !table ) {
10b58f: 83 c4 10 add $0x10,%esp
10b592: 85 c0 test %eax,%eax
10b594: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b597: 74 4f je 10b5e8 <pthread_key_create+0xb4>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
10b599: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4)
memset( table, '\0', bytes_to_allocate );
10b59d: 89 c7 mov %eax,%edi
10b59f: 31 c0 xor %eax,%eax
10b5a1: f3 aa rep stos %al,%es:(%edi)
* This is a bit more complex than one might initially expect because
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) {
10b5a3: 43 inc %ebx
10b5a4: 83 fb 04 cmp $0x4,%ebx
10b5a7: 75 bd jne 10b566 <pthread_key_create+0x32>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10b5a9: 8b 46 08 mov 0x8(%esi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10b5ac: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b5af: 8b 15 3c 8a 12 00 mov 0x128a3c,%edx
10b5b5: 89 34 8a mov %esi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10b5b8: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
10b5bf: 8b 55 08 mov 0x8(%ebp),%edx
10b5c2: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
10b5c4: e8 57 31 00 00 call 10e720 <_Thread_Enable_dispatch>
return 0;
10b5c9: 31 c0 xor %eax,%eax
}
10b5cb: 8d 65 f4 lea -0xc(%ebp),%esp
10b5ce: 5b pop %ebx
10b5cf: 5e pop %esi
10b5d0: 5f pop %edi
10b5d1: c9 leave
10b5d2: c3 ret
10b5d3: 90 nop
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
10b5d4: e8 47 31 00 00 call 10e720 <_Thread_Enable_dispatch>
return EAGAIN;
10b5d9: b8 0b 00 00 00 mov $0xb,%eax
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10b5de: 8d 65 f4 lea -0xc(%ebp),%esp
10b5e1: 5b pop %ebx
10b5e2: 5e pop %esi
10b5e3: 5f pop %edi
10b5e4: c9 leave
10b5e5: c3 ret
10b5e6: 66 90 xchg %ax,%ax
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
_POSIX_Keys_Free_memory( the_key );
10b5e8: 83 ec 0c sub $0xc,%esp
10b5eb: 56 push %esi
10b5ec: e8 87 00 00 00 call 10b678 <_POSIX_Keys_Free_memory>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
10b5f1: 58 pop %eax
10b5f2: 5a pop %edx
10b5f3: 56 push %esi
10b5f4: 68 20 8a 12 00 push $0x128a20
10b5f9: e8 2e 25 00 00 call 10db2c <_Objects_Free>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
10b5fe: e8 1d 31 00 00 call 10e720 <_Thread_Enable_dispatch>
return ENOMEM;
10b603: 83 c4 10 add $0x10,%esp
10b606: b8 0c 00 00 00 mov $0xc,%eax
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10b60b: 8d 65 f4 lea -0xc(%ebp),%esp
10b60e: 5b pop %ebx
10b60f: 5e pop %esi
10b610: 5f pop %edi
10b611: c9 leave
10b612: c3 ret
0010b614 <pthread_key_delete>:
* 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167
*/
int pthread_key_delete(
pthread_key_t key
)
{
10b614: 55 push %ebp
10b615: 89 e5 mov %esp,%ebp
10b617: 53 push %ebx
10b618: 83 ec 18 sub $0x18,%esp
POSIX_Keys_Control *the_key;
Objects_Locations location;
the_key = _POSIX_Keys_Get( key, &location );
10b61b: 8d 45 f4 lea -0xc(%ebp),%eax
pthread_key_t id,
Objects_Locations *location
)
{
return (POSIX_Keys_Control *)
_Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location );
10b61e: 50 push %eax
10b61f: ff 75 08 pushl 0x8(%ebp)
10b622: 68 20 8a 12 00 push $0x128a20
10b627: e8 40 26 00 00 call 10dc6c <_Objects_Get>
10b62c: 89 c3 mov %eax,%ebx
switch ( location ) {
10b62e: 83 c4 10 add $0x10,%esp
10b631: 8b 4d f4 mov -0xc(%ebp),%ecx
10b634: 85 c9 test %ecx,%ecx
10b636: 75 34 jne 10b66c <pthread_key_delete+0x58>
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
10b638: 83 ec 08 sub $0x8,%esp
10b63b: 50 push %eax
10b63c: 68 20 8a 12 00 push $0x128a20
10b641: e8 ea 21 00 00 call 10d830 <_Objects_Close>
_POSIX_Keys_Free_memory( the_key );
10b646: 89 1c 24 mov %ebx,(%esp)
10b649: e8 2a 00 00 00 call 10b678 <_POSIX_Keys_Free_memory>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
10b64e: 58 pop %eax
10b64f: 5a pop %edx
10b650: 53 push %ebx
10b651: 68 20 8a 12 00 push $0x128a20
10b656: e8 d1 24 00 00 call 10db2c <_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();
10b65b: e8 c0 30 00 00 call 10e720 <_Thread_Enable_dispatch>
return 0;
10b660: 83 c4 10 add $0x10,%esp
10b663: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b665: 8b 5d fc mov -0x4(%ebp),%ebx
10b668: c9 leave
10b669: c3 ret
10b66a: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b66c: b8 16 00 00 00 mov $0x16,%eax
}
10b671: 8b 5d fc mov -0x4(%ebp),%ebx
10b674: c9 leave
10b675: c3 ret
00124564 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
124564: 55 push %ebp
124565: 89 e5 mov %esp,%ebp
124567: 57 push %edi
124568: 56 push %esi
124569: 53 push %ebx
12456a: 83 ec 1c sub $0x1c,%esp
12456d: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
124570: 85 db test %ebx,%ebx
124572: 0f 84 84 00 00 00 je 1245fc <pthread_kill+0x98>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
124578: 8d 7b ff lea -0x1(%ebx),%edi
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
12457b: 83 ff 1f cmp $0x1f,%edi
12457e: 77 7c ja 1245fc <pthread_kill+0x98>
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
_Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
124580: 56 push %esi
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _POSIX_Threads_Get( thread, &location );
124581: 8d 45 e4 lea -0x1c(%ebp),%eax
124584: 50 push %eax
124585: ff 75 08 pushl 0x8(%ebp)
124588: 68 60 e5 12 00 push $0x12e560
12458d: e8 36 d9 fe ff call 111ec8 <_Objects_Get>
124592: 89 c6 mov %eax,%esi
switch ( location ) {
124594: 83 c4 10 add $0x10,%esp
124597: 8b 4d e4 mov -0x1c(%ebp),%ecx
12459a: 85 c9 test %ecx,%ecx
12459c: 75 72 jne 124610 <pthread_kill+0xac>
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
12459e: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
1245a4: 8d 04 5b lea (%ebx,%ebx,2),%eax
1245a7: 83 3c 85 e8 e8 12 00 cmpl $0x1,0x12e8e8(,%eax,4)
1245ae: 01
1245af: 74 2d je 1245de <pthread_kill+0x7a>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
1245b1: b8 01 00 00 00 mov $0x1,%eax
1245b6: 89 f9 mov %edi,%ecx
1245b8: d3 e0 shl %cl,%eax
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
1245ba: 09 82 d4 00 00 00 or %eax,0xd4(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
1245c0: 52 push %edx
1245c1: 6a 00 push $0x0
1245c3: 53 push %ebx
1245c4: 56 push %esi
1245c5: e8 7a fe ff ff call 124444 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1245ca: 83 c4 10 add $0x10,%esp
1245cd: a1 74 e8 12 00 mov 0x12e874,%eax
1245d2: 85 c0 test %eax,%eax
1245d4: 74 08 je 1245de <pthread_kill+0x7a>
1245d6: 3b 35 78 e8 12 00 cmp 0x12e878,%esi
1245dc: 74 12 je 1245f0 <pthread_kill+0x8c>
_Thread_Dispatch_necessary = true;
}
_Thread_Enable_dispatch();
1245de: e8 19 e4 fe ff call 1129fc <_Thread_Enable_dispatch>
return 0;
1245e3: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
1245e5: 8d 65 f4 lea -0xc(%ebp),%esp
1245e8: 5b pop %ebx
1245e9: 5e pop %esi
1245ea: 5f pop %edi
1245eb: c9 leave
1245ec: c3 ret
1245ed: 8d 76 00 lea 0x0(%esi),%esi
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
1245f0: c6 05 84 e8 12 00 01 movb $0x1,0x12e884
1245f7: eb e5 jmp 1245de <pthread_kill+0x7a>
1245f9: 8d 76 00 lea 0x0(%esi),%esi
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
1245fc: e8 db 3e ff ff call 1184dc <__errno>
124601: c7 00 16 00 00 00 movl $0x16,(%eax)
124607: b8 ff ff ff ff mov $0xffffffff,%eax
12460c: eb d7 jmp 1245e5 <pthread_kill+0x81>
12460e: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
124610: e8 c7 3e ff ff call 1184dc <__errno>
124615: c7 00 03 00 00 00 movl $0x3,(%eax)
12461b: b8 ff ff ff ff mov $0xffffffff,%eax
124620: eb c3 jmp 1245e5 <pthread_kill+0x81>
0010d18c <pthread_mutex_getprioceiling>:
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
10d18c: 55 push %ebp
10d18d: 89 e5 mov %esp,%ebp
10d18f: 53 push %ebx
10d190: 83 ec 14 sub $0x14,%esp
10d193: 8b 5d 0c mov 0xc(%ebp),%ebx
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
10d196: 85 db test %ebx,%ebx
10d198: 74 19 je 10d1b3 <pthread_mutex_getprioceiling+0x27>
return EINVAL;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
10d19a: 83 ec 08 sub $0x8,%esp
10d19d: 8d 45 f4 lea -0xc(%ebp),%eax
10d1a0: 50 push %eax
10d1a1: ff 75 08 pushl 0x8(%ebp)
10d1a4: e8 3b ff ff ff call 10d0e4 <_POSIX_Mutex_Get>
switch ( location ) {
10d1a9: 83 c4 10 add $0x10,%esp
10d1ac: 8b 55 f4 mov -0xc(%ebp),%edx
10d1af: 85 d2 test %edx,%edx
10d1b1: 74 0d je 10d1c0 <pthread_mutex_getprioceiling+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10d1b3: b8 16 00 00 00 mov $0x16,%eax
}
10d1b8: 8b 5d fc mov -0x4(%ebp),%ebx
10d1bb: c9 leave
10d1bc: c3 ret
10d1bd: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10d1c0: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx
10d1c7: 2b 50 60 sub 0x60(%eax),%edx
10d1ca: 89 13 mov %edx,(%ebx)
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
10d1cc: e8 db 35 00 00 call 1107ac <_Thread_Enable_dispatch>
return 0;
10d1d1: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d1d3: 8b 5d fc mov -0x4(%ebp),%ebx
10d1d6: c9 leave
10d1d7: c3 ret
0010d1d8 <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
10d1d8: 55 push %ebp
10d1d9: 89 e5 mov %esp,%ebp
10d1db: 57 push %edi
10d1dc: 56 push %esi
10d1dd: 53 push %ebx
10d1de: 83 ec 1c sub $0x1c,%esp
10d1e1: 8b 75 08 mov 0x8(%ebp),%esi
10d1e4: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Mutex_Control *the_mutex;
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
10d1e7: 85 db test %ebx,%ebx
10d1e9: 0f 84 09 01 00 00 je 10d2f8 <pthread_mutex_init+0x120>
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
10d1ef: 85 f6 test %esi,%esi
10d1f1: 0f 84 e5 00 00 00 je 10d2dc <pthread_mutex_init+0x104>
}
}
}
#endif
if ( !the_attr->is_initialized )
10d1f7: 8b 13 mov (%ebx),%edx
10d1f9: 85 d2 test %edx,%edx
10d1fb: 0f 84 db 00 00 00 je 10d2dc <pthread_mutex_init+0x104>
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10d201: 8b 43 04 mov 0x4(%ebx),%eax
10d204: 83 f8 01 cmp $0x1,%eax
10d207: 0f 84 f7 00 00 00 je 10d304 <pthread_mutex_init+0x12c>
return ENOSYS;
if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
10d20d: 85 c0 test %eax,%eax
10d20f: 0f 85 c7 00 00 00 jne 10d2dc <pthread_mutex_init+0x104>
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10d215: 8b 43 0c mov 0xc(%ebx),%eax
10d218: 83 f8 01 cmp $0x1,%eax
10d21b: 0f 84 eb 00 00 00 je 10d30c <pthread_mutex_init+0x134>
10d221: 83 f8 02 cmp $0x2,%eax
10d224: 0f 84 c2 00 00 00 je 10d2ec <pthread_mutex_init+0x114>
10d22a: 85 c0 test %eax,%eax
10d22c: 0f 85 aa 00 00 00 jne 10d2dc <pthread_mutex_init+0x104>
case PTHREAD_PRIO_NONE:
the_discipline = CORE_MUTEX_DISCIPLINES_FIFO;
10d232: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
/*
* Validate the priority ceiling field -- should always be valid.
*/
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
10d239: 83 ec 0c sub $0xc,%esp
10d23c: ff 73 08 pushl 0x8(%ebx)
10d23f: e8 58 03 00 00 call 10d59c <_POSIX_Priority_Is_valid>
10d244: 83 c4 10 add $0x10,%esp
10d247: 84 c0 test %al,%al
10d249: 0f 84 8d 00 00 00 je 10d2dc <pthread_mutex_init+0x104>
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/*
* Validate the mutex type and set appropriate SuperCore mutex
* attributes.
*/
switch ( the_attr->type ) {
10d24f: 83 7b 10 03 cmpl $0x3,0x10(%ebx)
10d253: 0f 87 83 00 00 00 ja 10d2dc <pthread_mutex_init+0x104>
10d259: a1 70 b5 12 00 mov 0x12b570,%eax
10d25e: 40 inc %eax
10d25f: a3 70 b5 12 00 mov %eax,0x12b570
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
10d264: 83 ec 0c sub $0xc,%esp
10d267: 68 80 b9 12 00 push $0x12b980
10d26c: e8 cf 25 00 00 call 10f840 <_Objects_Allocate>
10d271: 89 c7 mov %eax,%edi
*/
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
10d273: 83 c4 10 add $0x10,%esp
10d276: 85 c0 test %eax,%eax
10d278: 0f 84 9a 00 00 00 je 10d318 <pthread_mutex_init+0x140>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
10d27e: 8b 43 04 mov 0x4(%ebx),%eax
10d281: 89 47 10 mov %eax,0x10(%edi)
the_mutex_attr = &the_mutex->Mutex.Attributes;
10d284: 8d 57 54 lea 0x54(%edi),%edx
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10d287: 31 c0 xor %eax,%eax
10d289: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10d28d: 0f 94 c0 sete %al
10d290: 89 47 54 mov %eax,0x54(%edi)
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
10d293: c6 47 58 01 movb $0x1,0x58(%edi)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10d297: 0f b6 05 5c 72 12 00 movzbl 0x12725c,%eax
10d29e: 2b 43 08 sub 0x8(%ebx),%eax
10d2a1: 89 47 60 mov %eax,0x60(%edi)
the_mutex_attr->priority_ceiling =
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
10d2a4: 8b 45 e4 mov -0x1c(%ebp),%eax
10d2a7: 89 47 5c mov %eax,0x5c(%edi)
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
10d2aa: 50 push %eax
10d2ab: 6a 01 push $0x1
10d2ad: 52 push %edx
10d2ae: 8d 47 14 lea 0x14(%edi),%eax
10d2b1: 50 push %eax
10d2b2: e8 0d 1d 00 00 call 10efc4 <_CORE_mutex_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10d2b7: 8b 47 08 mov 0x8(%edi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10d2ba: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d2bd: 8b 15 9c b9 12 00 mov 0x12b99c,%edx
10d2c3: 89 3c 8a mov %edi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10d2c6: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
10d2cd: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10d2cf: e8 d8 34 00 00 call 1107ac <_Thread_Enable_dispatch>
return 0;
10d2d4: 83 c4 10 add $0x10,%esp
10d2d7: 31 c0 xor %eax,%eax
10d2d9: eb 06 jmp 10d2e1 <pthread_mutex_init+0x109>
10d2db: 90 nop
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
break;
default:
return EINVAL;
10d2dc: b8 16 00 00 00 mov $0x16,%eax
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10d2e1: 8d 65 f4 lea -0xc(%ebp),%esp
10d2e4: 5b pop %ebx
10d2e5: 5e pop %esi
10d2e6: 5f pop %edi
10d2e7: c9 leave
10d2e8: c3 ret
10d2e9: 8d 76 00 lea 0x0(%esi),%esi
break;
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
break;
case PTHREAD_PRIO_PROTECT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10d2ec: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp)
break;
10d2f3: e9 41 ff ff ff jmp 10d239 <pthread_mutex_init+0x61>
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Mutex_Default_attributes;
10d2f8: bb 00 ba 12 00 mov $0x12ba00,%ebx
10d2fd: e9 ed fe ff ff jmp 10d1ef <pthread_mutex_init+0x17>
10d302: 66 90 xchg %ax,%ax
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return ENOSYS;
10d304: b8 58 00 00 00 mov $0x58,%eax
10d309: eb d6 jmp 10d2e1 <pthread_mutex_init+0x109>
10d30b: 90 nop
switch ( the_attr->protocol ) {
case PTHREAD_PRIO_NONE:
the_discipline = CORE_MUTEX_DISCIPLINES_FIFO;
break;
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10d30c: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp)
10d313: e9 21 ff ff ff jmp 10d239 <pthread_mutex_init+0x61>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
10d318: e8 8f 34 00 00 call 1107ac <_Thread_Enable_dispatch>
return EAGAIN;
10d31d: b8 0b 00 00 00 mov $0xb,%eax
10d322: eb bd jmp 10d2e1 <pthread_mutex_init+0x109>
0010d430 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10d430: 55 push %ebp
10d431: 89 e5 mov %esp,%ebp
10d433: 56 push %esi
10d434: 53 push %ebx
10d435: 83 ec 18 sub $0x18,%esp
10d438: 8b 75 08 mov 0x8(%ebp),%esi
*
* 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 );
10d43b: 8d 45 f4 lea -0xc(%ebp),%eax
10d43e: 50 push %eax
10d43f: ff 75 0c pushl 0xc(%ebp)
10d442: e8 cd 00 00 00 call 10d514 <_POSIX_Absolute_timeout_to_ticks>
10d447: 89 c3 mov %eax,%ebx
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10d449: 83 c4 10 add $0x10,%esp
10d44c: 83 f8 03 cmp $0x3,%eax
10d44f: 74 2f je 10d480 <pthread_mutex_timedlock+0x50>
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10d451: 50 push %eax
10d452: ff 75 f4 pushl -0xc(%ebp)
10d455: 6a 00 push $0x0
10d457: 56 push %esi
10d458: e8 db fe ff ff call 10d338 <_POSIX_Mutex_Lock_support>
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
10d45d: 83 c4 10 add $0x10,%esp
10d460: 83 f8 10 cmp $0x10,%eax
10d463: 74 07 je 10d46c <pthread_mutex_timedlock+0x3c><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
10d465: 8d 65 f8 lea -0x8(%ebp),%esp
10d468: 5b pop %ebx
10d469: 5e pop %esi
10d46a: c9 leave
10d46b: c3 ret
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10d46c: 85 db test %ebx,%ebx
10d46e: 74 28 je 10d498 <pthread_mutex_timedlock+0x68><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10d470: 4b dec %ebx
10d471: 83 fb 01 cmp $0x1,%ebx
10d474: 77 ef ja 10d465 <pthread_mutex_timedlock+0x35><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10d476: b8 74 00 00 00 mov $0x74,%eax
10d47b: eb e8 jmp 10d465 <pthread_mutex_timedlock+0x35>
10d47d: 8d 76 00 lea 0x0(%esi),%esi
*/
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 );
10d480: 52 push %edx
10d481: ff 75 f4 pushl -0xc(%ebp)
10d484: 6a 01 push $0x1
10d486: 56 push %esi
10d487: e8 ac fe ff ff call 10d338 <_POSIX_Mutex_Lock_support>
10d48c: 83 c4 10 add $0x10,%esp
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
10d48f: 8d 65 f8 lea -0x8(%ebp),%esp
10d492: 5b pop %ebx
10d493: 5e pop %esi
10d494: c9 leave
10d495: c3 ret
10d496: 66 90 xchg %ax,%ax
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
10d498: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
10d49d: eb c6 jmp 10d465 <pthread_mutex_timedlock+0x35><== NOT EXECUTED
0010cf14 <pthread_mutexattr_destroy>:
*/
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
10cf14: 55 push %ebp
10cf15: 89 e5 mov %esp,%ebp
10cf17: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10cf1a: 85 c0 test %eax,%eax
10cf1c: 74 12 je 10cf30 <pthread_mutexattr_destroy+0x1c>
10cf1e: 8b 10 mov (%eax),%edx
10cf20: 85 d2 test %edx,%edx
10cf22: 74 0c je 10cf30 <pthread_mutexattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10cf24: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10cf2a: 31 c0 xor %eax,%eax
}
10cf2c: c9 leave
10cf2d: c3 ret
10cf2e: 66 90 xchg %ax,%ax
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
10cf30: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10cf35: c9 leave
10cf36: c3 ret
0010cfdc <pthread_mutexattr_setprioceiling>:
int pthread_mutexattr_setprioceiling(
pthread_mutexattr_t *attr,
int prioceiling
)
{
10cfdc: 55 push %ebp
10cfdd: 89 e5 mov %esp,%ebp
10cfdf: 56 push %esi
10cfe0: 53 push %ebx
10cfe1: 8b 5d 08 mov 0x8(%ebp),%ebx
10cfe4: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized )
10cfe7: 85 db test %ebx,%ebx
10cfe9: 74 06 je 10cff1 <pthread_mutexattr_setprioceiling+0x15>
10cfeb: 8b 03 mov (%ebx),%eax
10cfed: 85 c0 test %eax,%eax
10cfef: 75 0f jne 10d000 <pthread_mutexattr_setprioceiling+0x24><== NEVER TAKEN
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
return EINVAL;
10cff1: b8 16 00 00 00 mov $0x16,%eax
attr->prio_ceiling = prioceiling;
return 0;
}
10cff6: 8d 65 f8 lea -0x8(%ebp),%esp
10cff9: 5b pop %ebx
10cffa: 5e pop %esi
10cffb: c9 leave
10cffc: c3 ret
10cffd: 8d 76 00 lea 0x0(%esi),%esi
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
10d000: 83 ec 0c sub $0xc,%esp
10d003: 56 push %esi
10d004: e8 93 05 00 00 call 10d59c <_POSIX_Priority_Is_valid>
10d009: 83 c4 10 add $0x10,%esp
10d00c: 84 c0 test %al,%al
10d00e: 74 e1 je 10cff1 <pthread_mutexattr_setprioceiling+0x15><== NEVER TAKEN
return EINVAL;
attr->prio_ceiling = prioceiling;
10d010: 89 73 08 mov %esi,0x8(%ebx)
return 0;
10d013: 31 c0 xor %eax,%eax
}
10d015: 8d 65 f8 lea -0x8(%ebp),%esp
10d018: 5b pop %ebx
10d019: 5e pop %esi
10d01a: c9 leave
10d01b: c3 ret
0010d044 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10d044: 55 push %ebp
10d045: 89 e5 mov %esp,%ebp
10d047: 8b 45 08 mov 0x8(%ebp),%eax
10d04a: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10d04d: 85 c0 test %eax,%eax
10d04f: 74 0b je 10d05c <pthread_mutexattr_setpshared+0x18>
10d051: 8b 08 mov (%eax),%ecx
10d053: 85 c9 test %ecx,%ecx
10d055: 74 05 je 10d05c <pthread_mutexattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10d057: 83 fa 01 cmp $0x1,%edx
10d05a: 76 08 jbe 10d064 <pthread_mutexattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10d05c: b8 16 00 00 00 mov $0x16,%eax
}
}
10d061: c9 leave
10d062: c3 ret
10d063: 90 nop
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d064: 89 50 04 mov %edx,0x4(%eax)
return 0;
10d067: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10d069: c9 leave
10d06a: c3 ret
0010b228 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
10b228: 55 push %ebp
10b229: 89 e5 mov %esp,%ebp
10b22b: 8b 45 08 mov 0x8(%ebp),%eax
10b22e: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10b231: 85 c0 test %eax,%eax
10b233: 74 0b je 10b240 <pthread_mutexattr_settype+0x18>
10b235: 8b 08 mov (%eax),%ecx
10b237: 85 c9 test %ecx,%ecx
10b239: 74 05 je 10b240 <pthread_mutexattr_settype+0x18><== NEVER TAKEN
return EINVAL;
switch ( type ) {
10b23b: 83 fa 03 cmp $0x3,%edx
10b23e: 76 08 jbe 10b248 <pthread_mutexattr_settype+0x20>
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
default:
return EINVAL;
10b240: b8 16 00 00 00 mov $0x16,%eax
}
}
10b245: c9 leave
10b246: c3 ret
10b247: 90 nop
switch ( type ) {
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
10b248: 89 50 10 mov %edx,0x10(%eax)
return 0;
10b24b: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10b24d: c9 leave
10b24e: c3 ret
0010bd8c <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
10bd8c: 55 push %ebp
10bd8d: 89 e5 mov %esp,%ebp
10bd8f: 57 push %edi
10bd90: 56 push %esi
10bd91: 53 push %ebx
10bd92: 83 ec 1c sub $0x1c,%esp
10bd95: 8b 5d 08 mov 0x8(%ebp),%ebx
10bd98: 8b 75 0c mov 0xc(%ebp),%esi
if ( !once_control || !init_routine )
10bd9b: 85 db test %ebx,%ebx
10bd9d: 74 51 je 10bdf0 <pthread_once+0x64>
10bd9f: 85 f6 test %esi,%esi
10bda1: 74 4d je 10bdf0 <pthread_once+0x64>
return EINVAL;
if ( !once_control->init_executed ) {
10bda3: 8b 7b 04 mov 0x4(%ebx),%edi
10bda6: 85 ff test %edi,%edi
10bda8: 74 0a je 10bdb4 <pthread_once+0x28>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
10bdaa: 31 c0 xor %eax,%eax
}
10bdac: 8d 65 f4 lea -0xc(%ebp),%esp
10bdaf: 5b pop %ebx
10bdb0: 5e pop %esi
10bdb1: 5f pop %edi
10bdb2: c9 leave
10bdb3: c3 ret
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);
10bdb4: 51 push %ecx
10bdb5: 8d 7d e4 lea -0x1c(%ebp),%edi
10bdb8: 57 push %edi
10bdb9: 68 00 01 00 00 push $0x100
10bdbe: 68 00 01 00 00 push $0x100
10bdc3: e8 f4 0b 00 00 call 10c9bc <rtems_task_mode>
if ( !once_control->init_executed ) {
10bdc8: 83 c4 10 add $0x10,%esp
10bdcb: 8b 53 04 mov 0x4(%ebx),%edx
10bdce: 85 d2 test %edx,%edx
10bdd0: 74 2e je 10be00 <pthread_once+0x74> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10bdd2: 50 push %eax
10bdd3: 57 push %edi
10bdd4: 68 00 01 00 00 push $0x100
10bdd9: ff 75 e4 pushl -0x1c(%ebp)
10bddc: e8 db 0b 00 00 call 10c9bc <rtems_task_mode>
10bde1: 83 c4 10 add $0x10,%esp
}
return 0;
10bde4: 31 c0 xor %eax,%eax
}
10bde6: 8d 65 f4 lea -0xc(%ebp),%esp
10bde9: 5b pop %ebx
10bdea: 5e pop %esi
10bdeb: 5f pop %edi
10bdec: c9 leave
10bded: c3 ret
10bdee: 66 90 xchg %ax,%ax
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
10bdf0: b8 16 00 00 00 mov $0x16,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
10bdf5: 8d 65 f4 lea -0xc(%ebp),%esp
10bdf8: 5b pop %ebx
10bdf9: 5e pop %esi
10bdfa: 5f pop %edi
10bdfb: c9 leave
10bdfc: c3 ret
10bdfd: 8d 76 00 lea 0x0(%esi),%esi
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;
10be00: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
10be06: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
10be0d: ff d6 call *%esi
10be0f: eb c1 jmp 10bdd2 <pthread_once+0x46>
0010c470 <pthread_rwlock_destroy>:
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
10c470: 55 push %ebp
10c471: 89 e5 mov %esp,%ebp
10c473: 53 push %ebx
10c474: 83 ec 14 sub $0x14,%esp
10c477: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
10c47a: 85 c0 test %eax,%eax
10c47c: 74 42 je 10c4c0 <pthread_rwlock_destroy+0x50>
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
10c47e: 53 push %ebx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c47f: 8d 55 f4 lea -0xc(%ebp),%edx
10c482: 52 push %edx
10c483: ff 30 pushl (%eax)
10c485: 68 60 b1 12 00 push $0x12b160
10c48a: e8 e9 2b 00 00 call 10f078 <_Objects_Get>
10c48f: 89 c3 mov %eax,%ebx
switch ( location ) {
10c491: 83 c4 10 add $0x10,%esp
10c494: 8b 4d f4 mov -0xc(%ebp),%ecx
10c497: 85 c9 test %ecx,%ecx
10c499: 75 25 jne 10c4c0 <pthread_rwlock_destroy+0x50>
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 ) {
10c49b: 83 ec 0c sub $0xc,%esp
10c49e: 8d 40 10 lea 0x10(%eax),%eax
10c4a1: 50 push %eax
10c4a2: e8 89 3e 00 00 call 110330 <_Thread_queue_First>
10c4a7: 83 c4 10 add $0x10,%esp
10c4aa: 85 c0 test %eax,%eax
10c4ac: 74 1e je 10c4cc <pthread_rwlock_destroy+0x5c>
_Thread_Enable_dispatch();
10c4ae: e8 79 36 00 00 call 10fb2c <_Thread_Enable_dispatch>
return EBUSY;
10c4b3: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c4b8: 8b 5d fc mov -0x4(%ebp),%ebx
10c4bb: c9 leave
10c4bc: c3 ret
10c4bd: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c4c0: b8 16 00 00 00 mov $0x16,%eax
}
10c4c5: 8b 5d fc mov -0x4(%ebp),%ebx
10c4c8: c9 leave
10c4c9: c3 ret
10c4ca: 66 90 xchg %ax,%ax
/*
* POSIX doesn't require behavior when it is locked.
*/
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
10c4cc: 83 ec 08 sub $0x8,%esp
10c4cf: 53 push %ebx
10c4d0: 68 60 b1 12 00 push $0x12b160
10c4d5: e8 62 27 00 00 call 10ec3c <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free (
POSIX_RWLock_Control *the_RWLock
)
{
_Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
10c4da: 58 pop %eax
10c4db: 5a pop %edx
10c4dc: 53 push %ebx
10c4dd: 68 60 b1 12 00 push $0x12b160
10c4e2: e8 51 2a 00 00 call 10ef38 <_Objects_Free>
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
10c4e7: e8 40 36 00 00 call 10fb2c <_Thread_Enable_dispatch>
return 0;
10c4ec: 83 c4 10 add $0x10,%esp
10c4ef: 31 c0 xor %eax,%eax
10c4f1: eb d2 jmp 10c4c5 <pthread_rwlock_destroy+0x55>
0010c4f4 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10c4f4: 55 push %ebp
10c4f5: 89 e5 mov %esp,%ebp
10c4f7: 56 push %esi
10c4f8: 53 push %ebx
10c4f9: 83 ec 20 sub $0x20,%esp
10c4fc: 8b 5d 08 mov 0x8(%ebp),%ebx
10c4ff: 8b 75 0c mov 0xc(%ebp),%esi
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10c502: 85 db test %ebx,%ebx
10c504: 74 15 je 10c51b <pthread_rwlock_init+0x27>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10c506: 85 f6 test %esi,%esi
10c508: 0f 84 8e 00 00 00 je 10c59c <pthread_rwlock_init+0xa8>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10c50e: 8b 16 mov (%esi),%edx
10c510: 85 d2 test %edx,%edx
10c512: 74 07 je 10c51b <pthread_rwlock_init+0x27><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
10c514: 8b 46 04 mov 0x4(%esi),%eax
10c517: 85 c0 test %eax,%eax
10c519: 74 0d je 10c528 <pthread_rwlock_init+0x34><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10c51b: b8 16 00 00 00 mov $0x16,%eax
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10c520: 8d 65 f8 lea -0x8(%ebp),%esp
10c523: 5b pop %ebx
10c524: 5e pop %esi
10c525: c9 leave
10c526: c3 ret
10c527: 90 nop
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
10c528: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c52f: a1 d0 ae 12 00 mov 0x12aed0,%eax
10c534: 40 inc %eax
10c535: a3 d0 ae 12 00 mov %eax,0x12aed0
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
_Objects_Allocate( &_POSIX_RWLock_Information );
10c53a: 83 ec 0c sub $0xc,%esp
10c53d: 68 60 b1 12 00 push $0x12b160
10c542: e8 79 26 00 00 call 10ebc0 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10c547: 83 c4 10 add $0x10,%esp
10c54a: 85 c0 test %eax,%eax
10c54c: 74 42 je 10c590 <pthread_rwlock_init+0x9c>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10c54e: 83 ec 08 sub $0x8,%esp
10c551: 8d 55 f4 lea -0xc(%ebp),%edx
10c554: 52 push %edx
10c555: 8d 50 10 lea 0x10(%eax),%edx
10c558: 52 push %edx
10c559: 89 45 e4 mov %eax,-0x1c(%ebp)
10c55c: e8 3f 1e 00 00 call 10e3a0 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c561: 8b 45 e4 mov -0x1c(%ebp),%eax
10c564: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10c567: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c56a: 8b 0d 7c b1 12 00 mov 0x12b17c,%ecx
10c570: 89 04 b1 mov %eax,(%ecx,%esi,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10c573: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10c57a: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10c57c: e8 ab 35 00 00 call 10fb2c <_Thread_Enable_dispatch>
return 0;
10c581: 83 c4 10 add $0x10,%esp
10c584: 31 c0 xor %eax,%eax
}
10c586: 8d 65 f8 lea -0x8(%ebp),%esp
10c589: 5b pop %ebx
10c58a: 5e pop %esi
10c58b: c9 leave
10c58c: c3 ret
10c58d: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
10c590: e8 97 35 00 00 call 10fb2c <_Thread_Enable_dispatch>
return EAGAIN;
10c595: b8 0b 00 00 00 mov $0xb,%eax
10c59a: eb 84 jmp 10c520 <pthread_rwlock_init+0x2c>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
10c59c: 83 ec 0c sub $0xc,%esp
10c59f: 8d 75 ec lea -0x14(%ebp),%esi
10c5a2: 56 push %esi
10c5a3: e8 84 09 00 00 call 10cf2c <pthread_rwlockattr_init>
10c5a8: 83 c4 10 add $0x10,%esp
10c5ab: e9 5e ff ff ff jmp 10c50e <pthread_rwlock_init+0x1a>
0010c618 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10c618: 55 push %ebp
10c619: 89 e5 mov %esp,%ebp
10c61b: 56 push %esi
10c61c: 53 push %ebx
10c61d: 83 ec 20 sub $0x20,%esp
10c620: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10c623: 85 db test %ebx,%ebx
10c625: 74 7d je 10c6a4 <pthread_rwlock_timedrdlock+0x8c>
*
* 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 );
10c627: 83 ec 08 sub $0x8,%esp
10c62a: 8d 45 f0 lea -0x10(%ebp),%eax
10c62d: 50 push %eax
10c62e: ff 75 0c pushl 0xc(%ebp)
10c631: e8 ae 62 00 00 call 1128e4 <_POSIX_Absolute_timeout_to_ticks>
10c636: 89 c6 mov %eax,%esi
10c638: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c63b: 8d 45 f4 lea -0xc(%ebp),%eax
10c63e: 50 push %eax
10c63f: ff 33 pushl (%ebx)
10c641: 68 60 b1 12 00 push $0x12b160
10c646: e8 2d 2a 00 00 call 10f078 <_Objects_Get>
switch ( location ) {
10c64b: 83 c4 10 add $0x10,%esp
10c64e: 8b 55 f4 mov -0xc(%ebp),%edx
10c651: 85 d2 test %edx,%edx
10c653: 75 4f jne 10c6a4 <pthread_rwlock_timedrdlock+0x8c>
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
10c655: 83 fe 03 cmp $0x3,%esi
10c658: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10c65b: 83 ec 0c sub $0xc,%esp
10c65e: 6a 00 push $0x0
10c660: ff 75 f0 pushl -0x10(%ebp)
10c663: 0f b6 ca movzbl %dl,%ecx
10c666: 51 push %ecx
10c667: ff 33 pushl (%ebx)
10c669: 83 c0 10 add $0x10,%eax
10c66c: 50 push %eax
10c66d: 88 55 e4 mov %dl,-0x1c(%ebp)
10c670: e8 5f 1d 00 00 call 10e3d4 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10c675: 83 c4 20 add $0x20,%esp
10c678: e8 af 34 00 00 call 10fb2c <_Thread_Enable_dispatch>
if ( !do_wait ) {
10c67d: 8a 55 e4 mov -0x1c(%ebp),%dl
10c680: 84 d2 test %dl,%dl
10c682: 75 40 jne 10c6c4 <pthread_rwlock_timedrdlock+0xac>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10c684: a1 b8 b4 12 00 mov 0x12b4b8,%eax
10c689: 8b 40 34 mov 0x34(%eax),%eax
10c68c: 83 f8 02 cmp $0x2,%eax
10c68f: 74 1f je 10c6b0 <pthread_rwlock_timedrdlock+0x98>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c691: 83 ec 0c sub $0xc,%esp
10c694: 50 push %eax
10c695: e8 ee 00 00 00 call 10c788 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c69a: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c69d: 8d 65 f8 lea -0x8(%ebp),%esp
10c6a0: 5b pop %ebx
10c6a1: 5e pop %esi
10c6a2: c9 leave
10c6a3: c3 ret
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
10c6a4: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c6a9: 8d 65 f8 lea -0x8(%ebp),%esp
10c6ac: 5b pop %ebx
10c6ad: 5e pop %esi
10c6ae: c9 leave
10c6af: c3 ret
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10c6b0: 85 f6 test %esi,%esi
10c6b2: 74 f0 je 10c6a4 <pthread_rwlock_timedrdlock+0x8c><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10c6b4: 4e dec %esi
10c6b5: 83 fe 01 cmp $0x1,%esi
10c6b8: 77 d7 ja 10c691 <pthread_rwlock_timedrdlock+0x79><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10c6ba: b8 74 00 00 00 mov $0x74,%eax
10c6bf: eb e8 jmp 10c6a9 <pthread_rwlock_timedrdlock+0x91>
10c6c1: 8d 76 00 lea 0x0(%esi),%esi
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
10c6c4: a1 b8 b4 12 00 mov 0x12b4b8,%eax
10c6c9: 8b 40 34 mov 0x34(%eax),%eax
10c6cc: eb c3 jmp 10c691 <pthread_rwlock_timedrdlock+0x79>
0010c6d0 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10c6d0: 55 push %ebp
10c6d1: 89 e5 mov %esp,%ebp
10c6d3: 56 push %esi
10c6d4: 53 push %ebx
10c6d5: 83 ec 20 sub $0x20,%esp
10c6d8: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10c6db: 85 db test %ebx,%ebx
10c6dd: 74 7d je 10c75c <pthread_rwlock_timedwrlock+0x8c>
*
* 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 );
10c6df: 83 ec 08 sub $0x8,%esp
10c6e2: 8d 45 f0 lea -0x10(%ebp),%eax
10c6e5: 50 push %eax
10c6e6: ff 75 0c pushl 0xc(%ebp)
10c6e9: e8 f6 61 00 00 call 1128e4 <_POSIX_Absolute_timeout_to_ticks>
10c6ee: 89 c6 mov %eax,%esi
10c6f0: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c6f3: 8d 45 f4 lea -0xc(%ebp),%eax
10c6f6: 50 push %eax
10c6f7: ff 33 pushl (%ebx)
10c6f9: 68 60 b1 12 00 push $0x12b160
10c6fe: e8 75 29 00 00 call 10f078 <_Objects_Get>
switch ( location ) {
10c703: 83 c4 10 add $0x10,%esp
10c706: 8b 55 f4 mov -0xc(%ebp),%edx
10c709: 85 d2 test %edx,%edx
10c70b: 75 4f jne 10c75c <pthread_rwlock_timedwrlock+0x8c>
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
10c70d: 83 fe 03 cmp $0x3,%esi
10c710: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10c713: 83 ec 0c sub $0xc,%esp
10c716: 6a 00 push $0x0
10c718: ff 75 f0 pushl -0x10(%ebp)
10c71b: 0f b6 ca movzbl %dl,%ecx
10c71e: 51 push %ecx
10c71f: ff 33 pushl (%ebx)
10c721: 83 c0 10 add $0x10,%eax
10c724: 50 push %eax
10c725: 88 55 e4 mov %dl,-0x1c(%ebp)
10c728: e8 6f 1d 00 00 call 10e49c <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10c72d: 83 c4 20 add $0x20,%esp
10c730: e8 f7 33 00 00 call 10fb2c <_Thread_Enable_dispatch>
if ( !do_wait &&
10c735: 8a 55 e4 mov -0x1c(%ebp),%dl
10c738: 84 d2 test %dl,%dl
10c73a: 75 40 jne 10c77c <pthread_rwlock_timedwrlock+0xac>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10c73c: a1 b8 b4 12 00 mov 0x12b4b8,%eax
10c741: 8b 40 34 mov 0x34(%eax),%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10c744: 83 f8 02 cmp $0x2,%eax
10c747: 74 1f je 10c768 <pthread_rwlock_timedwrlock+0x98>
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c749: 83 ec 0c sub $0xc,%esp
10c74c: 50 push %eax
10c74d: e8 36 00 00 00 call 10c788 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c752: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c755: 8d 65 f8 lea -0x8(%ebp),%esp
10c758: 5b pop %ebx
10c759: 5e pop %esi
10c75a: c9 leave
10c75b: c3 ret
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
10c75c: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c761: 8d 65 f8 lea -0x8(%ebp),%esp
10c764: 5b pop %ebx
10c765: 5e pop %esi
10c766: c9 leave
10c767: c3 ret
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10c768: 85 f6 test %esi,%esi
10c76a: 74 f0 je 10c75c <pthread_rwlock_timedwrlock+0x8c><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10c76c: 4e dec %esi
10c76d: 83 fe 01 cmp $0x1,%esi
10c770: 77 d7 ja 10c749 <pthread_rwlock_timedwrlock+0x79><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10c772: b8 74 00 00 00 mov $0x74,%eax
10c777: eb e8 jmp 10c761 <pthread_rwlock_timedwrlock+0x91>
10c779: 8d 76 00 lea 0x0(%esi),%esi
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10c77c: a1 b8 b4 12 00 mov 0x12b4b8,%eax
10c781: 8b 40 34 mov 0x34(%eax),%eax
10c784: eb c3 jmp 10c749 <pthread_rwlock_timedwrlock+0x79>
0010cee4 <pthread_rwlockattr_destroy>:
*/
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
10cee4: 55 push %ebp
10cee5: 89 e5 mov %esp,%ebp
10cee7: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10ceea: 85 c0 test %eax,%eax
10ceec: 74 12 je 10cf00 <pthread_rwlockattr_destroy+0x1c>
10ceee: 8b 10 mov (%eax),%edx
10cef0: 85 d2 test %edx,%edx
10cef2: 74 0c je 10cf00 <pthread_rwlockattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10cef4: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10cefa: 31 c0 xor %eax,%eax
}
10cefc: c9 leave
10cefd: c3 ret
10cefe: 66 90 xchg %ax,%ax
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
10cf00: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10cf05: c9 leave
10cf06: c3 ret
0010cf50 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10cf50: 55 push %ebp
10cf51: 89 e5 mov %esp,%ebp
10cf53: 8b 45 08 mov 0x8(%ebp),%eax
10cf56: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10cf59: 85 c0 test %eax,%eax
10cf5b: 74 0b je 10cf68 <pthread_rwlockattr_setpshared+0x18>
return EINVAL;
if ( !attr->is_initialized )
10cf5d: 8b 08 mov (%eax),%ecx
10cf5f: 85 c9 test %ecx,%ecx
10cf61: 74 05 je 10cf68 <pthread_rwlockattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10cf63: 83 fa 01 cmp $0x1,%edx
10cf66: 76 08 jbe 10cf70 <pthread_rwlockattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10cf68: b8 16 00 00 00 mov $0x16,%eax
}
}
10cf6d: c9 leave
10cf6e: c3 ret
10cf6f: 90 nop
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10cf70: 89 50 04 mov %edx,0x4(%eax)
return 0;
10cf73: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10cf75: c9 leave
10cf76: c3 ret
0010b214 <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
10b214: 55 push %ebp
10b215: 89 e5 mov %esp,%ebp
10b217: 53 push %ebx
10b218: 83 ec 04 sub $0x4,%esp
10b21b: 8b 55 08 mov 0x8(%ebp),%edx
10b21e: 8b 45 0c mov 0xc(%ebp),%eax
* 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() )
10b221: 8b 0d 54 8e 12 00 mov 0x128e54,%ecx
10b227: 85 c9 test %ecx,%ecx
10b229: 75 15 jne 10b240 <pthread_setcancelstate+0x2c>
return EPROTO;
if ( !oldstate )
10b22b: 85 c0 test %eax,%eax
10b22d: 74 05 je 10b234 <pthread_setcancelstate+0x20>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
10b22f: 83 fa 01 cmp $0x1,%edx
10b232: 76 18 jbe 10b24c <pthread_setcancelstate+0x38>
return EINVAL;
10b234: b8 16 00 00 00 mov $0x16,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b239: 8b 5d fc mov -0x4(%ebp),%ebx
10b23c: c9 leave
10b23d: c3 ret
10b23e: 66 90 xchg %ax,%ax
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
10b240: b8 47 00 00 00 mov $0x47,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b245: 8b 5d fc mov -0x4(%ebp),%ebx
10b248: c9 leave
10b249: c3 ret
10b24a: 66 90 xchg %ax,%ax
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b24c: 8b 0d 58 8e 12 00 mov 0x128e58,%ecx
10b252: 8b 89 ec 00 00 00 mov 0xec(%ecx),%ecx
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b258: 8b 1d 70 88 12 00 mov 0x128870,%ebx
10b25e: 43 inc %ebx
10b25f: 89 1d 70 88 12 00 mov %ebx,0x128870
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
10b265: 8b 99 d8 00 00 00 mov 0xd8(%ecx),%ebx
10b26b: 89 18 mov %ebx,(%eax)
thread_support->cancelability_state = state;
10b26d: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
10b273: 83 ec 0c sub $0xc,%esp
10b276: ff 35 58 8e 12 00 pushl 0x128e58
10b27c: e8 5b 54 00 00 call 1106dc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b281: 83 c4 10 add $0x10,%esp
10b284: 31 c0 xor %eax,%eax
}
10b286: 8b 5d fc mov -0x4(%ebp),%ebx
10b289: c9 leave
10b28a: c3 ret
0010b28c <pthread_setcanceltype>:
int pthread_setcanceltype(
int type,
int *oldtype
)
{
10b28c: 55 push %ebp
10b28d: 89 e5 mov %esp,%ebp
10b28f: 53 push %ebx
10b290: 83 ec 04 sub $0x4,%esp
10b293: 8b 55 08 mov 0x8(%ebp),%edx
10b296: 8b 45 0c mov 0xc(%ebp),%eax
* 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() )
10b299: 8b 0d 54 8e 12 00 mov 0x128e54,%ecx
10b29f: 85 c9 test %ecx,%ecx
10b2a1: 75 15 jne 10b2b8 <pthread_setcanceltype+0x2c>
return EPROTO;
if ( !oldtype )
10b2a3: 85 c0 test %eax,%eax
10b2a5: 74 05 je 10b2ac <pthread_setcanceltype+0x20>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
10b2a7: 83 fa 01 cmp $0x1,%edx
10b2aa: 76 18 jbe 10b2c4 <pthread_setcanceltype+0x38>
return EINVAL;
10b2ac: b8 16 00 00 00 mov $0x16,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b2b1: 8b 5d fc mov -0x4(%ebp),%ebx
10b2b4: c9 leave
10b2b5: c3 ret
10b2b6: 66 90 xchg %ax,%ax
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
10b2b8: b8 47 00 00 00 mov $0x47,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b2bd: 8b 5d fc mov -0x4(%ebp),%ebx
10b2c0: c9 leave
10b2c1: c3 ret
10b2c2: 66 90 xchg %ax,%ax
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b2c4: 8b 0d 58 8e 12 00 mov 0x128e58,%ecx
10b2ca: 8b 89 ec 00 00 00 mov 0xec(%ecx),%ecx
10b2d0: 8b 1d 70 88 12 00 mov 0x128870,%ebx
10b2d6: 43 inc %ebx
10b2d7: 89 1d 70 88 12 00 mov %ebx,0x128870
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
10b2dd: 8b 99 dc 00 00 00 mov 0xdc(%ecx),%ebx
10b2e3: 89 18 mov %ebx,(%eax)
thread_support->cancelability_type = type;
10b2e5: 89 91 dc 00 00 00 mov %edx,0xdc(%ecx)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
10b2eb: 83 ec 0c sub $0xc,%esp
10b2ee: ff 35 58 8e 12 00 pushl 0x128e58
10b2f4: e8 e3 53 00 00 call 1106dc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b2f9: 83 c4 10 add $0x10,%esp
10b2fc: 31 c0 xor %eax,%eax
}
10b2fe: 8b 5d fc mov -0x4(%ebp),%ebx
10b301: c9 leave
10b302: c3 ret
0010dd04 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10dd04: 55 push %ebp
10dd05: 89 e5 mov %esp,%ebp
10dd07: 57 push %edi
10dd08: 56 push %esi
10dd09: 53 push %ebx
10dd0a: 83 ec 2c sub $0x2c,%esp
10dd0d: 8b 75 10 mov 0x10(%ebp),%esi
int rc;
/*
* Check all the parameters
*/
if ( !param )
10dd10: 85 f6 test %esi,%esi
10dd12: 0f 84 cc 00 00 00 je 10dde4 <pthread_setschedparam+0xe0>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10dd18: 8d 45 e0 lea -0x20(%ebp),%eax
10dd1b: 50 push %eax
10dd1c: 8d 45 e4 lea -0x1c(%ebp),%eax
10dd1f: 50 push %eax
10dd20: 56 push %esi
10dd21: ff 75 0c pushl 0xc(%ebp)
10dd24: e8 f7 5b 00 00 call 113920 <_POSIX_Thread_Translate_sched_param>
10dd29: 89 c3 mov %eax,%ebx
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10dd2b: 83 c4 10 add $0x10,%esp
10dd2e: 85 c0 test %eax,%eax
10dd30: 74 0a je 10dd3c <pthread_setschedparam+0x38>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10dd32: 89 d8 mov %ebx,%eax
10dd34: 8d 65 f4 lea -0xc(%ebp),%esp
10dd37: 5b pop %ebx
10dd38: 5e pop %esi
10dd39: 5f pop %edi
10dd3a: c9 leave
10dd3b: c3 ret
10dd3c: 50 push %eax
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
10dd3d: 8d 45 dc lea -0x24(%ebp),%eax
10dd40: 50 push %eax
10dd41: ff 75 08 pushl 0x8(%ebp)
10dd44: 68 40 b8 12 00 push $0x12b840
10dd49: e8 aa 1f 00 00 call 10fcf8 <_Objects_Get>
10dd4e: 89 c2 mov %eax,%edx
switch ( location ) {
10dd50: 83 c4 10 add $0x10,%esp
10dd53: 8b 7d dc mov -0x24(%ebp),%edi
10dd56: 85 ff test %edi,%edi
10dd58: 0f 85 96 00 00 00 jne 10ddf4 <pthread_setschedparam+0xf0>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10dd5e: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
10dd64: 89 45 d4 mov %eax,-0x2c(%ebp)
if ( api->schedpolicy == SCHED_SPORADIC )
10dd67: 83 b8 84 00 00 00 04 cmpl $0x4,0x84(%eax)
10dd6e: 0f 84 cc 00 00 00 je 10de40 <pthread_setschedparam+0x13c>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
10dd74: 8b 45 0c mov 0xc(%ebp),%eax
10dd77: 8b 4d d4 mov -0x2c(%ebp),%ecx
10dd7a: 89 81 84 00 00 00 mov %eax,0x84(%ecx)
api->schedparam = *param;
10dd80: 89 cf mov %ecx,%edi
10dd82: 81 c7 88 00 00 00 add $0x88,%edi
10dd88: b9 07 00 00 00 mov $0x7,%ecx
10dd8d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10dd8f: 8b 45 e4 mov -0x1c(%ebp),%eax
10dd92: 89 42 7c mov %eax,0x7c(%edx)
the_thread->budget_callout = budget_callout;
10dd95: 8b 45 e0 mov -0x20(%ebp),%eax
10dd98: 89 82 80 00 00 00 mov %eax,0x80(%edx)
switch ( api->schedpolicy ) {
10dd9e: 8b 75 0c mov 0xc(%ebp),%esi
10dda1: 85 f6 test %esi,%esi
10dda3: 78 2e js 10ddd3 <pthread_setschedparam+0xcf><== NEVER TAKEN
10dda5: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10dda9: 7f 59 jg 10de04 <pthread_setschedparam+0x100>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10ddab: a1 40 b5 12 00 mov 0x12b540,%eax
10ddb0: 89 42 78 mov %eax,0x78(%edx)
10ddb3: 0f b6 05 5c 72 12 00 movzbl 0x12725c,%eax
10ddba: 8b 4d d4 mov -0x2c(%ebp),%ecx
10ddbd: 2b 81 88 00 00 00 sub 0x88(%ecx),%eax
the_thread->real_priority =
10ddc3: 89 42 18 mov %eax,0x18(%edx)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10ddc6: 51 push %ecx
10ddc7: 6a 01 push $0x1
10ddc9: 50 push %eax
10ddca: 52 push %edx
10ddcb: e8 28 25 00 00 call 1102f8 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
10ddd0: 83 c4 10 add $0x10,%esp
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
10ddd3: e8 d4 29 00 00 call 1107ac <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10ddd8: 89 d8 mov %ebx,%eax
10ddda: 8d 65 f4 lea -0xc(%ebp),%esp
10dddd: 5b pop %ebx
10ddde: 5e pop %esi
10dddf: 5f pop %edi
10dde0: c9 leave
10dde1: c3 ret
10dde2: 66 90 xchg %ax,%ax
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
10dde4: bb 16 00 00 00 mov $0x16,%ebx
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10dde9: 89 d8 mov %ebx,%eax
10ddeb: 8d 65 f4 lea -0xc(%ebp),%esp
10ddee: 5b pop %ebx
10ddef: 5e pop %esi
10ddf0: 5f pop %edi
10ddf1: c9 leave
10ddf2: c3 ret
10ddf3: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10ddf4: bb 03 00 00 00 mov $0x3,%ebx
}
10ddf9: 89 d8 mov %ebx,%eax
10ddfb: 8d 65 f4 lea -0xc(%ebp),%esp
10ddfe: 5b pop %ebx
10ddff: 5e pop %esi
10de00: 5f pop %edi
10de01: c9 leave
10de02: c3 ret
10de03: 90 nop
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
10de04: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10de08: 75 c9 jne 10ddd3 <pthread_setschedparam+0xcf><== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10de0a: 8b 4d d4 mov -0x2c(%ebp),%ecx
10de0d: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax
10de13: 89 81 a4 00 00 00 mov %eax,0xa4(%ecx)
_Watchdog_Remove( &api->Sporadic_timer );
10de19: 83 ec 0c sub $0xc,%esp
10de1c: 89 c8 mov %ecx,%eax
10de1e: 05 a8 00 00 00 add $0xa8,%eax
10de23: 50 push %eax
10de24: 89 55 d0 mov %edx,-0x30(%ebp)
10de27: e8 10 3a 00 00 call 11183c <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10de2c: 58 pop %eax
10de2d: 5a pop %edx
10de2e: 8b 55 d0 mov -0x30(%ebp),%edx
10de31: 52 push %edx
10de32: 6a 00 push $0x0
10de34: e8 af fd ff ff call 10dbe8 <_POSIX_Threads_Sporadic_budget_TSR>
break;
10de39: 83 c4 10 add $0x10,%esp
10de3c: eb 95 jmp 10ddd3 <pthread_setschedparam+0xcf>
10de3e: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
10de40: 83 ec 0c sub $0xc,%esp
10de43: 05 a8 00 00 00 add $0xa8,%eax
10de48: 50 push %eax
10de49: 89 55 d0 mov %edx,-0x30(%ebp)
10de4c: e8 eb 39 00 00 call 11183c <_Watchdog_Remove>
10de51: 83 c4 10 add $0x10,%esp
10de54: 8b 55 d0 mov -0x30(%ebp),%edx
10de57: e9 18 ff ff ff jmp 10dd74 <pthread_setschedparam+0x70>
00111ce4 <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
111ce4: 55 push %ebp
111ce5: 89 e5 mov %esp,%ebp
111ce7: 56 push %esi
111ce8: 53 push %ebx
111ce9: 8b 4d 08 mov 0x8(%ebp),%ecx
111cec: 8b 55 0c mov 0xc(%ebp),%edx
111cef: 8b 5d 10 mov 0x10(%ebp),%ebx
POSIX_API_Control *api;
if ( !set && !oset )
111cf2: 85 d2 test %edx,%edx
111cf4: 0f 84 8a 00 00 00 je 111d84 <pthread_sigmask+0xa0>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
111cfa: a1 58 9b 12 00 mov 0x129b58,%eax
111cff: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
if ( oset )
111d05: 85 db test %ebx,%ebx
111d07: 74 0c je 111d15 <pthread_sigmask+0x31>
*oset = api->signals_blocked;
111d09: 8b b0 d0 00 00 00 mov 0xd0(%eax),%esi
111d0f: 89 33 mov %esi,(%ebx)
if ( !set )
111d11: 85 d2 test %edx,%edx
111d13: 74 3b je 111d50 <pthread_sigmask+0x6c>
return 0;
switch ( how ) {
111d15: 83 f9 01 cmp $0x1,%ecx
111d18: 74 5e je 111d78 <pthread_sigmask+0x94>
111d1a: 83 f9 02 cmp $0x2,%ecx
111d1d: 74 39 je 111d58 <pthread_sigmask+0x74>
111d1f: 85 c9 test %ecx,%ecx
111d21: 75 41 jne 111d64 <pthread_sigmask+0x80>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
111d23: 8b 12 mov (%edx),%edx
111d25: 89 90 d0 00 00 00 mov %edx,0xd0(%eax)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
111d2b: 8b 15 c8 9d 12 00 mov 0x129dc8,%edx
111d31: 0b 90 d4 00 00 00 or 0xd4(%eax),%edx
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
111d37: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
111d3d: f7 d0 not %eax
111d3f: 85 c2 test %eax,%edx
111d41: 74 0d je 111d50 <pthread_sigmask+0x6c>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
111d43: e8 24 c9 ff ff call 10e66c <_Thread_Dispatch>
}
return 0;
111d48: 31 c0 xor %eax,%eax
}
111d4a: 5b pop %ebx
111d4b: 5e pop %esi
111d4c: c9 leave
111d4d: c3 ret
111d4e: 66 90 xchg %ax,%ax
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
111d50: 31 c0 xor %eax,%eax
}
111d52: 5b pop %ebx
111d53: 5e pop %esi
111d54: c9 leave
111d55: c3 ret
111d56: 66 90 xchg %ax,%ax
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
111d58: 8b 12 mov (%edx),%edx
111d5a: f7 d2 not %edx
111d5c: 21 90 d0 00 00 00 and %edx,0xd0(%eax)
break;
111d62: eb c7 jmp 111d2b <pthread_sigmask+0x47>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
111d64: e8 c7 25 00 00 call 114330 <__errno>
111d69: c7 00 16 00 00 00 movl $0x16,(%eax)
111d6f: b8 ff ff ff ff mov $0xffffffff,%eax
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
111d74: 5b pop %ebx
111d75: 5e pop %esi
111d76: c9 leave
111d77: c3 ret
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
111d78: 8b 12 mov (%edx),%edx
111d7a: 09 90 d0 00 00 00 or %edx,0xd0(%eax)
break;
111d80: eb a9 jmp 111d2b <pthread_sigmask+0x47>
111d82: 66 90 xchg %ax,%ax
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
111d84: 85 db test %ebx,%ebx
111d86: 74 dc je 111d64 <pthread_sigmask+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
111d88: a1 58 9b 12 00 mov 0x129b58,%eax
111d8d: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
111d93: e9 71 ff ff ff jmp 111d09 <pthread_sigmask+0x25>
0010bb84 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
10bb84: 55 push %ebp
10bb85: 89 e5 mov %esp,%ebp
10bb87: 83 ec 08 sub $0x8,%esp
* 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() )
10bb8a: 8b 0d d4 95 12 00 mov 0x1295d4,%ecx
10bb90: 85 c9 test %ecx,%ecx
10bb92: 75 44 jne 10bbd8 <pthread_testcancel+0x54><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10bb94: a1 d8 95 12 00 mov 0x1295d8,%eax
10bb99: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
10bb9f: 8b 15 f0 8f 12 00 mov 0x128ff0,%edx
10bba5: 42 inc %edx
10bba6: 89 15 f0 8f 12 00 mov %edx,0x128ff0
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10bbac: 8b 90 d8 00 00 00 mov 0xd8(%eax),%edx
10bbb2: 85 d2 test %edx,%edx
10bbb4: 75 26 jne 10bbdc <pthread_testcancel+0x58><== NEVER TAKEN
10bbb6: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
10bbbc: 85 c0 test %eax,%eax
10bbbe: 74 1c je 10bbdc <pthread_testcancel+0x58>
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10bbc0: e8 cb 28 00 00 call 10e490 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10bbc5: 83 ec 08 sub $0x8,%esp
10bbc8: 6a ff push $0xffffffff
10bbca: ff 35 d8 95 12 00 pushl 0x1295d8
10bbd0: e8 53 5b 00 00 call 111728 <_POSIX_Thread_Exit>
10bbd5: 83 c4 10 add $0x10,%esp
}
10bbd8: c9 leave
10bbd9: c3 ret
10bbda: 66 90 xchg %ax,%ax
10bbdc: c9 leave
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10bbdd: e9 ae 28 00 00 jmp 10e490 <_Thread_Enable_dispatch>
0011ea08 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
11ea08: 55 push %ebp
11ea09: 89 e5 mov %esp,%ebp
11ea0b: 53 push %ebx
11ea0c: 83 ec 04 sub $0x4,%esp
11ea0f: 8b 4d 08 mov 0x8(%ebp),%ecx
11ea12: 8b 45 0c mov 0xc(%ebp),%eax
11ea15: 8b 55 10 mov 0x10(%ebp),%edx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11ea18: 3b 0d ac 31 12 00 cmp 0x1231ac,%ecx
11ea1e: 73 50 jae 11ea70 <read+0x68> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11ea20: c1 e1 03 shl $0x3,%ecx
11ea23: 8d 1c cd 00 00 00 00 lea 0x0(,%ecx,8),%ebx
11ea2a: 29 cb sub %ecx,%ebx
11ea2c: 03 1d e0 73 12 00 add 0x1273e0,%ebx
rtems_libio_check_is_open( iop );
11ea32: 8b 4b 14 mov 0x14(%ebx),%ecx
11ea35: f6 c5 01 test $0x1,%ch
11ea38: 74 36 je 11ea70 <read+0x68>
rtems_libio_check_buffer( buffer );
11ea3a: 85 c0 test %eax,%eax
11ea3c: 74 46 je 11ea84 <read+0x7c> <== NEVER TAKEN
rtems_libio_check_count( count );
11ea3e: 85 d2 test %edx,%edx
11ea40: 74 26 je 11ea68 <read+0x60>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
11ea42: 83 e1 02 and $0x2,%ecx
11ea45: 74 3d je 11ea84 <read+0x7c>
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
11ea47: 51 push %ecx
11ea48: 8b 4b 20 mov 0x20(%ebx),%ecx
11ea4b: 52 push %edx
11ea4c: 50 push %eax
11ea4d: 53 push %ebx
11ea4e: ff 51 08 call *0x8(%ecx)
if ( rc > 0 )
11ea51: 83 c4 10 add $0x10,%esp
11ea54: 85 c0 test %eax,%eax
11ea56: 7e 0b jle 11ea63 <read+0x5b>
iop->offset += rc;
11ea58: 89 c1 mov %eax,%ecx
11ea5a: c1 f9 1f sar $0x1f,%ecx
11ea5d: 01 43 0c add %eax,0xc(%ebx)
11ea60: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11ea63: 8b 5d fc mov -0x4(%ebp),%ebx
11ea66: c9 leave
11ea67: c3 ret
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 );
11ea68: 31 c0 xor %eax,%eax
if ( rc > 0 )
iop->offset += rc;
return rc;
}
11ea6a: 8b 5d fc mov -0x4(%ebp),%ebx
11ea6d: c9 leave
11ea6e: c3 ret
11ea6f: 90 nop
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
11ea70: e8 bf 48 ff ff call 113334 <__errno>
11ea75: c7 00 09 00 00 00 movl $0x9,(%eax)
11ea7b: b8 ff ff ff ff mov $0xffffffff,%eax
11ea80: eb e1 jmp 11ea63 <read+0x5b>
11ea82: 66 90 xchg %ax,%ax
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
11ea84: e8 ab 48 ff ff call 113334 <__errno>
11ea89: c7 00 16 00 00 00 movl $0x16,(%eax)
11ea8f: b8 ff ff ff ff mov $0xffffffff,%eax
11ea94: eb cd jmp 11ea63 <read+0x5b>
0010b058 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
10b058: 55 push %ebp
10b059: 89 e5 mov %esp,%ebp
10b05b: 57 push %edi
10b05c: 56 push %esi
10b05d: 53 push %ebx
10b05e: 83 ec 3c sub $0x3c,%esp
10b061: 8b 55 08 mov 0x8(%ebp),%edx
10b064: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
10b067: 85 db test %ebx,%ebx
10b069: 74 6d je 10b0d8 <readlink+0x80>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
10b06b: 31 c0 xor %eax,%eax
10b06d: b9 ff ff ff ff mov $0xffffffff,%ecx
10b072: 89 d7 mov %edx,%edi
10b074: f2 ae repnz scas %es:(%edi),%al
10b076: f7 d1 not %ecx
10b078: 49 dec %ecx
10b079: 83 ec 0c sub $0xc,%esp
10b07c: 6a 00 push $0x0
10b07e: 8d 75 d4 lea -0x2c(%ebp),%esi
10b081: 56 push %esi
10b082: 6a 00 push $0x0
10b084: 51 push %ecx
10b085: 52 push %edx
10b086: e8 79 ee ff ff call 109f04 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
10b08b: 83 c4 20 add $0x20,%esp
10b08e: 85 c0 test %eax,%eax
10b090: 74 0e je 10b0a0 <readlink+0x48> <== ALWAYS TAKEN
return -1;
10b092: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
10b097: 8d 65 f4 lea -0xc(%ebp),%esp
10b09a: 5b pop %ebx
10b09b: 5e pop %esi
10b09c: 5f pop %edi
10b09d: c9 leave
10b09e: c3 ret
10b09f: 90 nop
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
10b0a0: 83 ec 0c sub $0xc,%esp
10b0a3: 56 push %esi
10b0a4: 8b 45 e0 mov -0x20(%ebp),%eax
10b0a7: ff 50 10 call *0x10(%eax)
10b0aa: 83 c4 10 add $0x10,%esp
10b0ad: 83 f8 04 cmp $0x4,%eax
10b0b0: 75 3e jne 10b0f0 <readlink+0x98>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
10b0b2: 50 push %eax
10b0b3: ff 75 10 pushl 0x10(%ebp)
10b0b6: 53 push %ebx
10b0b7: 56 push %esi
10b0b8: 8b 45 e0 mov -0x20(%ebp),%eax
10b0bb: ff 50 3c call *0x3c(%eax)
rtems_filesystem_freenode( &loc );
10b0be: 89 34 24 mov %esi,(%esp)
10b0c1: 89 45 c4 mov %eax,-0x3c(%ebp)
10b0c4: e8 13 ef ff ff call 109fdc <rtems_filesystem_freenode>
return result;
10b0c9: 83 c4 10 add $0x10,%esp
10b0cc: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10b0cf: 8d 65 f4 lea -0xc(%ebp),%esp
10b0d2: 5b pop %ebx
10b0d3: 5e pop %esi
10b0d4: 5f pop %edi
10b0d5: c9 leave
10b0d6: c3 ret
10b0d7: 90 nop
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
10b0d8: e8 73 ad 00 00 call 115e50 <__errno>
10b0dd: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b0e3: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
10b0e8: 8d 65 f4 lea -0xc(%ebp),%esp
10b0eb: 5b pop %ebx
10b0ec: 5e pop %esi
10b0ed: 5f pop %edi
10b0ee: c9 leave
10b0ef: c3 ret
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
10b0f0: 83 ec 0c sub $0xc,%esp
10b0f3: 56 push %esi
10b0f4: e8 e3 ee ff ff call 109fdc <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
10b0f9: e8 52 ad 00 00 call 115e50 <__errno>
10b0fe: c7 00 16 00 00 00 movl $0x16,(%eax)
10b104: 83 c4 10 add $0x10,%esp
10b107: b8 ff ff ff ff mov $0xffffffff,%eax
10b10c: eb 89 jmp 10b097 <readlink+0x3f>
00109d1c <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
109d1c: 55 push %ebp
109d1d: 89 e5 mov %esp,%ebp
109d1f: 57 push %edi
109d20: 56 push %esi
109d21: 53 push %ebx
109d22: 83 ec 1c sub $0x1c,%esp
109d25: 8b 45 08 mov 0x8(%ebp),%eax
109d28: 8b 5d 0c mov 0xc(%ebp),%ebx
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
109d2b: 3b 05 cc 47 12 00 cmp 0x1247cc,%eax
109d31: 0f 83 ef 00 00 00 jae 109e26 <readv+0x10a>
iop = rtems_libio_iop( fd );
109d37: c1 e0 03 shl $0x3,%eax
109d3a: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi
109d41: 29 c6 sub %eax,%esi
109d43: 03 35 00 8a 12 00 add 0x128a00,%esi
rtems_libio_check_is_open( iop );
109d49: 8b 46 14 mov 0x14(%esi),%eax
109d4c: f6 c4 01 test $0x1,%ah
109d4f: 0f 84 d1 00 00 00 je 109e26 <readv+0x10a>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
109d55: a8 02 test $0x2,%al
109d57: 0f 84 97 00 00 00 je 109df4 <readv+0xd8> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
109d5d: 85 db test %ebx,%ebx
109d5f: 0f 84 8f 00 00 00 je 109df4 <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
109d65: 8b 7d 10 mov 0x10(%ebp),%edi
109d68: 85 ff test %edi,%edi
109d6a: 0f 8e 84 00 00 00 jle 109df4 <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
109d70: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp)
109d77: 7f 7b jg 109df4 <readv+0xd8> <== NEVER TAKEN
109d79: c6 45 e4 01 movb $0x1,-0x1c(%ebp)
109d7d: 31 c0 xor %eax,%eax
109d7f: 31 d2 xor %edx,%edx
109d81: eb 03 jmp 109d86 <readv+0x6a>
109d83: 90 nop
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
109d84: 89 fa mov %edi,%edx
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
109d86: 8b 0c c3 mov (%ebx,%eax,8),%ecx
109d89: 85 c9 test %ecx,%ecx
109d8b: 74 67 je 109df4 <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
109d8d: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx
109d91: 8d 3c 0a lea (%edx,%ecx,1),%edi
if ( total < old )
109d94: 39 fa cmp %edi,%edx
109d96: 7f 5c jg 109df4 <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
109d98: 85 c9 test %ecx,%ecx
109d9a: 74 04 je 109da0 <readv+0x84>
all_zeros = false;
109d9c: c6 45 e4 00 movb $0x0,-0x1c(%ebp)
* 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++ ) {
109da0: 40 inc %eax
109da1: 39 45 10 cmp %eax,0x10(%ebp)
109da4: 7f de jg 109d84 <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 ) {
109da6: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp)
109daa: 75 68 jne 109e14 <readv+0xf8>
109dac: 31 ff xor %edi,%edi
109dae: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
109db5: eb 1d jmp 109dd4 <readv+0xb8>
109db7: 90 nop
);
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
109db8: 74 0e je 109dc8 <readv+0xac> <== NEVER TAKEN
iop->offset += bytes;
109dba: 89 c1 mov %eax,%ecx
109dbc: c1 f9 1f sar $0x1f,%ecx
109dbf: 01 46 0c add %eax,0xc(%esi)
109dc2: 11 4e 10 adc %ecx,0x10(%esi)
total += bytes;
109dc5: 01 45 e4 add %eax,-0x1c(%ebp)
}
if (bytes != iov[ v ].iov_len)
109dc8: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax
109dcc: 75 38 jne 109e06 <readv+0xea> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
109dce: 47 inc %edi
109dcf: 39 7d 10 cmp %edi,0x10(%ebp)
109dd2: 7e 32 jle 109e06 <readv+0xea>
bytes = (*iop->pathinfo.handlers->read_h)(
109dd4: 50 push %eax
109dd5: 8b 46 20 mov 0x20(%esi),%eax
109dd8: ff 74 fb 04 pushl 0x4(%ebx,%edi,8)
109ddc: ff 34 fb pushl (%ebx,%edi,8)
109ddf: 56 push %esi
109de0: ff 50 08 call *0x8(%eax)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
109de3: 83 c4 10 add $0x10,%esp
109de6: 83 f8 00 cmp $0x0,%eax
109de9: 7d cd jge 109db8 <readv+0x9c> <== ALWAYS TAKEN
return -1;
109deb: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED
109df2: eb 12 jmp 109e06 <readv+0xea> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
109df4: e8 bb a2 00 00 call 1140b4 <__errno>
109df9: c7 00 16 00 00 00 movl $0x16,(%eax)
109dff: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
109e06: 8b 45 e4 mov -0x1c(%ebp),%eax
109e09: 8d 65 f4 lea -0xc(%ebp),%esp
109e0c: 5b pop %ebx
109e0d: 5e pop %esi
109e0e: 5f pop %edi
109e0f: c9 leave
109e10: c3 ret
109e11: 8d 76 00 lea 0x0(%esi),%esi
* 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 ) {
return 0;
109e14: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
109e1b: 8b 45 e4 mov -0x1c(%ebp),%eax
109e1e: 8d 65 f4 lea -0xc(%ebp),%esp
109e21: 5b pop %ebx
109e22: 5e pop %esi
109e23: 5f pop %edi
109e24: c9 leave
109e25: c3 ret
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
109e26: e8 89 a2 00 00 call 1140b4 <__errno>
109e2b: c7 00 09 00 00 00 movl $0x9,(%eax)
109e31: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
109e38: eb cc jmp 109e06 <readv+0xea>
0011eb24 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
11eb24: 55 push %ebp
11eb25: 89 e5 mov %esp,%ebp
11eb27: 57 push %edi
11eb28: 56 push %esi
11eb29: 53 push %ebx
11eb2a: 83 ec 2c sub $0x2c,%esp
11eb2d: 8b 5d 08 mov 0x8(%ebp),%ebx
11eb30: 8b 75 0c mov 0xc(%ebp),%esi
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
11eb33: ff 05 10 74 12 00 incl 0x127410
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
11eb39: 83 3d 20 77 12 00 03 cmpl $0x3,0x127720
11eb40: 74 72 je 11ebb4 <realloc+0x90> <== ALWAYS TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
11eb42: 85 db test %ebx,%ebx
11eb44: 74 5e je 11eba4 <realloc+0x80>
return malloc( size );
if ( !size ) {
11eb46: 85 f6 test %esi,%esi
11eb48: 74 3a je 11eb84 <realloc+0x60> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
11eb4a: 52 push %edx
11eb4b: 8d 45 e4 lea -0x1c(%ebp),%eax
11eb4e: 50 push %eax
11eb4f: 53 push %ebx
11eb50: ff 35 b8 31 12 00 pushl 0x1231b8
11eb56: e8 49 01 00 00 call 11eca4 <_Protected_heap_Get_block_size>
11eb5b: 83 c4 10 add $0x10,%esp
11eb5e: 84 c0 test %al,%al
11eb60: 74 32 je 11eb94 <realloc+0x70>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
11eb62: 50 push %eax
11eb63: 56 push %esi
11eb64: 53 push %ebx
11eb65: ff 35 b8 31 12 00 pushl 0x1231b8
11eb6b: e8 6c 01 00 00 call 11ecdc <_Protected_heap_Resize_block>
11eb70: 83 c4 10 add $0x10,%esp
11eb73: 84 c0 test %al,%al
11eb75: 74 5d je 11ebd4 <realloc+0xb0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
11eb77: 89 d8 mov %ebx,%eax
11eb79: 8d 65 f4 lea -0xc(%ebp),%esp
11eb7c: 5b pop %ebx
11eb7d: 5e pop %esi
11eb7e: 5f pop %edi
11eb7f: c9 leave
11eb80: c3 ret
11eb81: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
11eb84: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11eb87: 53 push %ebx <== NOT EXECUTED
11eb88: e8 27 95 fe ff call 1080b4 <free> <== NOT EXECUTED
return (void *) 0;
11eb8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11eb90: 31 db xor %ebx,%ebx <== NOT EXECUTED
11eb92: eb e3 jmp 11eb77 <realloc+0x53> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
11eb94: e8 9b 47 ff ff call 113334 <__errno>
11eb99: c7 00 16 00 00 00 movl $0x16,(%eax)
return (void *) 0;
11eb9f: 31 db xor %ebx,%ebx
11eba1: eb d4 jmp 11eb77 <realloc+0x53>
11eba3: 90 nop
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
11eba4: 83 ec 0c sub $0xc,%esp
11eba7: 56 push %esi
11eba8: e8 db 97 fe ff call 108388 <malloc>
11ebad: 89 c3 mov %eax,%ebx
11ebaf: 83 c4 10 add $0x10,%esp
11ebb2: eb c3 jmp 11eb77 <realloc+0x53>
/*
* 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)
11ebb4: a1 50 75 12 00 mov 0x127550,%eax
11ebb9: 85 c0 test %eax,%eax
11ebbb: 74 04 je 11ebc1 <realloc+0x9d> <== ALWAYS TAKEN
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
11ebbd: 31 db xor %ebx,%ebx
11ebbf: eb b6 jmp 11eb77 <realloc+0x53>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
11ebc1: 8b 0d 34 7b 12 00 mov 0x127b34,%ecx
11ebc7: 85 c9 test %ecx,%ecx
11ebc9: 0f 84 73 ff ff ff je 11eb42 <realloc+0x1e> <== ALWAYS TAKEN
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
11ebcf: 31 db xor %ebx,%ebx
11ebd1: eb a4 jmp 11eb77 <realloc+0x53> <== NOT EXECUTED
11ebd3: 90 nop <== NOT EXECUTED
* 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 );
11ebd4: 83 ec 0c sub $0xc,%esp
11ebd7: 56 push %esi
11ebd8: e8 ab 97 fe ff call 108388 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
11ebdd: ff 0d 04 74 12 00 decl 0x127404
if ( !new_area ) {
11ebe3: 83 c4 10 add $0x10,%esp
11ebe6: 85 c0 test %eax,%eax
11ebe8: 74 d3 je 11ebbd <realloc+0x99>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
11ebea: 8b 55 e4 mov -0x1c(%ebp),%edx
11ebed: 89 f1 mov %esi,%ecx
11ebef: 39 d6 cmp %edx,%esi
11ebf1: 76 02 jbe 11ebf5 <realloc+0xd1> <== NEVER TAKEN
11ebf3: 89 d1 mov %edx,%ecx
11ebf5: 89 c7 mov %eax,%edi
11ebf7: 89 de mov %ebx,%esi
11ebf9: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
11ebfb: 83 ec 0c sub $0xc,%esp
11ebfe: 53 push %ebx
11ebff: 89 45 d4 mov %eax,-0x2c(%ebp)
11ec02: e8 ad 94 fe ff call 1080b4 <free>
return new_area;
11ec07: 83 c4 10 add $0x10,%esp
11ec0a: 8b 45 d4 mov -0x2c(%ebp),%eax
11ec0d: 89 c3 mov %eax,%ebx
11ec0f: e9 63 ff ff ff jmp 11eb77 <realloc+0x53>
00109300 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
109300: 55 push %ebp
109301: 89 e5 mov %esp,%ebp
109303: 57 push %edi
109304: 56 push %esi
109305: 53 push %ebx
109306: 83 ec 58 sub $0x58,%esp
109309: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
10930c: 53 push %ebx
10930d: e8 46 f1 ff ff call 108458 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
109312: 83 c4 10 add $0x10,%esp
109315: 85 c0 test %eax,%eax
109317: 0f 85 0f 01 00 00 jne 10942c <rmdir+0x12c>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
10931d: 50 push %eax
10931e: 8d 45 d0 lea -0x30(%ebp),%eax
109321: 89 45 b4 mov %eax,-0x4c(%ebp)
109324: 50 push %eax
109325: 8d 45 e4 lea -0x1c(%ebp),%eax
109328: 50 push %eax
109329: 53 push %ebx
10932a: e8 45 01 00 00 call 109474 <rtems_filesystem_get_start_loc>
10932f: 83 c4 10 add $0x10,%esp
109332: 31 d2 xor %edx,%edx
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
109334: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
109338: 8d 7d bc lea -0x44(%ebp),%edi
10933b: b9 05 00 00 00 mov $0x5,%ecx
109340: 8b 75 b4 mov -0x4c(%ebp),%esi
109343: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = pathname + parentpathlen;
109345: 01 d3 add %edx,%ebx
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
109347: be ff ff ff ff mov $0xffffffff,%esi
10934c: 89 f1 mov %esi,%ecx
10934e: 89 df mov %ebx,%edi
109350: 31 c0 xor %eax,%eax
109352: f2 ae repnz scas %es:(%edi),%al
109354: f7 d1 not %ecx
109356: 49 dec %ecx
109357: 83 ec 08 sub $0x8,%esp
10935a: 51 push %ecx
10935b: 53 push %ebx
10935c: e8 3b f1 ff ff call 10849c <rtems_filesystem_prefix_separators>
109361: 01 c3 add %eax,%ebx
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
109363: 89 f1 mov %esi,%ecx
109365: 89 df mov %ebx,%edi
109367: 31 c0 xor %eax,%eax
109369: f2 ae repnz scas %es:(%edi),%al
10936b: f7 d1 not %ecx
10936d: 49 dec %ecx
10936e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
109375: 8d 75 bc lea -0x44(%ebp),%esi
109378: 56 push %esi
109379: 6a 00 push $0x0
10937b: 51 push %ecx
10937c: 53 push %ebx
10937d: e8 2a f0 ff ff call 1083ac <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
109382: 83 c4 20 add $0x20,%esp
109385: 85 c0 test %eax,%eax
109387: 75 5b jne 1093e4 <rmdir+0xe4>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
109389: 83 ec 0c sub $0xc,%esp
10938c: 56 push %esi
10938d: 8b 45 c8 mov -0x38(%ebp),%eax
109390: ff 50 10 call *0x10(%eax)
109393: 83 c4 10 add $0x10,%esp
109396: 48 dec %eax
109397: 75 5f jne 1093f8 <rmdir+0xf8>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
109399: 83 ec 08 sub $0x8,%esp
10939c: 56 push %esi
10939d: ff 75 b4 pushl -0x4c(%ebp)
1093a0: 8b 45 c4 mov -0x3c(%ebp),%eax
1093a3: ff 50 34 call *0x34(%eax)
rtems_filesystem_freenode( &loc );
1093a6: 89 34 24 mov %esi,(%esp)
1093a9: 89 45 ac mov %eax,-0x54(%ebp)
1093ac: e8 3b f1 ff ff call 1084ec <rtems_filesystem_freenode>
if ( free_parentloc )
1093b1: 83 c4 10 add $0x10,%esp
1093b4: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
1093b8: 8b 45 ac mov -0x54(%ebp),%eax
1093bb: 75 0b jne 1093c8 <rmdir+0xc8>
rtems_filesystem_freenode( &parentloc );
return result;
}
1093bd: 8d 65 f4 lea -0xc(%ebp),%esp
1093c0: 5b pop %ebx
1093c1: 5e pop %esi
1093c2: 5f pop %edi
1093c3: c9 leave
1093c4: c3 ret
1093c5: 8d 76 00 lea 0x0(%esi),%esi
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
1093c8: 83 ec 0c sub $0xc,%esp
1093cb: ff 75 b4 pushl -0x4c(%ebp)
1093ce: e8 19 f1 ff ff call 1084ec <rtems_filesystem_freenode>
1093d3: 83 c4 10 add $0x10,%esp
1093d6: 8b 45 ac mov -0x54(%ebp),%eax
return result;
}
1093d9: 8d 65 f4 lea -0xc(%ebp),%esp
1093dc: 5b pop %ebx
1093dd: 5e pop %esi
1093de: 5f pop %edi
1093df: c9 leave
1093e0: c3 ret
1093e1: 8d 76 00 lea 0x0(%esi),%esi
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 )
1093e4: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
1093e8: 75 6f jne 109459 <rmdir+0x159>
rtems_filesystem_freenode( &parentloc );
return -1;
1093ea: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
1093ef: 8d 65 f4 lea -0xc(%ebp),%esp
1093f2: 5b pop %ebx
1093f3: 5e pop %esi
1093f4: 5f pop %edi
1093f5: c9 leave
1093f6: c3 ret
1093f7: 90 nop
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
1093f8: 83 ec 0c sub $0xc,%esp
1093fb: 56 push %esi
1093fc: e8 eb f0 ff ff call 1084ec <rtems_filesystem_freenode>
if ( free_parentloc )
109401: 83 c4 10 add $0x10,%esp
109404: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
109408: 74 0e je 109418 <rmdir+0x118> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
10940a: 83 ec 0c sub $0xc,%esp
10940d: ff 75 b4 pushl -0x4c(%ebp)
109410: e8 d7 f0 ff ff call 1084ec <rtems_filesystem_freenode>
109415: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
109418: e8 a3 a7 00 00 call 113bc0 <__errno>
10941d: c7 00 14 00 00 00 movl $0x14,(%eax)
109423: b8 ff ff ff ff mov $0xffffffff,%eax
109428: eb 93 jmp 1093bd <rmdir+0xbd>
10942a: 66 90 xchg %ax,%ax
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
10942c: 89 c2 mov %eax,%edx
10942e: 83 ec 0c sub $0xc,%esp
109431: 6a 00 push $0x0
109433: 8d 45 d0 lea -0x30(%ebp),%eax
109436: 89 45 b4 mov %eax,-0x4c(%ebp)
109439: 50 push %eax
10943a: 6a 02 push $0x2
10943c: 52 push %edx
10943d: 53 push %ebx
10943e: 89 55 ac mov %edx,-0x54(%ebp)
109441: e8 ce ef ff ff call 108414 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
109446: 83 c4 20 add $0x20,%esp
109449: 85 c0 test %eax,%eax
10944b: 8b 55 ac mov -0x54(%ebp),%edx
10944e: 75 9a jne 1093ea <rmdir+0xea> <== NEVER TAKEN
return -1;
free_parentloc = true;
109450: c6 45 b3 01 movb $0x1,-0x4d(%ebp)
109454: e9 df fe ff ff jmp 109338 <rmdir+0x38>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
109459: 83 ec 0c sub $0xc,%esp
10945c: ff 75 b4 pushl -0x4c(%ebp)
10945f: e8 88 f0 ff ff call 1084ec <rtems_filesystem_freenode>
109464: 83 c4 10 add $0x10,%esp
return -1;
109467: b8 ff ff ff ff mov $0xffffffff,%eax
10946c: e9 4c ff ff ff jmp 1093bd <rmdir+0xbd>
0010c4f0 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
10c4f0: 55 push %ebp
10c4f1: 89 e5 mov %esp,%ebp
10c4f3: 57 push %edi
10c4f4: 56 push %esi
10c4f5: 53 push %ebx
10c4f6: 83 ec 58 sub $0x58,%esp
10c4f9: 8b 5d 08 mov 0x8(%ebp),%ebx
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
10c4fc: 68 60 a1 12 00 push $0x12a160
10c501: e8 7e 09 00 00 call 10ce84 <pthread_mutex_lock>
10c506: 89 c6 mov %eax,%esi
if (result != 0) {
10c508: 83 c4 10 add $0x10,%esp
10c50b: 85 c0 test %eax,%eax
10c50d: 0f 85 c1 00 00 00 jne 10c5d4 <rtems_aio_enqueue+0xe4><== NEVER TAKEN
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10c513: e8 1c 12 00 00 call 10d734 <pthread_self>
10c518: 51 push %ecx
10c519: 8d 55 c4 lea -0x3c(%ebp),%edx
10c51c: 52 push %edx
10c51d: 8d 55 e0 lea -0x20(%ebp),%edx
10c520: 52 push %edx
10c521: 50 push %eax
10c522: e8 d9 0d 00 00 call 10d300 <pthread_getschedparam>
req->caller_thread = pthread_self ();
10c527: e8 08 12 00 00 call 10d734 <pthread_self>
10c52c: 89 43 10 mov %eax,0x10(%ebx)
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
10c52f: 8b 43 14 mov 0x14(%ebx),%eax
10c532: 8b 55 c4 mov -0x3c(%ebp),%edx
10c535: 2b 50 14 sub 0x14(%eax),%edx
10c538: 89 53 0c mov %edx,0xc(%ebx)
req->policy = policy;
10c53b: 8b 55 e0 mov -0x20(%ebp),%edx
10c53e: 89 53 08 mov %edx,0x8(%ebx)
req->aiocbp->error_code = EINPROGRESS;
10c541: c7 40 30 77 00 00 00 movl $0x77,0x30(%eax)
req->aiocbp->return_value = 0;
10c548: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
if ((aio_request_queue.idle_threads == 0) &&
10c54f: 83 c4 10 add $0x10,%esp
10c552: 8b 15 c8 a1 12 00 mov 0x12a1c8,%edx
10c558: 85 d2 test %edx,%edx
10c55a: 75 0d jne 10c569 <rtems_aio_enqueue+0x79>
10c55c: 83 3d c4 a1 12 00 04 cmpl $0x4,0x12a1c4
10c563: 0f 8e 83 00 00 00 jle 10c5ec <rtems_aio_enqueue+0xfc>
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
10c569: 51 push %ecx
10c56a: 6a 00 push $0x0
10c56c: ff 30 pushl (%eax)
10c56e: 68 a8 a1 12 00 push $0x12a1a8
10c573: e8 6c fb ff ff call 10c0e4 <rtems_aio_search_fd>
10c578: 89 c7 mov %eax,%edi
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
10c57a: 83 c4 10 add $0x10,%esp
10c57d: 85 c0 test %eax,%eax
10c57f: 0f 84 df 00 00 00 je 10c664 <rtems_aio_enqueue+0x174><== ALWAYS TAKEN
{
pthread_mutex_lock (&r_chain->mutex);
10c585: 8d 57 1c lea 0x1c(%edi),%edx
10c588: 83 ec 0c sub $0xc,%esp
10c58b: 52 push %edx
10c58c: 89 55 b4 mov %edx,-0x4c(%ebp)
10c58f: e8 f0 08 00 00 call 10ce84 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
10c594: 58 pop %eax
10c595: 5a pop %edx
10c596: 53 push %ebx
10c597: 8d 47 08 lea 0x8(%edi),%eax
10c59a: 50 push %eax
10c59b: e8 70 fe ff ff call 10c410 <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
10c5a0: 83 c7 20 add $0x20,%edi
10c5a3: 89 3c 24 mov %edi,(%esp)
10c5a6: e8 a9 04 00 00 call 10ca54 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
10c5ab: 8b 55 b4 mov -0x4c(%ebp),%edx
10c5ae: 89 14 24 mov %edx,(%esp)
10c5b1: e8 56 09 00 00 call 10cf0c <pthread_mutex_unlock>
10c5b6: 83 c4 10 add $0x10,%esp
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
10c5b9: 83 ec 0c sub $0xc,%esp
10c5bc: 68 60 a1 12 00 push $0x12a160
10c5c1: e8 46 09 00 00 call 10cf0c <pthread_mutex_unlock>
return 0;
10c5c6: 83 c4 10 add $0x10,%esp
}
10c5c9: 89 f0 mov %esi,%eax
10c5cb: 8d 65 f4 lea -0xc(%ebp),%esp
10c5ce: 5b pop %ebx
10c5cf: 5e pop %esi
10c5d0: 5f pop %edi
10c5d1: c9 leave
10c5d2: c3 ret
10c5d3: 90 nop
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
if (result != 0) {
free (req);
10c5d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c5d7: 53 push %ebx <== NOT EXECUTED
10c5d8: e8 47 c5 ff ff call 108b24 <free> <== NOT EXECUTED
return result;
10c5dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
return 0;
}
10c5e0: 89 f0 mov %esi,%eax <== NOT EXECUTED
10c5e2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c5e5: 5b pop %ebx <== NOT EXECUTED
10c5e6: 5e pop %esi <== NOT EXECUTED
10c5e7: 5f pop %edi <== NOT EXECUTED
10c5e8: c9 leave <== NOT EXECUTED
10c5e9: c3 ret <== NOT EXECUTED
10c5ea: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10c5ec: 57 push %edi
10c5ed: 6a 01 push $0x1
10c5ef: ff 30 pushl (%eax)
10c5f1: 68 a8 a1 12 00 push $0x12a1a8
10c5f6: e8 e9 fa ff ff call 10c0e4 <rtems_aio_search_fd>
10c5fb: 89 c7 mov %eax,%edi
if (r_chain->new_fd == 1) {
10c5fd: 83 c4 10 add $0x10,%esp
10c600: 83 78 18 01 cmpl $0x1,0x18(%eax)
10c604: 0f 85 7b ff ff ff jne 10c585 <rtems_aio_enqueue+0x95>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10c60a: 83 ec 08 sub $0x8,%esp
10c60d: 53 push %ebx
10c60e: 8d 40 08 lea 0x8(%eax),%eax
10c611: 50 push %eax
10c612: e8 7d 22 00 00 call 10e894 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10c617: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
pthread_mutex_init (&r_chain->mutex, NULL);
10c61e: 5a pop %edx
10c61f: 59 pop %ecx
10c620: 6a 00 push $0x0
10c622: 8d 47 1c lea 0x1c(%edi),%eax
10c625: 50 push %eax
10c626: e8 0d 07 00 00 call 10cd38 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10c62b: 5b pop %ebx
10c62c: 58 pop %eax
10c62d: 6a 00 push $0x0
10c62f: 8d 47 20 lea 0x20(%edi),%eax
10c632: 50 push %eax
10c633: e8 68 03 00 00 call 10c9a0 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
10c638: 57 push %edi
10c639: 68 a4 c1 10 00 push $0x10c1a4
10c63e: 68 68 a1 12 00 push $0x12a168
10c643: 8d 45 e4 lea -0x1c(%ebp),%eax
10c646: 50 push %eax
10c647: e8 2c 0a 00 00 call 10d078 <pthread_create>
10c64c: 89 c3 mov %eax,%ebx
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
10c64e: 83 c4 20 add $0x20,%esp
10c651: 85 c0 test %eax,%eax
10c653: 0f 85 87 00 00 00 jne 10c6e0 <rtems_aio_enqueue+0x1f0><== NEVER TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
10c659: ff 05 c4 a1 12 00 incl 0x12a1c4
10c65f: e9 55 ff ff ff jmp 10c5b9 <rtems_aio_enqueue+0xc9>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10c664: 51 push %ecx
10c665: 6a 01 push $0x1
10c667: 8b 43 14 mov 0x14(%ebx),%eax
10c66a: ff 30 pushl (%eax)
10c66c: 68 b4 a1 12 00 push $0x12a1b4
10c671: e8 6e fa ff ff call 10c0e4 <rtems_aio_search_fd>
10c676: 89 c7 mov %eax,%edi
if (r_chain->new_fd == 1) {
10c678: 83 c4 10 add $0x10,%esp
10c67b: 83 78 18 01 cmpl $0x1,0x18(%eax)
10c67f: 74 17 je 10c698 <rtems_aio_enqueue+0x1a8>
pthread_cond_init (&r_chain->cond, NULL);
pthread_cond_signal (&aio_request_queue.new_req);
++aio_request_queue.idle_threads;
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
10c681: 83 ec 08 sub $0x8,%esp
10c684: 53 push %ebx
10c685: 83 c7 08 add $0x8,%edi
10c688: 57 push %edi
10c689: e8 82 fd ff ff call 10c410 <rtems_aio_insert_prio>
10c68e: 83 c4 10 add $0x10,%esp
10c691: e9 23 ff ff ff jmp 10c5b9 <rtems_aio_enqueue+0xc9>
10c696: 66 90 xchg %ax,%ax
10c698: 83 ec 08 sub $0x8,%esp
10c69b: 53 push %ebx
10c69c: 8d 40 08 lea 0x8(%eax),%eax
10c69f: 50 push %eax
10c6a0: e8 ef 21 00 00 call 10e894 <_Chain_Insert>
if (r_chain->new_fd == 1) {
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10c6a5: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
pthread_mutex_init (&r_chain->mutex, NULL);
10c6ac: 58 pop %eax
10c6ad: 5a pop %edx
10c6ae: 6a 00 push $0x0
10c6b0: 8d 47 1c lea 0x1c(%edi),%eax
10c6b3: 50 push %eax
10c6b4: e8 7f 06 00 00 call 10cd38 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10c6b9: 59 pop %ecx
10c6ba: 5b pop %ebx
10c6bb: 6a 00 push $0x0
10c6bd: 83 c7 20 add $0x20,%edi
10c6c0: 57 push %edi
10c6c1: e8 da 02 00 00 call 10c9a0 <pthread_cond_init>
pthread_cond_signal (&aio_request_queue.new_req);
10c6c6: c7 04 24 64 a1 12 00 movl $0x12a164,(%esp)
10c6cd: e8 82 03 00 00 call 10ca54 <pthread_cond_signal>
++aio_request_queue.idle_threads;
10c6d2: ff 05 c8 a1 12 00 incl 0x12a1c8
10c6d8: 83 c4 10 add $0x10,%esp
10c6db: e9 d9 fe ff ff jmp 10c5b9 <rtems_aio_enqueue+0xc9>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
10c6e0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c6e3: 68 60 a1 12 00 push $0x12a160 <== NOT EXECUTED
10c6e8: e8 1f 08 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
return result;
10c6ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c6f0: 89 de mov %ebx,%esi <== NOT EXECUTED
10c6f2: e9 d2 fe ff ff jmp 10c5c9 <rtems_aio_enqueue+0xd9><== NOT EXECUTED
0010c1a4 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
10c1a4: 55 push %ebp <== NOT EXECUTED
10c1a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10c1a7: 57 push %edi <== NOT EXECUTED
10c1a8: 56 push %esi <== NOT EXECUTED
10c1a9: 53 push %ebx <== NOT EXECUTED
10c1aa: 83 ec 4c sub $0x4c,%esp <== NOT EXECUTED
rtems_aio_request_chain *r_chain = arg;
10c1ad: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
10c1b0: 8d 43 1c lea 0x1c(%ebx),%eax <== NOT EXECUTED
10c1b3: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
10c1b6: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
10c1b8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c1bb: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
10c1be: e8 c1 0c 00 00 call 10ce84 <pthread_mutex_lock> <== NOT EXECUTED
if (result != 0)
10c1c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c1c6: 85 c0 test %eax,%eax <== NOT EXECUTED
10c1c8: 0f 85 92 01 00 00 jne 10c360 <rtems_aio_handle+0x1bc><== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c1ce: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10c1d1: 8d 43 0c lea 0xc(%ebx),%eax <== NOT EXECUTED
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
10c1d4: 39 c6 cmp %eax,%esi <== NOT EXECUTED
10c1d6: 0f 84 d0 00 00 00 je 10c2ac <rtems_aio_handle+0x108><== NOT EXECUTED
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10c1dc: e8 53 15 00 00 call 10d734 <pthread_self> <== NOT EXECUTED
10c1e1: 52 push %edx <== NOT EXECUTED
10c1e2: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED
10c1e5: 52 push %edx <== NOT EXECUTED
10c1e6: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED
10c1e9: 52 push %edx <== NOT EXECUTED
10c1ea: 50 push %eax <== NOT EXECUTED
10c1eb: e8 10 11 00 00 call 10d300 <pthread_getschedparam> <== NOT EXECUTED
param.sched_priority = req->priority;
10c1f0: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED
10c1f3: 89 45 c0 mov %eax,-0x40(%ebp) <== NOT EXECUTED
pthread_setschedparam (pthread_self(), req->policy, ¶m);
10c1f6: 8b 7e 08 mov 0x8(%esi),%edi <== NOT EXECUTED
10c1f9: e8 36 15 00 00 call 10d734 <pthread_self> <== NOT EXECUTED
10c1fe: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10c201: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED
10c204: 52 push %edx <== NOT EXECUTED
10c205: 57 push %edi <== NOT EXECUTED
10c206: 50 push %eax <== NOT EXECUTED
10c207: e8 38 15 00 00 call 10d744 <pthread_setschedparam> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10c20c: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
10c20f: e8 44 26 00 00 call 10e858 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
10c214: 5f pop %edi <== NOT EXECUTED
10c215: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
10c218: e8 ef 0c 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
switch (req->aiocbp->aio_lio_opcode) {
10c21d: 8b 7e 14 mov 0x14(%esi),%edi <== NOT EXECUTED
10c220: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c223: 8b 47 2c mov 0x2c(%edi),%eax <== NOT EXECUTED
10c226: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
10c229: 74 21 je 10c24c <rtems_aio_handle+0xa8> <== NOT EXECUTED
10c22b: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
10c22e: 74 6c je 10c29c <rtems_aio_handle+0xf8> <== NOT EXECUTED
10c230: 48 dec %eax <== NOT EXECUTED
10c231: 74 4d je 10c280 <rtems_aio_handle+0xdc> <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
10c233: c7 47 34 ff ff ff ff movl $0xffffffff,0x34(%edi) <== NOT EXECUTED
req->aiocbp->error_code = errno;
10c23a: e8 bd 99 00 00 call 115bfc <__errno> <== NOT EXECUTED
10c23f: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10c241: 89 47 30 mov %eax,0x30(%edi) <== NOT EXECUTED
10c244: e9 6f ff ff ff jmp 10c1b8 <rtems_aio_handle+0x14> <== NOT EXECUTED
10c249: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
result = pwrite (req->aiocbp->aio_fildes,
10c24c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c24f: ff 77 08 pushl 0x8(%edi) <== NOT EXECUTED
10c252: ff 77 04 pushl 0x4(%edi) <== NOT EXECUTED
10c255: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED
10c258: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED
10c25b: ff 37 pushl (%edi) <== NOT EXECUTED
10c25d: e8 3a a4 00 00 call 11669c <pwrite> <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
10c262: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
10c265: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
10c268: 0f 84 9a 01 00 00 je 10c408 <rtems_aio_handle+0x264><== NOT EXECUTED
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
10c26e: 8b 56 14 mov 0x14(%esi),%edx <== NOT EXECUTED
10c271: 89 42 34 mov %eax,0x34(%edx) <== NOT EXECUTED
req->aiocbp->error_code = 0;
10c274: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) <== NOT EXECUTED
10c27b: e9 38 ff ff ff jmp 10c1b8 <rtems_aio_handle+0x14> <== NOT EXECUTED
pthread_mutex_unlock (&r_chain->mutex);
switch (req->aiocbp->aio_lio_opcode) {
case LIO_READ:
result = pread (req->aiocbp->aio_fildes,
10c280: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c283: ff 77 08 pushl 0x8(%edi) <== NOT EXECUTED
10c286: ff 77 04 pushl 0x4(%edi) <== NOT EXECUTED
10c289: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED
10c28c: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED
10c28f: ff 37 pushl (%edi) <== NOT EXECUTED
10c291: e8 4e a3 00 00 call 1165e4 <pread> <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
10c296: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10c299: eb ca jmp 10c265 <rtems_aio_handle+0xc1> <== NOT EXECUTED
10c29b: 90 nop <== NOT EXECUTED
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_SYNC:
result = fsync (req->aiocbp->aio_fildes);
10c29c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c29f: ff 37 pushl (%edi) <== NOT EXECUTED
10c2a1: e8 de 66 00 00 call 112984 <fsync> <== NOT EXECUTED
break;
10c2a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c2a9: eb ba jmp 10c265 <rtems_aio_handle+0xc1> <== NOT EXECUTED
10c2ab: 90 nop <== NOT EXECUTED
wait for a signal on chain, this will unlock the queue.
The fd chain is already unlocked */
struct timespec timeout;
pthread_mutex_unlock (&r_chain->mutex);
10c2ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c2af: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
10c2b2: e8 55 0c 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
pthread_mutex_lock (&aio_request_queue.mutex);
10c2b7: c7 04 24 60 a1 12 00 movl $0x12a160,(%esp) <== NOT EXECUTED
10c2be: e8 c1 0b 00 00 call 10ce84 <pthread_mutex_lock> <== NOT EXECUTED
if (rtems_chain_is_empty (chain))
10c2c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c2c6: 3b 73 08 cmp 0x8(%ebx),%esi <== NOT EXECUTED
10c2c9: 0f 85 e9 fe ff ff jne 10c1b8 <rtems_aio_handle+0x14> <== NOT EXECUTED
{
clock_gettime (CLOCK_REALTIME, &timeout);
10c2cf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10c2d2: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
10c2d5: 50 push %eax <== NOT EXECUTED
10c2d6: 6a 01 push $0x1 <== NOT EXECUTED
10c2d8: e8 8b 05 00 00 call 10c868 <clock_gettime> <== NOT EXECUTED
timeout.tv_sec += 3;
10c2dd: 83 45 dc 03 addl $0x3,-0x24(%ebp) <== NOT EXECUTED
timeout.tv_nsec = 0;
10c2e1: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
result = pthread_cond_timedwait (&r_chain->cond,
10c2e8: 8d 73 20 lea 0x20(%ebx),%esi <== NOT EXECUTED
10c2eb: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10c2ee: 8d 55 dc lea -0x24(%ebp),%edx <== NOT EXECUTED
10c2f1: 52 push %edx <== NOT EXECUTED
10c2f2: 68 60 a1 12 00 push $0x12a160 <== NOT EXECUTED
10c2f7: 56 push %esi <== NOT EXECUTED
10c2f8: e8 db 07 00 00 call 10cad8 <pthread_cond_timedwait><== NOT EXECUTED
&aio_request_queue.mutex, &timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
10c2fd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c300: 83 f8 74 cmp $0x74,%eax <== NOT EXECUTED
10c303: 0f 85 af fe ff ff jne 10c1b8 <rtems_aio_handle+0x14> <== NOT EXECUTED
10c309: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c30c: 53 push %ebx <== NOT EXECUTED
10c30d: e8 46 25 00 00 call 10e858 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
10c312: 59 pop %ecx <== NOT EXECUTED
10c313: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
10c316: e8 fd 08 00 00 call 10cc18 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_cond_destroy (&r_chain->cond);
10c31b: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
10c31e: e8 b1 05 00 00 call 10c8d4 <pthread_cond_destroy> <== NOT EXECUTED
free (r_chain);
10c323: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10c326: e8 f9 c7 ff ff call 108b24 <free> <== NOT EXECUTED
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10c32b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c32e: 81 3d b4 a1 12 00 b8 cmpl $0x12a1b8,0x12a1b4 <== NOT EXECUTED
10c335: a1 12 00
10c338: 74 30 je 10c36a <rtems_aio_handle+0x1c6><== NOT EXECUTED
r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd;
}
else
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
10c33a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c33d: 68 60 a1 12 00 push $0x12a160 <== NOT EXECUTED
10c342: e8 c5 0b 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
10c347: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c34a: e9 69 fe ff ff jmp 10c1b8 <rtems_aio_handle+0x14> <== NOT EXECUTED
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
pthread_mutex_unlock (&aio_request_queue.mutex);
10c34f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c352: 68 60 a1 12 00 push $0x12a160 <== NOT EXECUTED
10c357: e8 b0 0b 00 00 call 10cf0c <pthread_mutex_unlock> <== NOT EXECUTED
return NULL;
10c35c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c35f: 90 nop <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c360: 31 c0 xor %eax,%eax <== NOT EXECUTED
10c362: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c365: 5b pop %ebx <== NOT EXECUTED
10c366: 5e pop %esi <== NOT EXECUTED
10c367: 5f pop %edi <== NOT EXECUTED
10c368: c9 leave <== NOT EXECUTED
10c369: c3 ret <== NOT EXECUTED
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
++aio_request_queue.idle_threads;
10c36a: ff 05 c8 a1 12 00 incl 0x12a1c8 <== NOT EXECUTED
clock_gettime (CLOCK_REALTIME, &timeout);
10c370: 52 push %edx <== NOT EXECUTED
10c371: 52 push %edx <== NOT EXECUTED
10c372: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
10c375: 50 push %eax <== NOT EXECUTED
10c376: 6a 01 push $0x1 <== NOT EXECUTED
10c378: e8 eb 04 00 00 call 10c868 <clock_gettime> <== NOT EXECUTED
timeout.tv_sec += 3;
10c37d: 83 45 dc 03 addl $0x3,-0x24(%ebp) <== NOT EXECUTED
timeout.tv_nsec = 0;
10c381: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
result = pthread_cond_timedwait (&aio_request_queue.new_req,
10c388: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10c38b: 8d 55 dc lea -0x24(%ebp),%edx <== NOT EXECUTED
10c38e: 52 push %edx <== NOT EXECUTED
10c38f: 68 60 a1 12 00 push $0x12a160 <== NOT EXECUTED
10c394: 68 64 a1 12 00 push $0x12a164 <== NOT EXECUTED
10c399: e8 3a 07 00 00 call 10cad8 <pthread_cond_timedwait><== NOT EXECUTED
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
10c39e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c3a1: 83 f8 74 cmp $0x74,%eax <== NOT EXECUTED
10c3a4: 74 a9 je 10c34f <rtems_aio_handle+0x1ab><== NOT EXECUTED
return NULL;
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
--aio_request_queue.idle_threads;
10c3a6: ff 0d c8 a1 12 00 decl 0x12a1c8 <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c3ac: 8b 35 b4 a1 12 00 mov 0x12a1b4,%esi <== NOT EXECUTED
10c3b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c3b5: 56 push %esi <== NOT EXECUTED
10c3b6: e8 9d 24 00 00 call 10e858 <_Chain_Extract> <== NOT EXECUTED
/* Otherwise move this chain to the working chain and
start the loop all over again */
--aio_request_queue.idle_threads;
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
10c3bb: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10c3be: 6a 01 push $0x1 <== NOT EXECUTED
10c3c0: ff 76 14 pushl 0x14(%esi) <== NOT EXECUTED
10c3c3: 68 a8 a1 12 00 push $0x12a1a8 <== NOT EXECUTED
10c3c8: e8 17 fd ff ff call 10c0e4 <rtems_aio_search_fd> <== NOT EXECUTED
10c3cd: 89 c3 mov %eax,%ebx <== NOT EXECUTED
((rtems_aio_request_chain *)node)->fildes,
1);
r_chain->new_fd = 0;
10c3cf: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) <== NOT EXECUTED
pthread_mutex_init (&r_chain->mutex, NULL);
10c3d6: 5f pop %edi <== NOT EXECUTED
10c3d7: 58 pop %eax <== NOT EXECUTED
10c3d8: 6a 00 push $0x0 <== NOT EXECUTED
10c3da: 8d 43 1c lea 0x1c(%ebx),%eax <== NOT EXECUTED
10c3dd: 89 45 b4 mov %eax,-0x4c(%ebp) <== NOT EXECUTED
10c3e0: 50 push %eax <== NOT EXECUTED
10c3e1: e8 52 09 00 00 call 10cd38 <pthread_mutex_init> <== NOT EXECUTED
pthread_cond_init (&r_chain->cond, NULL);
10c3e6: 5a pop %edx <== NOT EXECUTED
10c3e7: 59 pop %ecx <== NOT EXECUTED
10c3e8: 6a 00 push $0x0 <== NOT EXECUTED
10c3ea: 8d 43 20 lea 0x20(%ebx),%eax <== NOT EXECUTED
10c3ed: 50 push %eax <== NOT EXECUTED
10c3ee: e8 ad 05 00 00 call 10c9a0 <pthread_cond_init> <== NOT EXECUTED
r_chain->perfd = ((rtems_aio_request_chain *)node)->perfd;
10c3f3: 8d 7b 08 lea 0x8(%ebx),%edi <== NOT EXECUTED
10c3f6: 83 c6 08 add $0x8,%esi <== NOT EXECUTED
10c3f9: b9 03 00 00 00 mov $0x3,%ecx <== NOT EXECUTED
10c3fe: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
10c400: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c403: e9 b0 fd ff ff jmp 10c1b8 <rtems_aio_handle+0x14> <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
10c408: 8b 7e 14 mov 0x14(%esi),%edi <== NOT EXECUTED
10c40b: e9 23 fe ff ff jmp 10c233 <rtems_aio_handle+0x8f> <== NOT EXECUTED
0010bfbc <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
10bfbc: 55 push %ebp
10bfbd: 89 e5 mov %esp,%ebp
10bfbf: 53 push %ebx
10bfc0: 83 ec 10 sub $0x10,%esp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
10bfc3: 68 68 a1 12 00 push $0x12a168
10bfc8: e8 57 10 00 00 call 10d024 <pthread_attr_init>
10bfcd: 89 c3 mov %eax,%ebx
if (result != 0)
10bfcf: 83 c4 10 add $0x10,%esp
10bfd2: 85 c0 test %eax,%eax
10bfd4: 74 0a je 10bfe0 <rtems_aio_init+0x24> <== ALWAYS TAKEN
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
return result;
}
10bfd6: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10bfd8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10bfdb: c9 leave <== NOT EXECUTED
10bfdc: c3 ret <== NOT EXECUTED
10bfdd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
result = pthread_attr_init (&aio_request_queue.attr);
if (result != 0)
return result;
result =
10bfe0: 83 ec 08 sub $0x8,%esp
10bfe3: 6a 00 push $0x0
10bfe5: 68 68 a1 12 00 push $0x12a168
10bfea: e8 61 10 00 00 call 10d050 <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
10bfef: 83 c4 10 add $0x10,%esp
10bff2: 85 c0 test %eax,%eax
10bff4: 0f 85 96 00 00 00 jne 10c090 <rtems_aio_init+0xd4> <== NEVER TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
10bffa: 83 ec 08 sub $0x8,%esp
10bffd: 6a 00 push $0x0
10bfff: 68 60 a1 12 00 push $0x12a160
10c004: e8 2f 0d 00 00 call 10cd38 <pthread_mutex_init>
if (result != 0)
10c009: 83 c4 10 add $0x10,%esp
10c00c: 85 c0 test %eax,%eax
10c00e: 0f 85 b8 00 00 00 jne 10c0cc <rtems_aio_init+0x110> <== NEVER TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
10c014: 83 ec 08 sub $0x8,%esp
10c017: 6a 00 push $0x0
10c019: 68 64 a1 12 00 push $0x12a164
10c01e: e8 7d 09 00 00 call 10c9a0 <pthread_cond_init>
10c023: 89 c3 mov %eax,%ebx
if (result != 0) {
10c025: 83 c4 10 add $0x10,%esp
10c028: 85 c0 test %eax,%eax
10c02a: 75 7c jne 10c0a8 <rtems_aio_init+0xec> <== NEVER TAKEN
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c02c: c7 05 a8 a1 12 00 ac movl $0x12a1ac,0x12a1a8
10c033: a1 12 00
head->previous = NULL;
10c036: c7 05 ac a1 12 00 00 movl $0x0,0x12a1ac
10c03d: 00 00 00
tail->previous = head;
10c040: c7 05 b0 a1 12 00 a8 movl $0x12a1a8,0x12a1b0
10c047: a1 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c04a: c7 05 b4 a1 12 00 b8 movl $0x12a1b8,0x12a1b4
10c051: a1 12 00
head->previous = NULL;
10c054: c7 05 b8 a1 12 00 00 movl $0x0,0x12a1b8
10c05b: 00 00 00
tail->previous = head;
10c05e: c7 05 bc a1 12 00 b4 movl $0x12a1b4,0x12a1bc
10c065: a1 12 00
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
10c068: c7 05 c4 a1 12 00 00 movl $0x0,0x12a1c4
10c06f: 00 00 00
aio_request_queue.idle_threads = 0;
10c072: c7 05 c8 a1 12 00 00 movl $0x0,0x12a1c8
10c079: 00 00 00
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
10c07c: c7 05 c0 a1 12 00 0b movl $0xb00b,0x12a1c0
10c083: b0 00 00
return result;
}
10c086: 89 d8 mov %ebx,%eax
10c088: 8b 5d fc mov -0x4(%ebp),%ebx
10c08b: c9 leave
10c08c: c3 ret
10c08d: 8d 76 00 lea 0x0(%esi),%esi
result =
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
10c090: 83 ec 0c sub $0xc,%esp
10c093: 68 68 a1 12 00 push $0x12a168 <== NOT EXECUTED
10c098: e8 63 0f 00 00 call 10d000 <pthread_attr_destroy> <== NOT EXECUTED
10c09d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c0a0: e9 55 ff ff ff jmp 10bffa <rtems_aio_init+0x3e> <== NOT EXECUTED
10c0a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
if (result != 0) {
pthread_mutex_destroy (&aio_request_queue.mutex);
10c0a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c0ab: 68 60 a1 12 00 push $0x12a160 <== NOT EXECUTED
10c0b0: e8 63 0b 00 00 call 10cc18 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
10c0b5: c7 04 24 68 a1 12 00 movl $0x12a168,(%esp) <== NOT EXECUTED
10c0bc: e8 3f 0f 00 00 call 10d000 <pthread_attr_destroy> <== NOT EXECUTED
10c0c1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c0c4: e9 63 ff ff ff jmp 10c02c <rtems_aio_init+0x70> <== NOT EXECUTED
10c0c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
10c0cc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c0cf: 68 68 a1 12 00 push $0x12a168 <== NOT EXECUTED
10c0d4: e8 27 0f 00 00 call 10d000 <pthread_attr_destroy> <== NOT EXECUTED
10c0d9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c0dc: e9 33 ff ff ff jmp 10c014 <rtems_aio_init+0x58> <== NOT EXECUTED
0010c410 <rtems_aio_insert_prio>:
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
10c410: 55 push %ebp
10c411: 89 e5 mov %esp,%ebp
10c413: 56 push %esi
10c414: 53 push %ebx
10c415: 8b 55 08 mov 0x8(%ebp),%edx
10c418: 8b 75 0c mov 0xc(%ebp),%esi
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c41b: 8b 02 mov (%edx),%eax
10c41d: 8d 5a 04 lea 0x4(%edx),%ebx
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
10c420: 39 d8 cmp %ebx,%eax
10c422: 74 27 je 10c44b <rtems_aio_insert_prio+0x3b><== NEVER TAKEN
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
10c424: 8b 56 14 mov 0x14(%esi),%edx
10c427: 8b 4a 14 mov 0x14(%edx),%ecx
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
10c42a: 8b 50 14 mov 0x14(%eax),%edx
while (req->aiocbp->aio_reqprio > prio &&
10c42d: 39 4a 14 cmp %ecx,0x14(%edx)
10c430: 7c 06 jl 10c438 <rtems_aio_insert_prio+0x28><== NEVER TAKEN
10c432: eb 0e jmp 10c442 <rtems_aio_insert_prio+0x32>
10c434: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
10c436: 74 0a je 10c442 <rtems_aio_insert_prio+0x32><== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c438: 8b 00 mov (%eax),%eax <== NOT EXECUTED
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
10c43a: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
10c43d: 39 4a 14 cmp %ecx,0x14(%edx) <== NOT EXECUTED
10c440: 7c f2 jl 10c434 <rtems_aio_insert_prio+0x24><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
10c442: 89 75 0c mov %esi,0xc(%ebp)
10c445: 8b 40 04 mov 0x4(%eax),%eax
10c448: 89 45 08 mov %eax,0x8(%ebp)
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
10c44b: 5b pop %ebx
10c44c: 5e pop %esi
10c44d: c9 leave
10c44e: e9 41 24 00 00 jmp 10e894 <_Chain_Insert>
0010c454 <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
10c454: 55 push %ebp <== NOT EXECUTED
10c455: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10c457: 53 push %ebx <== NOT EXECUTED
10c458: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
10c45b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c45e: 8b 58 08 mov 0x8(%eax),%ebx <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
10c461: 83 c0 0c add $0xc,%eax <== NOT EXECUTED
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
10c464: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
10c466: 74 27 je 10c48f <rtems_aio_remove_fd+0x3b><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10c468: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c46b: 53 push %ebx <== NOT EXECUTED
10c46c: e8 e7 23 00 00 call 10e858 <_Chain_Extract> <== NOT EXECUTED
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
req->aiocbp->error_code = ECANCELED;
10c471: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10c474: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax) <== NOT EXECUTED
req->aiocbp->return_value = -1;
10c47b: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax) <== NOT EXECUTED
free (req);
10c482: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10c485: e8 9a c6 ff ff call 108b24 <free> <== NOT EXECUTED
10c48a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c48d: eb d9 jmp 10c468 <rtems_aio_remove_fd+0x14><== NOT EXECUTED
}
}
10c48f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10c492: c9 leave <== NOT EXECUTED
10c493: c3 ret <== NOT EXECUTED
0010c494 <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
10c494: 55 push %ebp <== NOT EXECUTED
10c495: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10c497: 53 push %ebx <== NOT EXECUTED
10c498: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
10c49b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10c49e: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c4a1: 8b 18 mov (%eax),%ebx <== NOT EXECUTED
10c4a3: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
10c4a6: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
10c4a8: 75 08 jne 10c4b2 <rtems_aio_remove_req+0x1e><== NOT EXECUTED
10c4aa: eb 38 jmp 10c4e4 <rtems_aio_remove_req+0x50><== NOT EXECUTED
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c4ac: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
10c4ae: 39 c3 cmp %eax,%ebx <== NOT EXECUTED
10c4b0: 74 32 je 10c4e4 <rtems_aio_remove_req+0x50><== NOT EXECUTED
10c4b2: 39 53 14 cmp %edx,0x14(%ebx) <== NOT EXECUTED
10c4b5: 75 f5 jne 10c4ac <rtems_aio_remove_req+0x18><== NOT EXECUTED
10c4b7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c4ba: 53 push %ebx <== NOT EXECUTED
10c4bb: e8 98 23 00 00 call 10e858 <_Chain_Extract> <== NOT EXECUTED
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
10c4c0: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10c4c3: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax) <== NOT EXECUTED
current->aiocbp->return_value = -1;
10c4ca: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax) <== NOT EXECUTED
free (current);
10c4d1: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10c4d4: e8 4b c6 ff ff call 108b24 <free> <== NOT EXECUTED
}
return AIO_CANCELED;
10c4d9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c4dc: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
10c4de: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10c4e1: c9 leave <== NOT EXECUTED
10c4e2: c3 ret <== NOT EXECUTED
10c4e3: 90 nop <== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
10c4e4: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
10c4e9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10c4ec: c9 leave <== NOT EXECUTED
10c4ed: c3 ret <== NOT EXECUTED
001087dc <rtems_assoc_local_by_name>:
uint32_t rtems_assoc_local_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
1087dc: 55 push %ebp
1087dd: 89 e5 mov %esp,%ebp
1087df: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_name(ap, name);
1087e2: ff 75 0c pushl 0xc(%ebp)
1087e5: ff 75 08 pushl 0x8(%ebp)
1087e8: e8 13 02 00 00 call 108a00 <rtems_assoc_ptr_by_name>
if (nap)
1087ed: 83 c4 10 add $0x10,%esp
1087f0: 85 c0 test %eax,%eax
1087f2: 74 08 je 1087fc <rtems_assoc_local_by_name+0x20>
return nap->local_value;
1087f4: 8b 40 04 mov 0x4(%eax),%eax
return 0;
}
1087f7: c9 leave
1087f8: c3 ret
1087f9: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_name(ap, name);
if (nap)
return nap->local_value;
return 0;
1087fc: 31 c0 xor %eax,%eax
}
1087fe: c9 leave
1087ff: c3 ret
0010fb90 <rtems_assoc_local_by_remote>:
uint32_t rtems_assoc_local_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
10fb90: 55 push %ebp
10fb91: 89 e5 mov %esp,%ebp
10fb93: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
10fb96: ff 75 0c pushl 0xc(%ebp)
10fb99: ff 75 08 pushl 0x8(%ebp)
10fb9c: e8 13 00 00 00 call 10fbb4 <rtems_assoc_ptr_by_remote>
if (nap)
10fba1: 83 c4 10 add $0x10,%esp
10fba4: 85 c0 test %eax,%eax
10fba6: 74 08 je 10fbb0 <rtems_assoc_local_by_remote+0x20>
return nap->local_value;
10fba8: 8b 40 04 mov 0x4(%eax),%eax
return 0;
}
10fbab: c9 leave
10fbac: c3 ret
10fbad: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->local_value;
return 0;
10fbb0: 31 c0 xor %eax,%eax
}
10fbb2: c9 leave
10fbb3: c3 ret
00112b20 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
112b20: 55 push %ebp
112b21: 89 e5 mov %esp,%ebp
112b23: 57 push %edi
112b24: 56 push %esi
112b25: 53 push %ebx
112b26: 83 ec 1c sub $0x1c,%esp
112b29: 8b 7d 0c mov 0xc(%ebp),%edi
112b2c: be 20 00 00 00 mov $0x20,%esi
uint32_t b;
uint32_t local_value = 0;
112b31: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
for (b = 1; b; b <<= 1) {
112b38: bb 01 00 00 00 mov $0x1,%ebx
112b3d: eb 06 jmp 112b45 <rtems_assoc_local_by_remote_bitfield+0x25>
112b3f: 90 nop
112b40: d1 e3 shl %ebx
112b42: 4e dec %esi
112b43: 74 1b je 112b60 <rtems_assoc_local_by_remote_bitfield+0x40>
if (b & remote_value)
112b45: 85 fb test %edi,%ebx
112b47: 74 f7 je 112b40 <rtems_assoc_local_by_remote_bitfield+0x20>
local_value |= rtems_assoc_local_by_remote(ap, b);
112b49: 83 ec 08 sub $0x8,%esp
112b4c: 53 push %ebx
112b4d: ff 75 08 pushl 0x8(%ebp)
112b50: e8 3b d0 ff ff call 10fb90 <rtems_assoc_local_by_remote>
112b55: 09 45 e4 or %eax,-0x1c(%ebp)
112b58: 83 c4 10 add $0x10,%esp
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
112b5b: d1 e3 shl %ebx
112b5d: 4e dec %esi
112b5e: 75 e5 jne 112b45 <rtems_assoc_local_by_remote_bitfield+0x25><== ALWAYS TAKEN
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
112b60: 8b 45 e4 mov -0x1c(%ebp),%eax
112b63: 8d 65 f4 lea -0xc(%ebp),%esp
112b66: 5b pop %ebx
112b67: 5e pop %esi
112b68: 5f pop %edi
112b69: c9 leave
112b6a: c3 ret
00114cb4 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
114cb4: 55 push %ebp
114cb5: 89 e5 mov %esp,%ebp
114cb7: 53 push %ebx
114cb8: 83 ec 0c sub $0xc,%esp
114cbb: 8b 5d 0c mov 0xc(%ebp),%ebx
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
114cbe: 53 push %ebx
114cbf: ff 75 08 pushl 0x8(%ebp)
114cc2: e8 1d 00 00 00 call 114ce4 <rtems_assoc_ptr_by_local>
if (nap)
114cc7: 83 c4 10 add $0x10,%esp
114cca: 85 c0 test %eax,%eax
114ccc: 74 0a je 114cd8 <rtems_assoc_name_by_local+0x24>
return nap->name;
114cce: 8b 00 mov (%eax),%eax
return rtems_assoc_name_bad(local_value);
}
114cd0: 8b 5d fc mov -0x4(%ebp),%ebx
114cd3: c9 leave
114cd4: c3 ret
114cd5: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
114cd8: 89 5d 08 mov %ebx,0x8(%ebp)
}
114cdb: 8b 5d fc mov -0x4(%ebp),%ebx
114cde: c9 leave
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
114cdf: e9 6c 31 00 00 jmp 117e50 <rtems_assoc_name_bad>
00108978 <rtems_assoc_name_by_remote>:
const char *rtems_assoc_name_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
108978: 55 push %ebp
108979: 89 e5 mov %esp,%ebp
10897b: 53 push %ebx
10897c: 83 ec 0c sub $0xc,%esp
10897f: 8b 5d 0c mov 0xc(%ebp),%ebx
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
108982: 53 push %ebx
108983: ff 75 08 pushl 0x8(%ebp)
108986: e8 ed 00 00 00 call 108a78 <rtems_assoc_ptr_by_remote>
if (nap)
10898b: 83 c4 10 add $0x10,%esp
10898e: 85 c0 test %eax,%eax
108990: 74 0a je 10899c <rtems_assoc_name_by_remote+0x24>
return nap->name;
108992: 8b 00 mov (%eax),%eax
return rtems_assoc_name_bad(remote_value);
}
108994: 8b 5d fc mov -0x4(%ebp),%ebx
108997: c9 leave
108998: c3 ret
108999: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(remote_value);
10899c: 89 5d 08 mov %ebx,0x8(%ebp)
}
10899f: 8b 5d fc mov -0x4(%ebp),%ebx
1089a2: c9 leave
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(remote_value);
1089a3: e9 c8 7e 00 00 jmp 110870 <rtems_assoc_name_bad>
00114ce4 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
114ce4: 55 push %ebp
114ce5: 89 e5 mov %esp,%ebp
114ce7: 57 push %edi
114ce8: 56 push %esi
114ce9: 53 push %ebx
114cea: 8b 45 08 mov 0x8(%ebp),%eax
114ced: 8b 55 0c mov 0xc(%ebp),%edx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
114cf0: 8b 30 mov (%eax),%esi
114cf2: 85 f6 test %esi,%esi
114cf4: 74 3e je 114d34 <rtems_assoc_ptr_by_local+0x50>
114cf6: bf 98 74 12 00 mov $0x127498,%edi
114cfb: b9 0a 00 00 00 mov $0xa,%ecx
114d00: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
114d02: 74 18 je 114d1c <rtems_assoc_ptr_by_local+0x38>
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
114d04: 31 c9 xor %ecx,%ecx
114d06: eb 09 jmp 114d11 <rtems_assoc_ptr_by_local+0x2d>
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
114d08: 83 c0 0c add $0xc,%eax
114d0b: 8b 18 mov (%eax),%ebx
114d0d: 85 db test %ebx,%ebx
114d0f: 74 1b je 114d2c <rtems_assoc_ptr_by_local+0x48>
if (ap->local_value == local_value)
114d11: 39 50 04 cmp %edx,0x4(%eax)
114d14: 75 f2 jne 114d08 <rtems_assoc_ptr_by_local+0x24>
return ap;
return default_ap;
}
114d16: 5b pop %ebx
114d17: 5e pop %esi
114d18: 5f pop %edi
114d19: c9 leave
114d1a: c3 ret
114d1b: 90 nop
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
114d1c: 8d 58 0c lea 0xc(%eax),%ebx
for ( ; ap->name; ap++)
114d1f: 8b 70 0c mov 0xc(%eax),%esi
114d22: 85 f6 test %esi,%esi
114d24: 74 f0 je 114d16 <rtems_assoc_ptr_by_local+0x32><== NEVER TAKEN
114d26: 89 c1 mov %eax,%ecx
114d28: 89 d8 mov %ebx,%eax
114d2a: eb e5 jmp 114d11 <rtems_assoc_ptr_by_local+0x2d>
114d2c: 89 c8 mov %ecx,%eax
if (ap->local_value == local_value)
return ap;
return default_ap;
}
114d2e: 5b pop %ebx
114d2f: 5e pop %esi
114d30: 5f pop %edi
114d31: c9 leave
114d32: c3 ret
114d33: 90 nop
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
114d34: 31 c0 xor %eax,%eax
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
114d36: 5b pop %ebx
114d37: 5e pop %esi
114d38: 5f pop %edi
114d39: c9 leave
114d3a: c3 ret
00108a00 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
108a00: 55 push %ebp
108a01: 89 e5 mov %esp,%ebp
108a03: 57 push %edi
108a04: 56 push %esi
108a05: 53 push %ebx
108a06: 83 ec 0c sub $0xc,%esp
108a09: 8b 5d 08 mov 0x8(%ebp),%ebx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
108a0c: 8b 03 mov (%ebx),%eax
108a0e: 85 c0 test %eax,%eax
108a10: 74 5a je 108a6c <rtems_assoc_ptr_by_name+0x6c>
108a12: bf 5d 03 12 00 mov $0x12035d,%edi
108a17: b9 0a 00 00 00 mov $0xa,%ecx
108a1c: 89 c6 mov %eax,%esi
108a1e: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
108a20: 74 2e je 108a50 <rtems_assoc_ptr_by_name+0x50>
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
108a22: 31 f6 xor %esi,%esi
108a24: eb 0b jmp 108a31 <rtems_assoc_ptr_by_name+0x31>
108a26: 66 90 xchg %ax,%ax
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
108a28: 83 c3 0c add $0xc,%ebx
108a2b: 8b 03 mov (%ebx),%eax
108a2d: 85 c0 test %eax,%eax
108a2f: 74 2f je 108a60 <rtems_assoc_ptr_by_name+0x60>
if (strcmp(ap->name, name) == 0)
108a31: 83 ec 08 sub $0x8,%esp
108a34: ff 75 0c pushl 0xc(%ebp)
108a37: 50 push %eax
108a38: e8 4f c1 00 00 call 114b8c <strcmp>
108a3d: 83 c4 10 add $0x10,%esp
108a40: 85 c0 test %eax,%eax
108a42: 75 e4 jne 108a28 <rtems_assoc_ptr_by_name+0x28>
return ap;
return default_ap;
}
108a44: 89 d8 mov %ebx,%eax
108a46: 8d 65 f4 lea -0xc(%ebp),%esp
108a49: 5b pop %ebx
108a4a: 5e pop %esi
108a4b: 5f pop %edi
108a4c: c9 leave
108a4d: c3 ret
108a4e: 66 90 xchg %ax,%ax
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
108a50: 8d 53 0c lea 0xc(%ebx),%edx
for ( ; ap->name; ap++)
108a53: 8b 43 0c mov 0xc(%ebx),%eax
108a56: 85 c0 test %eax,%eax
108a58: 74 ea je 108a44 <rtems_assoc_ptr_by_name+0x44><== NEVER TAKEN
108a5a: 89 de mov %ebx,%esi
108a5c: 89 d3 mov %edx,%ebx
108a5e: eb d1 jmp 108a31 <rtems_assoc_ptr_by_name+0x31>
108a60: 89 f3 mov %esi,%ebx
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
108a62: 89 d8 mov %ebx,%eax
108a64: 8d 65 f4 lea -0xc(%ebp),%esp
108a67: 5b pop %ebx
108a68: 5e pop %esi
108a69: 5f pop %edi
108a6a: c9 leave
108a6b: c3 ret
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
108a6c: 31 db xor %ebx,%ebx
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
108a6e: 89 d8 mov %ebx,%eax
108a70: 8d 65 f4 lea -0xc(%ebp),%esp
108a73: 5b pop %ebx
108a74: 5e pop %esi
108a75: 5f pop %edi
108a76: c9 leave
108a77: c3 ret
0010fbb4 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
10fbb4: 55 push %ebp
10fbb5: 89 e5 mov %esp,%ebp
10fbb7: 57 push %edi
10fbb8: 56 push %esi
10fbb9: 53 push %ebx
10fbba: 8b 45 08 mov 0x8(%ebp),%eax
10fbbd: 8b 55 0c mov 0xc(%ebp),%edx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
10fbc0: 8b 30 mov (%eax),%esi
10fbc2: 85 f6 test %esi,%esi
10fbc4: 74 3e je 10fc04 <rtems_assoc_ptr_by_remote+0x50>
10fbc6: bf 18 11 12 00 mov $0x121118,%edi
10fbcb: b9 0a 00 00 00 mov $0xa,%ecx
10fbd0: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10fbd2: 74 18 je 10fbec <rtems_assoc_ptr_by_remote+0x38>
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
10fbd4: 31 c9 xor %ecx,%ecx
10fbd6: eb 09 jmp 10fbe1 <rtems_assoc_ptr_by_remote+0x2d>
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
10fbd8: 83 c0 0c add $0xc,%eax
10fbdb: 8b 18 mov (%eax),%ebx
10fbdd: 85 db test %ebx,%ebx
10fbdf: 74 1b je 10fbfc <rtems_assoc_ptr_by_remote+0x48>
if (ap->remote_value == remote_value)
10fbe1: 39 50 08 cmp %edx,0x8(%eax)
10fbe4: 75 f2 jne 10fbd8 <rtems_assoc_ptr_by_remote+0x24>
return ap;
return default_ap;
}
10fbe6: 5b pop %ebx
10fbe7: 5e pop %esi
10fbe8: 5f pop %edi
10fbe9: c9 leave
10fbea: c3 ret
10fbeb: 90 nop
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
10fbec: 8d 58 0c lea 0xc(%eax),%ebx
for ( ; ap->name; ap++)
10fbef: 8b 70 0c mov 0xc(%eax),%esi
10fbf2: 85 f6 test %esi,%esi
10fbf4: 74 f0 je 10fbe6 <rtems_assoc_ptr_by_remote+0x32><== NEVER TAKEN
10fbf6: 89 c1 mov %eax,%ecx
10fbf8: 89 d8 mov %ebx,%eax
10fbfa: eb e5 jmp 10fbe1 <rtems_assoc_ptr_by_remote+0x2d>
10fbfc: 89 c8 mov %ecx,%eax
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
10fbfe: 5b pop %ebx
10fbff: 5e pop %esi
10fc00: 5f pop %edi
10fc01: c9 leave
10fc02: c3 ret
10fc03: 90 nop
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
10fc04: 31 c0 xor %eax,%eax
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
10fc06: 5b pop %ebx
10fc07: 5e pop %esi
10fc08: 5f pop %edi
10fc09: c9 leave
10fc0a: c3 ret
00108b1c <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
108b1c: 55 push %ebp
108b1d: 89 e5 mov %esp,%ebp
108b1f: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
108b22: ff 75 0c pushl 0xc(%ebp)
108b25: ff 75 08 pushl 0x8(%ebp)
108b28: e8 7b fe ff ff call 1089a8 <rtems_assoc_ptr_by_local>
if (nap)
108b2d: 83 c4 10 add $0x10,%esp
108b30: 85 c0 test %eax,%eax
108b32: 74 08 je 108b3c <rtems_assoc_remote_by_local+0x20>
return nap->remote_value;
108b34: 8b 40 08 mov 0x8(%eax),%eax
return 0;
}
108b37: c9 leave
108b38: c3 ret
108b39: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->remote_value;
return 0;
108b3c: 31 c0 xor %eax,%eax
}
108b3e: c9 leave
108b3f: c3 ret
00108ad0 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
108ad0: 55 push %ebp
108ad1: 89 e5 mov %esp,%ebp
108ad3: 57 push %edi
108ad4: 56 push %esi
108ad5: 53 push %ebx
108ad6: 83 ec 1c sub $0x1c,%esp
108ad9: 8b 7d 0c mov 0xc(%ebp),%edi
108adc: be 20 00 00 00 mov $0x20,%esi
uint32_t b;
uint32_t remote_value = 0;
108ae1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
for (b = 1; b; b <<= 1)
108ae8: bb 01 00 00 00 mov $0x1,%ebx
108aed: eb 06 jmp 108af5 <rtems_assoc_remote_by_local_bitfield+0x25>
108aef: 90 nop
108af0: d1 e3 shl %ebx
108af2: 4e dec %esi
108af3: 74 1b je 108b10 <rtems_assoc_remote_by_local_bitfield+0x40>
if (b & local_value)
108af5: 85 fb test %edi,%ebx
108af7: 74 f7 je 108af0 <rtems_assoc_remote_by_local_bitfield+0x20>
remote_value |= rtems_assoc_remote_by_local(ap, b);
108af9: 83 ec 08 sub $0x8,%esp
108afc: 53 push %ebx
108afd: ff 75 08 pushl 0x8(%ebp)
108b00: e8 17 00 00 00 call 108b1c <rtems_assoc_remote_by_local>
108b05: 09 45 e4 or %eax,-0x1c(%ebp)
108b08: 83 c4 10 add $0x10,%esp
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
108b0b: d1 e3 shl %ebx
108b0d: 4e dec %esi
108b0e: 75 e5 jne 108af5 <rtems_assoc_remote_by_local_bitfield+0x25><== ALWAYS TAKEN
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
108b10: 8b 45 e4 mov -0x1c(%ebp),%eax
108b13: 8d 65 f4 lea -0xc(%ebp),%esp
108b16: 5b pop %ebx
108b17: 5e pop %esi
108b18: 5f pop %edi
108b19: c9 leave
108b1a: c3 ret
00108b40 <rtems_assoc_remote_by_name>:
uint32_t rtems_assoc_remote_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
108b40: 55 push %ebp
108b41: 89 e5 mov %esp,%ebp
108b43: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_name(ap, name);
108b46: ff 75 0c pushl 0xc(%ebp)
108b49: ff 75 08 pushl 0x8(%ebp)
108b4c: e8 af fe ff ff call 108a00 <rtems_assoc_ptr_by_name>
if (nap)
108b51: 83 c4 10 add $0x10,%esp
108b54: 85 c0 test %eax,%eax
108b56: 74 08 je 108b60 <rtems_assoc_remote_by_name+0x20>
return nap->remote_value;
108b58: 8b 40 08 mov 0x8(%eax),%eax
return 0;
}
108b5b: c9 leave
108b5c: c3 ret
108b5d: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_name(ap, name);
if (nap)
return nap->remote_value;
return 0;
108b60: 31 c0 xor %eax,%eax
}
108b62: c9 leave
108b63: c3 ret
00113684 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
113684: 55 push %ebp
113685: 89 e5 mov %esp,%ebp
113687: 57 push %edi
113688: 56 push %esi
113689: 53 push %ebx
11368a: 83 ec 2c sub $0x2c,%esp
11368d: 8b 5d 08 mov 0x8(%ebp),%ebx
113690: 8b 7d 0c mov 0xc(%ebp),%edi
113693: 8b 45 10 mov 0x10(%ebp),%eax
113696: 8b 75 14 mov 0x14(%ebp),%esi
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
113699: 85 db test %ebx,%ebx
11369b: 0f 84 87 00 00 00 je 113728 <rtems_barrier_create+0xa4>
return RTEMS_INVALID_NAME;
if ( !id )
1136a1: 85 f6 test %esi,%esi
1136a3: 0f 84 bf 00 00 00 je 113768 <rtems_barrier_create+0xe4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
1136a9: f7 c7 10 00 00 00 test $0x10,%edi
1136af: 0f 84 83 00 00 00 je 113738 <rtems_barrier_create+0xb4>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
1136b5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
if ( maximum_waiters == 0 )
1136bc: 85 c0 test %eax,%eax
1136be: 0f 84 80 00 00 00 je 113744 <rtems_barrier_create+0xc0>
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
1136c4: 89 45 e4 mov %eax,-0x1c(%ebp)
1136c7: a1 70 9f 12 00 mov 0x129f70,%eax
1136cc: 40 inc %eax
1136cd: a3 70 9f 12 00 mov %eax,0x129f70
* 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 );
1136d2: 83 ec 0c sub $0xc,%esp
1136d5: 68 a0 a9 12 00 push $0x12a9a0
1136da: e8 6d b0 ff ff call 10e74c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
1136df: 83 c4 10 add $0x10,%esp
1136e2: 85 c0 test %eax,%eax
1136e4: 74 6e je 113754 <rtems_barrier_create+0xd0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
1136e6: 89 78 10 mov %edi,0x10(%eax)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
1136e9: 83 ec 08 sub $0x8,%esp
1136ec: 8d 55 e0 lea -0x20(%ebp),%edx
1136ef: 52 push %edx
1136f0: 8d 50 14 lea 0x14(%eax),%edx
1136f3: 52 push %edx
1136f4: 89 45 d4 mov %eax,-0x2c(%ebp)
1136f7: e8 c0 07 00 00 call 113ebc <_CORE_barrier_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
1136fc: 8b 45 d4 mov -0x2c(%ebp),%eax
1136ff: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
113702: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
113705: 8b 0d bc a9 12 00 mov 0x12a9bc,%ecx
11370b: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
11370e: 89 58 0c mov %ebx,0xc(%eax)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
113711: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
113713: e8 d0 bf ff ff call 10f6e8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
113718: 83 c4 10 add $0x10,%esp
11371b: 31 c0 xor %eax,%eax
}
11371d: 8d 65 f4 lea -0xc(%ebp),%esp
113720: 5b pop %ebx
113721: 5e pop %esi
113722: 5f pop %edi
113723: c9 leave
113724: c3 ret
113725: 8d 76 00 lea 0x0(%esi),%esi
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
113728: b8 03 00 00 00 mov $0x3,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11372d: 8d 65 f4 lea -0xc(%ebp),%esp
113730: 5b pop %ebx
113731: 5e pop %esi
113732: 5f pop %edi
113733: c9 leave
113734: c3 ret
113735: 8d 76 00 lea 0x0(%esi),%esi
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;
113738: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
11373f: eb 83 jmp 1136c4 <rtems_barrier_create+0x40>
113741: 8d 76 00 lea 0x0(%esi),%esi
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
113744: b8 0a 00 00 00 mov $0xa,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113749: 8d 65 f4 lea -0xc(%ebp),%esp
11374c: 5b pop %ebx
11374d: 5e pop %esi
11374e: 5f pop %edi
11374f: c9 leave
113750: c3 ret
113751: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
113754: e8 8f bf ff ff call 10f6e8 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
113759: b8 05 00 00 00 mov $0x5,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11375e: 8d 65 f4 lea -0xc(%ebp),%esp
113761: 5b pop %ebx
113762: 5e pop %esi
113763: 5f pop %edi
113764: c9 leave
113765: c3 ret
113766: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
113768: b8 09 00 00 00 mov $0x9,%eax
11376d: eb ae jmp 11371d <rtems_barrier_create+0x99>
00107d3c <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
107d3c: 55 push %ebp
107d3d: 89 e5 mov %esp,%ebp
107d3f: 57 push %edi
107d40: 56 push %esi
107d41: 53 push %ebx
107d42: 83 ec 1c sub $0x1c,%esp
107d45: 8b 45 08 mov 0x8(%ebp),%eax
107d48: 8b 5d 0c mov 0xc(%ebp),%ebx
107d4b: 8b 75 10 mov 0x10(%ebp),%esi
const char *p;
if ( !name )
107d4e: 85 c0 test %eax,%eax
107d50: 75 0e jne 107d60 <rtems_bsp_cmdline_get_param+0x24>
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
107d52: 31 db xor %ebx,%ebx
copy_string( p, value, length );
return value;
}
107d54: 89 d8 mov %ebx,%eax
107d56: 8d 65 f4 lea -0xc(%ebp),%esp
107d59: 5b pop %ebx
107d5a: 5e pop %esi
107d5b: 5f pop %edi
107d5c: c9 leave
107d5d: c3 ret
107d5e: 66 90 xchg %ax,%ax
const char *p;
if ( !name )
return NULL;
if ( !value )
107d60: 85 db test %ebx,%ebx
107d62: 74 f0 je 107d54 <rtems_bsp_cmdline_get_param+0x18>
return NULL;
if ( !length )
107d64: 85 f6 test %esi,%esi
107d66: 74 ea je 107d52 <rtems_bsp_cmdline_get_param+0x16>
return NULL;
value[0] = '\0';
107d68: c6 03 00 movb $0x0,(%ebx)
p = rtems_bsp_cmdline_get_param_raw( name );
107d6b: 83 ec 0c sub $0xc,%esp
107d6e: 50 push %eax
107d6f: e8 48 00 00 00 call 107dbc <rtems_bsp_cmdline_get_param_raw>
if ( !p )
107d74: 83 c4 10 add $0x10,%esp
107d77: 85 c0 test %eax,%eax
107d79: 74 d7 je 107d52 <rtems_bsp_cmdline_get_param+0x16>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
107d7b: 8a 08 mov (%eax),%cl
107d7d: 84 c9 test %cl,%cl
107d7f: 74 d3 je 107d54 <rtems_bsp_cmdline_get_param+0x18><== NEVER TAKEN
107d81: 4e dec %esi
107d82: 89 75 e4 mov %esi,-0x1c(%ebp)
107d85: 74 cd je 107d54 <rtems_bsp_cmdline_get_param+0x18><== NEVER TAKEN
107d87: 31 f6 xor %esi,%esi
107d89: 31 d2 xor %edx,%edx
107d8b: 31 ff xor %edi,%edi
107d8d: eb 24 jmp 107db3 <rtems_bsp_cmdline_get_param+0x77>
107d8f: 90 nop
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
107d90: f7 c7 01 00 00 00 test $0x1,%edi
107d96: 75 05 jne 107d9d <rtems_bsp_cmdline_get_param+0x61>
107d98: 80 f9 20 cmp $0x20,%cl
107d9b: 74 b7 je 107d54 <rtems_bsp_cmdline_get_param+0x18>
break;
value[i++] = *p++;
107d9d: 88 0c 33 mov %cl,(%ebx,%esi,1)
107da0: 42 inc %edx
107da1: 89 d6 mov %edx,%esi
value[i] = '\0';
107da3: c6 04 13 00 movb $0x0,(%ebx,%edx,1)
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
107da7: 8a 0c 10 mov (%eax,%edx,1),%cl
107daa: 84 c9 test %cl,%cl
107dac: 74 a6 je 107d54 <rtems_bsp_cmdline_get_param+0x18>
107dae: 3b 55 e4 cmp -0x1c(%ebp),%edx
107db1: 73 a1 jae 107d54 <rtems_bsp_cmdline_get_param+0x18>
if ( *p == '\"' ) {
107db3: 80 f9 22 cmp $0x22,%cl
107db6: 75 d8 jne 107d90 <rtems_bsp_cmdline_get_param+0x54>
quotes++;
107db8: 47 inc %edi
107db9: eb e2 jmp 107d9d <rtems_bsp_cmdline_get_param+0x61>
00107dbc <rtems_bsp_cmdline_get_param_raw>:
extern const char *bsp_boot_cmdline;
const char *rtems_bsp_cmdline_get_param_raw(
const char *name
)
{
107dbc: 55 push %ebp
107dbd: 89 e5 mov %esp,%ebp
107dbf: 83 ec 08 sub $0x8,%esp
107dc2: 8b 45 08 mov 0x8(%ebp),%eax
const char *p;
if ( !name )
107dc5: 85 c0 test %eax,%eax
107dc7: 75 07 jne 107dd0 <rtems_bsp_cmdline_get_param_raw+0x14>
return NULL;
if ( !bsp_boot_cmdline )
return NULL;
107dc9: 31 c0 xor %eax,%eax
p = strstr(bsp_boot_cmdline, name);
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
}
107dcb: c9 leave
107dcc: c3 ret
107dcd: 8d 76 00 lea 0x0(%esi),%esi
const char *p;
if ( !name )
return NULL;
if ( !bsp_boot_cmdline )
107dd0: 8b 15 d8 7c 12 00 mov 0x127cd8,%edx
107dd6: 85 d2 test %edx,%edx
107dd8: 74 ef je 107dc9 <rtems_bsp_cmdline_get_param_raw+0xd>
return NULL;
p = strstr(bsp_boot_cmdline, name);
107dda: 83 ec 08 sub $0x8,%esp
107ddd: 50 push %eax
107dde: 52 push %edx
107ddf: e8 6c ce 00 00 call 114c50 <strstr>
107de4: 83 c4 10 add $0x10,%esp
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
}
107de7: c9 leave
107de8: c3 ret
00107dec <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
107dec: 55 push %ebp
107ded: 89 e5 mov %esp,%ebp
107def: 57 push %edi
107df0: 53 push %ebx
107df1: 8b 7d 08 mov 0x8(%ebp),%edi
107df4: 8b 5d 0c mov 0xc(%ebp),%ebx
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
107df7: 50 push %eax
107df8: ff 75 10 pushl 0x10(%ebp)
107dfb: 53 push %ebx
107dfc: 57 push %edi
107dfd: e8 3a ff ff ff call 107d3c <rtems_bsp_cmdline_get_param>
107e02: 89 c2 mov %eax,%edx
if ( !p )
107e04: 83 c4 10 add $0x10,%esp
107e07: 85 c0 test %eax,%eax
107e09: 75 0d jne 107e18 <rtems_bsp_cmdline_get_param_rhs+0x2c>
return NULL;
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
107e0b: 31 db xor %ebx,%ebx
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
}
107e0d: 89 d8 mov %ebx,%eax
107e0f: 8d 65 f8 lea -0x8(%ebp),%esp
107e12: 5b pop %ebx
107e13: 5f pop %edi
107e14: c9 leave
107e15: c3 ret
107e16: 66 90 xchg %ax,%ax
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
107e18: 31 c0 xor %eax,%eax
107e1a: b9 ff ff ff ff mov $0xffffffff,%ecx
107e1f: f2 ae repnz scas %es:(%edi),%al
107e21: f7 d1 not %ecx
107e23: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
if ( *rhs != '=' )
107e27: 80 38 3d cmpb $0x3d,(%eax)
107e2a: 75 df jne 107e0b <rtems_bsp_cmdline_get_param_rhs+0x1f>
return NULL;
rhs++;
107e2c: 8d 48 01 lea 0x1(%eax),%ecx
if ( *rhs == '\"' )
107e2f: 8a 50 01 mov 0x1(%eax),%dl
107e32: 80 fa 22 cmp $0x22,%dl
107e35: 74 29 je 107e60 <rtems_bsp_cmdline_get_param_rhs+0x74>
rhs++;
for ( d=value ; *rhs ; )
107e37: 84 d2 test %dl,%dl
107e39: 74 31 je 107e6c <rtems_bsp_cmdline_get_param_rhs+0x80>
107e3b: 89 d8 mov %ebx,%eax
107e3d: 8d 76 00 lea 0x0(%esi),%esi
*d++ = *rhs++;
107e40: 88 10 mov %dl,(%eax)
107e42: 40 inc %eax
107e43: 41 inc %ecx
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
107e44: 8a 11 mov (%ecx),%dl
107e46: 84 d2 test %dl,%dl
107e48: 75 f6 jne 107e40 <rtems_bsp_cmdline_get_param_rhs+0x54>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
107e4a: 8d 50 ff lea -0x1(%eax),%edx
107e4d: 80 78 ff 22 cmpb $0x22,-0x1(%eax)
107e51: 74 15 je 107e68 <rtems_bsp_cmdline_get_param_rhs+0x7c>
d--;
*d = '\0';
107e53: c6 00 00 movb $0x0,(%eax)
return value;
}
107e56: 89 d8 mov %ebx,%eax
107e58: 8d 65 f8 lea -0x8(%ebp),%esp
107e5b: 5b pop %ebx
107e5c: 5f pop %edi
107e5d: c9 leave
107e5e: c3 ret
107e5f: 90 nop
if ( *rhs != '=' )
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
107e60: 8d 48 02 lea 0x2(%eax),%ecx
107e63: 8a 50 02 mov 0x2(%eax),%dl
107e66: eb cf jmp 107e37 <rtems_bsp_cmdline_get_param_rhs+0x4b>
for ( d=value ; *rhs ; )
*d++ = *rhs++;
if ( *(d-1) == '\"' )
107e68: 89 d0 mov %edx,%eax
107e6a: eb e7 jmp 107e53 <rtems_bsp_cmdline_get_param_rhs+0x67>
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
107e6c: 89 d8 mov %ebx,%eax
107e6e: eb da jmp 107e4a <rtems_bsp_cmdline_get_param_rhs+0x5e>
0010c13c <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
10c13c: 55 push %ebp
10c13d: 89 e5 mov %esp,%ebp
10c13f: 56 push %esi
10c140: 53 push %ebx
10c141: 8b 5d 10 mov 0x10(%ebp),%ebx
10c144: 8b 75 14 mov 0x14(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
10c147: 83 ec 08 sub $0x8,%esp
10c14a: ff 75 0c pushl 0xc(%ebp)
10c14d: ff 75 08 pushl 0x8(%ebp)
10c150: e8 e3 04 00 00 call 10c638 <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
10c155: 83 c4 10 add $0x10,%esp
10c158: 84 c0 test %al,%al
10c15a: 75 0c jne 10c168 <rtems_chain_append_with_notification+0x2c><== ALWAYS TAKEN
sc = rtems_event_send( task, events );
}
return sc;
}
10c15c: 31 c0 xor %eax,%eax
10c15e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10c161: 5b pop %ebx <== NOT EXECUTED
10c162: 5e pop %esi <== NOT EXECUTED
10c163: c9 leave <== NOT EXECUTED
10c164: c3 ret <== NOT EXECUTED
10c165: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
10c168: 89 75 0c mov %esi,0xc(%ebp)
10c16b: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10c16e: 8d 65 f8 lea -0x8(%ebp),%esp
10c171: 5b pop %ebx
10c172: 5e pop %esi
10c173: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
10c174: e9 a3 f5 ff ff jmp 10b71c <rtems_event_send>
0010c17c <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
10c17c: 55 push %ebp
10c17d: 89 e5 mov %esp,%ebp
10c17f: 56 push %esi
10c180: 53 push %ebx
10c181: 8b 5d 0c mov 0xc(%ebp),%ebx
10c184: 8b 75 10 mov 0x10(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node **node
)
{
return _Chain_Get_with_empty_check( chain, node );
10c187: 83 ec 08 sub $0x8,%esp
10c18a: ff 75 14 pushl 0x14(%ebp)
10c18d: ff 75 08 pushl 0x8(%ebp)
10c190: e8 0b 05 00 00 call 10c6a0 <_Chain_Get_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
10c195: 83 c4 10 add $0x10,%esp
10c198: 84 c0 test %al,%al
10c19a: 75 0c jne 10c1a8 <rtems_chain_get_with_notification+0x2c>
sc = rtems_event_send( task, events );
}
return sc;
}
10c19c: 31 c0 xor %eax,%eax
10c19e: 8d 65 f8 lea -0x8(%ebp),%esp
10c1a1: 5b pop %ebx
10c1a2: 5e pop %esi
10c1a3: c9 leave
10c1a4: c3 ret
10c1a5: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
10c1a8: 89 75 0c mov %esi,0xc(%ebp)
10c1ab: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10c1ae: 8d 65 f8 lea -0x8(%ebp),%esp
10c1b1: 5b pop %ebx
10c1b2: 5e pop %esi
10c1b3: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
10c1b4: e9 63 f5 ff ff jmp 10b71c <rtems_event_send>
0010c1bc <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10c1bc: 55 push %ebp
10c1bd: 89 e5 mov %esp,%ebp
10c1bf: 57 push %edi
10c1c0: 56 push %esi
10c1c1: 53 push %ebx
10c1c2: 83 ec 1c sub $0x1c,%esp
10c1c5: 8b 75 08 mov 0x8(%ebp),%esi
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10c1c8: 8d 7d e4 lea -0x1c(%ebp),%edi
10c1cb: 90 nop
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10c1cc: 83 ec 0c sub $0xc,%esp
10c1cf: 56 push %esi
10c1d0: e8 07 05 00 00 call 10c6dc <_Chain_Get>
10c1d5: 89 c3 mov %eax,%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c1d7: 83 c4 10 add $0x10,%esp
10c1da: 85 c0 test %eax,%eax
10c1dc: 75 22 jne 10c200 <rtems_chain_get_with_wait+0x44>
) {
rtems_event_set out;
sc = rtems_event_receive(
10c1de: 57 push %edi
10c1df: ff 75 10 pushl 0x10(%ebp)
10c1e2: 6a 00 push $0x0
10c1e4: ff 75 0c pushl 0xc(%ebp)
10c1e7: e8 a8 f3 ff ff call 10b594 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10c1ec: 83 c4 10 add $0x10,%esp
10c1ef: 85 c0 test %eax,%eax
10c1f1: 74 d9 je 10c1cc <rtems_chain_get_with_wait+0x10><== NEVER TAKEN
timeout,
&out
);
}
*node_ptr = node;
10c1f3: 8b 55 14 mov 0x14(%ebp),%edx
10c1f6: 89 1a mov %ebx,(%edx)
return sc;
}
10c1f8: 8d 65 f4 lea -0xc(%ebp),%esp
10c1fb: 5b pop %ebx
10c1fc: 5e pop %esi
10c1fd: 5f pop %edi
10c1fe: c9 leave
10c1ff: c3 ret
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c200: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10c202: 8b 55 14 mov 0x14(%ebp),%edx
10c205: 89 1a mov %ebx,(%edx)
return sc;
}
10c207: 8d 65 f4 lea -0xc(%ebp),%esp
10c20a: 5b pop %ebx
10c20b: 5e pop %esi
10c20c: 5f pop %edi
10c20d: c9 leave
10c20e: c3 ret
0010c210 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
10c210: 55 push %ebp
10c211: 89 e5 mov %esp,%ebp
10c213: 56 push %esi
10c214: 53 push %ebx
10c215: 8b 5d 10 mov 0x10(%ebp),%ebx
10c218: 8b 75 14 mov 0x14(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
10c21b: 83 ec 08 sub $0x8,%esp
10c21e: ff 75 0c pushl 0xc(%ebp)
10c221: ff 75 08 pushl 0x8(%ebp)
10c224: e8 f7 04 00 00 call 10c720 <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
10c229: 83 c4 10 add $0x10,%esp
10c22c: 84 c0 test %al,%al
10c22e: 75 0c jne 10c23c <rtems_chain_prepend_with_notification+0x2c><== ALWAYS TAKEN
sc = rtems_event_send( task, events );
}
return sc;
}
10c230: 31 c0 xor %eax,%eax
10c232: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10c235: 5b pop %ebx <== NOT EXECUTED
10c236: 5e pop %esi <== NOT EXECUTED
10c237: c9 leave <== NOT EXECUTED
10c238: c3 ret <== NOT EXECUTED
10c239: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
10c23c: 89 75 0c mov %esi,0xc(%ebp)
10c23f: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10c242: 8d 65 f8 lea -0x8(%ebp),%esp
10c245: 5b pop %ebx
10c246: 5e pop %esi
10c247: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
10c248: e9 cf f4 ff ff jmp 10b71c <rtems_event_send>
00115a4c <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
115a4c: 55 push %ebp
115a4d: 89 e5 mov %esp,%ebp
115a4f: 53 push %ebx
115a50: 83 ec 04 sub $0x4,%esp
115a53: 8b 45 08 mov 0x8(%ebp),%eax
115a56: 8b 5d 0c mov 0xc(%ebp),%ebx
if ( !time_buffer )
115a59: 85 db test %ebx,%ebx
115a5b: 74 3b je 115a98 <rtems_clock_get+0x4c>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
115a5d: 85 c0 test %eax,%eax
115a5f: 74 2b je 115a8c <rtems_clock_get+0x40>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
115a61: 83 f8 01 cmp $0x1,%eax
115a64: 74 3e je 115aa4 <rtems_clock_get+0x58>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
115a66: 83 f8 02 cmp $0x2,%eax
115a69: 74 45 je 115ab0 <rtems_clock_get+0x64>
*interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
115a6b: 83 f8 03 cmp $0x3,%eax
115a6e: 74 4c je 115abc <rtems_clock_get+0x70>
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
115a70: 83 f8 04 cmp $0x4,%eax
115a73: 74 0b je 115a80 <rtems_clock_get+0x34>
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
115a75: b8 0a 00 00 00 mov $0xa,%eax
}
115a7a: 5a pop %edx
115a7b: 5b pop %ebx
115a7c: c9 leave
115a7d: c3 ret
115a7e: 66 90 xchg %ax,%ax
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
115a80: 89 5d 08 mov %ebx,0x8(%ebp)
return RTEMS_INVALID_NUMBER;
}
115a83: 59 pop %ecx
115a84: 5b pop %ebx
115a85: c9 leave
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
115a86: e9 41 01 00 00 jmp 115bcc <rtems_clock_get_tod_timeval>
115a8b: 90 nop
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
115a8c: 89 5d 08 mov %ebx,0x8(%ebp)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
115a8f: 58 pop %eax
115a90: 5b pop %ebx
115a91: c9 leave
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
115a92: e9 81 00 00 00 jmp 115b18 <rtems_clock_get_tod>
115a97: 90 nop
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
115a98: b8 09 00 00 00 mov $0x9,%eax
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
115a9d: 5a pop %edx
115a9e: 5b pop %ebx
115a9f: c9 leave
115aa0: c3 ret
115aa1: 8d 76 00 lea 0x0(%esi),%esi
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
115aa4: 89 5d 08 mov %ebx,0x8(%ebp)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
115aa7: 5b pop %ebx
115aa8: 5b pop %ebx
115aa9: c9 leave
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
115aaa: e9 19 00 00 00 jmp 115ac8 <rtems_clock_get_seconds_since_epoch>
115aaf: 90 nop
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
115ab0: e8 57 00 00 00 call 115b0c <rtems_clock_get_ticks_since_boot>
115ab5: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
115ab7: 31 c0 xor %eax,%eax
115ab9: eb bf jmp 115a7a <rtems_clock_get+0x2e>
115abb: 90 nop
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
115abc: e8 37 00 00 00 call 115af8 <rtems_clock_get_ticks_per_second>
115ac1: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
115ac3: 31 c0 xor %eax,%eax
115ac5: eb b3 jmp 115a7a <rtems_clock_get+0x2e>
00115bcc <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
115bcc: 55 push %ebp
115bcd: 89 e5 mov %esp,%ebp
115bcf: 56 push %esi
115bd0: 53 push %ebx
115bd1: 83 ec 10 sub $0x10,%esp
115bd4: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !time )
115bd7: 85 db test %ebx,%ebx
115bd9: 74 51 je 115c2c <rtems_clock_get_tod_timeval+0x60>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
115bdb: 80 3d e4 21 14 00 00 cmpb $0x0,0x1421e4
115be2: 75 0c jne 115bf0 <rtems_clock_get_tod_timeval+0x24>
return RTEMS_NOT_DEFINED;
115be4: b8 0b 00 00 00 mov $0xb,%eax
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
115be9: 8d 65 f8 lea -0x8(%ebp),%esp
115bec: 5b pop %ebx
115bed: 5e pop %esi
115bee: c9 leave
115bef: c3 ret
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
115bf0: 9c pushf
115bf1: fa cli
115bf2: 5e pop %esi
_TOD_Get( &now );
115bf3: 83 ec 0c sub $0xc,%esp
115bf6: 8d 45 f0 lea -0x10(%ebp),%eax
115bf9: 50 push %eax
115bfa: e8 21 44 00 00 call 11a020 <_TOD_Get>
_ISR_Enable(level);
115bff: 56 push %esi
115c00: 9d popf
useconds = (suseconds_t)now.tv_nsec;
115c01: 8b 4d f4 mov -0xc(%ebp),%ecx
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
115c04: 8b 45 f0 mov -0x10(%ebp),%eax
115c07: 89 03 mov %eax,(%ebx)
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
115c09: b8 d3 4d 62 10 mov $0x10624dd3,%eax
115c0e: f7 e9 imul %ecx
115c10: 89 d0 mov %edx,%eax
115c12: c1 f8 06 sar $0x6,%eax
115c15: c1 f9 1f sar $0x1f,%ecx
115c18: 29 c8 sub %ecx,%eax
115c1a: 89 43 04 mov %eax,0x4(%ebx)
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
115c1d: 83 c4 10 add $0x10,%esp
115c20: 31 c0 xor %eax,%eax
}
115c22: 8d 65 f8 lea -0x8(%ebp),%esp
115c25: 5b pop %ebx
115c26: 5e pop %esi
115c27: c9 leave
115c28: c3 ret
115c29: 8d 76 00 lea 0x0(%esi),%esi
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
return RTEMS_INVALID_ADDRESS;
115c2c: b8 09 00 00 00 mov $0x9,%eax
115c31: eb b6 jmp 115be9 <rtems_clock_get_tod_timeval+0x1d>
0010b1c4 <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
10b1c4: 55 push %ebp
10b1c5: 89 e5 mov %esp,%ebp
10b1c7: 83 ec 08 sub $0x8,%esp
10b1ca: 8b 45 08 mov 0x8(%ebp),%eax
if ( !uptime )
10b1cd: 85 c0 test %eax,%eax
10b1cf: 74 13 je 10b1e4 <rtems_clock_get_uptime+0x20>
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
10b1d1: 83 ec 0c sub $0xc,%esp
10b1d4: 50 push %eax
10b1d5: e8 82 16 00 00 call 10c85c <_TOD_Get_uptime_as_timespec>
return RTEMS_SUCCESSFUL;
10b1da: 83 c4 10 add $0x10,%esp
10b1dd: 31 c0 xor %eax,%eax
}
10b1df: c9 leave
10b1e0: c3 ret
10b1e1: 8d 76 00 lea 0x0(%esi),%esi
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
return RTEMS_INVALID_ADDRESS;
10b1e4: b8 09 00 00 00 mov $0x9,%eax
_TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL;
}
10b1e9: c9 leave
10b1ea: c3 ret
0010c0f8 <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
10c0f8: 55 push %ebp
10c0f9: 89 e5 mov %esp,%ebp
10c0fb: 53 push %ebx
10c0fc: 83 ec 14 sub $0x14,%esp
10c0ff: 8b 5d 08 mov 0x8(%ebp),%ebx
struct timespec newtime;
if ( !time_buffer )
10c102: 85 db test %ebx,%ebx
10c104: 74 66 je 10c16c <rtems_clock_set+0x74>
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
10c106: 83 ec 0c sub $0xc,%esp
10c109: 53 push %ebx
10c10a: e8 39 01 00 00 call 10c248 <_TOD_Validate>
10c10f: 83 c4 10 add $0x10,%esp
10c112: 84 c0 test %al,%al
10c114: 75 0a jne 10c120 <rtems_clock_set+0x28>
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
10c116: b8 14 00 00 00 mov $0x14,%eax
}
10c11b: 8b 5d fc mov -0x4(%ebp),%ebx
10c11e: c9 leave
10c11f: c3 ret
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
10c120: 83 ec 0c sub $0xc,%esp
10c123: 53 push %ebx
10c124: e8 93 00 00 00 call 10c1bc <_TOD_To_seconds>
10c129: 89 45 f0 mov %eax,-0x10(%ebp)
newtime.tv_nsec = time_buffer->ticks *
10c12c: 8b 43 18 mov 0x18(%ebx),%eax
10c12f: 0f af 05 2c 62 12 00 imul 0x12622c,%eax
10c136: 8d 04 80 lea (%eax,%eax,4),%eax
10c139: 8d 04 80 lea (%eax,%eax,4),%eax
10c13c: 8d 04 80 lea (%eax,%eax,4),%eax
10c13f: c1 e0 03 shl $0x3,%eax
10c142: 89 45 f4 mov %eax,-0xc(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c145: a1 50 23 13 00 mov 0x132350,%eax
10c14a: 40 inc %eax
10c14b: a3 50 23 13 00 mov %eax,0x132350
rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
10c150: 8d 45 f0 lea -0x10(%ebp),%eax
10c153: 89 04 24 mov %eax,(%esp)
10c156: e8 69 19 00 00 call 10dac4 <_TOD_Set>
_Thread_Enable_dispatch();
10c15b: e8 f8 2e 00 00 call 10f058 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c160: 83 c4 10 add $0x10,%esp
10c163: 31 c0 xor %eax,%eax
}
return RTEMS_INVALID_CLOCK;
}
10c165: 8b 5d fc mov -0x4(%ebp),%ebx
10c168: c9 leave
10c169: c3 ret
10c16a: 66 90 xchg %ax,%ax
)
{
struct timespec newtime;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
10c16c: b8 09 00 00 00 mov $0x9,%eax
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10c171: 8b 5d fc mov -0x4(%ebp),%ebx
10c174: c9 leave
10c175: c3 ret
0010afd0 <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
10afd0: 55 push %ebp
10afd1: 89 e5 mov %esp,%ebp
10afd3: 83 ec 08 sub $0x8,%esp
_TOD_Tickle_ticks();
10afd6: e8 45 15 00 00 call 10c520 <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
10afdb: 83 ec 0c sub $0xc,%esp
10afde: 68 5c 76 12 00 push $0x12765c
10afe3: e8 bc 38 00 00 call 10e8a4 <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
10afe8: e8 7f 33 00 00 call 10e36c <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Thread_Dispatch_necessary );
10afed: a0 44 7b 12 00 mov 0x127b44,%al
if ( _Thread_Is_context_switch_necessary() &&
10aff2: 83 c4 10 add $0x10,%esp
10aff5: 84 c0 test %al,%al
10aff7: 74 09 je 10b002 <rtems_clock_tick+0x32>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
10aff9: a1 50 75 12 00 mov 0x127550,%eax
10affe: 85 c0 test %eax,%eax
10b000: 74 06 je 10b008 <rtems_clock_tick+0x38>
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
10b002: 31 c0 xor %eax,%eax
10b004: c9 leave
10b005: c3 ret
10b006: 66 90 xchg %ax,%ax
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
10b008: e8 77 27 00 00 call 10d784 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
}
10b00d: 31 c0 xor %eax,%eax
10b00f: c9 leave
10b010: c3 ret
001083f0 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
1083f0: 55 push %ebp
1083f1: 89 e5 mov %esp,%ebp
1083f3: 57 push %edi
1083f4: 56 push %esi
1083f5: 53 push %ebx
1083f6: 83 ec 6c sub $0x6c,%esp
1083f9: 8b 7d 08 mov 0x8(%ebp),%edi
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
1083fc: 8b 45 0c mov 0xc(%ebp),%eax
1083ff: 85 c0 test %eax,%eax
108401: 0f 84 57 01 00 00 je 10855e <rtems_cpu_usage_report_with_plugin+0x16e><== NEVER TAKEN
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
108407: 83 ec 0c sub $0xc,%esp
10840a: 8d 45 d8 lea -0x28(%ebp),%eax
10840d: 50 push %eax
10840e: e8 21 56 00 00 call 10da34 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
108413: 83 c4 0c add $0xc,%esp
108416: 8d 55 d0 lea -0x30(%ebp),%edx
108419: 52 push %edx
10841a: 8d 4d d8 lea -0x28(%ebp),%ecx
10841d: 51 push %ecx
10841e: 68 e0 29 13 00 push $0x1329e0
108423: e8 98 78 00 00 call 10fcc0 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
108428: 5b pop %ebx
108429: 5e pop %esi
10842a: 68 30 32 12 00 push $0x123230
10842f: 57 push %edi
108430: ff 55 0c call *0xc(%ebp)
108433: 83 c4 10 add $0x10,%esp
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
108436: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp)
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10843d: 8b 5d a4 mov -0x5c(%ebp),%ebx
108440: 8b 04 9d 28 23 13 00 mov 0x132328(,%ebx,4),%eax
108447: 8b 70 04 mov 0x4(%eax),%esi
if ( information ) {
10844a: 85 f6 test %esi,%esi
10844c: 0f 84 e2 00 00 00 je 108534 <rtems_cpu_usage_report_with_plugin+0x144><== NEVER TAKEN
for ( i=1 ; i <= information->maximum ; i++ ) {
108452: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
108457: 0f 84 d7 00 00 00 je 108534 <rtems_cpu_usage_report_with_plugin+0x144>
10845d: bb 01 00 00 00 mov $0x1,%ebx
108462: 89 5d 94 mov %ebx,-0x6c(%ebp)
108465: eb 4b jmp 1084b2 <rtems_cpu_usage_report_with_plugin+0xc2>
108467: 90 nop
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
108468: 8d 45 e0 lea -0x20(%ebp),%eax
10846b: 50 push %eax
10846c: 8d 55 e4 lea -0x1c(%ebp),%edx
10846f: 52 push %edx
108470: 8d 4d d0 lea -0x30(%ebp),%ecx
108473: 51 push %ecx
108474: 8d 5d c8 lea -0x38(%ebp),%ebx
108477: 53 push %ebx
108478: e8 7f 77 00 00 call 10fbfc <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
10847d: 58 pop %eax
10847e: 5a pop %edx
10847f: ff 75 e0 pushl -0x20(%ebp)
108482: ff 75 e4 pushl -0x1c(%ebp)
108485: ba d3 4d 62 10 mov $0x10624dd3,%edx
10848a: 8b 45 cc mov -0x34(%ebp),%eax
10848d: f7 e2 mul %edx
10848f: c1 ea 06 shr $0x6,%edx
108492: 52 push %edx
108493: ff 75 c8 pushl -0x38(%ebp)
108496: 68 a3 34 12 00 push $0x1234a3
10849b: 57 push %edi
10849c: ff 55 0c call *0xc(%ebp)
10849f: 83 c4 20 add $0x20,%esp
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
1084a2: ff 45 94 incl -0x6c(%ebp)
1084a5: 0f b7 46 10 movzwl 0x10(%esi),%eax
1084a9: 3b 45 94 cmp -0x6c(%ebp),%eax
1084ac: 0f 82 82 00 00 00 jb 108534 <rtems_cpu_usage_report_with_plugin+0x144>
the_thread = (Thread_Control *)information->local_table[ i ];
1084b2: 8b 46 1c mov 0x1c(%esi),%eax
1084b5: 8b 4d 94 mov -0x6c(%ebp),%ecx
1084b8: 8b 14 88 mov (%eax,%ecx,4),%edx
if ( !the_thread )
1084bb: 85 d2 test %edx,%edx
1084bd: 74 e3 je 1084a2 <rtems_cpu_usage_report_with_plugin+0xb2><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
1084bf: 51 push %ecx
1084c0: 8d 5d b3 lea -0x4d(%ebp),%ebx
1084c3: 53 push %ebx
1084c4: 6a 0d push $0xd
1084c6: ff 72 08 pushl 0x8(%edx)
1084c9: 89 55 a0 mov %edx,-0x60(%ebp)
1084cc: e8 0b 42 00 00 call 10c6dc <rtems_object_get_name>
(*print)(
1084d1: 53 push %ebx
1084d2: 8b 55 a0 mov -0x60(%ebp),%edx
1084d5: ff 72 08 pushl 0x8(%edx)
1084d8: 68 90 34 12 00 push $0x123490
1084dd: 57 push %edi
1084de: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
1084e1: 8b 55 a0 mov -0x60(%ebp),%edx
1084e4: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx
1084ea: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx
1084f0: 89 4d c8 mov %ecx,-0x38(%ebp)
1084f3: 89 5d cc mov %ebx,-0x34(%ebp)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
1084f6: 83 c4 20 add $0x20,%esp
1084f9: a1 78 29 13 00 mov 0x132978,%eax
1084fe: 8b 5a 08 mov 0x8(%edx),%ebx
108501: 39 58 08 cmp %ebx,0x8(%eax)
108504: 0f 85 5e ff ff ff jne 108468 <rtems_cpu_usage_report_with_plugin+0x78>
Timestamp_Control used;
_Timestamp_Subtract(
10850a: 50 push %eax
10850b: 8d 45 c0 lea -0x40(%ebp),%eax
10850e: 50 push %eax
10850f: 8d 55 d8 lea -0x28(%ebp),%edx
108512: 52 push %edx
108513: 68 48 24 13 00 push $0x132448
108518: e8 a3 77 00 00 call 10fcc0 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
10851d: 59 pop %ecx
10851e: 5b pop %ebx
10851f: 8d 4d c0 lea -0x40(%ebp),%ecx
108522: 51 push %ecx
108523: 8d 5d c8 lea -0x38(%ebp),%ebx
108526: 53 push %ebx
108527: e8 94 76 00 00 call 10fbc0 <_Timespec_Add_to>
10852c: 83 c4 10 add $0x10,%esp
10852f: e9 34 ff ff ff jmp 108468 <rtems_cpu_usage_report_with_plugin+0x78>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
108534: ff 45 a4 incl -0x5c(%ebp)
108537: 83 7d a4 04 cmpl $0x4,-0x5c(%ebp)
10853b: 0f 85 fc fe ff ff jne 10843d <rtems_cpu_usage_report_with_plugin+0x4d>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
108541: ba d3 4d 62 10 mov $0x10624dd3,%edx
108546: 8b 45 d4 mov -0x2c(%ebp),%eax
108549: f7 e2 mul %edx
10854b: c1 ea 06 shr $0x6,%edx
10854e: 52 push %edx
10854f: ff 75 d0 pushl -0x30(%ebp)
108552: 68 a4 33 12 00 push $0x1233a4
108557: 57 push %edi
108558: ff 55 0c call *0xc(%ebp)
10855b: 83 c4 10 add $0x10,%esp
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
10855e: 8d 65 f4 lea -0xc(%ebp),%esp
108561: 5b pop %ebx
108562: 5e pop %esi
108563: 5f pop %edi
108564: c9 leave
108565: c3 ret
001132a8 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
1132a8: 55 push %ebp
1132a9: 89 e5 mov %esp,%ebp
1132ab: 53 push %ebx
1132ac: 83 ec 04 sub $0x4,%esp
1132af: 8b 45 08 mov 0x8(%ebp),%eax
if (sc == RTEMS_SUCCESSFUL) {
1132b2: 85 c0 test %eax,%eax
1132b4: 75 06 jne 1132bc <rtems_deviceio_errno+0x14>
return 0;
1132b6: 31 c0 xor %eax,%eax
errno = eno;
return -1;
}
}
1132b8: 5a pop %edx
1132b9: 5b pop %ebx
1132ba: c9 leave
1132bb: c3 ret
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
1132bc: 83 f8 1c cmp $0x1c,%eax
1132bf: 77 17 ja 1132d8 <rtems_deviceio_errno+0x30><== NEVER TAKEN
eno = status_code_to_errno [sc];
1132c1: 8b 1c 85 c0 13 12 00 mov 0x1213c0(,%eax,4),%ebx
}
errno = eno;
1132c8: e8 67 00 00 00 call 113334 <__errno>
1132cd: 89 18 mov %ebx,(%eax)
return -1;
1132cf: b8 ff ff ff ff mov $0xffffffff,%eax
1132d4: eb e2 jmp 1132b8 <rtems_deviceio_errno+0x10>
1132d6: 66 90 xchg %ax,%ax
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
1132d8: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED
1132dd: eb e9 jmp 1132c8 <rtems_deviceio_errno+0x20><== NOT EXECUTED
0010b19c <rtems_event_send>:
rtems_status_code rtems_event_send(
rtems_id id,
rtems_event_set event_in
)
{
10b19c: 55 push %ebp
10b19d: 89 e5 mov %esp,%ebp
10b19f: 53 push %ebx
10b1a0: 83 ec 1c sub $0x1c,%esp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
the_thread = _Thread_Get( id, &location );
10b1a3: 8d 45 f4 lea -0xc(%ebp),%eax
10b1a6: 50 push %eax
10b1a7: ff 75 08 pushl 0x8(%ebp)
10b1aa: e8 71 27 00 00 call 10d920 <_Thread_Get>
switch ( location ) {
10b1af: 83 c4 10 add $0x10,%esp
10b1b2: 8b 55 f4 mov -0xc(%ebp),%edx
10b1b5: 85 d2 test %edx,%edx
10b1b7: 75 2b jne 10b1e4 <rtems_event_send+0x48>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
10b1b9: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
rtems_event_set *the_event_set
)
{
ISR_Level level;
_ISR_Disable( level );
10b1bf: 9c pushf
10b1c0: fa cli
10b1c1: 59 pop %ecx
*the_event_set |= the_new_events;
10b1c2: 8b 5d 0c mov 0xc(%ebp),%ebx
10b1c5: 09 1a or %ebx,(%edx)
_ISR_Enable( level );
10b1c7: 51 push %ecx
10b1c8: 9d popf
_Event_sets_Post( event_in, &api->pending_events );
_Event_Surrender( the_thread );
10b1c9: 83 ec 0c sub $0xc,%esp
10b1cc: 50 push %eax
10b1cd: e8 1e 00 00 00 call 10b1f0 <_Event_Surrender>
_Thread_Enable_dispatch();
10b1d2: e8 25 27 00 00 call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b1d7: 83 c4 10 add $0x10,%esp
10b1da: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b1dc: 8b 5d fc mov -0x4(%ebp),%ebx
10b1df: c9 leave
10b1e0: c3 ret
10b1e1: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b1e4: b8 04 00 00 00 mov $0x4,%eax
}
10b1e9: 8b 5d fc mov -0x4(%ebp),%ebx
10b1ec: c9 leave
10b1ed: c3 ret
0010d008 <rtems_extension_delete>:
#include <rtems/extension.h>
rtems_status_code rtems_extension_delete(
rtems_id id
)
{
10d008: 55 push %ebp
10d009: 89 e5 mov %esp,%ebp
10d00b: 53 push %ebx
10d00c: 83 ec 18 sub $0x18,%esp
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
10d00f: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Extension_Control *)
_Objects_Get( &_Extension_Information, id, location );
10d012: 50 push %eax
10d013: ff 75 08 pushl 0x8(%ebp)
10d016: 68 e0 25 13 00 push $0x1325e0
10d01b: e8 2c 12 00 00 call 10e24c <_Objects_Get>
10d020: 89 c3 mov %eax,%ebx
switch ( location ) {
10d022: 83 c4 10 add $0x10,%esp
10d025: 8b 55 f4 mov -0xc(%ebp),%edx
10d028: 85 d2 test %edx,%edx
10d02a: 75 38 jne 10d064 <rtems_extension_delete+0x5c>
case OBJECTS_LOCAL:
_User_extensions_Remove_set( &the_extension->Extension );
10d02c: 83 ec 0c sub $0xc,%esp
10d02f: 8d 40 10 lea 0x10(%eax),%eax
10d032: 50 push %eax
10d033: e8 ac 29 00 00 call 10f9e4 <_User_extensions_Remove_set>
_Objects_Close( &_Extension_Information, &the_extension->Object );
10d038: 59 pop %ecx
10d039: 58 pop %eax
10d03a: 53 push %ebx
10d03b: 68 e0 25 13 00 push $0x1325e0
10d040: e8 cb 0d 00 00 call 10de10 <_Objects_Close>
RTEMS_INLINE_ROUTINE void _Extension_Free (
Extension_Control *the_extension
)
{
_Objects_Free( &_Extension_Information, &the_extension->Object );
10d045: 58 pop %eax
10d046: 5a pop %edx
10d047: 53 push %ebx
10d048: 68 e0 25 13 00 push $0x1325e0
10d04d: e8 ba 10 00 00 call 10e10c <_Objects_Free>
_Extension_Free( the_extension );
_Thread_Enable_dispatch();
10d052: e8 a9 1c 00 00 call 10ed00 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d057: 83 c4 10 add $0x10,%esp
10d05a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d05c: 8b 5d fc mov -0x4(%ebp),%ebx
10d05f: c9 leave
10d060: c3 ret
10d061: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d064: b8 04 00 00 00 mov $0x4,%eax
}
10d069: 8b 5d fc mov -0x4(%ebp),%ebx
10d06c: c9 leave
10d06d: c3 ret
0010800c <rtems_filesystem_dirname>:
int rtems_filesystem_dirname(
const char *pathname
)
{
10800c: 55 push %ebp
10800d: 89 e5 mov %esp,%ebp
10800f: 57 push %edi
108010: 56 push %esi
108011: 53 push %ebx
108012: 83 ec 0c sub $0xc,%esp
108015: 8b 5d 08 mov 0x8(%ebp),%ebx
int len = strlen( pathname );
108018: 31 c0 xor %eax,%eax
10801a: b9 ff ff ff ff mov $0xffffffff,%ecx
10801f: 89 df mov %ebx,%edi
108021: f2 ae repnz scas %es:(%edi),%al
108023: f7 d1 not %ecx
while ( len ) {
108025: 89 ce mov %ecx,%esi
108027: 4e dec %esi
108028: 75 06 jne 108030 <rtems_filesystem_dirname+0x24><== ALWAYS TAKEN
10802a: eb 19 jmp 108045 <rtems_filesystem_dirname+0x39><== NOT EXECUTED
10802c: 85 f6 test %esi,%esi
10802e: 74 15 je 108045 <rtems_filesystem_dirname+0x39>
len--;
108030: 4e dec %esi
if ( rtems_filesystem_is_separator( pathname[len] ) )
108031: 83 ec 0c sub $0xc,%esp
108034: 0f be 04 33 movsbl (%ebx,%esi,1),%eax
108038: 50 push %eax
108039: e8 da 0e 00 00 call 108f18 <rtems_filesystem_is_separator>
10803e: 83 c4 10 add $0x10,%esp
108041: 85 c0 test %eax,%eax
108043: 74 e7 je 10802c <rtems_filesystem_dirname+0x20>
break;
}
return len;
}
108045: 89 f0 mov %esi,%eax
108047: 8d 65 f4 lea -0xc(%ebp),%esp
10804a: 5b pop %ebx
10804b: 5e pop %esi
10804c: 5f pop %edi
10804d: c9 leave
10804e: c3 ret
0011007c <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
11007c: 55 push %ebp
11007d: 89 e5 mov %esp,%ebp
11007f: 83 ec 18 sub $0x18,%esp
110082: 8b 45 08 mov 0x8(%ebp),%eax
find_arg fa = {
110085: 89 45 f0 mov %eax,-0x10(%ebp)
110088: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
11008f: 85 c0 test %eax,%eax
110091: 74 19 je 1100ac <rtems_filesystem_get_mount_handler+0x30><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
110093: 83 ec 08 sub $0x8,%esp
110096: 8d 45 f0 lea -0x10(%ebp),%eax
110099: 50 push %eax
11009a: 68 9c ff 10 00 push $0x10ff9c
11009f: e8 34 ff ff ff call 10ffd8 <rtems_filesystem_iterate>
1100a4: 8b 45 f4 mov -0xc(%ebp),%eax
1100a7: 83 c4 10 add $0x10,%esp
}
return fa.mount_h;
}
1100aa: c9 leave
1100ab: c3 ret
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
1100ac: 31 c0 xor %eax,%eax
rtems_filesystem_iterate( find_handler, &fa );
}
return fa.mount_h;
}
1100ae: c9 leave <== NOT EXECUTED
1100af: c3 ret <== NOT EXECUTED
00110238 <rtems_filesystem_get_sym_start_loc>:
#include "rtems/libio_.h"
void rtems_filesystem_get_sym_start_loc(const char *path,
int *index,
rtems_filesystem_location_info_t *loc)
{
110238: 55 push %ebp
110239: 89 e5 mov %esp,%ebp
11023b: 57 push %edi
11023c: 56 push %esi
11023d: 53 push %ebx
11023e: 83 ec 18 sub $0x18,%esp
110241: 8b 5d 0c mov 0xc(%ebp),%ebx
if (rtems_filesystem_is_separator(path[0])) {
110244: 8b 45 08 mov 0x8(%ebp),%eax
110247: 0f be 00 movsbl (%eax),%eax
11024a: 50 push %eax
11024b: e8 c8 8c ff ff call 108f18 <rtems_filesystem_is_separator>
110250: 83 c4 10 add $0x10,%esp
110253: 85 c0 test %eax,%eax
110255: 75 11 jne 110268 <rtems_filesystem_get_sym_start_loc+0x30>
*loc = rtems_filesystem_root;
*index = 1;
}
else {
*index = 0;
110257: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
}
11025d: 8d 65 f4 lea -0xc(%ebp),%esp
110260: 5b pop %ebx
110261: 5e pop %esi
110262: 5f pop %edi
110263: c9 leave
110264: c3 ret
110265: 8d 76 00 lea 0x0(%esi),%esi
void rtems_filesystem_get_sym_start_loc(const char *path,
int *index,
rtems_filesystem_location_info_t *loc)
{
if (rtems_filesystem_is_separator(path[0])) {
*loc = rtems_filesystem_root;
110268: 8b 35 b0 51 12 00 mov 0x1251b0,%esi
11026e: 83 c6 18 add $0x18,%esi
110271: b9 05 00 00 00 mov $0x5,%ecx
110276: 8b 7d 10 mov 0x10(%ebp),%edi
110279: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*index = 1;
11027b: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
else {
*index = 0;
}
}
110281: 8d 65 f4 lea -0xc(%ebp),%esp
110284: 5b pop %ebx
110285: 5e pop %esi
110286: 5f pop %edi
110287: c9 leave
110288: c3 ret
00107e3c <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
107e3c: 55 push %ebp
107e3d: 89 e5 mov %esp,%ebp
107e3f: 57 push %edi
107e40: 56 push %esi
107e41: 53 push %ebx
107e42: 83 ec 2c sub $0x2c,%esp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
107e45: a1 b0 51 12 00 mov 0x1251b0,%eax
107e4a: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
107e51: a1 20 f1 11 00 mov 0x11f120,%eax
107e56: 85 c0 test %eax,%eax
107e58: 0f 84 9f 00 00 00 je 107efd <rtems_filesystem_initialize+0xc1><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
107e5e: a1 b4 31 12 00 mov 0x1231b4,%eax
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
107e63: 83 ec 0c sub $0xc,%esp
107e66: 6a 00 push $0x0
107e68: ff 70 04 pushl 0x4(%eax)
107e6b: ff 30 pushl (%eax)
107e6d: ff 70 0c pushl 0xc(%eax)
107e70: ff 70 08 pushl 0x8(%eax)
107e73: e8 fc 06 00 00 call 108574 <mount>
if ( status == -1 )
107e78: 83 c4 20 add $0x20,%esp
107e7b: 40 inc %eax
107e7c: 0f 84 95 00 00 00 je 107f17 <rtems_filesystem_initialize+0xdb><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
107e82: a1 b0 51 12 00 mov 0x1251b0,%eax
107e87: 66 c7 40 30 00 00 movw $0x0,0x30(%eax)
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
107e8d: 83 ec 0c sub $0xc,%esp
107e90: 6a 00 push $0x0
107e92: 8d 5d d4 lea -0x2c(%ebp),%ebx
107e95: 53 push %ebx
107e96: 6a 00 push $0x0
107e98: 6a 01 push $0x1
107e9a: 68 07 0b 12 00 push $0x120b07
107e9f: e8 24 01 00 00 call 107fc8 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
107ea4: 8b 3d b0 51 12 00 mov 0x1251b0,%edi
107eaa: 83 c7 18 add $0x18,%edi
107ead: b9 05 00 00 00 mov $0x5,%ecx
107eb2: 89 de mov %ebx,%esi
107eb4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
107eb6: 83 c4 14 add $0x14,%esp
107eb9: 6a 00 push $0x0
107ebb: 53 push %ebx
107ebc: 6a 00 push $0x0
107ebe: 6a 01 push $0x1
107ec0: 68 07 0b 12 00 push $0x120b07
107ec5: e8 fe 00 00 00 call 107fc8 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
107eca: 8b 3d b0 51 12 00 mov 0x1251b0,%edi
107ed0: 83 c7 04 add $0x4,%edi
107ed3: b9 05 00 00 00 mov $0x5,%ecx
107ed8: 89 de mov %ebx,%esi
107eda: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*
* 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);
107edc: 83 c4 18 add $0x18,%esp
107edf: 68 ff 01 00 00 push $0x1ff
107ee4: 68 09 0b 12 00 push $0x120b09
107ee9: e8 42 05 00 00 call 108430 <mkdir>
if ( status != 0 )
107eee: 83 c4 10 add $0x10,%esp
107ef1: 85 c0 test %eax,%eax
107ef3: 75 15 jne 107f0a <rtems_filesystem_initialize+0xce><== NEVER TAKEN
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
107ef5: 8d 65 f4 lea -0xc(%ebp),%esp
107ef8: 5b pop %ebx
107ef9: 5e pop %esi
107efa: 5f pop %edi
107efb: c9 leave
107efc: c3 ret
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
107efd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f00: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED
107f05: e8 f6 3d 00 00 call 10bd00 <rtems_fatal_error_occurred><== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
107f0a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f0d: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED
107f12: e8 e9 3d 00 00 call 10bd00 <rtems_fatal_error_occurred><== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
107f17: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f1a: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED
107f1f: e8 dc 3d 00 00 call 10bd00 <rtems_fatal_error_occurred><== NOT EXECUTED
0010ffd8 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
10ffd8: 55 push %ebp
10ffd9: 89 e5 mov %esp,%ebp
10ffdb: 57 push %edi
10ffdc: 56 push %esi
10ffdd: 53 push %ebx
10ffde: 83 ec 1c sub $0x1c,%esp
10ffe1: 8b 75 08 mov 0x8(%ebp),%esi
10ffe4: 8b 7d 0c mov 0xc(%ebp),%edi
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10ffe7: 8b 1d 00 f1 11 00 mov 0x11f100,%ebx
10ffed: 85 db test %ebx,%ebx
10ffef: 74 24 je 110015 <rtems_filesystem_iterate+0x3d><== NEVER TAKEN
10fff1: bb 00 f1 11 00 mov $0x11f100,%ebx
10fff6: eb 04 jmp 10fffc <rtems_filesystem_iterate+0x24>
10fff8: 84 c0 test %al,%al
10fffa: 75 70 jne 11006c <rtems_filesystem_iterate+0x94>
stop = (*routine)( table_entry, routine_arg );
10fffc: 83 ec 08 sub $0x8,%esp
10ffff: 57 push %edi
110000: 53 push %ebx
110001: ff d6 call *%esi
110003: 88 c2 mov %al,%dl
++table_entry;
110005: 83 c3 08 add $0x8,%ebx
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
110008: 83 c4 10 add $0x10,%esp
11000b: 8b 0b mov (%ebx),%ecx
11000d: 85 c9 test %ecx,%ecx
11000f: 75 e7 jne 10fff8 <rtems_filesystem_iterate+0x20>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
110011: 84 c0 test %al,%al
110013: 75 57 jne 11006c <rtems_filesystem_iterate+0x94>
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 );
110015: 50 push %eax
110016: 6a 00 push $0x0
110018: 6a 00 push $0x0
11001a: ff 35 e8 73 12 00 pushl 0x1273e8
110020: e8 8b b6 ff ff call 10b6b0 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
110025: 8b 1d d4 51 12 00 mov 0x1251d4,%ebx
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
11002b: 83 c4 10 add $0x10,%esp
11002e: 81 fb d8 51 12 00 cmp $0x1251d8,%ebx
110034: 75 06 jne 11003c <rtems_filesystem_iterate+0x64>
110036: eb 3e jmp 110076 <rtems_filesystem_iterate+0x9e>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
110038: 84 c0 test %al,%al
11003a: 75 19 jne 110055 <rtems_filesystem_iterate+0x7d><== NEVER TAKEN
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
11003c: 83 ec 08 sub $0x8,%esp
11003f: 57 push %edi
110040: 8d 43 08 lea 0x8(%ebx),%eax
110043: 50 push %eax
110044: ff d6 call *%esi
110046: 88 c2 mov %al,%dl
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
110048: 8b 1b mov (%ebx),%ebx
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
11004a: 83 c4 10 add $0x10,%esp
11004d: 81 fb d8 51 12 00 cmp $0x1251d8,%ebx
110053: 75 e3 jne 110038 <rtems_filesystem_iterate+0x60>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
110055: 83 ec 0c sub $0xc,%esp
110058: ff 35 e8 73 12 00 pushl 0x1273e8
11005e: 88 55 e4 mov %dl,-0x1c(%ebp)
110061: e8 46 b7 ff ff call 10b7ac <rtems_semaphore_release>
110066: 83 c4 10 add $0x10,%esp
110069: 8a 55 e4 mov -0x1c(%ebp),%dl
}
rtems_libio_unlock();
}
return stop;
}
11006c: 88 d0 mov %dl,%al
11006e: 8d 65 f4 lea -0xc(%ebp),%esp
110071: 5b pop %ebx
110072: 5e pop %esi
110073: 5f pop %edi
110074: c9 leave
110075: c3 ret
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
110076: 31 d2 xor %edx,%edx
110078: eb db jmp 110055 <rtems_filesystem_iterate+0x7d>
00108504 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
108504: 55 push %ebp
108505: 89 e5 mov %esp,%ebp
108507: 57 push %edi
108508: 56 push %esi
108509: 53 push %ebx
10850a: 83 ec 20 sub $0x20,%esp
10850d: 8b 7d 08 mov 0x8(%ebp),%edi
108510: 8b 75 0c mov 0xc(%ebp),%esi
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 );
108513: 6a 00 push $0x0
108515: 6a 00 push $0x0
108517: ff 35 e8 73 12 00 pushl 0x1273e8
10851d: e8 8e 31 00 00 call 10b6b0 <rtems_semaphore_obtain>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
108522: 8b 1d 84 50 12 00 mov 0x125084,%ebx
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
108528: 83 c4 10 add $0x10,%esp
10852b: 81 fb 88 50 12 00 cmp $0x125088,%ebx
108531: 75 09 jne 10853c <rtems_filesystem_mount_iterate+0x38><== ALWAYS TAKEN
108533: eb 3b jmp 108570 <rtems_filesystem_mount_iterate+0x6c><== NOT EXECUTED
108535: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
108538: 84 c0 test %al,%al
10853a: 75 16 jne 108552 <rtems_filesystem_mount_iterate+0x4e><== NEVER TAKEN
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
10853c: 83 ec 08 sub $0x8,%esp
10853f: 56 push %esi
108540: 53 push %ebx
108541: ff d7 call *%edi
108543: 88 c2 mov %al,%dl
}
rtems_libio_unlock();
return stop;
}
108545: 8b 1b mov (%ebx),%ebx
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
108547: 83 c4 10 add $0x10,%esp
10854a: 81 fb 88 50 12 00 cmp $0x125088,%ebx
108550: 75 e6 jne 108538 <rtems_filesystem_mount_iterate+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
108552: 83 ec 0c sub $0xc,%esp
108555: ff 35 e8 73 12 00 pushl 0x1273e8
10855b: 88 55 e4 mov %dl,-0x1c(%ebp)
10855e: e8 49 32 00 00 call 10b7ac <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
108563: 8a 55 e4 mov -0x1c(%ebp),%dl
108566: 88 d0 mov %dl,%al
108568: 8d 65 f4 lea -0xc(%ebp),%esp
10856b: 5b pop %ebx
10856c: 5e pop %esi
10856d: 5f pop %edi
10856e: c9 leave
10856f: c3 ret
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
108570: 31 d2 xor %edx,%edx <== NOT EXECUTED
108572: eb de jmp 108552 <rtems_filesystem_mount_iterate+0x4e><== NOT EXECUTED
00108050 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
108050: 55 push %ebp
108051: 89 e5 mov %esp,%ebp
108053: 57 push %edi
108054: 56 push %esi
108055: 53 push %ebx
108056: 83 ec 0c sub $0xc,%esp
108059: 8b 75 08 mov 0x8(%ebp),%esi
10805c: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
10805f: 8a 06 mov (%esi),%al
108061: 84 c0 test %al,%al
108063: 74 34 je 108099 <rtems_filesystem_prefix_separators+0x49><== NEVER TAKEN
108065: 85 ff test %edi,%edi
108067: 74 30 je 108099 <rtems_filesystem_prefix_separators+0x49><== NEVER TAKEN
108069: 31 db xor %ebx,%ebx
10806b: eb 0f jmp 10807c <rtems_filesystem_prefix_separators+0x2c>
10806d: 8d 76 00 lea 0x0(%esi),%esi
{
pathname++;
pathnamelen--;
stripped++;
108070: 43 inc %ebx
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
108071: 8a 04 1e mov (%esi,%ebx,1),%al
108074: 84 c0 test %al,%al
108076: 74 17 je 10808f <rtems_filesystem_prefix_separators+0x3f><== NEVER TAKEN
108078: 39 df cmp %ebx,%edi
10807a: 74 13 je 10808f <rtems_filesystem_prefix_separators+0x3f><== NEVER TAKEN
10807c: 83 ec 0c sub $0xc,%esp
10807f: 0f be c0 movsbl %al,%eax
108082: 50 push %eax
108083: e8 90 0e 00 00 call 108f18 <rtems_filesystem_is_separator>
108088: 83 c4 10 add $0x10,%esp
10808b: 85 c0 test %eax,%eax
10808d: 75 e1 jne 108070 <rtems_filesystem_prefix_separators+0x20>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
10808f: 89 d8 mov %ebx,%eax
108091: 8d 65 f4 lea -0xc(%ebp),%esp
108094: 5b pop %ebx
108095: 5e pop %esi
108096: 5f pop %edi
108097: c9 leave
108098: c3 ret
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
108099: 31 db xor %ebx,%ebx
10809b: eb f2 jmp 10808f <rtems_filesystem_prefix_separators+0x3f><== NOT EXECUTED
001100b0 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
1100b0: 55 push %ebp
1100b1: 89 e5 mov %esp,%ebp
1100b3: 57 push %edi
1100b4: 56 push %esi
1100b5: 53 push %ebx
1100b6: 83 ec 28 sub $0x28,%esp
size_t type_size = strlen(type) + 1;
1100b9: 31 c0 xor %eax,%eax
1100bb: b9 ff ff ff ff mov $0xffffffff,%ecx
1100c0: 8b 7d 08 mov 0x8(%ebp),%edi
1100c3: f2 ae repnz scas %es:(%edi),%al
1100c5: f7 d1 not %ecx
size_t fsn_size = sizeof( filesystem_node ) + type_size;
1100c7: 8d 41 10 lea 0x10(%ecx),%eax
filesystem_node *fsn = malloc( fsn_size );
1100ca: 50 push %eax
1100cb: 89 4d e4 mov %ecx,-0x1c(%ebp)
1100ce: e8 b5 82 ff ff call 108388 <malloc>
1100d3: 89 c3 mov %eax,%ebx
char *type_storage = (char *) fsn + sizeof( *fsn );
if ( fsn == NULL )
1100d5: 83 c4 10 add $0x10,%esp
1100d8: 85 c0 test %eax,%eax
1100da: 8b 4d e4 mov -0x1c(%ebp),%ecx
1100dd: 0f 84 8e 00 00 00 je 110171 <rtems_filesystem_register+0xc1>
)
{
size_t type_size = strlen(type) + 1;
size_t fsn_size = sizeof( filesystem_node ) + type_size;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( *fsn );
1100e3: 8d 40 10 lea 0x10(%eax),%eax
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memcpy(type_storage, type, type_size);
1100e6: 89 c7 mov %eax,%edi
1100e8: 8b 75 08 mov 0x8(%ebp),%esi
1100eb: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
fsn->entry.type = type_storage;
1100ed: 89 43 08 mov %eax,0x8(%ebx)
fsn->entry.mount_h = mount_h;
1100f0: 8b 45 0c mov 0xc(%ebp),%eax
1100f3: 89 43 0c mov %eax,0xc(%ebx)
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 );
1100f6: 50 push %eax
1100f7: 6a 00 push $0x0
1100f9: 6a 00 push $0x0
1100fb: ff 35 e8 73 12 00 pushl 0x1273e8
110101: e8 aa b5 ff ff call 10b6b0 <rtems_semaphore_obtain>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
110106: 5f pop %edi
110107: ff 75 08 pushl 0x8(%ebp)
11010a: e8 6d ff ff ff call 11007c <rtems_filesystem_get_mount_handler>
11010f: 83 c4 10 add $0x10,%esp
110112: 85 c0 test %eax,%eax
110114: 75 2a jne 110140 <rtems_filesystem_register+0x90>
110116: 83 ec 08 sub $0x8,%esp
110119: 53 push %ebx
11011a: 68 d4 51 12 00 push $0x1251d4
11011f: e8 b8 be ff ff call 10bfdc <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
110124: 5e pop %esi
110125: ff 35 e8 73 12 00 pushl 0x1273e8
11012b: e8 7c b6 ff ff call 10b7ac <rtems_semaphore_release>
110130: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
110133: 31 c0 xor %eax,%eax
}
110135: 8d 65 f4 lea -0xc(%ebp),%esp
110138: 5b pop %ebx
110139: 5e pop %esi
11013a: 5f pop %edi
11013b: c9 leave
11013c: c3 ret
11013d: 8d 76 00 lea 0x0(%esi),%esi
110140: 83 ec 0c sub $0xc,%esp
110143: ff 35 e8 73 12 00 pushl 0x1273e8
110149: e8 5e b6 ff ff call 10b7ac <rtems_semaphore_release>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
rtems_chain_append( &filesystem_chain, &fsn->node );
} else {
rtems_libio_unlock();
free( fsn );
11014e: 89 1c 24 mov %ebx,(%esp)
110151: e8 5e 7f ff ff call 1080b4 <free>
rtems_set_errno_and_return_minus_one( EINVAL );
110156: e8 d9 31 00 00 call 113334 <__errno>
11015b: c7 00 16 00 00 00 movl $0x16,(%eax)
110161: 83 c4 10 add $0x10,%esp
110164: b8 ff ff ff ff mov $0xffffffff,%eax
}
rtems_libio_unlock();
return 0;
}
110169: 8d 65 f4 lea -0xc(%ebp),%esp
11016c: 5b pop %ebx
11016d: 5e pop %esi
11016e: 5f pop %edi
11016f: c9 leave
110170: c3 ret
size_t fsn_size = sizeof( filesystem_node ) + type_size;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( *fsn );
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
110171: e8 be 31 00 00 call 113334 <__errno>
110176: c7 00 0c 00 00 00 movl $0xc,(%eax)
11017c: b8 ff ff ff ff mov $0xffffffff,%eax
110181: eb b2 jmp 110135 <rtems_filesystem_register+0x85>
00110184 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
110184: 55 push %ebp
110185: 89 e5 mov %esp,%ebp
110187: 56 push %esi
110188: 53 push %ebx
110189: 8b 75 08 mov 0x8(%ebp),%esi
rtems_chain_node *node = NULL;
if ( type == NULL ) {
11018c: 85 f6 test %esi,%esi
11018e: 0f 84 94 00 00 00 je 110228 <rtems_filesystem_unregister+0xa4>
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 );
110194: 51 push %ecx
110195: 6a 00 push $0x0
110197: 6a 00 push $0x0
110199: ff 35 e8 73 12 00 pushl 0x1273e8
11019f: e8 0c b5 ff ff call 10b6b0 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
1101a4: 8b 1d d4 51 12 00 mov 0x1251d4,%ebx
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
1101aa: 83 c4 10 add $0x10,%esp
1101ad: 81 fb d8 51 12 00 cmp $0x1251d8,%ebx
1101b3: 75 0d jne 1101c2 <rtems_filesystem_unregister+0x3e>
1101b5: eb 49 jmp 110200 <rtems_filesystem_unregister+0x7c>
1101b7: 90 nop
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
1101b8: 8b 1b mov (%ebx),%ebx
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
1101ba: 81 fb d8 51 12 00 cmp $0x1251d8,%ebx
1101c0: 74 3e je 110200 <rtems_filesystem_unregister+0x7c><== ALWAYS TAKEN
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
1101c2: 83 ec 08 sub $0x8,%esp
1101c5: 56 push %esi
1101c6: ff 73 08 pushl 0x8(%ebx)
1101c9: e8 de 3d 00 00 call 113fac <strcmp>
1101ce: 83 c4 10 add $0x10,%esp
1101d1: 85 c0 test %eax,%eax
1101d3: 75 e3 jne 1101b8 <rtems_filesystem_unregister+0x34>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
1101d5: 83 ec 0c sub $0xc,%esp
1101d8: 53 push %ebx
1101d9: e8 22 be ff ff call 10c000 <_Chain_Extract>
rtems_chain_extract( node );
free( fsn );
1101de: 89 1c 24 mov %ebx,(%esp)
1101e1: e8 ce 7e ff ff call 1080b4 <free>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
1101e6: 5a pop %edx
1101e7: ff 35 e8 73 12 00 pushl 0x1273e8
1101ed: e8 ba b5 ff ff call 10b7ac <rtems_semaphore_release>
1101f2: 83 c4 10 add $0x10,%esp
rtems_libio_unlock();
return 0;
1101f5: 31 c0 xor %eax,%eax
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
1101f7: 8d 65 f8 lea -0x8(%ebp),%esp
1101fa: 5b pop %ebx
1101fb: 5e pop %esi
1101fc: c9 leave
1101fd: c3 ret
1101fe: 66 90 xchg %ax,%ax
110200: 83 ec 0c sub $0xc,%esp
110203: ff 35 e8 73 12 00 pushl 0x1273e8
110209: e8 9e b5 ff ff call 10b7ac <rtems_semaphore_release>
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
11020e: e8 21 31 00 00 call 113334 <__errno>
110213: c7 00 02 00 00 00 movl $0x2,(%eax)
110219: 83 c4 10 add $0x10,%esp
11021c: b8 ff ff ff ff mov $0xffffffff,%eax
}
110221: 8d 65 f8 lea -0x8(%ebp),%esp
110224: 5b pop %ebx
110225: 5e pop %esi
110226: c9 leave
110227: c3 ret
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
110228: e8 07 31 00 00 call 113334 <__errno>
11022d: c7 00 16 00 00 00 movl $0x16,(%eax)
110233: 83 c8 ff or $0xffffffff,%eax
110236: eb e9 jmp 110221 <rtems_filesystem_unregister+0x9d>
0010897c <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
10897c: 55 push %ebp
10897d: 89 e5 mov %esp,%ebp
10897f: 56 push %esi
108980: 53 push %ebx
108981: 8b 75 0c mov 0xc(%ebp),%esi
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
108984: 83 ec 0c sub $0xc,%esp
108987: 6a 08 push $0x8
108989: e8 c6 03 00 00 call 108d54 <malloc>
10898e: 89 c3 mov %eax,%ebx
*key = new_key;
108990: 8b 45 08 mov 0x8(%ebp),%eax
108993: 89 18 mov %ebx,(%eax)
new_key->val = NULL;
108995: c7 03 00 00 00 00 movl $0x0,(%ebx)
new_key->dtor = dtor;
10899b: 89 73 04 mov %esi,0x4(%ebx)
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
10899e: 83 c4 0c add $0xc,%esp
1089a1: 56 push %esi
1089a2: 53 push %ebx
1089a3: 6a 00 push $0x0
1089a5: e8 a6 3c 00 00 call 10c650 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
1089aa: 83 c4 10 add $0x10,%esp
1089ad: 85 c0 test %eax,%eax
1089af: 75 0b jne 1089bc <rtems_gxx_key_create+0x40><== NEVER TAKEN
return 0;
1089b1: 31 c0 xor %eax,%eax
free( new_key );
return -1;
}
1089b3: 8d 65 f8 lea -0x8(%ebp),%esp
1089b6: 5b pop %ebx
1089b7: 5e pop %esi
1089b8: c9 leave
1089b9: c3 ret
1089ba: 66 90 xchg %ax,%ax
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
return 0;
free( new_key );
1089bc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1089bf: 53 push %ebx <== NOT EXECUTED
1089c0: e8 3f fe ff ff call 108804 <free> <== NOT EXECUTED
return -1;
1089c5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1089c8: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1089cd: eb e4 jmp 1089b3 <rtems_gxx_key_create+0x37><== NOT EXECUTED
001089e0 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
1089e0: 55 push %ebp
1089e1: 89 e5 mov %esp,%ebp
1089e3: 53 push %ebx
1089e4: 83 ec 0c sub $0xc,%esp
1089e7: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
1089ea: 53 push %ebx
1089eb: 6a 00 push $0x0
1089ed: e8 22 3d 00 00 call 10c714 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
1089f2: 83 c4 10 add $0x10,%esp
1089f5: 85 c0 test %eax,%eax
1089f7: 75 11 jne 108a0a <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
1089f9: 85 db test %ebx,%ebx
1089fb: 74 0d je 108a0a <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
1089fd: 83 ec 0c sub $0xc,%esp
108a00: ff 33 pushl (%ebx)
108a02: e8 fd fd ff ff call 108804 <free>
108a07: 83 c4 10 add $0x10,%esp
return 0;
}
key = NULL;
return 0;
}
108a0a: 31 c0 xor %eax,%eax
108a0c: 8b 5d fc mov -0x4(%ebp),%ebx
108a0f: c9 leave
108a10: c3 ret
00108900 <rtems_gxx_once>:
/* uncomment this if you need to debug this interface */
/*#define DEBUG_GXX_WRAPPERS 1*/
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
108900: 55 push %ebp
108901: 89 e5 mov %esp,%ebp
108903: 56 push %esi
108904: 53 push %ebx
108905: 83 ec 10 sub $0x10,%esp
108908: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
10890b: 8b 03 mov (%ebx),%eax
10890d: 85 c0 test %eax,%eax
10890f: 74 0b je 10891c <rtems_gxx_once+0x1c>
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
108911: 31 c0 xor %eax,%eax
108913: 8d 65 f8 lea -0x8(%ebp),%esp
108916: 5b pop %ebx
108917: 5e pop %esi
108918: c9 leave
108919: c3 ret
10891a: 66 90 xchg %ax,%ax
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
10891c: 51 push %ecx
10891d: 8d 75 f4 lea -0xc(%ebp),%esi
108920: 56 push %esi
108921: 68 00 01 00 00 push $0x100
108926: 68 00 01 00 00 push $0x100
10892b: e8 48 3b 00 00 call 10c478 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
108930: 8b 03 mov (%ebx),%eax
108932: 83 c4 10 add $0x10,%esp
108935: 85 c0 test %eax,%eax
108937: 75 27 jne 108960 <rtems_gxx_once+0x60> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
108939: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10893f: 52 push %edx
108940: 56 push %esi
108941: 68 00 01 00 00 push $0x100
108946: ff 75 f4 pushl -0xc(%ebp)
108949: e8 2a 3b 00 00 call 10c478 <rtems_task_mode>
if ( o == 0 )
(*func)();
10894e: ff 55 0c call *0xc(%ebp)
108951: 83 c4 10 add $0x10,%esp
}
return 0;
}
108954: 31 c0 xor %eax,%eax
108956: 8d 65 f8 lea -0x8(%ebp),%esp
108959: 5b pop %ebx
10895a: 5e pop %esi
10895b: c9 leave
10895c: c3 ret
10895d: 8d 76 00 lea 0x0(%esi),%esi
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
108960: 50 push %eax <== NOT EXECUTED
108961: 56 push %esi <== NOT EXECUTED
108962: 68 00 01 00 00 push $0x100 <== NOT EXECUTED
108967: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED
10896a: e8 09 3b 00 00 call 10c478 <rtems_task_mode> <== NOT EXECUTED
10896f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
108972: 31 c0 xor %eax,%eax <== NOT EXECUTED
108974: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108977: 5b pop %ebx <== NOT EXECUTED
108978: 5e pop %esi <== NOT EXECUTED
108979: c9 leave <== NOT EXECUTED
10897a: c3 ret <== NOT EXECUTED
00108a70 <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
108a70: 55 push %ebp
108a71: 89 e5 mov %esp,%ebp
108a73: 53 push %ebx
108a74: 83 ec 08 sub $0x8,%esp
108a77: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
108a7a: ff 73 04 pushl 0x4(%ebx)
108a7d: 53 push %ebx
108a7e: 6a 00 push $0x0
108a80: e8 cb 3b 00 00 call 10c650 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
108a85: 83 c4 10 add $0x10,%esp
108a88: 85 c0 test %eax,%eax
108a8a: 75 0c jne 108a98 <rtems_gxx_setspecific+0x28><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
108a8c: 8b 45 0c mov 0xc(%ebp),%eax
108a8f: 89 03 mov %eax,(%ebx)
return 0;
108a91: 31 c0 xor %eax,%eax
}
return -1;
}
108a93: 8b 5d fc mov -0x4(%ebp),%ebx
108a96: c9 leave
108a97: c3 ret
if ( status == RTEMS_SUCCESSFUL ) {
/* now let's set the proper value */
key->val = (void *)ptr;
return 0;
}
return -1;
108a98: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
}
108a9d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108aa0: c9 leave <== NOT EXECUTED
108aa1: c3 ret <== NOT EXECUTED
0010bc34 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
10bc34: 55 push %ebp
10bc35: 89 e5 mov %esp,%ebp
10bc37: 83 ec 08 sub $0x8,%esp
if (
10bc3a: 83 3d 00 e0 12 00 03 cmpl $0x3,0x12e000
10bc41: 74 21 je 10bc64 <rtems_heap_allocate_aligned_with_boundary+0x30><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
10bc43: e8 e4 ef ff ff call 10ac2c <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
10bc48: ff 75 10 pushl 0x10(%ebp)
10bc4b: ff 75 0c pushl 0xc(%ebp)
10bc4e: ff 75 08 pushl 0x8(%ebp)
10bc51: ff 35 58 91 12 00 pushl 0x129158
10bc57: e8 e4 4d 00 00 call 110a40 <_Protected_heap_Allocate_aligned_with_boundary>
10bc5c: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
10bc5f: c9 leave
10bc60: c3 ret
10bc61: 8d 76 00 lea 0x0(%esi),%esi
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
10bc64: e8 83 ef ff ff call 10abec <malloc_is_system_state_OK>
10bc69: 84 c0 test %al,%al
10bc6b: 75 d6 jne 10bc43 <rtems_heap_allocate_aligned_with_boundary+0xf>
) {
return NULL;
10bc6d: 31 c0 xor %eax,%eax
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
10bc6f: c9 leave
10bc70: c3 ret
00113018 <rtems_io_close>:
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
113018: 55 push %ebp
113019: 89 e5 mov %esp,%ebp
11301b: 53 push %ebx
11301c: 83 ec 04 sub $0x4,%esp
11301f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
113022: 39 05 00 80 12 00 cmp %eax,0x128000
113028: 76 1a jbe 113044 <rtems_io_close+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
11302a: 8d 14 40 lea (%eax,%eax,2),%edx
11302d: c1 e2 03 shl $0x3,%edx
113030: 03 15 04 80 12 00 add 0x128004,%edx
113036: 8b 52 08 mov 0x8(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113039: 85 d2 test %edx,%edx
11303b: 74 13 je 113050 <rtems_io_close+0x38>
}
11303d: 59 pop %ecx
11303e: 5b pop %ebx
11303f: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113040: ff e2 jmp *%edx
113042: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
113044: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
113049: 5a pop %edx
11304a: 5b pop %ebx
11304b: c9 leave
11304c: c3 ret
11304d: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113050: 31 c0 xor %eax,%eax
}
113052: 5a pop %edx
113053: 5b pop %ebx
113054: c9 leave
113055: c3 ret
00113058 <rtems_io_control>:
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
113058: 55 push %ebp
113059: 89 e5 mov %esp,%ebp
11305b: 53 push %ebx
11305c: 83 ec 04 sub $0x4,%esp
11305f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
113062: 39 05 00 80 12 00 cmp %eax,0x128000
113068: 76 1a jbe 113084 <rtems_io_control+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
11306a: 8d 14 40 lea (%eax,%eax,2),%edx
11306d: c1 e2 03 shl $0x3,%edx
113070: 03 15 04 80 12 00 add 0x128004,%edx
113076: 8b 52 14 mov 0x14(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113079: 85 d2 test %edx,%edx
11307b: 74 13 je 113090 <rtems_io_control+0x38>
}
11307d: 59 pop %ecx
11307e: 5b pop %ebx
11307f: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113080: ff e2 jmp *%edx
113082: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
113084: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
113089: 5a pop %edx
11308a: 5b pop %ebx
11308b: c9 leave
11308c: c3 ret
11308d: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113090: 31 c0 xor %eax,%eax
}
113092: 5a pop %edx
113093: 5b pop %ebx
113094: c9 leave
113095: c3 ret
00111014 <rtems_io_initialize>:
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
111014: 55 push %ebp
111015: 89 e5 mov %esp,%ebp
111017: 53 push %ebx
111018: 83 ec 04 sub $0x4,%esp
11101b: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
11101e: 39 05 00 80 12 00 cmp %eax,0x128000
111024: 76 1a jbe 111040 <rtems_io_initialize+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
111026: 8d 14 40 lea (%eax,%eax,2),%edx
111029: c1 e2 03 shl $0x3,%edx
11102c: 03 15 04 80 12 00 add 0x128004,%edx
111032: 8b 12 mov (%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
111034: 85 d2 test %edx,%edx
111036: 74 14 je 11104c <rtems_io_initialize+0x38>
}
111038: 59 pop %ecx
111039: 5b pop %ebx
11103a: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
11103b: ff e2 jmp *%edx
11103d: 8d 76 00 lea 0x0(%esi),%esi
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
111040: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
111045: 5a pop %edx
111046: 5b pop %ebx
111047: c9 leave
111048: c3 ret
111049: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
11104c: 31 c0 xor %eax,%eax
}
11104e: 5a pop %edx
11104f: 5b pop %ebx
111050: c9 leave
111051: c3 ret
00107d60 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
107d60: 55 push %ebp
107d61: 89 e5 mov %esp,%ebp
107d63: 57 push %edi
107d64: 56 push %esi
107d65: 53 push %ebx
107d66: 83 ec 48 sub $0x48,%esp
107d69: 8b 75 08 mov 0x8(%ebp),%esi
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(
107d6c: b9 ff ff ff ff mov $0xffffffff,%ecx
107d71: 89 f7 mov %esi,%edi
107d73: 31 c0 xor %eax,%eax
107d75: f2 ae repnz scas %es:(%edi),%al
107d77: f7 d1 not %ecx
107d79: 49 dec %ecx
107d7a: 6a 01 push $0x1
107d7c: 8d 5d d4 lea -0x2c(%ebp),%ebx
107d7f: 53 push %ebx
107d80: 6a 00 push $0x0
107d82: 51 push %ecx
107d83: 56 push %esi
107d84: e8 3f 02 00 00 call 107fc8 <rtems_filesystem_evaluate_path>
107d89: 89 c7 mov %eax,%edi
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
107d8b: 8b 55 d4 mov -0x2c(%ebp),%edx
107d8e: 89 55 c4 mov %edx,-0x3c(%ebp)
node_type = (*loc.ops->node_type_h)( &loc );
107d91: 83 c4 14 add $0x14,%esp
107d94: 53 push %ebx
107d95: 8b 45 e0 mov -0x20(%ebp),%eax
107d98: ff 50 10 call *0x10(%eax)
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
107d9b: 83 c4 10 add $0x10,%esp
107d9e: 85 ff test %edi,%edi
107da0: 75 05 jne 107da7 <rtems_io_lookup_name+0x47><== NEVER TAKEN
107da2: 83 f8 02 cmp $0x2,%eax
107da5: 74 19 je 107dc0 <rtems_io_lookup_name+0x60>
rtems_filesystem_freenode( &loc );
107da7: 83 ec 0c sub $0xc,%esp
107daa: 53 push %ebx
107dab: e8 f0 02 00 00 call 1080a0 <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
107db0: 83 c4 10 add $0x10,%esp
107db3: b8 0d 00 00 00 mov $0xd,%eax
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
107db8: 8d 65 f4 lea -0xc(%ebp),%esp
107dbb: 5b pop %ebx
107dbc: 5e pop %esi
107dbd: 5f pop %edi
107dbe: c9 leave
107dbf: c3 ret
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
107dc0: 8b 7d 0c mov 0xc(%ebp),%edi
107dc3: 89 37 mov %esi,(%edi)
device_info->device_name_length = strlen( name );
107dc5: b9 ff ff ff ff mov $0xffffffff,%ecx
107dca: 89 f7 mov %esi,%edi
107dcc: 31 c0 xor %eax,%eax
107dce: f2 ae repnz scas %es:(%edi),%al
107dd0: f7 d1 not %ecx
107dd2: 49 dec %ecx
107dd3: 8b 45 0c mov 0xc(%ebp),%eax
107dd6: 89 48 04 mov %ecx,0x4(%eax)
device_info->major = the_jnode->info.device.major;
107dd9: 8b 55 c4 mov -0x3c(%ebp),%edx
107ddc: 8b 42 50 mov 0x50(%edx),%eax
107ddf: 8b 7d 0c mov 0xc(%ebp),%edi
107de2: 89 47 08 mov %eax,0x8(%edi)
device_info->minor = the_jnode->info.device.minor;
107de5: 8b 42 54 mov 0x54(%edx),%eax
107de8: 89 47 0c mov %eax,0xc(%edi)
rtems_filesystem_freenode( &loc );
107deb: 83 ec 0c sub $0xc,%esp
107dee: 53 push %ebx
107def: e8 ac 02 00 00 call 1080a0 <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
107df4: 83 c4 10 add $0x10,%esp
107df7: 31 c0 xor %eax,%eax
107df9: eb bd jmp 107db8 <rtems_io_lookup_name+0x58>
00113098 <rtems_io_open>:
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
113098: 55 push %ebp
113099: 89 e5 mov %esp,%ebp
11309b: 53 push %ebx
11309c: 83 ec 04 sub $0x4,%esp
11309f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
1130a2: 39 05 00 80 12 00 cmp %eax,0x128000
1130a8: 76 1a jbe 1130c4 <rtems_io_open+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
1130aa: 8d 14 40 lea (%eax,%eax,2),%edx
1130ad: c1 e2 03 shl $0x3,%edx
1130b0: 03 15 04 80 12 00 add 0x128004,%edx
1130b6: 8b 52 04 mov 0x4(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1130b9: 85 d2 test %edx,%edx
1130bb: 74 13 je 1130d0 <rtems_io_open+0x38>
}
1130bd: 59 pop %ecx
1130be: 5b pop %ebx
1130bf: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1130c0: ff e2 jmp *%edx
1130c2: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
1130c4: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
1130c9: 5a pop %edx
1130ca: 5b pop %ebx
1130cb: c9 leave
1130cc: c3 ret
1130cd: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1130d0: 31 c0 xor %eax,%eax
}
1130d2: 5a pop %edx
1130d3: 5b pop %ebx
1130d4: c9 leave
1130d5: c3 ret
001130d8 <rtems_io_read>:
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
1130d8: 55 push %ebp
1130d9: 89 e5 mov %esp,%ebp
1130db: 53 push %ebx
1130dc: 83 ec 04 sub $0x4,%esp
1130df: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
1130e2: 39 05 00 80 12 00 cmp %eax,0x128000
1130e8: 76 1a jbe 113104 <rtems_io_read+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
1130ea: 8d 14 40 lea (%eax,%eax,2),%edx
1130ed: c1 e2 03 shl $0x3,%edx
1130f0: 03 15 04 80 12 00 add 0x128004,%edx
1130f6: 8b 52 0c mov 0xc(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1130f9: 85 d2 test %edx,%edx
1130fb: 74 13 je 113110 <rtems_io_read+0x38>
}
1130fd: 59 pop %ecx
1130fe: 5b pop %ebx
1130ff: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113100: ff e2 jmp *%edx
113102: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
113104: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
113109: 5a pop %edx
11310a: 5b pop %ebx
11310b: c9 leave
11310c: c3 ret
11310d: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113110: 31 c0 xor %eax,%eax
}
113112: 5a pop %edx
113113: 5b pop %ebx
113114: c9 leave
113115: c3 ret
0010cebc <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
)
{
10cebc: 55 push %ebp
10cebd: 89 e5 mov %esp,%ebp
10cebf: 57 push %edi
10cec0: 56 push %esi
10cec1: 53 push %ebx
10cec2: 83 ec 0c sub $0xc,%esp
10cec5: 8b 5d 08 mov 0x8(%ebp),%ebx
10cec8: 8b 75 0c mov 0xc(%ebp),%esi
10cecb: 8b 55 10 mov 0x10(%ebp),%edx
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10cece: a1 e0 bc 12 00 mov 0x12bce0,%eax
if ( rtems_interrupt_is_in_progress() )
10ced3: 8b 0d 14 b8 12 00 mov 0x12b814,%ecx
10ced9: 85 c9 test %ecx,%ecx
10cedb: 0f 85 ab 00 00 00 jne 10cf8c <rtems_io_register_driver+0xd0>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10cee1: 85 d2 test %edx,%edx
10cee3: 0f 84 e7 00 00 00 je 10cfd0 <rtems_io_register_driver+0x114>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10cee9: 89 02 mov %eax,(%edx)
if ( driver_table == NULL )
10ceeb: 85 f6 test %esi,%esi
10ceed: 0f 84 dd 00 00 00 je 10cfd0 <rtems_io_register_driver+0x114>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10cef3: 8b 3e mov (%esi),%edi
10cef5: 85 ff test %edi,%edi
10cef7: 0f 84 c7 00 00 00 je 10cfc4 <rtems_io_register_driver+0x108>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10cefd: 39 d8 cmp %ebx,%eax
10ceff: 76 7b jbe 10cf7c <rtems_io_register_driver+0xc0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10cf01: a1 30 b2 12 00 mov 0x12b230,%eax
10cf06: 40 inc %eax
10cf07: a3 30 b2 12 00 mov %eax,0x12b230
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10cf0c: 85 db test %ebx,%ebx
10cf0e: 0f 85 88 00 00 00 jne 10cf9c <rtems_io_register_driver+0xe0>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
10cf14: 8b 0d e0 bc 12 00 mov 0x12bce0,%ecx
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10cf1a: 85 c9 test %ecx,%ecx
10cf1c: 0f 84 bb 00 00 00 je 10cfdd <rtems_io_register_driver+0x121><== NEVER TAKEN
10cf22: 8b 3d e4 bc 12 00 mov 0x12bce4,%edi
10cf28: 89 f8 mov %edi,%eax
10cf2a: eb 08 jmp 10cf34 <rtems_io_register_driver+0x78>
10cf2c: 43 inc %ebx
10cf2d: 83 c0 18 add $0x18,%eax
10cf30: 39 d9 cmp %ebx,%ecx
10cf32: 76 0b jbe 10cf3f <rtems_io_register_driver+0x83>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10cf34: 83 38 00 cmpl $0x0,(%eax)
10cf37: 75 f3 jne 10cf2c <rtems_io_register_driver+0x70>
10cf39: 83 78 04 00 cmpl $0x0,0x4(%eax)
10cf3d: 75 ed jne 10cf2c <rtems_io_register_driver+0x70>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10cf3f: 89 1a mov %ebx,(%edx)
if ( m != n )
10cf41: 39 d9 cmp %ebx,%ecx
10cf43: 0f 84 9b 00 00 00 je 10cfe4 <rtems_io_register_driver+0x128>
10cf49: 8d 04 5b lea (%ebx,%ebx,2),%eax
10cf4c: c1 e0 03 shl $0x3,%eax
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
10cf4f: 01 c7 add %eax,%edi
10cf51: b9 06 00 00 00 mov $0x6,%ecx
10cf56: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10cf58: e8 ab 1c 00 00 call 10ec08 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10cf5d: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
10cf64: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp)
10cf6b: 89 5d 08 mov %ebx,0x8(%ebp)
}
10cf6e: 83 c4 0c add $0xc,%esp
10cf71: 5b pop %ebx
10cf72: 5e pop %esi
10cf73: 5f pop %edi
10cf74: c9 leave
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10cf75: e9 2e 7e 00 00 jmp 114da8 <rtems_io_initialize>
10cf7a: 66 90 xchg %ax,%ax
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
10cf7c: b8 0a 00 00 00 mov $0xa,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10cf81: 83 c4 0c add $0xc,%esp
10cf84: 5b pop %ebx
10cf85: 5e pop %esi
10cf86: 5f pop %edi
10cf87: c9 leave
10cf88: c3 ret
10cf89: 8d 76 00 lea 0x0(%esi),%esi
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
10cf8c: b8 12 00 00 00 mov $0x12,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10cf91: 83 c4 0c add $0xc,%esp
10cf94: 5b pop %ebx
10cf95: 5e pop %esi
10cf96: 5f pop %edi
10cf97: c9 leave
10cf98: c3 ret
10cf99: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10cf9c: 8d 04 5b lea (%ebx,%ebx,2),%eax
10cf9f: c1 e0 03 shl $0x3,%eax
10cfa2: 8b 0d e4 bc 12 00 mov 0x12bce4,%ecx
10cfa8: 01 c1 add %eax,%ecx
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10cfaa: 8b 39 mov (%ecx),%edi
10cfac: 85 ff test %edi,%edi
10cfae: 74 40 je 10cff0 <rtems_io_register_driver+0x134>
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();
10cfb0: e8 53 1c 00 00 call 10ec08 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10cfb5: b8 0c 00 00 00 mov $0xc,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10cfba: 83 c4 0c add $0xc,%esp
10cfbd: 5b pop %ebx
10cfbe: 5e pop %esi
10cfbf: 5f pop %edi
10cfc0: c9 leave
10cfc1: c3 ret
10cfc2: 66 90 xchg %ax,%ax
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10cfc4: 8b 4e 04 mov 0x4(%esi),%ecx
10cfc7: 85 c9 test %ecx,%ecx
10cfc9: 0f 85 2e ff ff ff jne 10cefd <rtems_io_register_driver+0x41>
10cfcf: 90 nop
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
10cfd0: b8 09 00 00 00 mov $0x9,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10cfd5: 83 c4 0c add $0xc,%esp
10cfd8: 5b pop %ebx
10cfd9: 5e pop %esi
10cfda: 5f pop %edi
10cfdb: c9 leave
10cfdc: c3 ret
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10cfdd: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
10cfe3: 90 nop <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
10cfe4: e8 1f 1c 00 00 call 10ec08 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
10cfe9: b8 05 00 00 00 mov $0x5,%eax
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
10cfee: eb 91 jmp 10cf81 <rtems_io_register_driver+0xc5>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10cff0: 8b 49 04 mov 0x4(%ecx),%ecx
10cff3: 85 c9 test %ecx,%ecx
10cff5: 75 b9 jne 10cfb0 <rtems_io_register_driver+0xf4>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
10cff7: 89 1a mov %ebx,(%edx)
10cff9: 8b 3d e4 bc 12 00 mov 0x12bce4,%edi
10cfff: e9 4b ff ff ff jmp 10cf4f <rtems_io_register_driver+0x93>
0010d004 <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
10d004: 55 push %ebp
10d005: 89 e5 mov %esp,%ebp
10d007: 57 push %edi
10d008: 83 ec 04 sub $0x4,%esp
10d00b: 8b 45 08 mov 0x8(%ebp),%eax
if ( rtems_interrupt_is_in_progress() )
10d00e: 8b 0d 14 b8 12 00 mov 0x12b814,%ecx
10d014: 85 c9 test %ecx,%ecx
10d016: 75 44 jne 10d05c <rtems_io_unregister_driver+0x58>
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
10d018: 39 05 e0 bc 12 00 cmp %eax,0x12bce0
10d01e: 77 0c ja 10d02c <rtems_io_unregister_driver+0x28>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
10d020: b8 0d 00 00 00 mov $0xd,%eax
}
10d025: 5a pop %edx
10d026: 5f pop %edi
10d027: c9 leave
10d028: c3 ret
10d029: 8d 76 00 lea 0x0(%esi),%esi
10d02c: 8b 15 30 b2 12 00 mov 0x12b230,%edx
10d032: 42 inc %edx
10d033: 89 15 30 b2 12 00 mov %edx,0x12b230
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
&_IO_Driver_address_table[major],
10d039: 8d 14 40 lea (%eax,%eax,2),%edx
10d03c: c1 e2 03 shl $0x3,%edx
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
10d03f: 03 15 e4 bc 12 00 add 0x12bce4,%edx
10d045: b9 18 00 00 00 mov $0x18,%ecx
10d04a: 31 c0 xor %eax,%eax
10d04c: 89 d7 mov %edx,%edi
10d04e: f3 aa rep stos %al,%es:(%edi)
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
_Thread_Enable_dispatch();
10d050: e8 b3 1b 00 00 call 10ec08 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d055: 31 c0 xor %eax,%eax
}
return RTEMS_UNSATISFIED;
}
10d057: 5a pop %edx
10d058: 5f pop %edi
10d059: c9 leave
10d05a: c3 ret
10d05b: 90 nop
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
10d05c: b8 12 00 00 00 mov $0x12,%eax
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10d061: 5a pop %edx
10d062: 5f pop %edi
10d063: c9 leave
10d064: c3 ret
00113118 <rtems_io_write>:
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
113118: 55 push %ebp
113119: 89 e5 mov %esp,%ebp
11311b: 53 push %ebx
11311c: 83 ec 04 sub $0x4,%esp
11311f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
113122: 39 05 00 80 12 00 cmp %eax,0x128000
113128: 76 1a jbe 113144 <rtems_io_write+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
11312a: 8d 14 40 lea (%eax,%eax,2),%edx
11312d: c1 e2 03 shl $0x3,%edx
113130: 03 15 04 80 12 00 add 0x128004,%edx
113136: 8b 52 10 mov 0x10(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113139: 85 d2 test %edx,%edx
11313b: 74 13 je 113150 <rtems_io_write+0x38>
}
11313d: 59 pop %ecx
11313e: 5b pop %ebx
11313f: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113140: ff e2 jmp *%edx
113142: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
113144: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
113149: 5a pop %edx
11314a: 5b pop %ebx
11314b: c9 leave
11314c: c3 ret
11314d: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113150: 31 c0 xor %eax,%eax
}
113152: 5a pop %edx
113153: 5b pop %ebx
113154: c9 leave
113155: c3 ret
0010dfa0 <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)
{
10dfa0: 55 push %ebp
10dfa1: 89 e5 mov %esp,%ebp
10dfa3: 57 push %edi
10dfa4: 56 push %esi
10dfa5: 53 push %ebx
10dfa6: 83 ec 1c sub $0x1c,%esp
10dfa9: 8b 7d 08 mov 0x8(%ebp),%edi
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10dfac: 85 ff test %edi,%edi
10dfae: 74 49 je 10dff9 <rtems_iterate_over_all_threads+0x59><== NEVER TAKEN
10dfb0: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10dfb7: 8b 55 e4 mov -0x1c(%ebp),%edx
10dfba: 8b 04 95 28 23 13 00 mov 0x132328(,%edx,4),%eax
10dfc1: 8b 70 04 mov 0x4(%eax),%esi
if ( !information )
10dfc4: 85 f6 test %esi,%esi
10dfc6: 74 28 je 10dff0 <rtems_iterate_over_all_threads+0x50>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10dfc8: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
10dfcd: 74 21 je 10dff0 <rtems_iterate_over_all_threads+0x50>
10dfcf: bb 01 00 00 00 mov $0x1,%ebx
the_thread = (Thread_Control *)information->local_table[ i ];
10dfd4: 8b 46 1c mov 0x1c(%esi),%eax
10dfd7: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10dfda: 85 c0 test %eax,%eax
10dfdc: 74 09 je 10dfe7 <rtems_iterate_over_all_threads+0x47><== NEVER TAKEN
continue;
(*routine)(the_thread);
10dfde: 83 ec 0c sub $0xc,%esp
10dfe1: 50 push %eax
10dfe2: ff d7 call *%edi
10dfe4: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10dfe7: 43 inc %ebx
10dfe8: 0f b7 46 10 movzwl 0x10(%esi),%eax
10dfec: 39 d8 cmp %ebx,%eax
10dfee: 73 e4 jae 10dfd4 <rtems_iterate_over_all_threads+0x34>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10dff0: ff 45 e4 incl -0x1c(%ebp)
10dff3: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp)
10dff7: 75 be jne 10dfb7 <rtems_iterate_over_all_threads+0x17>
(*routine)(the_thread);
}
}
}
10dff9: 8d 65 f4 lea -0xc(%ebp),%esp
10dffc: 5b pop %ebx
10dffd: 5e pop %esi
10dffe: 5f pop %edi
10dfff: c9 leave
10e000: c3 ret
0010fe7c <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
10fe7c: 55 push %ebp
10fe7d: 89 e5 mov %esp,%ebp
10fe7f: 53 push %ebx
10fe80: 83 ec 08 sub $0x8,%esp
10fe83: 8b 5d 08 mov 0x8(%ebp),%ebx
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 );
10fe86: 6a 00 push $0x0
10fe88: 6a 00 push $0x0
10fe8a: ff 35 e8 73 12 00 pushl 0x1273e8
10fe90: e8 1b b8 ff ff call 10b6b0 <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
10fe95: 8b 43 2c mov 0x2c(%ebx),%eax
10fe98: 83 c4 10 add $0x10,%esp
10fe9b: 85 c0 test %eax,%eax
10fe9d: 74 0c je 10feab <rtems_libio_free+0x2f> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
10fe9f: 83 ec 0c sub $0xc,%esp
10fea2: 50 push %eax
10fea3: e8 64 b7 ff ff call 10b60c <rtems_semaphore_delete>
10fea8: 83 c4 10 add $0x10,%esp
iop->flags &= ~LIBIO_FLAGS_OPEN;
10feab: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx)
iop->data1 = rtems_libio_iop_freelist;
10feb2: a1 e4 73 12 00 mov 0x1273e4,%eax
10feb7: 89 43 34 mov %eax,0x34(%ebx)
rtems_libio_iop_freelist = iop;
10feba: 89 1d e4 73 12 00 mov %ebx,0x1273e4
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10fec0: a1 e8 73 12 00 mov 0x1273e8,%eax
10fec5: 89 45 08 mov %eax,0x8(%ebp)
rtems_libio_unlock();
}
10fec8: 8b 5d fc mov -0x4(%ebp),%ebx
10fecb: c9 leave
10fecc: e9 db b8 ff ff jmp 10b7ac <rtems_semaphore_release>
001081b0 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
1081b0: 55 push %ebp
1081b1: 89 e5 mov %esp,%ebp
1081b3: 53 push %ebx
1081b4: 83 ec 04 sub $0x4,%esp
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
1081b7: 8b 1d ac 31 12 00 mov 0x1231ac,%ebx
1081bd: 85 db test %ebx,%ebx
1081bf: 74 50 je 108211 <rtems_libio_init+0x61> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
1081c1: 83 ec 08 sub $0x8,%esp
1081c4: 6a 38 push $0x38
1081c6: 53 push %ebx
1081c7: e8 58 fd ff ff call 107f24 <calloc>
1081cc: 89 c2 mov %eax,%edx
1081ce: a3 e0 73 12 00 mov %eax,0x1273e0
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
1081d3: 83 c4 10 add $0x10,%esp
1081d6: 85 c0 test %eax,%eax
1081d8: 74 74 je 10824e <rtems_libio_init+0x9e>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
1081da: a3 e4 73 12 00 mov %eax,0x1273e4
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1081df: 83 fb 01 cmp $0x1,%ebx
1081e2: 76 26 jbe 10820a <rtems_libio_init+0x5a> <== NEVER TAKEN
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
1081e4: 8d 50 38 lea 0x38(%eax),%edx
1081e7: b9 01 00 00 00 mov $0x1,%ecx
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++)
iop->data1 = iop + 1;
1081ec: 89 52 fc mov %edx,-0x4(%edx)
1081ef: 41 inc %ecx
1081f0: 83 c2 38 add $0x38,%edx
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++)
1081f3: 39 d9 cmp %ebx,%ecx
1081f5: 75 f5 jne 1081ec <rtems_libio_init+0x3c>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
1081f7: 8d 0c cd f8 ff ff ff lea -0x8(,%ecx,8),%ecx
1081fe: 8d 14 cd 00 00 00 00 lea 0x0(,%ecx,8),%edx
108205: 29 ca sub %ecx,%edx
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++)
108207: 8d 14 10 lea (%eax,%edx,1),%edx
iop->data1 = iop + 1;
iop->data1 = NULL;
10820a: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
108211: 83 ec 0c sub $0xc,%esp
108214: 68 e8 73 12 00 push $0x1273e8
108219: 6a 00 push $0x0
10821b: 6a 54 push $0x54
10821d: 6a 01 push $0x1
10821f: 68 4f 49 42 4c push $0x4c42494f
108224: e8 0b 32 00 00 call 10b434 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
108229: 83 c4 20 add $0x20,%esp
10822c: 85 c0 test %eax,%eax
10822e: 75 15 jne 108245 <rtems_libio_init+0x95> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
108230: a1 a8 31 12 00 mov 0x1231a8,%eax
108235: 85 c0 test %eax,%eax
108237: 74 07 je 108240 <rtems_libio_init+0x90> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
108239: 8b 5d fc mov -0x4(%ebp),%ebx
10823c: c9 leave
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
10823d: ff e0 jmp *%eax
10823f: 90 nop
}
108240: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108243: c9 leave <== NOT EXECUTED
108244: c3 ret <== 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 );
108245: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108248: 50 push %eax <== NOT EXECUTED
108249: e8 b2 3a 00 00 call 10bd00 <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);
10824e: 83 ec 0c sub $0xc,%esp
108251: 6a 1a push $0x1a
108253: e8 a8 3a 00 00 call 10bd00 <rtems_fatal_error_occurred>
0010ff38 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
10ff38: 55 push %ebp
10ff39: 89 e5 mov %esp,%ebp
10ff3b: 53 push %ebx
10ff3c: 83 ec 08 sub $0x8,%esp
10ff3f: 8b 5d 08 mov 0x8(%ebp),%ebx
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 );
10ff42: 6a 00 push $0x0
10ff44: 6a 00 push $0x0
10ff46: ff 35 e8 73 12 00 pushl 0x1273e8
10ff4c: e8 5f b7 ff ff call 10b6b0 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10ff51: a1 e0 73 12 00 mov 0x1273e0,%eax
10ff56: 8b 0d ac 31 12 00 mov 0x1231ac,%ecx
10ff5c: 83 c4 10 add $0x10,%esp
10ff5f: 85 c9 test %ecx,%ecx
10ff61: 74 18 je 10ff7b <rtems_libio_is_file_open+0x43><== NEVER TAKEN
10ff63: 31 d2 xor %edx,%edx
10ff65: eb 04 jmp 10ff6b <rtems_libio_is_file_open+0x33>
10ff67: 90 nop
10ff68: 83 c0 38 add $0x38,%eax
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
10ff6b: f6 40 15 01 testb $0x1,0x15(%eax)
10ff6f: 74 05 je 10ff76 <rtems_libio_is_file_open+0x3e>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
10ff71: 39 58 18 cmp %ebx,0x18(%eax)
10ff74: 74 1e je 10ff94 <rtems_libio_is_file_open+0x5c>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10ff76: 42 inc %edx
10ff77: 39 ca cmp %ecx,%edx
10ff79: 72 ed jb 10ff68 <rtems_libio_is_file_open+0x30>
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
10ff7b: 31 db xor %ebx,%ebx
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10ff7d: 83 ec 0c sub $0xc,%esp
10ff80: ff 35 e8 73 12 00 pushl 0x1273e8
10ff86: e8 21 b8 ff ff call 10b7ac <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
10ff8b: 89 d8 mov %ebx,%eax
10ff8d: 8b 5d fc mov -0x4(%ebp),%ebx
10ff90: c9 leave
10ff91: c3 ret
10ff92: 66 90 xchg %ax,%ax
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
result = 1;
10ff94: bb 01 00 00 00 mov $0x1,%ebx
10ff99: eb e2 jmp 10ff7d <rtems_libio_is_file_open+0x45>
0010fed4 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
10fed4: 55 push %ebp
10fed5: 89 e5 mov %esp,%ebp
10fed7: 53 push %ebx
10fed8: 83 ec 08 sub $0x8,%esp
10fedb: 8b 5d 08 mov 0x8(%ebp),%ebx
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 );
10fede: 6a 00 push $0x0
10fee0: 6a 00 push $0x0
10fee2: ff 35 e8 73 12 00 pushl 0x1273e8
10fee8: e8 c3 b7 ff ff call 10b6b0 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10feed: a1 e0 73 12 00 mov 0x1273e0,%eax
10fef2: 8b 0d ac 31 12 00 mov 0x1231ac,%ecx
10fef8: 83 c4 10 add $0x10,%esp
10fefb: 85 c9 test %ecx,%ecx
10fefd: 74 18 je 10ff17 <rtems_libio_is_open_files_in_fs+0x43><== NEVER TAKEN
10feff: 31 d2 xor %edx,%edx
10ff01: eb 04 jmp 10ff07 <rtems_libio_is_open_files_in_fs+0x33>
10ff03: 90 nop
10ff04: 83 c0 38 add $0x38,%eax
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
10ff07: f6 40 15 01 testb $0x1,0x15(%eax)
10ff0b: 74 05 je 10ff12 <rtems_libio_is_open_files_in_fs+0x3e>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
10ff0d: 39 58 28 cmp %ebx,0x28(%eax)
10ff10: 74 1e je 10ff30 <rtems_libio_is_open_files_in_fs+0x5c>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10ff12: 42 inc %edx
10ff13: 39 ca cmp %ecx,%edx
10ff15: 72 ed jb 10ff04 <rtems_libio_is_open_files_in_fs+0x30>
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
rtems_libio_t *iop;
int result = 0;
10ff17: 31 db xor %ebx,%ebx
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10ff19: 83 ec 0c sub $0xc,%esp
10ff1c: ff 35 e8 73 12 00 pushl 0x1273e8
10ff22: e8 85 b8 ff ff call 10b7ac <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
10ff27: 89 d8 mov %ebx,%eax
10ff29: 8b 5d fc mov -0x4(%ebp),%ebx
10ff2c: c9 leave
10ff2d: c3 ret
10ff2e: 66 90 xchg %ax,%ax
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
result = 1;
10ff30: bb 01 00 00 00 mov $0x1,%ebx
10ff35: eb e2 jmp 10ff19 <rtems_libio_is_open_files_in_fs+0x45>
00109580 <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
109580: 55 push %ebp
109581: 89 e5 mov %esp,%ebp
109583: 57 push %edi
109584: 56 push %esi
109585: 53 push %ebx
109586: 83 ec 5c sub $0x5c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id task_id = rtems_task_self();
109589: e8 0e 2e 00 00 call 10c39c <rtems_task_self>
10958e: 89 45 b4 mov %eax,-0x4c(%ebp)
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
109591: 83 ec 0c sub $0xc,%esp
109594: 6a 00 push $0x0
109596: 8d 5d d4 lea -0x2c(%ebp),%ebx
109599: 53 push %ebx
10959a: 6a 00 push $0x0
10959c: 6a 01 push $0x1
10959e: 68 27 14 12 00 push $0x121427
1095a3: e8 50 ee ff ff call 1083f8 <rtems_filesystem_evaluate_path>
if (rv != 0)
1095a8: 83 c4 20 add $0x20,%esp
1095ab: 85 c0 test %eax,%eax
1095ad: 74 0d je 1095bc <rtems_libio_set_private_env+0x3c><== ALWAYS TAKEN
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
1095af: b8 1a 00 00 00 mov $0x1a,%eax
}
1095b4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1095b7: 5b pop %ebx <== NOT EXECUTED
1095b8: 5e pop %esi <== NOT EXECUTED
1095b9: 5f pop %edi <== NOT EXECUTED
1095ba: c9 leave <== NOT EXECUTED
1095bb: c3 ret <== NOT EXECUTED
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
if (rv != 0)
goto error_0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0);
1095bc: 83 ec 0c sub $0xc,%esp
1095bf: 6a 00 push $0x0
1095c1: 8d 45 c0 lea -0x40(%ebp),%eax
1095c4: 89 45 a4 mov %eax,-0x5c(%ebp)
1095c7: 50 push %eax
1095c8: 6a 00 push $0x0
1095ca: 6a 01 push $0x1
1095cc: 68 27 14 12 00 push $0x121427
1095d1: e8 22 ee ff ff call 1083f8 <rtems_filesystem_evaluate_path>
if (rv != 0)
1095d6: 83 c4 20 add $0x20,%esp
1095d9: 85 c0 test %eax,%eax
1095db: 0f 85 9a 00 00 00 jne 10967b <rtems_libio_set_private_env+0xfb><== NEVER TAKEN
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
rtems_current_user_env == &rtems_global_user_env
1095e1: 8b 15 b0 5a 12 00 mov 0x125ab0,%edx
/*
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
1095e7: 81 fa 40 7d 12 00 cmp $0x127d40,%edx
1095ed: 74 07 je 1095f6 <rtems_libio_set_private_env+0x76>
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
1095ef: 8b 45 b4 mov -0x4c(%ebp),%eax
1095f2: 39 02 cmp %eax,(%edx)
1095f4: 74 3a je 109630 <rtems_libio_set_private_env+0xb0>
) {
new_env = malloc(sizeof(rtems_user_env_t));
1095f6: 83 ec 0c sub $0xc,%esp
1095f9: 6a 48 push $0x48
1095fb: e8 14 f4 ff ff call 108a14 <malloc>
109600: 89 c2 mov %eax,%edx
109602: 89 c6 mov %eax,%esi
if (new_env == NULL)
109604: 83 c4 10 add $0x10,%esp
109607: 85 c0 test %eax,%eax
109609: 74 61 je 10966c <rtems_libio_set_private_env+0xec>
#ifdef HAVE_USERENV_REFCNT
new_env->refcnt = 1;
#endif
sc = rtems_task_variable_add(
10960b: 50 push %eax
10960c: 68 40 95 10 00 push $0x109540
109611: 68 b0 5a 12 00 push $0x125ab0
109616: 6a 00 push $0x0
109618: 89 55 b0 mov %edx,-0x50(%ebp)
10961b: e8 00 2e 00 00 call 10c420 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL)
109620: 83 c4 10 add $0x10,%esp
109623: 85 c0 test %eax,%eax
109625: 8b 55 b0 mov -0x50(%ebp),%edx
109628: 75 36 jne 109660 <rtems_libio_set_private_env+0xe0>
goto error_3;
rtems_current_user_env = new_env;
10962a: 89 15 b0 5a 12 00 mov %edx,0x125ab0
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
109630: be 40 7d 12 00 mov $0x127d40,%esi
109635: b9 12 00 00 00 mov $0x12,%ecx
10963a: 89 d7 mov %edx,%edi
10963c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_current_user_env->task_id = task_id;
10963e: 8b 75 b4 mov -0x4c(%ebp),%esi
109641: 89 32 mov %esi,(%edx)
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because what we are trying to do here is forking off clones.
* The reason is a pathloc can be allocated by the file system and needs to
* be freed when deleting the environment.
*/
rtems_filesystem_root = root_loc;
109643: 8d 7a 18 lea 0x18(%edx),%edi
109646: b1 05 mov $0x5,%cl
109648: 89 de mov %ebx,%esi
10964a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_current = current_loc;
10964c: 8d 7a 04 lea 0x4(%edx),%edi
10964f: b1 05 mov $0x5,%cl
109651: 8b 75 a4 mov -0x5c(%ebp),%esi
109654: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return RTEMS_SUCCESSFUL;
109656: 31 c0 xor %eax,%eax
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
109658: 8d 65 f4 lea -0xc(%ebp),%esp
10965b: 5b pop %ebx
10965c: 5e pop %esi
10965d: 5f pop %edi
10965e: c9 leave
10965f: c3 ret
rtems_filesystem_current = current_loc;
return RTEMS_SUCCESSFUL;
error_3:
free(new_env);
109660: 83 ec 0c sub $0xc,%esp
109663: 56 push %esi
109664: e8 7b ee ff ff call 1084e4 <free>
109669: 83 c4 10 add $0x10,%esp
error_2:
rtems_filesystem_freenode(¤t_loc);
10966c: 83 ec 0c sub $0xc,%esp
10966f: 8d 45 c0 lea -0x40(%ebp),%eax
109672: 50 push %eax
109673: e8 58 ee ff ff call 1084d0 <rtems_filesystem_freenode>
109678: 83 c4 10 add $0x10,%esp
error_1:
rtems_filesystem_freenode(&root_loc);
10967b: 83 ec 0c sub $0xc,%esp
10967e: 53 push %ebx
10967f: e8 4c ee ff ff call 1084d0 <rtems_filesystem_freenode>
109684: 83 c4 10 add $0x10,%esp
error_0:
return RTEMS_NO_MEMORY;
109687: b8 1a 00 00 00 mov $0x1a,%eax
}
10968c: 8d 65 f4 lea -0xc(%ebp),%esp
10968f: 5b pop %ebx
109690: 5e pop %esi
109691: 5f pop %edi
109692: c9 leave
109693: c3 ret
00109694 <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
109694: 55 push %ebp
109695: 89 e5 mov %esp,%ebp
109697: 56 push %esi
109698: 53 push %ebx
109699: 83 ec 20 sub $0x20,%esp
10969c: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
10969f: e8 f8 2c 00 00 call 10c39c <rtems_task_self>
1096a4: 89 c6 mov %eax,%esi
/*
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
1096a6: 39 c3 cmp %eax,%ebx
1096a8: 74 32 je 1096dc <rtems_libio_share_private_env+0x48><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
1096aa: 52 push %edx
task_id,
(void*)&rtems_current_user_env,
(void*)&shared_user_env );
1096ab: 8d 45 f4 lea -0xc(%ebp),%eax
if( task_id == current_task_id )
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
1096ae: 50 push %eax
1096af: 68 b0 5a 12 00 push $0x125ab0
1096b4: 53 push %ebx
1096b5: e8 2a 2e 00 00 call 10c4e4 <rtems_task_variable_get>
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
1096ba: 83 c4 10 add $0x10,%esp
1096bd: 85 c0 test %eax,%eax
1096bf: 75 13 jne 1096d4 <rtems_libio_share_private_env+0x40>
* If we have a current environment in place, we need to
* free it, since we will be sharing the variable with the
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
1096c1: 8b 15 b0 5a 12 00 mov 0x125ab0,%edx
1096c7: 39 32 cmp %esi,(%edx)
1096c9: 74 1d je 1096e8 <rtems_libio_share_private_env+0x54>
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
1096cb: 8b 55 f4 mov -0xc(%ebp),%edx
1096ce: 89 15 b0 5a 12 00 mov %edx,0x125ab0
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
1096d4: 8d 65 f8 lea -0x8(%ebp),%esp
1096d7: 5b pop %ebx
1096d8: 5e pop %esi
1096d9: c9 leave
1096da: c3 ret
1096db: 90 nop
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
return RTEMS_SUCCESSFUL;
1096dc: 31 c0 xor %eax,%eax
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
1096de: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1096e1: 5b pop %ebx <== NOT EXECUTED
1096e2: 5e pop %esi <== NOT EXECUTED
1096e3: c9 leave <== NOT EXECUTED
1096e4: c3 ret <== NOT EXECUTED
1096e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
1096e8: 83 ec 0c sub $0xc,%esp
1096eb: 52 push %edx
1096ec: 89 45 e4 mov %eax,-0x1c(%ebp)
1096ef: e8 4c fe ff ff call 109540 <free_user_env>
1096f4: 83 c4 10 add $0x10,%esp
1096f7: 8b 45 e4 mov -0x1c(%ebp),%eax
1096fa: eb cf jmp 1096cb <rtems_libio_share_private_env+0x37>
0010fd94 <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
10fd94: 55 push %ebp
10fd95: 89 e5 mov %esp,%ebp
10fd97: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10fd9a: 89 d0 mov %edx,%eax
10fd9c: 83 e0 06 and $0x6,%eax
10fd9f: 83 f8 06 cmp $0x6,%eax
10fda2: 74 2c je 10fdd0 <rtems_libio_to_fcntl_flags+0x3c>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
10fda4: f6 c2 02 test $0x2,%dl
10fda7: 75 23 jne 10fdcc <rtems_libio_to_fcntl_flags+0x38><== ALWAYS TAKEN
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
10fda9: 31 c0 xor %eax,%eax
10fdab: f6 c2 04 test $0x4,%dl <== NOT EXECUTED
10fdae: 0f 95 c0 setne %al <== NOT EXECUTED
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
10fdb1: f6 c2 01 test $0x1,%dl
10fdb4: 74 03 je 10fdb9 <rtems_libio_to_fcntl_flags+0x25>
fcntl_flags |= O_NONBLOCK;
10fdb6: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
10fdb9: f6 c6 02 test $0x2,%dh
10fdbc: 74 03 je 10fdc1 <rtems_libio_to_fcntl_flags+0x2d>
fcntl_flags |= O_APPEND;
10fdbe: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
10fdc1: 80 e6 04 and $0x4,%dh
10fdc4: 74 03 je 10fdc9 <rtems_libio_to_fcntl_flags+0x35>
fcntl_flags |= O_CREAT;
10fdc6: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
10fdc9: c9 leave
10fdca: c3 ret
10fdcb: 90 nop
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) {
fcntl_flags |= O_RDONLY;
10fdcc: 31 c0 xor %eax,%eax
10fdce: eb e1 jmp 10fdb1 <rtems_libio_to_fcntl_flags+0x1d>
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
10fdd0: b8 02 00 00 00 mov $0x2,%eax
10fdd5: eb da jmp 10fdb1 <rtems_libio_to_fcntl_flags+0x1d>
0010af10 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
10af10: 55 push %ebp
10af11: 89 e5 mov %esp,%ebp
10af13: 83 ec 1c sub $0x1c,%esp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
10af16: 8d 45 f4 lea -0xc(%ebp),%eax
10af19: 50 push %eax
10af1a: ff 75 08 pushl 0x8(%ebp)
10af1d: ff 35 58 91 12 00 pushl 0x129158
10af23: e8 c0 5b 00 00 call 110ae8 <_Protected_heap_Get_block_size>
10af28: 83 c4 10 add $0x10,%esp
10af2b: 84 c0 test %al,%al
10af2d: 74 11 je 10af40 <rtems_malloc_statistics_at_free+0x30><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
10af2f: 8b 45 f4 mov -0xc(%ebp),%eax
10af32: 31 d2 xor %edx,%edx
10af34: 01 05 04 dd 12 00 add %eax,0x12dd04
10af3a: 11 15 08 dd 12 00 adc %edx,0x12dd08
}
}
10af40: c9 leave
10af41: c3 ret
0010af44 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
10af44: 55 push %ebp
10af45: 89 e5 mov %esp,%ebp
10af47: 83 ec 18 sub $0x18,%esp
10af4a: 8b 45 08 mov 0x8(%ebp),%eax
uintptr_t actual_size = 0;
10af4d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
10af54: 85 c0 test %eax,%eax
10af56: 74 43 je 10af9b <rtems_malloc_statistics_at_malloc+0x57><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
10af58: 52 push %edx
10af59: 8d 55 f4 lea -0xc(%ebp),%edx
10af5c: 52 push %edx
10af5d: 50 push %eax
10af5e: ff 35 58 91 12 00 pushl 0x129158
10af64: e8 7f 5b 00 00 call 110ae8 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
10af69: 8b 45 f4 mov -0xc(%ebp),%eax
10af6c: 31 d2 xor %edx,%edx
10af6e: 03 05 fc dc 12 00 add 0x12dcfc,%eax
10af74: 13 15 00 dd 12 00 adc 0x12dd00,%edx
10af7a: a3 fc dc 12 00 mov %eax,0x12dcfc
10af7f: 89 15 00 dd 12 00 mov %edx,0x12dd00
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
10af85: 2b 05 04 dd 12 00 sub 0x12dd04,%eax
if (current_depth > s->max_depth)
10af8b: 83 c4 10 add $0x10,%esp
10af8e: 3b 05 f8 dc 12 00 cmp 0x12dcf8,%eax
10af94: 76 05 jbe 10af9b <rtems_malloc_statistics_at_malloc+0x57>
s->max_depth = current_depth;
10af96: a3 f8 dc 12 00 mov %eax,0x12dcf8
}
10af9b: c9 leave
10af9c: c3 ret
00113d80 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
113d80: 55 push %ebp
113d81: 89 e5 mov %esp,%ebp
113d83: 53 push %ebx
113d84: 83 ec 14 sub $0x14,%esp
113d87: 8b 5d 08 mov 0x8(%ebp),%ebx
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
113d8a: 85 db test %ebx,%ebx
113d8c: 74 5b je 113de9 <rtems_memalign+0x69>
return EINVAL;
*pointer = NULL;
113d8e: c7 03 00 00 00 00 movl $0x0,(%ebx)
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
113d94: 83 3d 00 b4 12 00 03 cmpl $0x3,0x12b400
113d9b: 74 43 je 113de0 <rtems_memalign+0x60> <== ALWAYS TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
113d9d: e8 ae 53 ff ff call 109150 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
113da2: 6a 00 push $0x0
113da4: ff 75 0c pushl 0xc(%ebp)
113da7: ff 75 10 pushl 0x10(%ebp)
113daa: ff 35 d8 6d 12 00 pushl 0x126dd8
113db0: e8 e7 a5 ff ff call 10e39c <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
113db5: 83 c4 10 add $0x10,%esp
113db8: 85 c0 test %eax,%eax
113dba: 74 38 je 113df4 <rtems_memalign+0x74>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
113dbc: 8b 15 e8 93 12 00 mov 0x1293e8,%edx
113dc2: 85 d2 test %edx,%edx
113dc4: 74 10 je 113dd6 <rtems_memalign+0x56>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
113dc6: 83 ec 0c sub $0xc,%esp
113dc9: 53 push %ebx
113dca: 89 45 f4 mov %eax,-0xc(%ebp)
113dcd: ff 52 04 call *0x4(%edx)
113dd0: 83 c4 10 add $0x10,%esp
113dd3: 8b 45 f4 mov -0xc(%ebp),%eax
*pointer = return_this;
113dd6: 89 03 mov %eax,(%ebx)
return 0;
113dd8: 31 c0 xor %eax,%eax
}
113dda: 8b 5d fc mov -0x4(%ebp),%ebx
113ddd: c9 leave
113dde: c3 ret
113ddf: 90 nop
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
113de0: e8 2b 53 ff ff call 109110 <malloc_is_system_state_OK>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
113de5: 84 c0 test %al,%al
113de7: 75 b4 jne 113d9d <rtems_memalign+0x1d> <== ALWAYS TAKEN
!malloc_is_system_state_OK() )
return EINVAL;
113de9: b8 16 00 00 00 mov $0x16,%eax
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
113dee: 8b 5d fc mov -0x4(%ebp),%ebx
113df1: c9 leave
113df2: c3 ret
113df3: 90 nop
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
113df4: b8 0c 00 00 00 mov $0xc,%eax
113df9: eb df jmp 113dda <rtems_memalign+0x5a>
001163a8 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
1163a8: 55 push %ebp
1163a9: 89 e5 mov %esp,%ebp
1163ab: 57 push %edi
1163ac: 56 push %esi
1163ad: 53 push %ebx
1163ae: 83 ec 1c sub $0x1c,%esp
1163b1: 8b 7d 08 mov 0x8(%ebp),%edi
1163b4: 8b 5d 0c mov 0xc(%ebp),%ebx
1163b7: 8b 75 14 mov 0x14(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
1163ba: 85 db test %ebx,%ebx
1163bc: 74 62 je 116420 <rtems_message_queue_broadcast+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !count )
1163be: 85 f6 test %esi,%esi
1163c0: 74 5e je 116420 <rtems_message_queue_broadcast+0x78>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
1163c2: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
1163c3: 8d 45 e4 lea -0x1c(%ebp),%eax
1163c6: 50 push %eax
1163c7: 57 push %edi
1163c8: 68 00 2c 14 00 push $0x142c00
1163cd: e8 f6 4e 00 00 call 11b2c8 <_Objects_Get>
switch ( location ) {
1163d2: 83 c4 10 add $0x10,%esp
1163d5: 8b 55 e4 mov -0x1c(%ebp),%edx
1163d8: 85 d2 test %edx,%edx
1163da: 74 10 je 1163ec <rtems_message_queue_broadcast+0x44>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1163dc: b8 04 00 00 00 mov $0x4,%eax
}
1163e1: 8d 65 f4 lea -0xc(%ebp),%esp
1163e4: 5b pop %ebx
1163e5: 5e pop %esi
1163e6: 5f pop %edi
1163e7: c9 leave
1163e8: c3 ret
1163e9: 8d 76 00 lea 0x0(%esi),%esi
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
1163ec: 83 ec 08 sub $0x8,%esp
1163ef: 56 push %esi
1163f0: 6a 00 push $0x0
1163f2: 57 push %edi
1163f3: ff 75 10 pushl 0x10(%ebp)
1163f6: 53 push %ebx
1163f7: 83 c0 14 add $0x14,%eax
1163fa: 50 push %eax
1163fb: e8 cc 34 00 00 call 1198cc <_CORE_message_queue_Broadcast>
116400: 89 c3 mov %eax,%ebx
NULL,
#endif
count
);
_Thread_Enable_dispatch();
116402: 83 c4 20 add $0x20,%esp
116405: e8 72 59 00 00 call 11bd7c <_Thread_Enable_dispatch>
return
11640a: 83 ec 0c sub $0xc,%esp
11640d: 53 push %ebx
11640e: e8 69 03 00 00 call 11677c <_Message_queue_Translate_core_message_queue_return_code>
116413: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116416: 8d 65 f4 lea -0xc(%ebp),%esp
116419: 5b pop %ebx
11641a: 5e pop %esi
11641b: 5f pop %edi
11641c: c9 leave
11641d: c3 ret
11641e: 66 90 xchg %ax,%ax
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !count )
return RTEMS_INVALID_ADDRESS;
116420: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116425: 8d 65 f4 lea -0xc(%ebp),%esp
116428: 5b pop %ebx
116429: 5e pop %esi
11642a: 5f pop %edi
11642b: c9 leave
11642c: c3 ret
00113844 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
113844: 55 push %ebp
113845: 89 e5 mov %esp,%ebp
113847: 57 push %edi
113848: 56 push %esi
113849: 53 push %ebx
11384a: 83 ec 2c sub $0x2c,%esp
11384d: 8b 5d 08 mov 0x8(%ebp),%ebx
113850: 8b 75 0c mov 0xc(%ebp),%esi
113853: 8b 4d 10 mov 0x10(%ebp),%ecx
113856: 8b 7d 18 mov 0x18(%ebp),%edi
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
113859: 85 db test %ebx,%ebx
11385b: 74 2f je 11388c <rtems_message_queue_create+0x48>
return RTEMS_INVALID_NAME;
if ( !id )
11385d: 85 ff test %edi,%edi
11385f: 0f 84 a3 00 00 00 je 113908 <rtems_message_queue_create+0xc4>
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
113865: 85 f6 test %esi,%esi
113867: 74 13 je 11387c <rtems_message_queue_create+0x38>
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
113869: 85 c9 test %ecx,%ecx
11386b: 75 2f jne 11389c <rtems_message_queue_create+0x58>
return RTEMS_INVALID_SIZE;
11386d: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113872: 8d 65 f4 lea -0xc(%ebp),%esp
113875: 5b pop %ebx
113876: 5e pop %esi
113877: 5f pop %edi
113878: c9 leave
113879: c3 ret
11387a: 66 90 xchg %ax,%ax
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
return RTEMS_INVALID_NUMBER;
11387c: b8 0a 00 00 00 mov $0xa,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113881: 8d 65 f4 lea -0xc(%ebp),%esp
113884: 5b pop %ebx
113885: 5e pop %esi
113886: 5f pop %edi
113887: c9 leave
113888: c3 ret
113889: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
11388c: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113891: 8d 65 f4 lea -0xc(%ebp),%esp
113894: 5b pop %ebx
113895: 5e pop %esi
113896: 5f pop %edi
113897: c9 leave
113898: c3 ret
113899: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
11389c: a1 f0 0b 13 00 mov 0x130bf0,%eax
1138a1: 40 inc %eax
1138a2: a3 f0 0b 13 00 mov %eax,0x130bf0
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
1138a7: 89 4d d4 mov %ecx,-0x2c(%ebp)
1138aa: e8 dd 5f 00 00 call 11988c <_Message_queue_Allocate>
1138af: 89 c2 mov %eax,%edx
if ( !the_message_queue ) {
1138b1: 85 c0 test %eax,%eax
1138b3: 8b 4d d4 mov -0x2c(%ebp),%ecx
1138b6: 74 7c je 113934 <rtems_message_queue_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
1138b8: 8b 45 14 mov 0x14(%ebp),%eax
1138bb: 89 42 10 mov %eax,0x10(%edx)
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
1138be: a8 04 test $0x4,%al
1138c0: 0f 95 c0 setne %al
1138c3: 0f b6 c0 movzbl %al,%eax
1138c6: 89 45 e4 mov %eax,-0x1c(%ebp)
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
1138c9: 51 push %ecx
1138ca: 56 push %esi
1138cb: 8d 45 e4 lea -0x1c(%ebp),%eax
1138ce: 50 push %eax
1138cf: 8d 42 14 lea 0x14(%edx),%eax
1138d2: 50 push %eax
1138d3: 89 55 d4 mov %edx,-0x2c(%ebp)
1138d6: e8 31 11 00 00 call 114a0c <_CORE_message_queue_Initialize>
1138db: 83 c4 10 add $0x10,%esp
1138de: 84 c0 test %al,%al
1138e0: 8b 55 d4 mov -0x2c(%ebp),%edx
1138e3: 75 2f jne 113914 <rtems_message_queue_create+0xd0>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
1138e5: 83 ec 08 sub $0x8,%esp
1138e8: 52 push %edx
1138e9: 68 20 16 13 00 push $0x131620
1138ee: e8 c1 1f 00 00 call 1158b4 <_Objects_Free>
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
1138f3: e8 30 2c 00 00 call 116528 <_Thread_Enable_dispatch>
return RTEMS_UNSATISFIED;
1138f8: 83 c4 10 add $0x10,%esp
1138fb: b8 0d 00 00 00 mov $0xd,%eax
113900: e9 6d ff ff ff jmp 113872 <rtems_message_queue_create+0x2e>
113905: 8d 76 00 lea 0x0(%esi),%esi
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
113908: b8 09 00 00 00 mov $0x9,%eax
11390d: e9 60 ff ff ff jmp 113872 <rtems_message_queue_create+0x2e>
113912: 66 90 xchg %ax,%ax
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
113914: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
113917: 0f b7 f0 movzwl %ax,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11391a: 8b 0d 3c 16 13 00 mov 0x13163c,%ecx
113920: 89 14 b1 mov %edx,(%ecx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
113923: 89 5a 0c mov %ebx,0xc(%edx)
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
113926: 89 07 mov %eax,(%edi)
name,
0
);
#endif
_Thread_Enable_dispatch();
113928: e8 fb 2b 00 00 call 116528 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11392d: 31 c0 xor %eax,%eax
11392f: e9 3e ff ff ff jmp 113872 <rtems_message_queue_create+0x2e>
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
113934: e8 ef 2b 00 00 call 116528 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
113939: b8 05 00 00 00 mov $0x5,%eax
11393e: e9 2f ff ff ff jmp 113872 <rtems_message_queue_create+0x2e>
00116530 <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
rtems_id id
)
{
116530: 55 push %ebp
116531: 89 e5 mov %esp,%ebp
116533: 53 push %ebx
116534: 83 ec 18 sub $0x18,%esp
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
116537: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
11653a: 50 push %eax
11653b: ff 75 08 pushl 0x8(%ebp)
11653e: 68 00 2c 14 00 push $0x142c00
116543: e8 80 4d 00 00 call 11b2c8 <_Objects_Get>
116548: 89 c3 mov %eax,%ebx
switch ( location ) {
11654a: 83 c4 10 add $0x10,%esp
11654d: 8b 4d f4 mov -0xc(%ebp),%ecx
116550: 85 c9 test %ecx,%ecx
116552: 75 3c jne 116590 <rtems_message_queue_delete+0x60>
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
116554: 83 ec 08 sub $0x8,%esp
116557: 50 push %eax
116558: 68 00 2c 14 00 push $0x142c00
11655d: e8 ee 48 00 00 call 11ae50 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
116562: 83 c4 0c add $0xc,%esp
116565: 6a 05 push $0x5
116567: 6a 00 push $0x0
116569: 8d 43 14 lea 0x14(%ebx),%eax
11656c: 50 push %eax
11656d: e8 de 33 00 00 call 119950 <_CORE_message_queue_Close>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
116572: 58 pop %eax
116573: 5a pop %edx
116574: 53 push %ebx
116575: 68 00 2c 14 00 push $0x142c00
11657a: e8 cd 4b 00 00 call 11b14c <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
11657f: e8 f8 57 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116584: 83 c4 10 add $0x10,%esp
116587: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116589: 8b 5d fc mov -0x4(%ebp),%ebx
11658c: c9 leave
11658d: c3 ret
11658e: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116590: b8 04 00 00 00 mov $0x4,%eax
}
116595: 8b 5d fc mov -0x4(%ebp),%ebx
116598: c9 leave
116599: c3 ret
0011659c <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
rtems_id id,
uint32_t *count
)
{
11659c: 55 push %ebp
11659d: 89 e5 mov %esp,%ebp
11659f: 53 push %ebx
1165a0: 83 ec 14 sub $0x14,%esp
1165a3: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
1165a6: 85 db test %ebx,%ebx
1165a8: 74 46 je 1165f0 <rtems_message_queue_flush+0x54>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
1165aa: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
1165ab: 8d 45 f4 lea -0xc(%ebp),%eax
1165ae: 50 push %eax
1165af: ff 75 08 pushl 0x8(%ebp)
1165b2: 68 00 2c 14 00 push $0x142c00
1165b7: e8 0c 4d 00 00 call 11b2c8 <_Objects_Get>
switch ( location ) {
1165bc: 83 c4 10 add $0x10,%esp
1165bf: 8b 55 f4 mov -0xc(%ebp),%edx
1165c2: 85 d2 test %edx,%edx
1165c4: 74 0a je 1165d0 <rtems_message_queue_flush+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1165c6: b8 04 00 00 00 mov $0x4,%eax
}
1165cb: 8b 5d fc mov -0x4(%ebp),%ebx
1165ce: c9 leave
1165cf: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
1165d0: 83 ec 0c sub $0xc,%esp
1165d3: 83 c0 14 add $0x14,%eax
1165d6: 50 push %eax
1165d7: e8 b0 33 00 00 call 11998c <_CORE_message_queue_Flush>
1165dc: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
1165de: e8 99 57 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1165e3: 83 c4 10 add $0x10,%esp
1165e6: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1165e8: 8b 5d fc mov -0x4(%ebp),%ebx
1165eb: c9 leave
1165ec: c3 ret
1165ed: 8d 76 00 lea 0x0(%esi),%esi
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
1165f0: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1165f5: 8b 5d fc mov -0x4(%ebp),%ebx
1165f8: c9 leave
1165f9: c3 ret
001165fc <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
1165fc: 55 push %ebp
1165fd: 89 e5 mov %esp,%ebp
1165ff: 53 push %ebx
116600: 83 ec 14 sub $0x14,%esp
116603: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116606: 85 db test %ebx,%ebx
116608: 74 3a je 116644 <rtems_message_queue_get_number_pending+0x48>
11660a: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
11660b: 8d 45 f4 lea -0xc(%ebp),%eax
11660e: 50 push %eax
11660f: ff 75 08 pushl 0x8(%ebp)
116612: 68 00 2c 14 00 push $0x142c00
116617: e8 ac 4c 00 00 call 11b2c8 <_Objects_Get>
switch ( location ) {
11661c: 83 c4 10 add $0x10,%esp
11661f: 8b 55 f4 mov -0xc(%ebp),%edx
116622: 85 d2 test %edx,%edx
116624: 74 0a je 116630 <rtems_message_queue_get_number_pending+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116626: b8 04 00 00 00 mov $0x4,%eax
}
11662b: 8b 5d fc mov -0x4(%ebp),%ebx
11662e: c9 leave
11662f: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
116630: 8b 40 5c mov 0x5c(%eax),%eax
116633: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
116635: e8 42 57 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11663a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11663c: 8b 5d fc mov -0x4(%ebp),%ebx
11663f: c9 leave
116640: c3 ret
116641: 8d 76 00 lea 0x0(%esi),%esi
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
116644: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116649: 8b 5d fc mov -0x4(%ebp),%ebx
11664c: c9 leave
11664d: c3 ret
00113968 <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
113968: 55 push %ebp
113969: 89 e5 mov %esp,%ebp
11396b: 56 push %esi
11396c: 53 push %ebx
11396d: 83 ec 10 sub $0x10,%esp
113970: 8b 5d 0c mov 0xc(%ebp),%ebx
113973: 8b 75 10 mov 0x10(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
113976: 85 db test %ebx,%ebx
113978: 74 6e je 1139e8 <rtems_message_queue_receive+0x80>
return RTEMS_INVALID_ADDRESS;
if ( !size )
11397a: 85 f6 test %esi,%esi
11397c: 74 6a je 1139e8 <rtems_message_queue_receive+0x80>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
11397e: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
11397f: 8d 45 f4 lea -0xc(%ebp),%eax
113982: 50 push %eax
113983: ff 75 08 pushl 0x8(%ebp)
113986: 68 20 16 13 00 push $0x131620
11398b: e8 64 20 00 00 call 1159f4 <_Objects_Get>
switch ( location ) {
113990: 83 c4 10 add $0x10,%esp
113993: 8b 55 f4 mov -0xc(%ebp),%edx
113996: 85 d2 test %edx,%edx
113998: 75 42 jne 1139dc <rtems_message_queue_receive+0x74>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
11399a: 83 ec 08 sub $0x8,%esp
11399d: ff 75 18 pushl 0x18(%ebp)
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
1139a0: 8b 55 14 mov 0x14(%ebp),%edx
1139a3: 83 e2 01 and $0x1,%edx
1139a6: 83 f2 01 xor $0x1,%edx
1139a9: 52 push %edx
1139aa: 56 push %esi
1139ab: 53 push %ebx
1139ac: ff 70 08 pushl 0x8(%eax)
1139af: 83 c0 14 add $0x14,%eax
1139b2: 50 push %eax
1139b3: e8 04 11 00 00 call 114abc <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
1139b8: 83 c4 20 add $0x20,%esp
1139bb: e8 68 2b 00 00 call 116528 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
1139c0: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code
1139c3: a1 d8 11 13 00 mov 0x1311d8,%eax
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
1139c8: ff 70 34 pushl 0x34(%eax)
1139cb: e8 a0 00 00 00 call 113a70 <_Message_queue_Translate_core_message_queue_return_code>
1139d0: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1139d3: 8d 65 f8 lea -0x8(%ebp),%esp
1139d6: 5b pop %ebx
1139d7: 5e pop %esi
1139d8: c9 leave
1139d9: c3 ret
1139da: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1139dc: b8 04 00 00 00 mov $0x4,%eax
}
1139e1: 8d 65 f8 lea -0x8(%ebp),%esp
1139e4: 5b pop %ebx
1139e5: 5e pop %esi
1139e6: c9 leave
1139e7: c3 ret
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
1139e8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1139ed: 8d 65 f8 lea -0x8(%ebp),%esp
1139f0: 5b pop %ebx
1139f1: 5e pop %esi
1139f2: c9 leave
1139f3: c3 ret
0010b3a8 <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
rtems_id id,
const void *buffer,
size_t size
)
{
10b3a8: 55 push %ebp
10b3a9: 89 e5 mov %esp,%ebp
10b3ab: 56 push %esi
10b3ac: 53 push %ebx
10b3ad: 83 ec 10 sub $0x10,%esp
10b3b0: 8b 75 08 mov 0x8(%ebp),%esi
10b3b3: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10b3b6: 85 db test %ebx,%ebx
10b3b8: 74 5e je 10b418 <rtems_message_queue_send+0x70>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
10b3ba: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
10b3bb: 8d 45 f4 lea -0xc(%ebp),%eax
10b3be: 50 push %eax
10b3bf: 56 push %esi
10b3c0: 68 80 7f 12 00 push $0x127f80
10b3c5: e8 7e 1a 00 00 call 10ce48 <_Objects_Get>
switch ( location ) {
10b3ca: 83 c4 10 add $0x10,%esp
10b3cd: 8b 55 f4 mov -0xc(%ebp),%edx
10b3d0: 85 d2 test %edx,%edx
10b3d2: 74 0c je 10b3e0 <rtems_message_queue_send+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b3d4: b8 04 00 00 00 mov $0x4,%eax
}
10b3d9: 8d 65 f8 lea -0x8(%ebp),%esp
10b3dc: 5b pop %ebx
10b3dd: 5e pop %esi
10b3de: c9 leave
10b3df: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
10b3e0: 6a 00 push $0x0
10b3e2: 6a 00 push $0x0
10b3e4: 68 ff ff ff 7f push $0x7fffffff
10b3e9: 6a 00 push $0x0
10b3eb: 56 push %esi
10b3ec: ff 75 10 pushl 0x10(%ebp)
10b3ef: 53 push %ebx
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_message_queue_Send(
10b3f0: 83 c0 14 add $0x14,%eax
10b3f3: 50 push %eax
10b3f4: e8 43 0c 00 00 call 10c03c <_CORE_message_queue_Submit>
10b3f9: 89 c3 mov %eax,%ebx
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
10b3fb: 83 c4 20 add $0x20,%esp
10b3fe: e8 f9 24 00 00 call 10d8fc <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
10b403: 83 ec 0c sub $0xc,%esp
10b406: 53 push %ebx
10b407: e8 18 00 00 00 call 10b424 <_Message_queue_Translate_core_message_queue_return_code>
10b40c: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b40f: 8d 65 f8 lea -0x8(%ebp),%esp
10b412: 5b pop %ebx
10b413: 5e pop %esi
10b414: c9 leave
10b415: c3 ret
10b416: 66 90 xchg %ax,%ax
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
10b418: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b41d: 8d 65 f8 lea -0x8(%ebp),%esp
10b420: 5b pop %ebx
10b421: 5e pop %esi
10b422: c9 leave
10b423: c3 ret
0011678c <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
rtems_id id,
const void *buffer,
size_t size
)
{
11678c: 55 push %ebp
11678d: 89 e5 mov %esp,%ebp
11678f: 56 push %esi
116790: 53 push %ebx
116791: 83 ec 10 sub $0x10,%esp
116794: 8b 75 08 mov 0x8(%ebp),%esi
116797: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
11679a: 85 db test %ebx,%ebx
11679c: 74 5e je 1167fc <rtems_message_queue_urgent+0x70>
11679e: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
11679f: 8d 45 f4 lea -0xc(%ebp),%eax
1167a2: 50 push %eax
1167a3: 56 push %esi
1167a4: 68 00 2c 14 00 push $0x142c00
1167a9: e8 1a 4b 00 00 call 11b2c8 <_Objects_Get>
switch ( location ) {
1167ae: 83 c4 10 add $0x10,%esp
1167b1: 8b 55 f4 mov -0xc(%ebp),%edx
1167b4: 85 d2 test %edx,%edx
1167b6: 74 0c je 1167c4 <rtems_message_queue_urgent+0x38>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1167b8: b8 04 00 00 00 mov $0x4,%eax
}
1167bd: 8d 65 f8 lea -0x8(%ebp),%esp
1167c0: 5b pop %ebx
1167c1: 5e pop %esi
1167c2: c9 leave
1167c3: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
1167c4: 6a 00 push $0x0
1167c6: 6a 00 push $0x0
1167c8: 68 00 00 00 80 push $0x80000000
1167cd: 6a 00 push $0x0
1167cf: 56 push %esi
1167d0: ff 75 10 pushl 0x10(%ebp)
1167d3: 53 push %ebx
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_message_queue_Urgent(
1167d4: 83 c0 14 add $0x14,%eax
1167d7: 50 push %eax
1167d8: e8 ef 33 00 00 call 119bcc <_CORE_message_queue_Submit>
1167dd: 89 c3 mov %eax,%ebx
id,
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
1167df: 83 c4 20 add $0x20,%esp
1167e2: e8 95 55 00 00 call 11bd7c <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
1167e7: 83 ec 0c sub $0xc,%esp
1167ea: 53 push %ebx
1167eb: e8 8c ff ff ff call 11677c <_Message_queue_Translate_core_message_queue_return_code>
1167f0: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1167f3: 8d 65 f8 lea -0x8(%ebp),%esp
1167f6: 5b pop %ebx
1167f7: 5e pop %esi
1167f8: c9 leave
1167f9: c3 ret
1167fa: 66 90 xchg %ax,%ax
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
1167fc: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116801: 8d 65 f8 lea -0x8(%ebp),%esp
116804: 5b pop %ebx
116805: 5e pop %esi
116806: c9 leave
116807: c3 ret
001124ac <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
1124ac: 55 push %ebp
1124ad: 89 e5 mov %esp,%ebp
1124af: 57 push %edi
1124b0: 56 push %esi
1124b1: 53 push %ebx
1124b2: 83 ec 78 sub $0x78,%esp
int success = 0;
char *dup_path = strdup(path);
1124b5: ff 75 08 pushl 0x8(%ebp)
1124b8: e8 97 36 00 00 call 115b54 <strdup>
1124bd: 89 c7 mov %eax,%edi
if (dup_path != NULL) {
1124bf: 83 c4 10 add $0x10,%esp
1124c2: 85 c0 test %eax,%eax
1124c4: 0f 84 0a 01 00 00 je 1125d4 <rtems_mkdir+0x128> <== NEVER TAKEN
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
1124ca: 8a 10 mov (%eax),%dl
1124cc: 80 fa 2f cmp $0x2f,%dl
1124cf: 0f 84 0f 01 00 00 je 1125e4 <rtems_mkdir+0x138>
1124d5: 89 c3 mov %eax,%ebx
1124d7: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp)
1124de: b8 01 00 00 00 mov $0x1,%eax
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
1124e3: 84 d2 test %dl,%dl
1124e5: 74 11 je 1124f8 <rtems_mkdir+0x4c> <== NEVER TAKEN
1124e7: 90 nop
last = 1;
else if (p[0] != '/')
1124e8: 80 fa 2f cmp $0x2f,%dl
1124eb: 0f 84 83 00 00 00 je 112574 <rtems_mkdir+0xc8>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
1124f1: 43 inc %ebx
1124f2: 8a 13 mov (%ebx),%dl
if (p[0] == '\0')
1124f4: 84 d2 test %dl,%dl
1124f6: 75 f0 jne 1124e8 <rtems_mkdir+0x3c>
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
1124f8: c6 03 00 movb $0x0,(%ebx)
1124fb: be 01 00 00 00 mov $0x1,%esi
if (!last && p[1] == '\0')
last = 1;
if (first) {
112500: 85 c0 test %eax,%eax
112502: 75 54 jne 112558 <rtems_mkdir+0xac>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
112504: 85 f6 test %esi,%esi
112506: 75 3c jne 112544 <rtems_mkdir+0x98>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
112508: b8 ff 01 00 00 mov $0x1ff,%eax
11250d: 83 ec 08 sub $0x8,%esp
112510: 50 push %eax
112511: 57 push %edi
112512: e8 cd 71 ff ff call 1096e4 <mkdir>
112517: 83 c4 10 add $0x10,%esp
11251a: 85 c0 test %eax,%eax
11251c: 78 6a js 112588 <rtems_mkdir+0xdc>
} else {
retval = 0;
break;
}
}
if (!last)
11251e: 85 f6 test %esi,%esi
112520: 75 0a jne 11252c <rtems_mkdir+0x80>
*p = '/';
112522: c6 03 2f movb $0x2f,(%ebx)
112525: 31 c0 xor %eax,%eax
112527: eb c8 jmp 1124f1 <rtems_mkdir+0x45>
112529: 8d 76 00 lea 0x0(%esi),%esi
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
11252c: 83 ec 0c sub $0xc,%esp
11252f: 57 push %edi
112530: e8 b7 6b ff ff call 1090ec <free>
112535: 83 c4 10 add $0x10,%esp
}
return success != 0 ? 0 : -1;
112538: 31 c0 xor %eax,%eax
}
11253a: 8d 65 f4 lea -0xc(%ebp),%esp
11253d: 5b pop %ebx
11253e: 5e pop %esi
11253f: 5f pop %edi
112540: c9 leave
112541: c3 ret
112542: 66 90 xchg %ax,%ax
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
112544: 83 ec 0c sub $0xc,%esp
112547: ff 75 94 pushl -0x6c(%ebp)
11254a: e8 81 01 00 00 call 1126d0 <umask>
11254f: 83 c4 10 add $0x10,%esp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
112552: 8b 45 0c mov 0xc(%ebp),%eax
112555: eb b6 jmp 11250d <rtems_mkdir+0x61>
112557: 90 nop
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
112558: 83 ec 0c sub $0xc,%esp
11255b: 6a 00 push $0x0
11255d: e8 6e 01 00 00 call 1126d0 <umask>
112562: 89 45 94 mov %eax,-0x6c(%ebp)
numask = oumask & ~(S_IWUSR | S_IXUSR);
112565: 24 3f and $0x3f,%al
(void)umask(numask);
112567: 89 04 24 mov %eax,(%esp)
11256a: e8 61 01 00 00 call 1126d0 <umask>
11256f: 83 c4 10 add $0x10,%esp
112572: eb 90 jmp 112504 <rtems_mkdir+0x58>
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
112574: c6 03 00 movb $0x0,(%ebx)
if (!last && p[1] == '\0')
112577: 31 d2 xor %edx,%edx
112579: 80 7b 01 00 cmpb $0x0,0x1(%ebx)
11257d: 0f 94 c2 sete %dl
112580: 89 d6 mov %edx,%esi
112582: e9 79 ff ff ff jmp 112500 <rtems_mkdir+0x54>
112587: 90 nop
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
112588: e8 47 29 00 00 call 114ed4 <__errno>
11258d: 83 38 11 cmpl $0x11,(%eax)
112590: 74 0a je 11259c <rtems_mkdir+0xf0>
112592: e8 3d 29 00 00 call 114ed4 <__errno>
112597: 83 38 15 cmpl $0x15,(%eax)
11259a: 75 53 jne 1125ef <rtems_mkdir+0x143> <== ALWAYS TAKEN
if (stat(path, &sb) < 0) {
11259c: 83 ec 08 sub $0x8,%esp
11259f: 8d 45 a0 lea -0x60(%ebp),%eax
1125a2: 50 push %eax
1125a3: 57 push %edi
1125a4: e8 7f 00 00 00 call 112628 <stat>
1125a9: 83 c4 10 add $0x10,%esp
1125ac: 85 c0 test %eax,%eax
1125ae: 78 3f js 1125ef <rtems_mkdir+0x143> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
1125b0: 8b 45 ac mov -0x54(%ebp),%eax
1125b3: 25 00 f0 00 00 and $0xf000,%eax
1125b8: 3d 00 40 00 00 cmp $0x4000,%eax
1125bd: 0f 84 5b ff ff ff je 11251e <rtems_mkdir+0x72>
if (last)
1125c3: 85 f6 test %esi,%esi
1125c5: 74 53 je 11261a <rtems_mkdir+0x16e>
errno = EEXIST;
1125c7: e8 08 29 00 00 call 114ed4 <__errno>
1125cc: c7 00 11 00 00 00 movl $0x11,(%eax)
1125d2: eb 2d jmp 112601 <rtems_mkdir+0x155>
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
1125d4: b8 ff ff ff ff mov $0xffffffff,%eax
}
1125d9: 8d 65 f4 lea -0xc(%ebp),%esp
1125dc: 5b pop %ebx <== NOT EXECUTED
1125dd: 5e pop %esi <== NOT EXECUTED
1125de: 5f pop %edi <== NOT EXECUTED
1125df: c9 leave <== NOT EXECUTED
1125e0: c3 ret <== NOT EXECUTED
1125e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
1125e4: 8d 58 01 lea 0x1(%eax),%ebx
1125e7: 8a 50 01 mov 0x1(%eax),%dl
1125ea: e9 e8 fe ff ff jmp 1124d7 <rtems_mkdir+0x2b>
}
}
if (!last)
*p = '/';
}
if (!first && !last)
1125ef: 85 f6 test %esi,%esi
1125f1: 75 0e jne 112601 <rtems_mkdir+0x155> <== ALWAYS TAKEN
(void)umask(oumask);
1125f3: 83 ec 0c sub $0xc,%esp
1125f6: ff 75 94 pushl -0x6c(%ebp)
1125f9: e8 d2 00 00 00 call 1126d0 <umask>
1125fe: 83 c4 10 add $0x10,%esp
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
112601: 83 ec 0c sub $0xc,%esp
112604: 57 push %edi
112605: e8 e2 6a ff ff call 1090ec <free>
11260a: 83 c4 10 add $0x10,%esp
}
return success != 0 ? 0 : -1;
11260d: b8 ff ff ff ff mov $0xffffffff,%eax
}
112612: 8d 65 f4 lea -0xc(%ebp),%esp
112615: 5b pop %ebx
112616: 5e pop %esi
112617: 5f pop %edi
112618: c9 leave
112619: c3 ret
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
11261a: e8 b5 28 00 00 call 114ed4 <__errno>
11261f: c7 00 14 00 00 00 movl $0x14,(%eax)
112625: eb cc jmp 1125f3 <rtems_mkdir+0x147>
0010b974 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
int api
)
{
10b974: 55 push %ebp
10b975: 89 e5 mov %esp,%ebp
10b977: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
10b97a: ff 75 08 pushl 0x8(%ebp)
10b97d: 68 80 74 12 00 push $0x127480
10b982: e8 ad 49 00 00 call 110334 <rtems_assoc_ptr_by_local>
if ( api_assoc )
10b987: 83 c4 10 add $0x10,%esp
10b98a: 85 c0 test %eax,%eax
10b98c: 74 06 je 10b994 <rtems_object_get_api_name+0x20>
return api_assoc->name;
10b98e: 8b 00 mov (%eax),%eax
return "BAD CLASS";
}
10b990: c9 leave
10b991: c3 ret
10b992: 66 90 xchg %ax,%ax
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
if ( api_assoc )
return api_assoc->name;
return "BAD CLASS";
10b994: b8 63 24 12 00 mov $0x122463,%eax
}
10b999: c9 leave
10b99a: c3 ret
0010cf5c <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
)
{
10cf5c: 55 push %ebp
10cf5d: 89 e5 mov %esp,%ebp
10cf5f: 57 push %edi
10cf60: 56 push %esi
10cf61: 53 push %ebx
10cf62: 83 ec 0c sub $0xc,%esp
10cf65: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10cf68: 85 db test %ebx,%ebx
10cf6a: 74 60 je 10cfcc <rtems_object_get_class_information+0x70>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10cf6c: 83 ec 08 sub $0x8,%esp
10cf6f: 0f b7 45 0c movzwl 0xc(%ebp),%eax
10cf73: 50 push %eax
10cf74: ff 75 08 pushl 0x8(%ebp)
10cf77: e8 5c 1b 00 00 call 10ead8 <_Objects_Get_information>
if ( !obj_info )
10cf7c: 83 c4 10 add $0x10,%esp
10cf7f: 85 c0 test %eax,%eax
10cf81: 74 59 je 10cfdc <rtems_object_get_class_information+0x80>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
10cf83: 8b 50 08 mov 0x8(%eax),%edx
10cf86: 89 13 mov %edx,(%ebx)
info->maximum_id = obj_info->maximum_id;
10cf88: 8b 50 0c mov 0xc(%eax),%edx
10cf8b: 89 53 04 mov %edx,0x4(%ebx)
info->auto_extend = obj_info->auto_extend;
10cf8e: 8a 50 12 mov 0x12(%eax),%dl
10cf91: 88 53 0c mov %dl,0xc(%ebx)
info->maximum = obj_info->maximum;
10cf94: 0f b7 70 10 movzwl 0x10(%eax),%esi
10cf98: 89 73 08 mov %esi,0x8(%ebx)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10cf9b: 85 f6 test %esi,%esi
10cf9d: 74 44 je 10cfe3 <rtems_object_get_class_information+0x87><== NEVER TAKEN
10cf9f: 8b 78 1c mov 0x1c(%eax),%edi
10cfa2: b9 01 00 00 00 mov $0x1,%ecx
10cfa7: b8 01 00 00 00 mov $0x1,%eax
10cfac: 31 d2 xor %edx,%edx
10cfae: 66 90 xchg %ax,%ax
if ( !obj_info->local_table[i] )
unallocated++;
10cfb0: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4)
10cfb4: 83 d2 00 adc $0x0,%edx
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++ )
10cfb7: 40 inc %eax
10cfb8: 89 c1 mov %eax,%ecx
10cfba: 39 c6 cmp %eax,%esi
10cfbc: 73 f2 jae 10cfb0 <rtems_object_get_class_information+0x54>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10cfbe: 89 53 10 mov %edx,0x10(%ebx)
return RTEMS_SUCCESSFUL;
10cfc1: 31 c0 xor %eax,%eax
}
10cfc3: 8d 65 f4 lea -0xc(%ebp),%esp
10cfc6: 5b pop %ebx
10cfc7: 5e pop %esi
10cfc8: 5f pop %edi
10cfc9: c9 leave
10cfca: c3 ret
10cfcb: 90 nop
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
10cfcc: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10cfd1: 8d 65 f4 lea -0xc(%ebp),%esp
10cfd4: 5b pop %ebx
10cfd5: 5e pop %esi
10cfd6: 5f pop %edi
10cfd7: c9 leave
10cfd8: c3 ret
10cfd9: 8d 76 00 lea 0x0(%esi),%esi
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
10cfdc: b8 0a 00 00 00 mov $0xa,%eax
10cfe1: eb e0 jmp 10cfc3 <rtems_object_get_class_information+0x67>
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++ )
10cfe3: 31 d2 xor %edx,%edx
10cfe5: eb d7 jmp 10cfbe <rtems_object_get_class_information+0x62>
0010c50c <rtems_object_get_classic_name>:
rtems_status_code rtems_object_get_classic_name(
rtems_id id,
rtems_name *name
)
{
10c50c: 55 push %ebp
10c50d: 89 e5 mov %esp,%ebp
10c50f: 53 push %ebx
10c510: 83 ec 14 sub $0x14,%esp
10c513: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
10c516: 85 db test %ebx,%ebx
10c518: 74 26 je 10c540 <rtems_object_get_classic_name+0x34>
return RTEMS_INVALID_ADDRESS;
status = _Objects_Id_to_name( id, &name_u );
10c51a: 83 ec 08 sub $0x8,%esp
10c51d: 8d 45 f4 lea -0xc(%ebp),%eax
10c520: 50 push %eax
10c521: ff 75 08 pushl 0x8(%ebp)
10c524: e8 b7 1b 00 00 call 10e0e0 <_Objects_Id_to_name>
*name = name_u.name_u32;
10c529: 8b 55 f4 mov -0xc(%ebp),%edx
10c52c: 89 13 mov %edx,(%ebx)
return _Status_Object_name_errors_to_status[ status ];
10c52e: 8b 04 85 2c 30 12 00 mov 0x12302c(,%eax,4),%eax
10c535: 83 c4 10 add $0x10,%esp
}
10c538: 8b 5d fc mov -0x4(%ebp),%ebx
10c53b: c9 leave
10c53c: c3 ret
10c53d: 8d 76 00 lea 0x0(%esi),%esi
{
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
return RTEMS_INVALID_ADDRESS;
10c540: b8 09 00 00 00 mov $0x9,%eax
status = _Objects_Id_to_name( id, &name_u );
*name = name_u.name_u32;
return _Status_Object_name_errors_to_status[ status ];
}
10c545: 8b 5d fc mov -0x4(%ebp),%ebx
10c548: c9 leave
10c549: c3 ret
0010b9a8 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
10b9a8: 55 push %ebp
10b9a9: 89 e5 mov %esp,%ebp
10b9ab: 57 push %edi
10b9ac: 56 push %esi
10b9ad: 53 push %ebx
10b9ae: 83 ec 1c sub $0x1c,%esp
10b9b1: 8b 75 08 mov 0x8(%ebp),%esi
10b9b4: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10b9b7: 85 ff test %edi,%edi
10b9b9: 74 61 je 10ba1c <rtems_object_set_name+0x74>
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10b9bb: 85 f6 test %esi,%esi
10b9bd: 74 35 je 10b9f4 <rtems_object_set_name+0x4c>
information = _Objects_Get_information_id( tmpId );
10b9bf: 83 ec 0c sub $0xc,%esp
10b9c2: 56 push %esi
10b9c3: e8 34 19 00 00 call 10d2fc <_Objects_Get_information_id>
10b9c8: 89 c3 mov %eax,%ebx
if ( !information )
10b9ca: 83 c4 10 add $0x10,%esp
10b9cd: 85 c0 test %eax,%eax
10b9cf: 74 16 je 10b9e7 <rtems_object_set_name+0x3f>
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
10b9d1: 50 push %eax
10b9d2: 8d 45 e4 lea -0x1c(%ebp),%eax
10b9d5: 50 push %eax
10b9d6: 56 push %esi
10b9d7: 53 push %ebx
10b9d8: e8 d7 1a 00 00 call 10d4b4 <_Objects_Get>
switch ( location ) {
10b9dd: 83 c4 10 add $0x10,%esp
10b9e0: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b9e3: 85 c9 test %ecx,%ecx
10b9e5: 74 19 je 10ba00 <rtems_object_set_name+0x58>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b9e7: b8 04 00 00 00 mov $0x4,%eax
}
10b9ec: 8d 65 f4 lea -0xc(%ebp),%esp
10b9ef: 5b pop %ebx
10b9f0: 5e pop %esi
10b9f1: 5f pop %edi
10b9f2: c9 leave
10b9f3: c3 ret
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10b9f4: a1 18 9e 12 00 mov 0x129e18,%eax
10b9f9: 8b 70 08 mov 0x8(%eax),%esi
10b9fc: eb c1 jmp 10b9bf <rtems_object_set_name+0x17>
10b9fe: 66 90 xchg %ax,%ax
the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
10ba00: 52 push %edx
10ba01: 57 push %edi
10ba02: 50 push %eax
10ba03: 53 push %ebx
10ba04: e8 a7 1c 00 00 call 10d6b0 <_Objects_Set_name>
_Thread_Enable_dispatch();
10ba09: e8 3e 26 00 00 call 10e04c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ba0e: 83 c4 10 add $0x10,%esp
10ba11: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba13: 8d 65 f4 lea -0xc(%ebp),%esp
10ba16: 5b pop %ebx
10ba17: 5e pop %esi
10ba18: 5f pop %edi
10ba19: c9 leave
10ba1a: c3 ret
10ba1b: 90 nop
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
10ba1c: b8 09 00 00 00 mov $0x9,%eax
10ba21: eb c9 jmp 10b9ec <rtems_object_set_name+0x44>
00116808 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
116808: 55 push %ebp
116809: 89 e5 mov %esp,%ebp
11680b: 57 push %edi
11680c: 56 push %esi
11680d: 53 push %ebx
11680e: 83 ec 1c sub $0x1c,%esp
116811: 8b 5d 08 mov 0x8(%ebp),%ebx
116814: 8b 75 0c mov 0xc(%ebp),%esi
116817: 8b 55 10 mov 0x10(%ebp),%edx
11681a: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
11681d: 85 db test %ebx,%ebx
11681f: 74 47 je 116868 <rtems_partition_create+0x60>
return RTEMS_INVALID_NAME;
if ( !starting_address )
116821: 85 f6 test %esi,%esi
116823: 74 23 je 116848 <rtems_partition_create+0x40>
return RTEMS_INVALID_ADDRESS;
if ( !id )
116825: 8b 45 1c mov 0x1c(%ebp),%eax
116828: 85 c0 test %eax,%eax
11682a: 74 1c je 116848 <rtems_partition_create+0x40><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
11682c: 85 d2 test %edx,%edx
11682e: 74 28 je 116858 <rtems_partition_create+0x50>
116830: 85 ff test %edi,%edi
116832: 74 24 je 116858 <rtems_partition_create+0x50>
116834: 39 fa cmp %edi,%edx
116836: 72 20 jb 116858 <rtems_partition_create+0x50>
116838: f7 c7 03 00 00 00 test $0x3,%edi
11683e: 75 18 jne 116858 <rtems_partition_create+0x50>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
116840: f7 c6 03 00 00 00 test $0x3,%esi
116846: 74 30 je 116878 <rtems_partition_create+0x70>
return RTEMS_INVALID_ADDRESS;
116848: b8 09 00 00 00 mov $0x9,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11684d: 8d 65 f4 lea -0xc(%ebp),%esp
116850: 5b pop %ebx
116851: 5e pop %esi
116852: 5f pop %edi
116853: c9 leave
116854: c3 ret
116855: 8d 76 00 lea 0x0(%esi),%esi
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
116858: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11685d: 8d 65 f4 lea -0xc(%ebp),%esp
116860: 5b pop %ebx
116861: 5e pop %esi
116862: 5f pop %edi
116863: c9 leave
116864: c3 ret
116865: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
116868: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11686d: 8d 65 f4 lea -0xc(%ebp),%esp
116870: 5b pop %ebx
116871: 5e pop %esi
116872: 5f pop %edi
116873: c9 leave
116874: c3 ret
116875: 8d 76 00 lea 0x0(%esi),%esi
116878: a1 d0 21 14 00 mov 0x1421d0,%eax
11687d: 40 inc %eax
11687e: a3 d0 21 14 00 mov %eax,0x1421d0
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
116883: 83 ec 0c sub $0xc,%esp
116886: 68 60 20 14 00 push $0x142060
11688b: 89 55 e0 mov %edx,-0x20(%ebp)
11688e: e8 41 45 00 00 call 11add4 <_Objects_Allocate>
116893: 89 45 e4 mov %eax,-0x1c(%ebp)
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
116896: 83 c4 10 add $0x10,%esp
116899: 85 c0 test %eax,%eax
11689b: 8b 55 e0 mov -0x20(%ebp),%edx
11689e: 74 58 je 1168f8 <rtems_partition_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
1168a0: 8b 45 e4 mov -0x1c(%ebp),%eax
1168a3: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
1168a6: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
1168a9: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
1168ac: 8b 4d 18 mov 0x18(%ebp),%ecx
1168af: 89 48 1c mov %ecx,0x1c(%eax)
the_partition->number_of_used_blocks = 0;
1168b2: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
_Chain_Initialize( &the_partition->Memory, starting_address,
1168b9: 57 push %edi
1168ba: 89 d0 mov %edx,%eax
1168bc: 31 d2 xor %edx,%edx
1168be: f7 f7 div %edi
1168c0: 50 push %eax
1168c1: 56 push %esi
1168c2: 8b 45 e4 mov -0x1c(%ebp),%eax
1168c5: 83 c0 24 add $0x24,%eax
1168c8: 50 push %eax
1168c9: e8 a2 2f 00 00 call 119870 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
1168ce: 8b 7d e4 mov -0x1c(%ebp),%edi
1168d1: 8b 47 08 mov 0x8(%edi),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
1168d4: 0f b7 f0 movzwl %ax,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1168d7: 8b 15 7c 20 14 00 mov 0x14207c,%edx
1168dd: 89 3c b2 mov %edi,(%edx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1168e0: 89 5f 0c mov %ebx,0xc(%edi)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
1168e3: 8b 55 1c mov 0x1c(%ebp),%edx
1168e6: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
1168e8: e8 8f 54 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1168ed: 83 c4 10 add $0x10,%esp
1168f0: 31 c0 xor %eax,%eax
1168f2: e9 66 ff ff ff jmp 11685d <rtems_partition_create+0x55>
1168f7: 90 nop
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
1168f8: e8 7f 54 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
1168fd: b8 05 00 00 00 mov $0x5,%eax
116902: e9 56 ff ff ff jmp 11685d <rtems_partition_create+0x55>
00116974 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
rtems_id id,
void **buffer
)
{
116974: 55 push %ebp
116975: 89 e5 mov %esp,%ebp
116977: 56 push %esi
116978: 53 push %ebx
116979: 83 ec 20 sub $0x20,%esp
11697c: 8b 5d 0c mov 0xc(%ebp),%ebx
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
11697f: 85 db test %ebx,%ebx
116981: 74 59 je 1169dc <rtems_partition_get_buffer+0x68>
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
116983: 52 push %edx
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
116984: 8d 45 f4 lea -0xc(%ebp),%eax
116987: 50 push %eax
116988: ff 75 08 pushl 0x8(%ebp)
11698b: 68 60 20 14 00 push $0x142060
116990: e8 33 49 00 00 call 11b2c8 <_Objects_Get>
116995: 89 c6 mov %eax,%esi
switch ( location ) {
116997: 83 c4 10 add $0x10,%esp
11699a: 8b 45 f4 mov -0xc(%ebp),%eax
11699d: 85 c0 test %eax,%eax
11699f: 75 2f jne 1169d0 <rtems_partition_get_buffer+0x5c>
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
1169a1: 83 ec 0c sub $0xc,%esp
1169a4: 8d 46 24 lea 0x24(%esi),%eax
1169a7: 50 push %eax
1169a8: e8 9f 2e 00 00 call 11984c <_Chain_Get>
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
1169ad: 83 c4 10 add $0x10,%esp
1169b0: 85 c0 test %eax,%eax
1169b2: 74 34 je 1169e8 <rtems_partition_get_buffer+0x74>
the_partition->number_of_used_blocks += 1;
1169b4: ff 46 20 incl 0x20(%esi)
_Thread_Enable_dispatch();
1169b7: 89 45 e4 mov %eax,-0x1c(%ebp)
1169ba: e8 bd 53 00 00 call 11bd7c <_Thread_Enable_dispatch>
*buffer = the_buffer;
1169bf: 8b 45 e4 mov -0x1c(%ebp),%eax
1169c2: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
1169c4: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1169c6: 8d 65 f8 lea -0x8(%ebp),%esp
1169c9: 5b pop %ebx
1169ca: 5e pop %esi
1169cb: c9 leave
1169cc: c3 ret
1169cd: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1169d0: b8 04 00 00 00 mov $0x4,%eax
}
1169d5: 8d 65 f8 lea -0x8(%ebp),%esp
1169d8: 5b pop %ebx
1169d9: 5e pop %esi
1169da: c9 leave
1169db: c3 ret
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
1169dc: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1169e1: 8d 65 f8 lea -0x8(%ebp),%esp
1169e4: 5b pop %ebx
1169e5: 5e pop %esi
1169e6: c9 leave
1169e7: c3 ret
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1169e8: e8 8f 53 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_UNSATISFIED;
1169ed: b8 0d 00 00 00 mov $0xd,%eax
1169f2: eb e1 jmp 1169d5 <rtems_partition_get_buffer+0x61>
00116a18 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
116a18: 55 push %ebp
116a19: 89 e5 mov %esp,%ebp
116a1b: 56 push %esi
116a1c: 53 push %ebx
116a1d: 83 ec 14 sub $0x14,%esp
116a20: 8b 75 0c mov 0xc(%ebp),%esi
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
116a23: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
116a26: 50 push %eax
116a27: ff 75 08 pushl 0x8(%ebp)
116a2a: 68 60 20 14 00 push $0x142060
116a2f: e8 94 48 00 00 call 11b2c8 <_Objects_Get>
116a34: 89 c3 mov %eax,%ebx
switch ( location ) {
116a36: 83 c4 10 add $0x10,%esp
116a39: 8b 45 f4 mov -0xc(%ebp),%eax
116a3c: 85 c0 test %eax,%eax
116a3e: 74 0c je 116a4c <rtems_partition_return_buffer+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116a40: b8 04 00 00 00 mov $0x4,%eax
}
116a45: 8d 65 f8 lea -0x8(%ebp),%esp
116a48: 5b pop %ebx
116a49: 5e pop %esi
116a4a: c9 leave
116a4b: c3 ret
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
116a4c: 8b 43 10 mov 0x10(%ebx),%eax
ending = _Addresses_Add_offset( starting, the_partition->length );
116a4f: 8b 53 14 mov 0x14(%ebx),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
116a52: 39 c6 cmp %eax,%esi
116a54: 72 3a jb 116a90 <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
116a56: 8d 14 10 lea (%eax,%edx,1),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
116a59: 39 d6 cmp %edx,%esi
116a5b: 77 33 ja 116a90 <rtems_partition_return_buffer+0x78><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
116a5d: 89 f2 mov %esi,%edx
116a5f: 29 c2 sub %eax,%edx
116a61: 89 d0 mov %edx,%eax
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
116a63: 31 d2 xor %edx,%edx
116a65: f7 73 18 divl 0x18(%ebx)
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
116a68: 85 d2 test %edx,%edx
116a6a: 75 24 jne 116a90 <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
116a6c: 83 ec 08 sub $0x8,%esp
116a6f: 56 push %esi
116a70: 8d 43 24 lea 0x24(%ebx),%eax
116a73: 50 push %eax
116a74: e8 97 2d 00 00 call 119810 <_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;
116a79: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
116a7c: e8 fb 52 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116a81: 83 c4 10 add $0x10,%esp
116a84: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116a86: 8d 65 f8 lea -0x8(%ebp),%esp
116a89: 5b pop %ebx
116a8a: 5e pop %esi
116a8b: c9 leave
116a8c: c3 ret
116a8d: 8d 76 00 lea 0x0(%esi),%esi
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
116a90: e8 e7 52 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
116a95: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116a9a: 8d 65 f8 lea -0x8(%ebp),%esp
116a9d: 5b pop %ebx
116a9e: 5e pop %esi
116a9f: c9 leave
116aa0: c3 ret
00115e3c <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
115e3c: 55 push %ebp
115e3d: 89 e5 mov %esp,%ebp
115e3f: 57 push %edi
115e40: 56 push %esi
115e41: 53 push %ebx
115e42: 83 ec 1c sub $0x1c,%esp
115e45: 8b 5d 08 mov 0x8(%ebp),%ebx
115e48: 8b 55 0c mov 0xc(%ebp),%edx
115e4b: 8b 7d 10 mov 0x10(%ebp),%edi
115e4e: 8b 75 18 mov 0x18(%ebp),%esi
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
115e51: 85 db test %ebx,%ebx
115e53: 74 1b je 115e70 <rtems_port_create+0x34>
return RTEMS_INVALID_NAME;
if ( !id )
115e55: 85 f6 test %esi,%esi
115e57: 74 08 je 115e61 <rtems_port_create+0x25>
* id - port id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_port_create(
115e59: 89 f8 mov %edi,%eax
115e5b: 09 d0 or %edx,%eax
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
115e5d: a8 03 test $0x3,%al
115e5f: 74 1f je 115e80 <rtems_port_create+0x44>
!_Addresses_Is_aligned( external_start ) )
return RTEMS_INVALID_ADDRESS;
115e61: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
115e66: 8d 65 f4 lea -0xc(%ebp),%esp
115e69: 5b pop %ebx
115e6a: 5e pop %esi
115e6b: 5f pop %edi
115e6c: c9 leave
115e6d: c3 ret
115e6e: 66 90 xchg %ax,%ax
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
115e70: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
115e75: 8d 65 f4 lea -0xc(%ebp),%esp
115e78: 5b pop %ebx
115e79: 5e pop %esi
115e7a: 5f pop %edi
115e7b: c9 leave
115e7c: c3 ret
115e7d: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
115e80: a1 d0 21 14 00 mov 0x1421d0,%eax
115e85: 40 inc %eax
115e86: a3 d0 21 14 00 mov %eax,0x1421d0
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
_Objects_Allocate( &_Dual_ported_memory_Information );
115e8b: 83 ec 0c sub $0xc,%esp
115e8e: 68 20 20 14 00 push $0x142020
115e93: 89 55 e4 mov %edx,-0x1c(%ebp)
115e96: e8 39 4f 00 00 call 11add4 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
115e9b: 83 c4 10 add $0x10,%esp
115e9e: 85 c0 test %eax,%eax
115ea0: 8b 55 e4 mov -0x1c(%ebp),%edx
115ea3: 74 33 je 115ed8 <rtems_port_create+0x9c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
115ea5: 89 50 10 mov %edx,0x10(%eax)
the_port->external_base = external_start;
115ea8: 89 78 14 mov %edi,0x14(%eax)
the_port->length = length - 1;
115eab: 8b 55 14 mov 0x14(%ebp),%edx
115eae: 4a dec %edx
115eaf: 89 50 18 mov %edx,0x18(%eax)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
115eb2: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
115eb5: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
115eb8: 8b 0d 3c 20 14 00 mov 0x14203c,%ecx
115ebe: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
115ec1: 89 58 0c mov %ebx,0xc(%eax)
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
115ec4: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
115ec6: e8 b1 5e 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115ecb: 31 c0 xor %eax,%eax
}
115ecd: 8d 65 f4 lea -0xc(%ebp),%esp
115ed0: 5b pop %ebx
115ed1: 5e pop %esi
115ed2: 5f pop %edi
115ed3: c9 leave
115ed4: c3 ret
115ed5: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
115ed8: e8 9f 5e 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
115edd: b8 05 00 00 00 mov $0x5,%eax
115ee2: eb 82 jmp 115e66 <rtems_port_create+0x2a>
00115ee4 <rtems_port_delete>:
*/
rtems_status_code rtems_port_delete(
rtems_id id
)
{
115ee4: 55 push %ebp
115ee5: 89 e5 mov %esp,%ebp
115ee7: 83 ec 2c sub $0x2c,%esp
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
115eea: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
_Objects_Get( &_Dual_ported_memory_Information, id, location );
115eed: 50 push %eax
115eee: ff 75 08 pushl 0x8(%ebp)
115ef1: 68 20 20 14 00 push $0x142020
115ef6: e8 cd 53 00 00 call 11b2c8 <_Objects_Get>
switch ( location ) {
115efb: 83 c4 10 add $0x10,%esp
115efe: 8b 4d f4 mov -0xc(%ebp),%ecx
115f01: 85 c9 test %ecx,%ecx
115f03: 75 2f jne 115f34 <rtems_port_delete+0x50>
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
115f05: 83 ec 08 sub $0x8,%esp
115f08: 50 push %eax
115f09: 68 20 20 14 00 push $0x142020
115f0e: 89 45 e4 mov %eax,-0x1c(%ebp)
115f11: e8 3a 4f 00 00 call 11ae50 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free (
Dual_ported_memory_Control *the_port
)
{
_Objects_Free( &_Dual_ported_memory_Information, &the_port->Object );
115f16: 58 pop %eax
115f17: 5a pop %edx
115f18: 8b 45 e4 mov -0x1c(%ebp),%eax
115f1b: 50 push %eax
115f1c: 68 20 20 14 00 push $0x142020
115f21: e8 26 52 00 00 call 11b14c <_Objects_Free>
_Dual_ported_memory_Free( the_port );
_Thread_Enable_dispatch();
115f26: e8 51 5e 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115f2b: 83 c4 10 add $0x10,%esp
115f2e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115f30: c9 leave
115f31: c3 ret
115f32: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115f34: b8 04 00 00 00 mov $0x4,%eax
}
115f39: c9 leave
115f3a: c3 ret
00115f3c <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
rtems_id id,
void *external,
void **internal
)
{
115f3c: 55 push %ebp
115f3d: 89 e5 mov %esp,%ebp
115f3f: 56 push %esi
115f40: 53 push %ebx
115f41: 83 ec 10 sub $0x10,%esp
115f44: 8b 75 0c mov 0xc(%ebp),%esi
115f47: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
115f4a: 85 db test %ebx,%ebx
115f4c: 74 4e je 115f9c <rtems_port_external_to_internal+0x60>
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
_Objects_Get( &_Dual_ported_memory_Information, id, location );
115f4e: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
115f4f: 8d 45 f4 lea -0xc(%ebp),%eax
115f52: 50 push %eax
115f53: ff 75 08 pushl 0x8(%ebp)
115f56: 68 20 20 14 00 push $0x142020
115f5b: e8 68 53 00 00 call 11b2c8 <_Objects_Get>
switch ( location ) {
115f60: 83 c4 10 add $0x10,%esp
115f63: 8b 55 f4 mov -0xc(%ebp),%edx
115f66: 85 d2 test %edx,%edx
115f68: 74 0e je 115f78 <rtems_port_external_to_internal+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115f6a: b8 04 00 00 00 mov $0x4,%eax
}
115f6f: 8d 65 f8 lea -0x8(%ebp),%esp
115f72: 5b pop %ebx
115f73: 5e pop %esi
115f74: c9 leave
115f75: c3 ret
115f76: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
115f78: 89 f2 mov %esi,%edx
115f7a: 2b 50 14 sub 0x14(%eax),%edx
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
115f7d: 3b 50 18 cmp 0x18(%eax),%edx
115f80: 77 16 ja 115f98 <rtems_port_external_to_internal+0x5c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
115f82: 03 50 10 add 0x10(%eax),%edx
115f85: 89 13 mov %edx,(%ebx)
*internal = external;
else
*internal = _Addresses_Add_offset( the_port->internal_base,
ending );
_Thread_Enable_dispatch();
115f87: e8 f0 5d 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115f8c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115f8e: 8d 65 f8 lea -0x8(%ebp),%esp
115f91: 5b pop %ebx
115f92: 5e pop %esi
115f93: c9 leave
115f94: c3 ret
115f95: 8d 76 00 lea 0x0(%esi),%esi
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
*internal = external;
115f98: 89 33 mov %esi,(%ebx)
115f9a: eb eb jmp 115f87 <rtems_port_external_to_internal+0x4b>
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
return RTEMS_INVALID_ADDRESS;
115f9c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115fa1: 8d 65 f8 lea -0x8(%ebp),%esp
115fa4: 5b pop %ebx
115fa5: 5e pop %esi
115fa6: c9 leave
115fa7: c3 ret
00115fcc <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
rtems_id id,
void *internal,
void **external
)
{
115fcc: 55 push %ebp
115fcd: 89 e5 mov %esp,%ebp
115fcf: 56 push %esi
115fd0: 53 push %ebx
115fd1: 83 ec 10 sub $0x10,%esp
115fd4: 8b 75 0c mov 0xc(%ebp),%esi
115fd7: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
115fda: 85 db test %ebx,%ebx
115fdc: 74 4e je 11602c <rtems_port_internal_to_external+0x60><== NEVER TAKEN
115fde: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
115fdf: 8d 45 f4 lea -0xc(%ebp),%eax
115fe2: 50 push %eax
115fe3: ff 75 08 pushl 0x8(%ebp)
115fe6: 68 20 20 14 00 push $0x142020
115feb: e8 d8 52 00 00 call 11b2c8 <_Objects_Get>
switch ( location ) {
115ff0: 83 c4 10 add $0x10,%esp
115ff3: 8b 55 f4 mov -0xc(%ebp),%edx
115ff6: 85 d2 test %edx,%edx
115ff8: 74 0e je 116008 <rtems_port_internal_to_external+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115ffa: b8 04 00 00 00 mov $0x4,%eax
}
115fff: 8d 65 f8 lea -0x8(%ebp),%esp
116002: 5b pop %ebx
116003: 5e pop %esi
116004: c9 leave
116005: c3 ret
116006: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
116008: 89 f2 mov %esi,%edx
11600a: 2b 50 10 sub 0x10(%eax),%edx
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
11600d: 3b 50 18 cmp 0x18(%eax),%edx
116010: 77 16 ja 116028 <rtems_port_internal_to_external+0x5c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
116012: 03 50 14 add 0x14(%eax),%edx
116015: 89 13 mov %edx,(%ebx)
*external = internal;
else
*external = _Addresses_Add_offset( the_port->external_base,
ending );
_Thread_Enable_dispatch();
116017: e8 60 5d 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11601c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11601e: 8d 65 f8 lea -0x8(%ebp),%esp
116021: 5b pop %ebx
116022: 5e pop %esi
116023: c9 leave
116024: c3 ret
116025: 8d 76 00 lea 0x0(%esi),%esi
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
*external = internal;
116028: 89 33 mov %esi,(%ebx)
11602a: eb eb jmp 116017 <rtems_port_internal_to_external+0x4b>
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
return RTEMS_INVALID_ADDRESS;
11602c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116031: 8d 65 f8 lea -0x8(%ebp),%esp
116034: 5b pop %ebx
116035: 5e pop %esi
116036: c9 leave
116037: c3 ret
00107820 <rtems_print_buffer>:
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
107820: 55 push %ebp
107821: 89 e5 mov %esp,%ebp
107823: 57 push %edi
107824: 56 push %esi
107825: 53 push %ebx
107826: 81 ec 9c 00 00 00 sub $0x9c,%esp
10782c: 8b 75 0c mov 0xc(%ebp),%esi
int i, mod, max;
if ( !length ) return;
10782f: 85 f6 test %esi,%esi
107831: 0f 84 00 01 00 00 je 107937 <rtems_print_buffer+0x117>
mod = length % 16;
107837: 89 f0 mov %esi,%eax
107839: 25 0f 00 00 80 and $0x8000000f,%eax
10783e: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
107844: 0f 88 21 02 00 00 js 107a6b <rtems_print_buffer+0x24b>
10784a: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
107850: 89 85 58 ff ff ff mov %eax,-0xa8(%ebp)
max = length - mod;
107856: 29 c6 sub %eax,%esi
107858: 89 b5 5c ff ff ff mov %esi,-0xa4(%ebp)
for ( i=0 ; i<max ; i+=16 )
10785e: 85 f6 test %esi,%esi
107860: 0f 8e c7 00 00 00 jle 10792d <rtems_print_buffer+0x10d>
107866: c7 85 64 ff ff ff 00 movl $0x0,-0x9c(%ebp)
10786d: 00 00 00
107870: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx
107876: 66 90 xchg %ax,%ax
static inline void Dump_Line(
const unsigned char *buffer,
int length
);
void rtems_print_buffer(
107878: 8b 75 08 mov 0x8(%ebp),%esi
10787b: 03 b5 64 ff ff ff add -0x9c(%ebp),%esi
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
107881: c6 85 70 ff ff ff 00 movb $0x0,-0x90(%ebp)
for( i=0 ; i<length ; i++ )
107888: 31 ff xor %edi,%edi
10788a: 66 90 xchg %ax,%ax
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
10788c: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
107890: 50 push %eax
107891: 53 push %ebx
107892: 68 d3 0b 12 00 push $0x120bd3
107897: 53 push %ebx
107898: e8 7f c6 00 00 call 113f1c <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
10789d: 47 inc %edi
10789e: 83 c4 10 add $0x10,%esp
1078a1: 83 ff 10 cmp $0x10,%edi
1078a4: 75 e6 jne 10788c <rtems_print_buffer+0x6c>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
1078a6: 31 c0 xor %eax,%eax
1078a8: b9 ff ff ff ff mov $0xffffffff,%ecx
1078ad: 89 df mov %ebx,%edi
1078af: f2 ae repnz scas %es:(%edi),%al
1078b1: f7 d1 not %ecx
1078b3: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1)
for( i=0 ; i<length ; i++ )
1078ba: 31 ff xor %edi,%edi
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
1078bc: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
1078c0: 8b 15 14 54 12 00 mov 0x125414,%edx
1078c6: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
1078cb: 81 e2 97 00 00 00 and $0x97,%edx
1078d1: 75 05 jne 1078d8 <rtems_print_buffer+0xb8>
1078d3: b8 2e 00 00 00 mov $0x2e,%eax
1078d8: 50 push %eax
1078d9: 53 push %ebx
1078da: 68 db 0b 12 00 push $0x120bdb
1078df: 53 push %ebx
1078e0: e8 37 c6 00 00 call 113f1c <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
1078e5: 47 inc %edi
1078e6: 83 c4 10 add $0x10,%esp
1078e9: 83 ff 10 cmp $0x10,%edi
1078ec: 75 ce jne 1078bc <rtems_print_buffer+0x9c>
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
1078ee: 31 c0 xor %eax,%eax
1078f0: b9 ff ff ff ff mov $0xffffffff,%ecx
1078f5: 89 df mov %ebx,%edi
1078f7: f2 ae repnz scas %es:(%edi),%al
1078f9: f7 d1 not %ecx
1078fb: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax
1078ff: 66 c7 00 7c 0a movw $0xa7c,(%eax)
107904: c6 40 02 00 movb $0x0,0x2(%eax)
printk( line_buffer );
107908: 83 ec 0c sub $0xc,%esp
10790b: 53 push %ebx
10790c: e8 17 18 00 00 call 109128 <printk>
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
107911: 83 85 64 ff ff ff 10 addl $0x10,-0x9c(%ebp)
107918: 83 c4 10 add $0x10,%esp
10791b: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
107921: 39 85 5c ff ff ff cmp %eax,-0xa4(%ebp)
107927: 0f 8f 4b ff ff ff jg 107878 <rtems_print_buffer+0x58>
Dump_Line( &buffer[ i ], 16 );
if ( mod )
10792d: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx
107933: 85 c9 test %ecx,%ecx
107935: 75 08 jne 10793f <rtems_print_buffer+0x11f>
Dump_Line( &buffer[ max ], mod );
}
107937: 8d 65 f4 lea -0xc(%ebp),%esp
10793a: 5b pop %ebx
10793b: 5e pop %esi
10793c: 5f pop %edi
10793d: c9 leave
10793e: c3 ret
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
10793f: 8b 75 08 mov 0x8(%ebp),%esi
107942: 03 b5 5c ff ff ff add -0xa4(%ebp),%esi
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
107948: c6 85 70 ff ff ff 00 movb $0x0,-0x90(%ebp)
for( i=0 ; i<length ; i++ )
10794f: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx
107955: 85 d2 test %edx,%edx
107957: 0f 8e 2a 01 00 00 jle 107a87 <rtems_print_buffer+0x267>
10795d: 31 ff xor %edi,%edi
10795f: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx
107965: 8d 76 00 lea 0x0(%esi),%esi
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
107968: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
10796c: 50 push %eax
10796d: 53 push %ebx
10796e: 68 d3 0b 12 00 push $0x120bd3
107973: 53 push %ebx
107974: e8 a3 c5 00 00 call 113f1c <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
107979: 47 inc %edi
10797a: 83 c4 10 add $0x10,%esp
10797d: 39 bd 60 ff ff ff cmp %edi,-0xa0(%ebp)
107983: 7f e3 jg 107968 <rtems_print_buffer+0x148>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
107985: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp)
10798c: 0f 8f 02 01 00 00 jg 107a94 <rtems_print_buffer+0x274><== NEVER TAKEN
107992: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx
strcat( line_buffer, " " );
107998: 31 c0 xor %eax,%eax
10799a: 66 90 xchg %ax,%ax
10799c: b9 ff ff ff ff mov $0xffffffff,%ecx
1079a1: 89 df mov %ebx,%edi
1079a3: f2 ae repnz scas %es:(%edi),%al
1079a5: f7 d1 not %ecx
1079a7: c7 44 0b ff 20 20 20 movl $0x202020,-0x1(%ebx,%ecx,1)
1079ae: 00
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
1079af: 42 inc %edx
1079b0: 83 fa 0f cmp $0xf,%edx
1079b3: 7e e7 jle 10799c <rtems_print_buffer+0x17c>
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
1079b5: 31 c0 xor %eax,%eax
1079b7: b9 ff ff ff ff mov $0xffffffff,%ecx
1079bc: 89 df mov %ebx,%edi
1079be: f2 ae repnz scas %es:(%edi),%al
1079c0: f7 d1 not %ecx
1079c2: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1)
for( i=0 ; i<length ; i++ )
1079c9: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
1079cf: 85 c0 test %eax,%eax
1079d1: 0f 8e a4 00 00 00 jle 107a7b <rtems_print_buffer+0x25b>
1079d7: 31 ff xor %edi,%edi
1079d9: 8d 76 00 lea 0x0(%esi),%esi
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
1079dc: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
1079e0: 8b 15 14 54 12 00 mov 0x125414,%edx
1079e6: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
1079eb: 81 e2 97 00 00 00 and $0x97,%edx
1079f1: 75 05 jne 1079f8 <rtems_print_buffer+0x1d8>
1079f3: b8 2e 00 00 00 mov $0x2e,%eax
1079f8: 50 push %eax
1079f9: 53 push %ebx
1079fa: 68 db 0b 12 00 push $0x120bdb
1079ff: 53 push %ebx
107a00: e8 17 c5 00 00 call 113f1c <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
107a05: 47 inc %edi
107a06: 83 c4 10 add $0x10,%esp
107a09: 39 bd 60 ff ff ff cmp %edi,-0xa0(%ebp)
107a0f: 7f cb jg 1079dc <rtems_print_buffer+0x1bc>
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
107a11: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp)
107a18: 7f 23 jg 107a3d <rtems_print_buffer+0x21d><== NEVER TAKEN
strcat( line_buffer, " " );
107a1a: ba ff ff ff ff mov $0xffffffff,%edx
107a1f: 31 c0 xor %eax,%eax
107a21: 8b b5 58 ff ff ff mov -0xa8(%ebp),%esi
107a27: 90 nop
107a28: 89 d1 mov %edx,%ecx
107a2a: 89 df mov %ebx,%edi
107a2c: f2 ae repnz scas %es:(%edi),%al
107a2e: f7 d1 not %ecx
107a30: 66 c7 44 0b ff 20 00 movw $0x20,-0x1(%ebx,%ecx,1)
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
107a37: 46 inc %esi
107a38: 83 fe 0f cmp $0xf,%esi
107a3b: 7e eb jle 107a28 <rtems_print_buffer+0x208>
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
107a3d: 31 c0 xor %eax,%eax
107a3f: b9 ff ff ff ff mov $0xffffffff,%ecx
107a44: 89 df mov %ebx,%edi
107a46: f2 ae repnz scas %es:(%edi),%al
107a48: f7 d1 not %ecx
107a4a: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax
107a4e: 66 c7 00 7c 0a movw $0xa7c,(%eax)
107a53: c6 40 02 00 movb $0x0,0x2(%eax)
printk( line_buffer );
107a57: 83 ec 0c sub $0xc,%esp
107a5a: 53 push %ebx
107a5b: e8 c8 16 00 00 call 109128 <printk>
107a60: 83 c4 10 add $0x10,%esp
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
}
107a63: 8d 65 f4 lea -0xc(%ebp),%esp
107a66: 5b pop %ebx
107a67: 5e pop %esi
107a68: 5f pop %edi
107a69: c9 leave
107a6a: c3 ret
int i, mod, max;
if ( !length ) return;
mod = length % 16;
107a6b: 48 dec %eax
107a6c: 83 c8 f0 or $0xfffffff0,%eax
107a6f: 40 inc %eax
107a70: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
107a76: e9 cf fd ff ff jmp 10784a <rtems_print_buffer+0x2a>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
107a7b: c7 85 58 ff ff ff 00 movl $0x0,-0xa8(%ebp)
107a82: 00 00 00
107a85: eb 93 jmp 107a1a <rtems_print_buffer+0x1fa>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
107a87: 31 d2 xor %edx,%edx
107a89: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx
107a8f: e9 04 ff ff ff jmp 107998 <rtems_print_buffer+0x178>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
107a94: 31 c0 xor %eax,%eax
107a96: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
107a99: 89 df mov %ebx,%edi <== NOT EXECUTED
107a9b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
107a9d: f7 d1 not %ecx <== NOT EXECUTED
107a9f: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) <== NOT EXECUTED
107aa6: e9 2c ff ff ff jmp 1079d7 <rtems_print_buffer+0x1b7><== NOT EXECUTED
00116aa4 <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
116aa4: 55 push %ebp
116aa5: 89 e5 mov %esp,%ebp
116aa7: 53 push %ebx
116aa8: 83 ec 18 sub $0x18,%esp
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
116aab: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
116aae: 50 push %eax
116aaf: ff 75 08 pushl 0x8(%ebp)
116ab2: 68 a0 20 14 00 push $0x1420a0
116ab7: e8 0c 48 00 00 call 11b2c8 <_Objects_Get>
116abc: 89 c3 mov %eax,%ebx
switch ( location ) {
116abe: 83 c4 10 add $0x10,%esp
116ac1: 8b 45 f4 mov -0xc(%ebp),%eax
116ac4: 85 c0 test %eax,%eax
116ac6: 74 0c je 116ad4 <rtems_rate_monotonic_cancel+0x30>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116ac8: b8 04 00 00 00 mov $0x4,%eax
}
116acd: 8b 5d fc mov -0x4(%ebp),%ebx
116ad0: c9 leave
116ad1: c3 ret
116ad2: 66 90 xchg %ax,%ax
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
116ad4: a1 b8 27 14 00 mov 0x1427b8,%eax
116ad9: 39 43 40 cmp %eax,0x40(%ebx)
116adc: 74 12 je 116af0 <rtems_rate_monotonic_cancel+0x4c>
_Thread_Enable_dispatch();
116ade: e8 99 52 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
116ae3: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116ae8: 8b 5d fc mov -0x4(%ebp),%ebx
116aeb: c9 leave
116aec: c3 ret
116aed: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
(void) _Watchdog_Remove( &the_period->Timer );
116af0: 83 ec 0c sub $0xc,%esp
116af3: 8d 43 10 lea 0x10(%ebx),%eax
116af6: 50 push %eax
116af7: e8 50 64 00 00 call 11cf4c <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
116afc: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
_Thread_Enable_dispatch();
116b03: e8 74 52 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116b08: 83 c4 10 add $0x10,%esp
116b0b: 31 c0 xor %eax,%eax
116b0d: eb be jmp 116acd <rtems_rate_monotonic_cancel+0x29>
0010c32c <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
10c32c: 55 push %ebp
10c32d: 89 e5 mov %esp,%ebp
10c32f: 57 push %edi
10c330: 56 push %esi
10c331: 53 push %ebx
10c332: 83 ec 1c sub $0x1c,%esp
10c335: 8b 5d 08 mov 0x8(%ebp),%ebx
10c338: 8b 75 0c mov 0xc(%ebp),%esi
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10c33b: 85 db test %ebx,%ebx
10c33d: 0f 84 a9 00 00 00 je 10c3ec <rtems_rate_monotonic_create+0xc0>
return RTEMS_INVALID_NAME;
if ( !id )
10c343: 85 f6 test %esi,%esi
10c345: 0f 84 c5 00 00 00 je 10c410 <rtems_rate_monotonic_create+0xe4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c34b: a1 d0 a8 12 00 mov 0x12a8d0,%eax
10c350: 40 inc %eax
10c351: a3 d0 a8 12 00 mov %eax,0x12a8d0
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
_Objects_Allocate( &_Rate_monotonic_Information );
10c356: 83 ec 0c sub $0xc,%esp
10c359: 68 e0 a7 12 00 push $0x12a7e0
10c35e: e8 35 1f 00 00 call 10e298 <_Objects_Allocate>
10c363: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
10c365: 83 c4 10 add $0x10,%esp
10c368: 85 c0 test %eax,%eax
10c36a: 0f 84 8c 00 00 00 je 10c3fc <rtems_rate_monotonic_create+0xd0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
10c370: a1 b8 ae 12 00 mov 0x12aeb8,%eax
10c375: 89 42 40 mov %eax,0x40(%edx)
the_period->state = RATE_MONOTONIC_INACTIVE;
10c378: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c37f: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
10c386: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx)
the_watchdog->id = id;
10c38d: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
the_watchdog->user_data = user_data;
10c394: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
10c39b: 8d 42 54 lea 0x54(%edx),%eax
10c39e: 89 45 e4 mov %eax,-0x1c(%ebp)
10c3a1: b9 38 00 00 00 mov $0x38,%ecx
10c3a6: 31 c0 xor %eax,%eax
10c3a8: 8b 7d e4 mov -0x1c(%ebp),%edi
10c3ab: f3 aa rep stos %al,%es:(%edi)
10c3ad: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx)
10c3b4: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx)
10c3bb: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx)
10c3c2: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c3c9: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10c3cc: 0f b7 f8 movzwl %ax,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c3cf: 8b 0d fc a7 12 00 mov 0x12a7fc,%ecx
10c3d5: 89 14 b9 mov %edx,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c3d8: 89 5a 0c mov %ebx,0xc(%edx)
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
10c3db: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10c3dd: e8 0a 2f 00 00 call 10f2ec <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c3e2: 31 c0 xor %eax,%eax
}
10c3e4: 8d 65 f4 lea -0xc(%ebp),%esp
10c3e7: 5b pop %ebx
10c3e8: 5e pop %esi
10c3e9: 5f pop %edi
10c3ea: c9 leave
10c3eb: c3 ret
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10c3ec: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c3f1: 8d 65 f4 lea -0xc(%ebp),%esp
10c3f4: 5b pop %ebx
10c3f5: 5e pop %esi
10c3f6: 5f pop %edi
10c3f7: c9 leave
10c3f8: c3 ret
10c3f9: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
10c3fc: e8 eb 2e 00 00 call 10f2ec <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10c401: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c406: 8d 65 f4 lea -0xc(%ebp),%esp
10c409: 5b pop %ebx
10c40a: 5e pop %esi
10c40b: 5f pop %edi
10c40c: c9 leave
10c40d: c3 ret
10c40e: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10c410: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c415: 8d 65 f4 lea -0xc(%ebp),%esp
10c418: 5b pop %ebx
10c419: 5e pop %esi
10c41a: 5f pop %edi
10c41b: c9 leave
10c41c: c3 ret
001128d0 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
1128d0: 55 push %ebp
1128d1: 89 e5 mov %esp,%ebp
1128d3: 53 push %ebx
1128d4: 83 ec 24 sub $0x24,%esp
1128d7: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
1128da: 85 db test %ebx,%ebx
1128dc: 0f 84 92 00 00 00 je 112974 <rtems_rate_monotonic_get_status+0xa4>
1128e2: 50 push %eax
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
1128e3: 8d 45 f4 lea -0xc(%ebp),%eax
1128e6: 50 push %eax
1128e7: ff 75 08 pushl 0x8(%ebp)
1128ea: 68 e0 a7 12 00 push $0x12a7e0
1128ef: e8 44 bf ff ff call 10e838 <_Objects_Get>
switch ( location ) {
1128f4: 83 c4 10 add $0x10,%esp
1128f7: 8b 4d f4 mov -0xc(%ebp),%ecx
1128fa: 85 c9 test %ecx,%ecx
1128fc: 74 0a je 112908 <rtems_rate_monotonic_get_status+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1128fe: b8 04 00 00 00 mov $0x4,%eax
}
112903: 8b 5d fc mov -0x4(%ebp),%ebx
112906: c9 leave
112907: c3 ret
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
112908: 8b 50 40 mov 0x40(%eax),%edx
11290b: 8b 52 08 mov 0x8(%edx),%edx
11290e: 89 13 mov %edx,(%ebx)
status->state = the_period->state;
112910: 8b 50 38 mov 0x38(%eax),%edx
112913: 89 53 04 mov %edx,0x4(%ebx)
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
112916: 85 d2 test %edx,%edx
112918: 75 2a jne 112944 <rtems_rate_monotonic_get_status+0x74>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
11291a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
112921: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Timespec_Set_to_zero( &status->executed_since_last_period );
112928: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
11292f: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
112936: e8 b1 c9 ff ff call 10f2ec <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11293b: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11293d: 8b 5d fc mov -0x4(%ebp),%ebx
112940: c9 leave
112941: c3 ret
112942: 66 90 xchg %ax,%ax
} else {
/*
* Grab the current status.
*/
valid_status =
112944: 52 push %edx
_Rate_monotonic_Get_status(
112945: 8d 55 ec lea -0x14(%ebp),%edx
} else {
/*
* Grab the current status.
*/
valid_status =
112948: 52 push %edx
_Rate_monotonic_Get_status(
112949: 8d 55 e4 lea -0x1c(%ebp),%edx
} else {
/*
* Grab the current status.
*/
valid_status =
11294c: 52 push %edx
11294d: 50 push %eax
11294e: e8 f1 9a ff ff call 10c444 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
112953: 83 c4 10 add $0x10,%esp
112956: 84 c0 test %al,%al
112958: 74 26 je 112980 <rtems_rate_monotonic_get_status+0xb0>
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
11295a: 8b 45 e4 mov -0x1c(%ebp),%eax
11295d: 8b 55 e8 mov -0x18(%ebp),%edx
112960: 89 43 08 mov %eax,0x8(%ebx)
112963: 89 53 0c mov %edx,0xc(%ebx)
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
112966: 8b 45 ec mov -0x14(%ebp),%eax
112969: 8b 55 f0 mov -0x10(%ebp),%edx
11296c: 89 43 10 mov %eax,0x10(%ebx)
11296f: 89 53 14 mov %edx,0x14(%ebx)
112972: eb c2 jmp 112936 <rtems_rate_monotonic_get_status+0x66>
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
return RTEMS_INVALID_ADDRESS;
112974: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112979: 8b 5d fc mov -0x4(%ebp),%ebx
11297c: c9 leave
11297d: c3 ret
11297e: 66 90 xchg %ax,%ax
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
112980: e8 67 c9 ff ff call 10f2ec <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
112985: b8 0b 00 00 00 mov $0xb,%eax
11298a: e9 74 ff ff ff jmp 112903 <rtems_rate_monotonic_get_status+0x33>
0010c640 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10c640: 55 push %ebp
10c641: 89 e5 mov %esp,%ebp
10c643: 57 push %edi
10c644: 56 push %esi
10c645: 53 push %ebx
10c646: 83 ec 30 sub $0x30,%esp
10c649: 8b 5d 08 mov 0x8(%ebp),%ebx
10c64c: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Locations location;
rtems_status_code return_value;
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
10c64f: 8d 45 e4 lea -0x1c(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
10c652: 50 push %eax
10c653: 53 push %ebx
10c654: 68 e0 a7 12 00 push $0x12a7e0
10c659: e8 da 21 00 00 call 10e838 <_Objects_Get>
switch ( location ) {
10c65e: 83 c4 10 add $0x10,%esp
10c661: 8b 55 e4 mov -0x1c(%ebp),%edx
10c664: 85 d2 test %edx,%edx
10c666: 74 10 je 10c678 <rtems_rate_monotonic_period+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c668: b8 04 00 00 00 mov $0x4,%eax
}
10c66d: 8d 65 f4 lea -0xc(%ebp),%esp
10c670: 5b pop %ebx
10c671: 5e pop %esi
10c672: 5f pop %edi
10c673: c9 leave
10c674: c3 ret
10c675: 8d 76 00 lea 0x0(%esi),%esi
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10c678: 8b 15 b8 ae 12 00 mov 0x12aeb8,%edx
10c67e: 39 50 40 cmp %edx,0x40(%eax)
10c681: 74 15 je 10c698 <rtems_rate_monotonic_period+0x58>
_Thread_Enable_dispatch();
10c683: e8 64 2c 00 00 call 10f2ec <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
10c688: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c68d: 8d 65 f4 lea -0xc(%ebp),%esp
10c690: 5b pop %ebx
10c691: 5e pop %esi
10c692: 5f pop %edi
10c693: c9 leave
10c694: c3 ret
10c695: 8d 76 00 lea 0x0(%esi),%esi
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
10c698: 85 f6 test %esi,%esi
10c69a: 75 1c jne 10c6b8 <rtems_rate_monotonic_period+0x78>
switch ( the_period->state ) {
10c69c: 8b 40 38 mov 0x38(%eax),%eax
10c69f: 83 f8 04 cmp $0x4,%eax
10c6a2: 77 6c ja 10c710 <rtems_rate_monotonic_period+0xd0><== NEVER TAKEN
10c6a4: 8b 04 85 fc 34 12 00 mov 0x1234fc(,%eax,4),%eax
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10c6ab: 89 45 d4 mov %eax,-0x2c(%ebp)
10c6ae: e8 39 2c 00 00 call 10f2ec <_Thread_Enable_dispatch>
return( return_value );
10c6b3: 8b 45 d4 mov -0x2c(%ebp),%eax
10c6b6: eb b5 jmp 10c66d <rtems_rate_monotonic_period+0x2d>
}
_ISR_Disable( level );
10c6b8: 9c pushf
10c6b9: fa cli
10c6ba: 5f pop %edi
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
10c6bb: 8b 50 38 mov 0x38(%eax),%edx
10c6be: 85 d2 test %edx,%edx
10c6c0: 74 52 je 10c714 <rtems_rate_monotonic_period+0xd4>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
10c6c2: 83 fa 02 cmp $0x2,%edx
10c6c5: 0f 84 9e 00 00 00 je 10c769 <rtems_rate_monotonic_period+0x129>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
10c6cb: 83 fa 04 cmp $0x4,%edx
10c6ce: 75 98 jne 10c668 <rtems_rate_monotonic_period+0x28><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10c6d0: 83 ec 0c sub $0xc,%esp
10c6d3: 50 push %eax
10c6d4: 89 45 d4 mov %eax,-0x2c(%ebp)
10c6d7: e8 74 fe ff ff call 10c550 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10c6dc: 57 push %edi
10c6dd: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10c6de: 8b 45 d4 mov -0x2c(%ebp),%eax
10c6e1: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
the_period->next_length = length;
10c6e8: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c6eb: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c6ee: 5b pop %ebx
10c6ef: 5e pop %esi
_Watchdog_Insert_ticks( &the_period->Timer, length );
10c6f0: 83 c0 10 add $0x10,%eax
10c6f3: 50 push %eax
10c6f4: 68 dc a9 12 00 push $0x12a9dc
10c6f9: e8 f6 3a 00 00 call 1101f4 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10c6fe: e8 e9 2b 00 00 call 10f2ec <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
10c703: 83 c4 10 add $0x10,%esp
10c706: b8 06 00 00 00 mov $0x6,%eax
10c70b: e9 5d ff ff ff jmp 10c66d <rtems_rate_monotonic_period+0x2d>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
10c710: 31 c0 xor %eax,%eax
10c712: eb 97 jmp 10c6ab <rtems_rate_monotonic_period+0x6b><== NOT EXECUTED
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
10c714: 57 push %edi
10c715: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10c716: 83 ec 0c sub $0xc,%esp
10c719: 50 push %eax
10c71a: 89 45 d4 mov %eax,-0x2c(%ebp)
10c71d: e8 ba fd ff ff call 10c4dc <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10c722: 8b 45 d4 mov -0x2c(%ebp),%eax
10c725: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c72c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c733: c7 40 2c 98 ca 10 00 movl $0x10ca98,0x2c(%eax)
the_watchdog->id = id;
10c73a: 89 58 30 mov %ebx,0x30(%eax)
the_watchdog->user_data = user_data;
10c73d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10c744: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c747: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c74a: 5e pop %esi
10c74b: 5f pop %edi
_Watchdog_Insert_ticks( &the_period->Timer, length );
10c74c: 83 c0 10 add $0x10,%eax
10c74f: 50 push %eax
10c750: 68 dc a9 12 00 push $0x12a9dc
10c755: e8 9a 3a 00 00 call 1101f4 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10c75a: e8 8d 2b 00 00 call 10f2ec <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c75f: 83 c4 10 add $0x10,%esp
10c762: 31 c0 xor %eax,%eax
10c764: e9 04 ff ff ff jmp 10c66d <rtems_rate_monotonic_period+0x2d>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10c769: 83 ec 0c sub $0xc,%esp
10c76c: 50 push %eax
10c76d: 89 45 d4 mov %eax,-0x2c(%ebp)
10c770: e8 db fd ff ff call 10c550 <_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;
10c775: 8b 45 d4 mov -0x2c(%ebp),%eax
10c778: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax)
the_period->next_length = length;
10c77f: 89 70 3c mov %esi,0x3c(%eax)
_ISR_Enable( level );
10c782: 57 push %edi
10c783: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10c784: 8b 15 b8 ae 12 00 mov 0x12aeb8,%edx
10c78a: 8b 48 08 mov 0x8(%eax),%ecx
10c78d: 89 4a 20 mov %ecx,0x20(%edx)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10c790: 59 pop %ecx
10c791: 5b pop %ebx
10c792: 68 00 40 00 00 push $0x4000
10c797: 52 push %edx
10c798: 89 45 d4 mov %eax,-0x2c(%ebp)
10c79b: e8 b0 33 00 00 call 10fb50 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10c7a0: 9c pushf
10c7a1: fa cli
10c7a2: 59 pop %ecx
local_state = the_period->state;
10c7a3: 8b 45 d4 mov -0x2c(%ebp),%eax
10c7a6: 8b 50 38 mov 0x38(%eax),%edx
the_period->state = RATE_MONOTONIC_ACTIVE;
10c7a9: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
_ISR_Enable( level );
10c7b0: 51 push %ecx
10c7b1: 9d popf
/*
* 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 )
10c7b2: 83 c4 10 add $0x10,%esp
10c7b5: 83 fa 03 cmp $0x3,%edx
10c7b8: 74 0c je 10c7c6 <rtems_rate_monotonic_period+0x186>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
10c7ba: e8 2d 2b 00 00 call 10f2ec <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c7bf: 31 c0 xor %eax,%eax
10c7c1: e9 a7 fe ff ff jmp 10c66d <rtems_rate_monotonic_period+0x2d>
/*
* 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 );
10c7c6: 57 push %edi
10c7c7: 57 push %edi
10c7c8: 68 00 40 00 00 push $0x4000
10c7cd: ff 35 b8 ae 12 00 pushl 0x12aeb8
10c7d3: e8 94 27 00 00 call 10ef6c <_Thread_Clear_state>
10c7d8: 83 c4 10 add $0x10,%esp
10c7db: eb dd jmp 10c7ba <rtems_rate_monotonic_period+0x17a>
0010c7e0 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10c7e0: 55 push %ebp
10c7e1: 89 e5 mov %esp,%ebp
10c7e3: 57 push %edi
10c7e4: 56 push %esi
10c7e5: 53 push %ebx
10c7e6: 81 ec 8c 00 00 00 sub $0x8c,%esp
10c7ec: 8b 75 08 mov 0x8(%ebp),%esi
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
10c7ef: 8b 7d 0c mov 0xc(%ebp),%edi
10c7f2: 85 ff test %edi,%edi
10c7f4: 0f 84 be 00 00 00 je 10c8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10c7fa: 83 ec 08 sub $0x8,%esp
10c7fd: 68 10 35 12 00 push $0x123510
10c802: 56 push %esi
10c803: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10c806: 59 pop %ecx
10c807: 5b pop %ebx
10c808: 68 48 35 12 00 push $0x123548
10c80d: 56 push %esi
10c80e: ff 55 0c call *0xc(%ebp)
(*print)( context, "--- Wall times are in seconds ---\n" );
10c811: 58 pop %eax
10c812: 5a pop %edx
10c813: 68 6c 35 12 00 push $0x12356c
10c818: 56 push %esi
10c819: ff 55 0c call *0xc(%ebp)
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10c81c: 5b pop %ebx
10c81d: 5f pop %edi
10c81e: 68 90 35 12 00 push $0x123590
10c823: 56 push %esi
10c824: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10c827: 5a pop %edx
10c828: 59 pop %ecx
10c829: 68 dc 35 12 00 push $0x1235dc
10c82e: 56 push %esi
10c82f: ff 55 0c call *0xc(%ebp)
/*
* 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 ;
10c832: 8b 1d e8 a7 12 00 mov 0x12a7e8,%ebx
10c838: 83 c4 10 add $0x10,%esp
10c83b: 3b 1d ec a7 12 00 cmp 0x12a7ec,%ebx
10c841: 77 75 ja 10c8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8><== NEVER TAKEN
10c843: 8d 7d 88 lea -0x78(%ebp),%edi
10c846: eb 09 jmp 10c851 <rtems_rate_monotonic_report_statistics_with_plugin+0x71>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
10c848: 43 inc %ebx
/*
* 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 ;
10c849: 39 1d ec a7 12 00 cmp %ebx,0x12a7ec
10c84f: 72 67 jb 10c8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10c851: 83 ec 08 sub $0x8,%esp
10c854: 57 push %edi
10c855: 53 push %ebx
10c856: e8 c9 5f 00 00 call 112824 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10c85b: 83 c4 10 add $0x10,%esp
10c85e: 85 c0 test %eax,%eax
10c860: 75 e6 jne 10c848 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
10c862: 83 ec 08 sub $0x8,%esp
10c865: 8d 45 c0 lea -0x40(%ebp),%eax
10c868: 50 push %eax
10c869: 53 push %ebx
10c86a: e8 61 60 00 00 call 1128d0 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10c86f: 83 c4 0c add $0xc,%esp
10c872: 8d 55 e3 lea -0x1d(%ebp),%edx
10c875: 52 push %edx
10c876: 6a 05 push $0x5
10c878: ff 75 c0 pushl -0x40(%ebp)
10c87b: e8 b4 02 00 00 call 10cb34 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10c880: 59 pop %ecx
10c881: 58 pop %eax
10c882: ff 75 8c pushl -0x74(%ebp)
10c885: ff 75 88 pushl -0x78(%ebp)
10c888: 8d 45 e3 lea -0x1d(%ebp),%eax
10c88b: 50 push %eax
10c88c: 53 push %ebx
10c88d: 68 2e 35 12 00 push $0x12352e
10c892: 56 push %esi
10c893: ff 55 0c call *0xc(%ebp)
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10c896: 8b 45 88 mov -0x78(%ebp),%eax
10c899: 83 c4 20 add $0x20,%esp
10c89c: 85 c0 test %eax,%eax
10c89e: 75 20 jne 10c8c0 <rtems_rate_monotonic_report_statistics_with_plugin+0xe0>
(*print)( context, "\n" );
10c8a0: 83 ec 08 sub $0x8,%esp
10c8a3: 68 19 16 12 00 push $0x121619
10c8a8: 56 push %esi
10c8a9: ff 55 0c call *0xc(%ebp)
continue;
10c8ac: 83 c4 10 add $0x10,%esp
* 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++ ) {
10c8af: 43 inc %ebx
/*
* 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 ;
10c8b0: 39 1d ec a7 12 00 cmp %ebx,0x12a7ec
10c8b6: 73 99 jae 10c851 <rtems_rate_monotonic_report_statistics_with_plugin+0x71><== ALWAYS TAKEN
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10c8b8: 8d 65 f4 lea -0xc(%ebp),%esp
10c8bb: 5b pop %ebx
10c8bc: 5e pop %esi
10c8bd: 5f pop %edi
10c8be: c9 leave
10c8bf: c3 ret
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 );
10c8c0: 52 push %edx
10c8c1: 8d 55 d8 lea -0x28(%ebp),%edx
10c8c4: 52 push %edx
10c8c5: 50 push %eax
10c8c6: 8d 45 a0 lea -0x60(%ebp),%eax
10c8c9: 50 push %eax
10c8ca: e8 85 35 00 00 call 10fe54 <_Timespec_Divide_by_integer>
(*print)( context,
10c8cf: b9 d3 4d 62 10 mov $0x10624dd3,%ecx
10c8d4: 8b 45 dc mov -0x24(%ebp),%eax
10c8d7: f7 e9 imul %ecx
10c8d9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c8df: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c8e5: c1 f8 06 sar $0x6,%eax
10c8e8: 8b 55 dc mov -0x24(%ebp),%edx
10c8eb: c1 fa 1f sar $0x1f,%edx
10c8ee: 29 d0 sub %edx,%eax
10c8f0: 50 push %eax
10c8f1: ff 75 d8 pushl -0x28(%ebp)
10c8f4: 8b 45 9c mov -0x64(%ebp),%eax
10c8f7: f7 e9 imul %ecx
10c8f9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c8ff: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c905: c1 f8 06 sar $0x6,%eax
10c908: 8b 55 9c mov -0x64(%ebp),%edx
10c90b: c1 fa 1f sar $0x1f,%edx
10c90e: 29 d0 sub %edx,%eax
10c910: 50 push %eax
10c911: ff 75 98 pushl -0x68(%ebp)
10c914: 8b 45 94 mov -0x6c(%ebp),%eax
10c917: f7 e9 imul %ecx
10c919: 89 85 70 ff ff ff mov %eax,-0x90(%ebp)
10c91f: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c925: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c92b: c1 f8 06 sar $0x6,%eax
10c92e: 8b 55 94 mov -0x6c(%ebp),%edx
10c931: c1 fa 1f sar $0x1f,%edx
10c934: 29 d0 sub %edx,%eax
10c936: 50 push %eax
10c937: ff 75 90 pushl -0x70(%ebp)
10c93a: 68 28 36 12 00 push $0x123628
10c93f: 56 push %esi
10c940: 89 4d 84 mov %ecx,-0x7c(%ebp)
10c943: ff 55 0c call *0xc(%ebp)
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);
10c946: 83 c4 2c add $0x2c,%esp
10c949: 8d 55 d8 lea -0x28(%ebp),%edx
10c94c: 52 push %edx
10c94d: ff 75 88 pushl -0x78(%ebp)
10c950: 8d 45 b8 lea -0x48(%ebp),%eax
10c953: 50 push %eax
10c954: e8 fb 34 00 00 call 10fe54 <_Timespec_Divide_by_integer>
(*print)( context,
10c959: 8b 4d 84 mov -0x7c(%ebp),%ecx
10c95c: 8b 45 dc mov -0x24(%ebp),%eax
10c95f: f7 e9 imul %ecx
10c961: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c967: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c96d: c1 f8 06 sar $0x6,%eax
10c970: 8b 55 dc mov -0x24(%ebp),%edx
10c973: c1 fa 1f sar $0x1f,%edx
10c976: 29 d0 sub %edx,%eax
10c978: 50 push %eax
10c979: ff 75 d8 pushl -0x28(%ebp)
10c97c: 8b 45 b4 mov -0x4c(%ebp),%eax
10c97f: f7 e9 imul %ecx
10c981: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c987: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c98d: c1 f8 06 sar $0x6,%eax
10c990: 8b 55 b4 mov -0x4c(%ebp),%edx
10c993: c1 fa 1f sar $0x1f,%edx
10c996: 29 d0 sub %edx,%eax
10c998: 50 push %eax
10c999: ff 75 b0 pushl -0x50(%ebp)
10c99c: 8b 45 ac mov -0x54(%ebp),%eax
10c99f: f7 e9 imul %ecx
10c9a1: 89 85 70 ff ff ff mov %eax,-0x90(%ebp)
10c9a7: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c9ad: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c9b3: c1 f8 06 sar $0x6,%eax
10c9b6: 8b 55 ac mov -0x54(%ebp),%edx
10c9b9: c1 fa 1f sar $0x1f,%edx
10c9bc: 29 d0 sub %edx,%eax
10c9be: 50 push %eax
10c9bf: ff 75 a8 pushl -0x58(%ebp)
10c9c2: 68 48 36 12 00 push $0x123648
10c9c7: 56 push %esi
10c9c8: ff 55 0c call *0xc(%ebp)
10c9cb: 83 c4 30 add $0x30,%esp
10c9ce: e9 75 fe ff ff jmp 10c848 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
0010c9ec <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
10c9ec: 55 push %ebp
10c9ed: 89 e5 mov %esp,%ebp
10c9ef: 53 push %ebx
10c9f0: 83 ec 04 sub $0x4,%esp
10c9f3: a1 d0 a8 12 00 mov 0x12a8d0,%eax
10c9f8: 40 inc %eax
10c9f9: a3 d0 a8 12 00 mov %eax,0x12a8d0
/*
* 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 ;
10c9fe: 8b 1d e8 a7 12 00 mov 0x12a7e8,%ebx
10ca04: 3b 1d ec a7 12 00 cmp 0x12a7ec,%ebx
10ca0a: 77 15 ja 10ca21 <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
10ca0c: 83 ec 0c sub $0xc,%esp
10ca0f: 53 push %ebx
10ca10: e8 17 00 00 00 call 10ca2c <rtems_rate_monotonic_reset_statistics>
* 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++ ) {
10ca15: 43 inc %ebx
/*
* 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 ;
10ca16: 83 c4 10 add $0x10,%esp
10ca19: 39 1d ec a7 12 00 cmp %ebx,0x12a7ec
10ca1f: 73 eb jae 10ca0c <rtems_rate_monotonic_reset_all_statistics+0x20>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
10ca21: 8b 5d fc mov -0x4(%ebp),%ebx
10ca24: c9 leave
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
10ca25: e9 c2 28 00 00 jmp 10f2ec <_Thread_Enable_dispatch>
0010ca2c <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
10ca2c: 55 push %ebp
10ca2d: 89 e5 mov %esp,%ebp
10ca2f: 57 push %edi
10ca30: 53 push %ebx
10ca31: 83 ec 14 sub $0x14,%esp
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
10ca34: 8d 45 f4 lea -0xc(%ebp),%eax
10ca37: 50 push %eax
10ca38: ff 75 08 pushl 0x8(%ebp)
10ca3b: 68 e0 a7 12 00 push $0x12a7e0
10ca40: e8 f3 1d 00 00 call 10e838 <_Objects_Get>
10ca45: 89 c2 mov %eax,%edx
switch ( location ) {
10ca47: 83 c4 10 add $0x10,%esp
10ca4a: 8b 45 f4 mov -0xc(%ebp),%eax
10ca4d: 85 c0 test %eax,%eax
10ca4f: 75 3b jne 10ca8c <rtems_rate_monotonic_reset_statistics+0x60>
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
10ca51: 8d 5a 54 lea 0x54(%edx),%ebx
10ca54: b9 38 00 00 00 mov $0x38,%ecx
10ca59: 31 c0 xor %eax,%eax
10ca5b: 89 df mov %ebx,%edi
10ca5d: f3 aa rep stos %al,%es:(%edi)
10ca5f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx)
10ca66: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx)
10ca6d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx)
10ca74: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
_Thread_Enable_dispatch();
10ca7b: e8 6c 28 00 00 call 10f2ec <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ca80: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ca82: 8d 65 f8 lea -0x8(%ebp),%esp
10ca85: 5b pop %ebx
10ca86: 5f pop %edi
10ca87: c9 leave
10ca88: c3 ret
10ca89: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10ca8c: b8 04 00 00 00 mov $0x4,%eax
}
10ca91: 8d 65 f8 lea -0x8(%ebp),%esp
10ca94: 5b pop %ebx
10ca95: 5f pop %edi
10ca96: c9 leave
10ca97: c3 ret
00117238 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
117238: 55 push %ebp
117239: 89 e5 mov %esp,%ebp
11723b: 57 push %edi
11723c: 56 push %esi
11723d: 53 push %ebx
11723e: 83 ec 1c sub $0x1c,%esp
117241: 8b 7d 08 mov 0x8(%ebp),%edi
117244: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
117247: 85 ff test %edi,%edi
117249: 0f 84 c1 00 00 00 je 117310 <rtems_region_create+0xd8>
return RTEMS_INVALID_NAME;
if ( !starting_address )
11724f: 85 f6 test %esi,%esi
117251: 0f 84 e1 00 00 00 je 117338 <rtems_region_create+0x100>
return RTEMS_INVALID_ADDRESS;
if ( !id )
117257: 8b 45 1c mov 0x1c(%ebp),%eax
11725a: 85 c0 test %eax,%eax
11725c: 0f 84 d6 00 00 00 je 117338 <rtems_region_create+0x100>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
117262: 83 ec 0c sub $0xc,%esp
117265: ff 35 bc 22 14 00 pushl 0x1422bc
11726b: e8 28 25 00 00 call 119798 <_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 );
117270: c7 04 24 e0 20 14 00 movl $0x1420e0,(%esp)
117277: e8 58 3b 00 00 call 11add4 <_Objects_Allocate>
11727c: 89 c3 mov %eax,%ebx
the_region = _Region_Allocate();
if ( !the_region )
11727e: 83 c4 10 add $0x10,%esp
117281: 85 c0 test %eax,%eax
117283: 0f 84 bf 00 00 00 je 117348 <rtems_region_create+0x110>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
117289: ff 75 14 pushl 0x14(%ebp)
11728c: ff 75 10 pushl 0x10(%ebp)
11728f: 56 push %esi
117290: 8d 40 68 lea 0x68(%eax),%eax
117293: 50 push %eax
117294: e8 47 37 00 00 call 11a9e0 <_Heap_Initialize>
117299: 89 43 5c mov %eax,0x5c(%ebx)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
11729c: 83 c4 10 add $0x10,%esp
11729f: 85 c0 test %eax,%eax
1172a1: 74 7d je 117320 <rtems_region_create+0xe8>
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
1172a3: 89 73 50 mov %esi,0x50(%ebx)
the_region->length = length;
1172a6: 8b 45 10 mov 0x10(%ebp),%eax
1172a9: 89 43 54 mov %eax,0x54(%ebx)
the_region->page_size = page_size;
1172ac: 8b 55 14 mov 0x14(%ebp),%edx
1172af: 89 53 58 mov %edx,0x58(%ebx)
the_region->attribute_set = attribute_set;
1172b2: 8b 45 18 mov 0x18(%ebp),%eax
1172b5: 89 43 60 mov %eax,0x60(%ebx)
the_region->number_of_used_blocks = 0;
1172b8: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
_Thread_queue_Initialize(
1172bf: 6a 06 push $0x6
1172c1: 6a 40 push $0x40
1172c3: a8 04 test $0x4,%al
1172c5: 0f 95 c0 setne %al
1172c8: 0f b6 c0 movzbl %al,%eax
1172cb: 50 push %eax
1172cc: 8d 43 10 lea 0x10(%ebx),%eax
1172cf: 50 push %eax
1172d0: e8 eb 51 00 00 call 11c4c0 <_Thread_queue_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
1172d5: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
1172d8: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1172db: 8b 15 fc 20 14 00 mov 0x1420fc,%edx
1172e1: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1172e4: 89 7b 0c mov %edi,0xc(%ebx)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
1172e7: 8b 55 1c mov 0x1c(%ebp),%edx
1172ea: 89 02 mov %eax,(%edx)
1172ec: 83 c4 10 add $0x10,%esp
return_status = RTEMS_SUCCESSFUL;
1172ef: 31 c0 xor %eax,%eax
}
}
_RTEMS_Unlock_allocator();
1172f1: 83 ec 0c sub $0xc,%esp
1172f4: ff 35 bc 22 14 00 pushl 0x1422bc
1172fa: 89 45 e4 mov %eax,-0x1c(%ebp)
1172fd: e8 de 24 00 00 call 1197e0 <_API_Mutex_Unlock>
return return_status;
117302: 83 c4 10 add $0x10,%esp
117305: 8b 45 e4 mov -0x1c(%ebp),%eax
}
117308: 8d 65 f4 lea -0xc(%ebp),%esp
11730b: 5b pop %ebx
11730c: 5e pop %esi
11730d: 5f pop %edi
11730e: c9 leave
11730f: c3 ret
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
117310: b8 03 00 00 00 mov $0x3,%eax
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
117315: 8d 65 f4 lea -0xc(%ebp),%esp
117318: 5b pop %ebx
117319: 5e pop %esi
11731a: 5f pop %edi
11731b: c9 leave
11731c: c3 ret
11731d: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
117320: 83 ec 08 sub $0x8,%esp
117323: 53 push %ebx
117324: 68 e0 20 14 00 push $0x1420e0
117329: e8 1e 3e 00 00 call 11b14c <_Objects_Free>
11732e: 83 c4 10 add $0x10,%esp
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
117331: b8 08 00 00 00 mov $0x8,%eax
117336: eb b9 jmp 1172f1 <rtems_region_create+0xb9>
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
117338: b8 09 00 00 00 mov $0x9,%eax
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
11733d: 8d 65 f4 lea -0xc(%ebp),%esp
117340: 5b pop %ebx
117341: 5e pop %esi
117342: 5f pop %edi
117343: c9 leave
117344: c3 ret
117345: 8d 76 00 lea 0x0(%esi),%esi
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
return_status = RTEMS_TOO_MANY;
117348: b8 05 00 00 00 mov $0x5,%eax
11734d: eb a2 jmp 1172f1 <rtems_region_create+0xb9>
00117350 <rtems_region_delete>:
*/
rtems_status_code rtems_region_delete(
rtems_id id
)
{
117350: 55 push %ebp
117351: 89 e5 mov %esp,%ebp
117353: 53 push %ebx
117354: 83 ec 30 sub $0x30,%esp
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
_RTEMS_Lock_allocator();
117357: ff 35 bc 22 14 00 pushl 0x1422bc
11735d: e8 36 24 00 00 call 119798 <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
117362: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
117365: 8d 45 f4 lea -0xc(%ebp),%eax
117368: 50 push %eax
117369: ff 75 08 pushl 0x8(%ebp)
11736c: 68 e0 20 14 00 push $0x1420e0
117371: e8 16 3f 00 00 call 11b28c <_Objects_Get_no_protection>
switch ( location ) {
117376: 83 c4 10 add $0x10,%esp
117379: 8b 5d f4 mov -0xc(%ebp),%ebx
11737c: 85 db test %ebx,%ebx
11737e: 74 1c je 11739c <rtems_region_delete+0x4c>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
117380: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
117385: 83 ec 0c sub $0xc,%esp
117388: ff 35 bc 22 14 00 pushl 0x1422bc
11738e: e8 4d 24 00 00 call 1197e0 <_API_Mutex_Unlock>
return return_status;
}
117393: 89 d8 mov %ebx,%eax
117395: 8b 5d fc mov -0x4(%ebp),%ebx
117398: c9 leave
117399: c3 ret
11739a: 66 90 xchg %ax,%ax
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 )
11739c: 8b 48 64 mov 0x64(%eax),%ecx
11739f: 85 c9 test %ecx,%ecx
1173a1: 74 09 je 1173ac <rtems_region_delete+0x5c>
return_status = RTEMS_RESOURCE_IN_USE;
1173a3: bb 0c 00 00 00 mov $0xc,%ebx
1173a8: eb db jmp 117385 <rtems_region_delete+0x35>
1173aa: 66 90 xchg %ax,%ax
else {
_Objects_Close( &_Region_Information, &the_region->Object );
1173ac: 83 ec 08 sub $0x8,%esp
1173af: 50 push %eax
1173b0: 68 e0 20 14 00 push $0x1420e0
1173b5: 89 45 e4 mov %eax,-0x1c(%ebp)
1173b8: e8 93 3a 00 00 call 11ae50 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
1173bd: 58 pop %eax
1173be: 5a pop %edx
1173bf: 8b 45 e4 mov -0x1c(%ebp),%eax
1173c2: 50 push %eax
1173c3: 68 e0 20 14 00 push $0x1420e0
1173c8: e8 7f 3d 00 00 call 11b14c <_Objects_Free>
1173cd: 83 c4 10 add $0x10,%esp
_Region_Free( the_region );
return_status = RTEMS_SUCCESSFUL;
1173d0: 31 db xor %ebx,%ebx
1173d2: eb b1 jmp 117385 <rtems_region_delete+0x35>
001173d4 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
1173d4: 55 push %ebp
1173d5: 89 e5 mov %esp,%ebp
1173d7: 56 push %esi
1173d8: 53 push %ebx
1173d9: 83 ec 10 sub $0x10,%esp
1173dc: 8b 5d 0c mov 0xc(%ebp),%ebx
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
1173df: 85 db test %ebx,%ebx
1173e1: 74 75 je 117458 <rtems_region_extend+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
1173e3: 83 ec 0c sub $0xc,%esp
1173e6: ff 35 bc 22 14 00 pushl 0x1422bc
1173ec: e8 a7 23 00 00 call 119798 <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
1173f1: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1173f4: 8d 45 f0 lea -0x10(%ebp),%eax
1173f7: 50 push %eax
1173f8: ff 75 08 pushl 0x8(%ebp)
1173fb: 68 e0 20 14 00 push $0x1420e0
117400: e8 87 3e 00 00 call 11b28c <_Objects_Get_no_protection>
117405: 89 c6 mov %eax,%esi
switch ( location ) {
117407: 83 c4 10 add $0x10,%esp
11740a: 8b 45 f0 mov -0x10(%ebp),%eax
11740d: 85 c0 test %eax,%eax
11740f: 74 1f je 117430 <rtems_region_extend+0x5c>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
117411: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
117416: 83 ec 0c sub $0xc,%esp
117419: ff 35 bc 22 14 00 pushl 0x1422bc
11741f: e8 bc 23 00 00 call 1197e0 <_API_Mutex_Unlock>
return return_status;
117424: 83 c4 10 add $0x10,%esp
}
117427: 89 d8 mov %ebx,%eax
117429: 8d 65 f8 lea -0x8(%ebp),%esp
11742c: 5b pop %ebx
11742d: 5e pop %esi
11742e: c9 leave
11742f: c3 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
117430: 8d 45 f4 lea -0xc(%ebp),%eax
117433: 50 push %eax
117434: ff 75 10 pushl 0x10(%ebp)
117437: 53 push %ebx
117438: 8d 46 68 lea 0x68(%esi),%eax
11743b: 50 push %eax
11743c: e8 ab 2f 00 00 call 11a3ec <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
117441: 83 c4 10 add $0x10,%esp
117444: 84 c0 test %al,%al
117446: 74 20 je 117468 <rtems_region_extend+0x94>
the_region->length += amount_extended;
117448: 8b 45 f4 mov -0xc(%ebp),%eax
11744b: 01 46 54 add %eax,0x54(%esi)
the_region->maximum_segment_size += amount_extended;
11744e: 01 46 5c add %eax,0x5c(%esi)
return_status = RTEMS_SUCCESSFUL;
117451: 31 db xor %ebx,%ebx
117453: eb c1 jmp 117416 <rtems_region_extend+0x42>
117455: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
117458: bb 09 00 00 00 mov $0x9,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
11745d: 89 d8 mov %ebx,%eax
11745f: 8d 65 f8 lea -0x8(%ebp),%esp
117462: 5b pop %ebx
117463: 5e pop %esi
117464: c9 leave
117465: c3 ret
117466: 66 90 xchg %ax,%ax
if ( extend_ok ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else {
return_status = RTEMS_INVALID_ADDRESS;
117468: bb 09 00 00 00 mov $0x9,%ebx
11746d: eb a7 jmp 117416 <rtems_region_extend+0x42>
00117470 <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
117470: 55 push %ebp
117471: 89 e5 mov %esp,%ebp
117473: 53 push %ebx
117474: 83 ec 14 sub $0x14,%esp
117477: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
11747a: 85 db test %ebx,%ebx
11747c: 74 76 je 1174f4 <rtems_region_get_free_information+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
11747e: 83 ec 0c sub $0xc,%esp
117481: ff 35 bc 22 14 00 pushl 0x1422bc
117487: e8 0c 23 00 00 call 119798 <_API_Mutex_Lock>
11748c: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
11748f: 8d 45 f4 lea -0xc(%ebp),%eax
117492: 50 push %eax
117493: ff 75 08 pushl 0x8(%ebp)
117496: 68 e0 20 14 00 push $0x1420e0
11749b: e8 ec 3d 00 00 call 11b28c <_Objects_Get_no_protection>
switch ( location ) {
1174a0: 83 c4 10 add $0x10,%esp
1174a3: 8b 55 f4 mov -0xc(%ebp),%edx
1174a6: 85 d2 test %edx,%edx
1174a8: 74 1e je 1174c8 <rtems_region_get_free_information+0x58>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
1174aa: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
1174af: 83 ec 0c sub $0xc,%esp
1174b2: ff 35 bc 22 14 00 pushl 0x1422bc
1174b8: e8 23 23 00 00 call 1197e0 <_API_Mutex_Unlock>
return return_status;
1174bd: 83 c4 10 add $0x10,%esp
}
1174c0: 89 d8 mov %ebx,%eax
1174c2: 8b 5d fc mov -0x4(%ebp),%ebx
1174c5: c9 leave
1174c6: c3 ret
1174c7: 90 nop
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
1174c8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_info->Used.total = 0;
1174cf: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
the_info->Used.largest = 0;
1174d6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
1174dd: 83 ec 08 sub $0x8,%esp
1174e0: 53 push %ebx
1174e1: 83 c0 68 add $0x68,%eax
1174e4: 50 push %eax
1174e5: e8 de 32 00 00 call 11a7c8 <_Heap_Get_free_information>
return_status = RTEMS_SUCCESSFUL;
break;
1174ea: 83 c4 10 add $0x10,%esp
the_info->Used.total = 0;
the_info->Used.largest = 0;
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
return_status = RTEMS_SUCCESSFUL;
1174ed: 31 db xor %ebx,%ebx
break;
1174ef: eb be jmp 1174af <rtems_region_get_free_information+0x3f>
1174f1: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
1174f4: bb 09 00 00 00 mov $0x9,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1174f9: 89 d8 mov %ebx,%eax
1174fb: 8b 5d fc mov -0x4(%ebp),%ebx
1174fe: c9 leave
1174ff: c3 ret
00117578 <rtems_region_get_segment>:
uintptr_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
117578: 55 push %ebp
117579: 89 e5 mov %esp,%ebp
11757b: 57 push %edi
11757c: 56 push %esi
11757d: 53 push %ebx
11757e: 83 ec 2c sub $0x2c,%esp
117581: 8b 75 0c mov 0xc(%ebp),%esi
117584: 8b 5d 18 mov 0x18(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
117587: 85 db test %ebx,%ebx
117589: 0f 84 a1 00 00 00 je 117630 <rtems_region_get_segment+0xb8>
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
11758f: c7 03 00 00 00 00 movl $0x0,(%ebx)
if ( size == 0 )
117595: 85 f6 test %esi,%esi
117597: 75 0f jne 1175a8 <rtems_region_get_segment+0x30>
return RTEMS_INVALID_SIZE;
117599: b8 08 00 00 00 mov $0x8,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
11759e: 8d 65 f4 lea -0xc(%ebp),%esp
1175a1: 5b pop %ebx
1175a2: 5e pop %esi
1175a3: 5f pop %edi
1175a4: c9 leave
1175a5: c3 ret
1175a6: 66 90 xchg %ax,%ax
*segment = NULL;
if ( size == 0 )
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
1175a8: 83 ec 0c sub $0xc,%esp
1175ab: ff 35 bc 22 14 00 pushl 0x1422bc
1175b1: e8 e2 21 00 00 call 119798 <_API_Mutex_Lock>
executing = _Thread_Executing;
1175b6: a1 b8 27 14 00 mov 0x1427b8,%eax
1175bb: 89 45 d4 mov %eax,-0x2c(%ebp)
1175be: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1175c1: 8d 45 e4 lea -0x1c(%ebp),%eax
1175c4: 50 push %eax
1175c5: ff 75 08 pushl 0x8(%ebp)
1175c8: 68 e0 20 14 00 push $0x1420e0
1175cd: e8 ba 3c 00 00 call 11b28c <_Objects_Get_no_protection>
1175d2: 89 c7 mov %eax,%edi
switch ( location ) {
1175d4: 83 c4 10 add $0x10,%esp
1175d7: 8b 45 e4 mov -0x1c(%ebp),%eax
1175da: 85 c0 test %eax,%eax
1175dc: 75 2a jne 117608 <rtems_region_get_segment+0x90>
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
1175de: 3b 77 5c cmp 0x5c(%edi),%esi
1175e1: 76 2d jbe 117610 <rtems_region_get_segment+0x98>
return_status = RTEMS_INVALID_SIZE;
1175e3: b8 08 00 00 00 mov $0x8,%eax
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1175e8: 83 ec 0c sub $0xc,%esp
1175eb: ff 35 bc 22 14 00 pushl 0x1422bc
1175f1: 89 45 d0 mov %eax,-0x30(%ebp)
1175f4: e8 e7 21 00 00 call 1197e0 <_API_Mutex_Unlock>
return return_status;
1175f9: 83 c4 10 add $0x10,%esp
1175fc: 8b 45 d0 mov -0x30(%ebp),%eax
}
1175ff: 8d 65 f4 lea -0xc(%ebp),%esp
117602: 5b pop %ebx
117603: 5e pop %esi
117604: 5f pop %edi
117605: c9 leave
117606: c3 ret
117607: 90 nop
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
117608: b8 04 00 00 00 mov $0x4,%eax
11760d: eb d9 jmp 1175e8 <rtems_region_get_segment+0x70>
11760f: 90 nop
* @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 );
117610: 6a 00 push $0x0
117612: 6a 00 push $0x0
117614: 56 push %esi
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uintptr_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
117615: 8d 47 68 lea 0x68(%edi),%eax
117618: 50 push %eax
117619: e8 fa 2b 00 00 call 11a218 <_Heap_Allocate_aligned_with_boundary>
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
11761e: 83 c4 10 add $0x10,%esp
117621: 85 c0 test %eax,%eax
117623: 74 17 je 11763c <rtems_region_get_segment+0xc4>
the_region->number_of_used_blocks += 1;
117625: ff 47 64 incl 0x64(%edi)
*segment = the_segment;
117628: 89 03 mov %eax,(%ebx)
return_status = RTEMS_SUCCESSFUL;
11762a: 31 c0 xor %eax,%eax
11762c: eb ba jmp 1175e8 <rtems_region_get_segment+0x70>
11762e: 66 90 xchg %ax,%ax
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
return RTEMS_INVALID_ADDRESS;
117630: b8 09 00 00 00 mov $0x9,%eax
117635: e9 64 ff ff ff jmp 11759e <rtems_region_get_segment+0x26>
11763a: 66 90 xchg %ax,%ax
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 ) ) {
11763c: f6 45 10 01 testb $0x1,0x10(%ebp)
117640: 74 07 je 117649 <rtems_region_get_segment+0xd1>
return_status = RTEMS_UNSATISFIED;
117642: b8 0d 00 00 00 mov $0xd,%eax
117647: eb 9f jmp 1175e8 <rtems_region_get_segment+0x70>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
117649: a1 d0 21 14 00 mov 0x1421d0,%eax
11764e: 40 inc %eax
11764f: a3 d0 21 14 00 mov %eax,0x1421d0
* 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();
117654: 83 ec 0c sub $0xc,%esp
117657: ff 35 bc 22 14 00 pushl 0x1422bc
11765d: e8 7e 21 00 00 call 1197e0 <_API_Mutex_Unlock>
executing->Wait.queue = &the_region->Wait_queue;
117662: 8d 47 10 lea 0x10(%edi),%eax
117665: 8b 55 d4 mov -0x2c(%ebp),%edx
117668: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
11766b: 8b 4d 08 mov 0x8(%ebp),%ecx
11766e: 89 4a 20 mov %ecx,0x20(%edx)
executing->Wait.count = size;
117671: 89 72 24 mov %esi,0x24(%edx)
executing->Wait.return_argument = segment;
117674: 89 5a 28 mov %ebx,0x28(%edx)
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;
117677: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi)
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
11767e: 83 c4 0c add $0xc,%esp
117681: 68 84 c5 11 00 push $0x11c584
117686: ff 75 14 pushl 0x14(%ebp)
117689: 50 push %eax
11768a: e8 c9 4b 00 00 call 11c258 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
11768f: e8 e8 46 00 00 call 11bd7c <_Thread_Enable_dispatch>
return (rtems_status_code) executing->Wait.return_code;
117694: 8b 55 d4 mov -0x2c(%ebp),%edx
117697: 8b 42 34 mov 0x34(%edx),%eax
11769a: 83 c4 10 add $0x10,%esp
11769d: e9 fc fe ff ff jmp 11759e <rtems_region_get_segment+0x26>
00117758 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
117758: 55 push %ebp
117759: 89 e5 mov %esp,%ebp
11775b: 56 push %esi
11775c: 53 push %ebx
11775d: 83 ec 20 sub $0x20,%esp
117760: 8b 5d 14 mov 0x14(%ebp),%ebx
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
117763: 85 db test %ebx,%ebx
117765: 0f 84 89 00 00 00 je 1177f4 <rtems_region_resize_segment+0x9c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
11776b: 83 ec 0c sub $0xc,%esp
11776e: ff 35 bc 22 14 00 pushl 0x1422bc
117774: e8 1f 20 00 00 call 119798 <_API_Mutex_Lock>
117779: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
11777c: 8d 45 f0 lea -0x10(%ebp),%eax
11777f: 50 push %eax
117780: ff 75 08 pushl 0x8(%ebp)
117783: 68 e0 20 14 00 push $0x1420e0
117788: e8 ff 3a 00 00 call 11b28c <_Objects_Get_no_protection>
11778d: 89 c6 mov %eax,%esi
switch ( location ) {
11778f: 83 c4 10 add $0x10,%esp
117792: 8b 45 f0 mov -0x10(%ebp),%eax
117795: 85 c0 test %eax,%eax
117797: 74 1f je 1177b8 <rtems_region_resize_segment+0x60>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117799: 83 ec 0c sub $0xc,%esp
11779c: ff 35 bc 22 14 00 pushl 0x1422bc
1177a2: e8 39 20 00 00 call 1197e0 <_API_Mutex_Unlock>
return return_status;
1177a7: 83 c4 10 add $0x10,%esp
1177aa: b8 04 00 00 00 mov $0x4,%eax
}
1177af: 8d 65 f8 lea -0x8(%ebp),%esp
1177b2: 5b pop %ebx
1177b3: 5e pop %esi
1177b4: c9 leave
1177b5: c3 ret
1177b6: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
1177b8: 83 ec 0c sub $0xc,%esp
1177bb: 8d 45 f4 lea -0xc(%ebp),%eax
1177be: 50 push %eax
1177bf: 8d 45 ec lea -0x14(%ebp),%eax
1177c2: 50 push %eax
1177c3: ff 75 10 pushl 0x10(%ebp)
1177c6: ff 75 0c pushl 0xc(%ebp)
1177c9: 8d 46 68 lea 0x68(%esi),%eax
1177cc: 50 push %eax
1177cd: e8 16 34 00 00 call 11abe8 <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
1177d2: 8b 55 ec mov -0x14(%ebp),%edx
1177d5: 89 13 mov %edx,(%ebx)
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
1177d7: 83 c4 20 add $0x20,%esp
1177da: 85 c0 test %eax,%eax
1177dc: 75 22 jne 117800 <rtems_region_resize_segment+0xa8>
_Region_Process_queue( the_region ); /* unlocks allocator */
1177de: 83 ec 0c sub $0xc,%esp
1177e1: 56 push %esi
1177e2: e8 a9 7c 00 00 call 11f490 <_Region_Process_queue>
1177e7: 83 c4 10 add $0x10,%esp
else
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
1177ea: 31 c0 xor %eax,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1177ec: 8d 65 f8 lea -0x8(%ebp),%esp
1177ef: 5b pop %ebx
1177f0: 5e pop %esi
1177f1: c9 leave
1177f2: c3 ret
1177f3: 90 nop
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
return RTEMS_INVALID_ADDRESS;
1177f4: b8 09 00 00 00 mov $0x9,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1177f9: 8d 65 f8 lea -0x8(%ebp),%esp
1177fc: 5b pop %ebx
1177fd: 5e pop %esi
1177fe: c9 leave
1177ff: c3 ret
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
117800: 83 ec 0c sub $0xc,%esp
117803: ff 35 bc 22 14 00 pushl 0x1422bc
117809: 89 45 e4 mov %eax,-0x1c(%ebp)
11780c: e8 cf 1f 00 00 call 1197e0 <_API_Mutex_Unlock>
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
117811: 83 c4 10 add $0x10,%esp
return RTEMS_UNSATISFIED;
117814: 8b 45 e4 mov -0x1c(%ebp),%eax
117817: 48 dec %eax
117818: 0f 94 c0 sete %al
11781b: 0f b6 c0 movzbl %al,%eax
11781e: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117825: 8d 65 f8 lea -0x8(%ebp),%esp
117828: 5b pop %ebx
117829: 5e pop %esi
11782a: c9 leave
11782b: c3 ret
0011782c <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
11782c: 55 push %ebp
11782d: 89 e5 mov %esp,%ebp
11782f: 53 push %ebx
117830: 83 ec 20 sub $0x20,%esp
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
117833: ff 35 bc 22 14 00 pushl 0x1422bc
117839: e8 5a 1f 00 00 call 119798 <_API_Mutex_Lock>
11783e: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
117841: 8d 45 f4 lea -0xc(%ebp),%eax
117844: 50 push %eax
117845: ff 75 08 pushl 0x8(%ebp)
117848: 68 e0 20 14 00 push $0x1420e0
11784d: e8 3a 3a 00 00 call 11b28c <_Objects_Get_no_protection>
117852: 89 c3 mov %eax,%ebx
switch ( location ) {
117854: 83 c4 10 add $0x10,%esp
117857: 8b 45 f4 mov -0xc(%ebp),%eax
11785a: 85 c0 test %eax,%eax
11785c: 75 1e jne 11787c <rtems_region_return_segment+0x50>
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
11785e: 83 ec 08 sub $0x8,%esp
117861: ff 75 0c pushl 0xc(%ebp)
117864: 8d 43 68 lea 0x68(%ebx),%eax
117867: 50 push %eax
117868: e8 0b 2e 00 00 call 11a678 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
11786d: 83 c4 10 add $0x10,%esp
117870: 84 c0 test %al,%al
117872: 75 28 jne 11789c <rtems_region_return_segment+0x70>
return_status = RTEMS_INVALID_ADDRESS;
117874: bb 09 00 00 00 mov $0x9,%ebx
117879: eb 06 jmp 117881 <rtems_region_return_segment+0x55>
11787b: 90 nop
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
11787c: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
117881: 83 ec 0c sub $0xc,%esp
117884: ff 35 bc 22 14 00 pushl 0x1422bc
11788a: e8 51 1f 00 00 call 1197e0 <_API_Mutex_Unlock>
return return_status;
11788f: 83 c4 10 add $0x10,%esp
}
117892: 89 d8 mov %ebx,%eax
117894: 8b 5d fc mov -0x4(%ebp),%ebx
117897: c9 leave
117898: c3 ret
117899: 8d 76 00 lea 0x0(%esi),%esi
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
11789c: ff 4b 64 decl 0x64(%ebx)
_Region_Process_queue(the_region); /* unlocks allocator */
11789f: 83 ec 0c sub $0xc,%esp
1178a2: 53 push %ebx
1178a3: e8 e8 7b 00 00 call 11f490 <_Region_Process_queue>
return RTEMS_SUCCESSFUL;
1178a8: 83 c4 10 add $0x10,%esp
1178ab: 31 db xor %ebx,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1178ad: 89 d8 mov %ebx,%eax
1178af: 8b 5d fc mov -0x4(%ebp),%ebx
1178b2: c9 leave
1178b3: c3 ret
0010b434 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
10b434: 55 push %ebp
10b435: 89 e5 mov %esp,%ebp
10b437: 57 push %edi
10b438: 56 push %esi
10b439: 53 push %ebx
10b43a: 83 ec 3c sub $0x3c,%esp
10b43d: 8b 75 08 mov 0x8(%ebp),%esi
10b440: 8b 5d 10 mov 0x10(%ebp),%ebx
10b443: 8b 7d 18 mov 0x18(%ebp),%edi
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 ) )
10b446: 85 f6 test %esi,%esi
10b448: 74 4a je 10b494 <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME;
if ( !id )
10b44a: 85 ff test %edi,%edi
10b44c: 0f 84 f6 00 00 00 je 10b548 <rtems_semaphore_create+0x114>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
10b452: 89 da mov %ebx,%edx
10b454: 81 e2 c0 00 00 00 and $0xc0,%edx
10b45a: 74 48 je 10b4a4 <rtems_semaphore_create+0x70>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
10b45c: 89 d8 mov %ebx,%eax
10b45e: 83 e0 30 and $0x30,%eax
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10b461: 83 f8 10 cmp $0x10,%eax
10b464: 74 0e je 10b474 <rtems_semaphore_create+0x40>
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
10b466: b8 0b 00 00 00 mov $0xb,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b46b: 8d 65 f4 lea -0xc(%ebp),%esp
10b46e: 5b pop %ebx
10b46f: 5e pop %esi
10b470: 5f pop %edi
10b471: c9 leave
10b472: c3 ret
10b473: 90 nop
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10b474: f6 c3 04 test $0x4,%bl
10b477: 74 ed je 10b466 <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
10b479: 81 fa c0 00 00 00 cmp $0xc0,%edx
10b47f: 74 e5 je 10b466 <rtems_semaphore_create+0x32>
10b481: b9 10 00 00 00 mov $0x10,%ecx
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
10b486: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10b48a: 76 1f jbe 10b4ab <rtems_semaphore_create+0x77>
return RTEMS_INVALID_NUMBER;
10b48c: b8 0a 00 00 00 mov $0xa,%eax
10b491: eb d8 jmp 10b46b <rtems_semaphore_create+0x37>
10b493: 90 nop
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10b494: b8 03 00 00 00 mov $0x3,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b499: 8d 65 f4 lea -0xc(%ebp),%esp
10b49c: 5b pop %ebx
10b49d: 5e pop %esi
10b49e: 5f pop %edi
10b49f: c9 leave
10b4a0: c3 ret
10b4a1: 8d 76 00 lea 0x0(%esi),%esi
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 ) )
10b4a4: 89 d9 mov %ebx,%ecx
10b4a6: 83 e1 30 and $0x30,%ecx
10b4a9: 75 db jne 10b486 <rtems_semaphore_create+0x52>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b4ab: a1 50 75 12 00 mov 0x127550,%eax
10b4b0: 40 inc %eax
10b4b1: a3 50 75 12 00 mov %eax,0x127550
* 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 );
10b4b6: 83 ec 0c sub $0xc,%esp
10b4b9: 68 a0 74 12 00 push $0x1274a0
10b4be: 89 4d c4 mov %ecx,-0x3c(%ebp)
10b4c1: e8 ca 14 00 00 call 10c990 <_Objects_Allocate>
10b4c6: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
10b4c8: 83 c4 10 add $0x10,%esp
10b4cb: 85 c0 test %eax,%eax
10b4cd: 8b 4d c4 mov -0x3c(%ebp),%ecx
10b4d0: 0f 84 ba 00 00 00 je 10b590 <rtems_semaphore_create+0x15c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
10b4d6: 89 58 10 mov %ebx,0x10(%eax)
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
10b4d9: 85 c9 test %ecx,%ecx
10b4db: 74 77 je 10b554 <rtems_semaphore_create+0x120>
/*
* 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;
10b4dd: 31 c0 xor %eax,%eax
10b4df: f6 c3 04 test $0x4,%bl
10b4e2: 0f 95 c0 setne %al
10b4e5: 89 45 d8 mov %eax,-0x28(%ebp)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
10b4e8: 83 f9 10 cmp $0x10,%ecx
10b4eb: 0f 84 ae 00 00 00 je 10b59f <rtems_semaphore_create+0x16b>
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;
10b4f1: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10b4f8: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
}
mutex_status = _CORE_mutex_Initialize(
10b4fc: 50 push %eax
10b4fd: 31 c0 xor %eax,%eax
10b4ff: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10b503: 0f 94 c0 sete %al
10b506: 50 push %eax
10b507: 8d 45 d0 lea -0x30(%ebp),%eax
10b50a: 50 push %eax
10b50b: 8d 42 14 lea 0x14(%edx),%eax
10b50e: 50 push %eax
10b50f: 89 55 c4 mov %edx,-0x3c(%ebp)
10b512: e8 69 0c 00 00 call 10c180 <_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 ) {
10b517: 83 c4 10 add $0x10,%esp
10b51a: 83 f8 06 cmp $0x6,%eax
10b51d: 8b 55 c4 mov -0x3c(%ebp),%edx
10b520: 0f 84 a9 00 00 00 je 10b5cf <rtems_semaphore_create+0x19b>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10b526: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10b529: 0f b7 d8 movzwl %ax,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b52c: 8b 0d bc 74 12 00 mov 0x1274bc,%ecx
10b532: 89 14 99 mov %edx,(%ecx,%ebx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10b535: 89 72 0c mov %esi,0xc(%edx)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
10b538: 89 07 mov %eax,(%edi)
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10b53a: e8 bd 23 00 00 call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b53f: 31 c0 xor %eax,%eax
10b541: e9 25 ff ff ff jmp 10b46b <rtems_semaphore_create+0x37>
10b546: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10b548: b8 09 00 00 00 mov $0x9,%eax
10b54d: e9 19 ff ff ff jmp 10b46b <rtems_semaphore_create+0x37>
10b552: 66 90 xchg %ax,%ax
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
10b554: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
10b55b: 31 c0 xor %eax,%eax
10b55d: f6 c3 04 test $0x4,%bl
10b560: 0f 95 c0 setne %al
10b563: 89 45 e4 mov %eax,-0x1c(%ebp)
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;
10b566: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
10b56d: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
_CORE_semaphore_Initialize(
10b574: 51 push %ecx
10b575: ff 75 0c pushl 0xc(%ebp)
10b578: 8d 45 e0 lea -0x20(%ebp),%eax
10b57b: 50 push %eax
10b57c: 8d 42 14 lea 0x14(%edx),%eax
10b57f: 50 push %eax
10b580: 89 55 c4 mov %edx,-0x3c(%ebp)
10b583: e8 88 0e 00 00 call 10c410 <_CORE_semaphore_Initialize>
10b588: 83 c4 10 add $0x10,%esp
10b58b: 8b 55 c4 mov -0x3c(%ebp),%edx
10b58e: eb 96 jmp 10b526 <rtems_semaphore_create+0xf2>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
10b590: e8 67 23 00 00 call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10b595: b8 05 00 00 00 mov $0x5,%eax
10b59a: e9 cc fe ff ff jmp 10b46b <rtems_semaphore_create+0x37>
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;
10b59f: 8b 45 14 mov 0x14(%ebp),%eax
10b5a2: 89 45 dc mov %eax,-0x24(%ebp)
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10b5a5: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10b5ac: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
10b5b0: 83 7d d8 01 cmpl $0x1,-0x28(%ebp)
10b5b4: 0f 85 42 ff ff ff jne 10b4fc <rtems_semaphore_create+0xc8>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
10b5ba: f6 c3 40 test $0x40,%bl
10b5bd: 74 30 je 10b5ef <rtems_semaphore_create+0x1bb>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10b5bf: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10b5c6: c6 45 d4 01 movb $0x1,-0x2c(%ebp)
10b5ca: e9 2d ff ff ff jmp 10b4fc <rtems_semaphore_create+0xc8>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10b5cf: 83 ec 08 sub $0x8,%esp
10b5d2: 52 push %edx
10b5d3: 68 a0 74 12 00 push $0x1274a0
10b5d8: e8 2b 17 00 00 call 10cd08 <_Objects_Free>
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
10b5dd: e8 1a 23 00 00 call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
10b5e2: 83 c4 10 add $0x10,%esp
10b5e5: b8 13 00 00 00 mov $0x13,%eax
10b5ea: e9 7c fe ff ff jmp 10b46b <rtems_semaphore_create+0x37>
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 ) ) {
10b5ef: 81 e3 80 00 00 00 and $0x80,%ebx
10b5f5: 0f 84 01 ff ff ff je 10b4fc <rtems_semaphore_create+0xc8>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10b5fb: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10b602: c6 45 d4 01 movb $0x1,-0x2c(%ebp)
10b606: e9 f1 fe ff ff jmp 10b4fc <rtems_semaphore_create+0xc8>
0010b60c <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
10b60c: 55 push %ebp
10b60d: 89 e5 mov %esp,%ebp
10b60f: 53 push %ebx
10b610: 83 ec 18 sub $0x18,%esp
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
10b613: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
10b616: 50 push %eax
10b617: ff 75 08 pushl 0x8(%ebp)
10b61a: 68 a0 74 12 00 push $0x1274a0
10b61f: e8 24 18 00 00 call 10ce48 <_Objects_Get>
10b624: 89 c3 mov %eax,%ebx
switch ( location ) {
10b626: 83 c4 10 add $0x10,%esp
10b629: 8b 4d f4 mov -0xc(%ebp),%ecx
10b62c: 85 c9 test %ecx,%ecx
10b62e: 74 0c je 10b63c <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b630: b8 04 00 00 00 mov $0x4,%eax
}
10b635: 8b 5d fc mov -0x4(%ebp),%ebx
10b638: c9 leave
10b639: c3 ret
10b63a: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
10b63c: 8b 40 10 mov 0x10(%eax),%eax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10b63f: 83 e0 30 and $0x30,%eax
10b642: 74 58 je 10b69c <rtems_semaphore_delete+0x90>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
10b644: 8b 53 64 mov 0x64(%ebx),%edx
10b647: 85 d2 test %edx,%edx
10b649: 75 15 jne 10b660 <rtems_semaphore_delete+0x54>
10b64b: 83 f8 20 cmp $0x20,%eax
10b64e: 74 10 je 10b660 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
10b650: e8 a7 22 00 00 call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10b655: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b65a: 8b 5d fc mov -0x4(%ebp),%ebx
10b65d: c9 leave
10b65e: c3 ret
10b65f: 90 nop
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
10b660: 50 push %eax
10b661: 6a 04 push $0x4
10b663: 6a 00 push $0x0
10b665: 8d 43 14 lea 0x14(%ebx),%eax
10b668: 50 push %eax
10b669: e8 06 0b 00 00 call 10c174 <_CORE_mutex_Flush>
10b66e: 83 c4 10 add $0x10,%esp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
10b671: 83 ec 08 sub $0x8,%esp
10b674: 53 push %ebx
10b675: 68 a0 74 12 00 push $0x1274a0
10b67a: e8 8d 13 00 00 call 10ca0c <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10b67f: 58 pop %eax
10b680: 5a pop %edx
10b681: 53 push %ebx
10b682: 68 a0 74 12 00 push $0x1274a0
10b687: e8 7c 16 00 00 call 10cd08 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
10b68c: e8 6b 22 00 00 call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b691: 83 c4 10 add $0x10,%esp
10b694: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b696: 8b 5d fc mov -0x4(%ebp),%ebx
10b699: c9 leave
10b69a: c3 ret
10b69b: 90 nop
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
10b69c: 51 push %ecx
10b69d: 6a 02 push $0x2
10b69f: 6a 00 push $0x0
10b6a1: 8d 43 14 lea 0x14(%ebx),%eax
10b6a4: 50 push %eax
10b6a5: e8 5a 0d 00 00 call 10c404 <_CORE_semaphore_Flush>
10b6aa: 83 c4 10 add $0x10,%esp
10b6ad: eb c2 jmp 10b671 <rtems_semaphore_delete+0x65>
0010b6b0 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
10b6b0: 55 push %ebp
10b6b1: 89 e5 mov %esp,%ebp
10b6b3: 57 push %edi
10b6b4: 56 push %esi
10b6b5: 53 push %ebx
10b6b6: 83 ec 1c sub $0x1c,%esp
10b6b9: 8b 5d 08 mov 0x8(%ebp),%ebx
10b6bc: 8b 75 0c mov 0xc(%ebp),%esi
10b6bf: 8b 7d 10 mov 0x10(%ebp),%edi
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
10b6c2: 8d 45 e0 lea -0x20(%ebp),%eax
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
_Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
10b6c5: 50 push %eax
10b6c6: 8d 45 e4 lea -0x1c(%ebp),%eax
10b6c9: 50 push %eax
10b6ca: 53 push %ebx
10b6cb: 68 a0 74 12 00 push $0x1274a0
10b6d0: e8 1b 17 00 00 call 10cdf0 <_Objects_Get_isr_disable>
switch ( location ) {
10b6d5: 83 c4 10 add $0x10,%esp
10b6d8: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b6db: 85 c9 test %ecx,%ecx
10b6dd: 74 0d je 10b6ec <rtems_semaphore_obtain+0x3c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b6df: b8 04 00 00 00 mov $0x4,%eax
}
10b6e4: 8d 65 f4 lea -0xc(%ebp),%esp
10b6e7: 5b pop %ebx
10b6e8: 5e pop %esi
10b6e9: 5f pop %edi
10b6ea: c9 leave
10b6eb: c3 ret
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10b6ec: f6 40 10 30 testb $0x30,0x10(%eax)
10b6f0: 74 36 je 10b728 <rtems_semaphore_obtain+0x78>
_CORE_mutex_Seize(
10b6f2: 83 ec 0c sub $0xc,%esp
10b6f5: ff 75 e0 pushl -0x20(%ebp)
10b6f8: 57 push %edi
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
10b6f9: 83 e6 01 and $0x1,%esi
10b6fc: 83 f6 01 xor $0x1,%esi
10b6ff: 56 push %esi
10b700: 53 push %ebx
10b701: 83 c0 14 add $0x14,%eax
10b704: 50 push %eax
10b705: e8 6e 0b 00 00 call 10c278 <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10b70a: 83 c4 14 add $0x14,%esp
_Thread_Executing->Wait.return_code );
10b70d: a1 38 7b 12 00 mov 0x127b38,%eax
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10b712: ff 70 34 pushl 0x34(%eax)
10b715: e8 12 01 00 00 call 10b82c <_Semaphore_Translate_core_mutex_return_code>
10b71a: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10b71d: 8d 65 f4 lea -0xc(%ebp),%esp
10b720: 5b pop %ebx
10b721: 5e pop %esi
10b722: 5f pop %edi
10b723: c9 leave
10b724: c3 ret
10b725: 8d 76 00 lea 0x0(%esi),%esi
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
10b728: 8b 15 38 7b 12 00 mov 0x127b38,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10b72e: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( the_semaphore->count != 0 ) {
10b735: 8b 48 5c mov 0x5c(%eax),%ecx
10b738: 85 c9 test %ecx,%ecx
10b73a: 75 2c jne 10b768 <rtems_semaphore_obtain+0xb8>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
10b73c: 83 e6 01 and $0x1,%esi
10b73f: 74 33 je 10b774 <rtems_semaphore_obtain+0xc4>
_ISR_Enable( *level_p );
10b741: ff 75 e0 pushl -0x20(%ebp)
10b744: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
10b745: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx)
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10b74c: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code );
10b74f: a1 38 7b 12 00 mov 0x127b38,%eax
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10b754: ff 70 34 pushl 0x34(%eax)
10b757: e8 e0 00 00 00 call 10b83c <_Semaphore_Translate_core_semaphore_return_code>
10b75c: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10b75f: 8d 65 f4 lea -0xc(%ebp),%esp
10b762: 5b pop %ebx
10b763: 5e pop %esi
10b764: 5f pop %edi
10b765: c9 leave
10b766: c3 ret
10b767: 90 nop
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
10b768: 49 dec %ecx
10b769: 89 48 5c mov %ecx,0x5c(%eax)
_ISR_Enable( *level_p );
10b76c: ff 75 e0 pushl -0x20(%ebp)
10b76f: 9d popf
10b770: eb da jmp 10b74c <rtems_semaphore_obtain+0x9c>
10b772: 66 90 xchg %ax,%ax
10b774: 8b 0d 50 75 12 00 mov 0x127550,%ecx
10b77a: 41 inc %ecx
10b77b: 89 0d 50 75 12 00 mov %ecx,0x127550
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;
10b781: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax)
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
10b788: 83 c0 14 add $0x14,%eax
10b78b: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10b78e: 89 5a 20 mov %ebx,0x20(%edx)
_ISR_Enable( *level_p );
10b791: ff 75 e0 pushl -0x20(%ebp)
10b794: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
10b795: 52 push %edx
10b796: 68 04 e1 10 00 push $0x10e104
10b79b: 57 push %edi
10b79c: 50 push %eax
10b79d: e8 36 26 00 00 call 10ddd8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10b7a2: e8 55 21 00 00 call 10d8fc <_Thread_Enable_dispatch>
10b7a7: 83 c4 10 add $0x10,%esp
10b7aa: eb a0 jmp 10b74c <rtems_semaphore_obtain+0x9c>
0010b7ac <rtems_semaphore_release>:
#endif
rtems_status_code rtems_semaphore_release(
rtems_id id
)
{
10b7ac: 55 push %ebp
10b7ad: 89 e5 mov %esp,%ebp
10b7af: 53 push %ebx
10b7b0: 83 ec 18 sub $0x18,%esp
10b7b3: 8b 5d 08 mov 0x8(%ebp),%ebx
register Semaphore_Control *the_semaphore;
Objects_Locations location;
CORE_mutex_Status mutex_status;
CORE_semaphore_Status semaphore_status;
the_semaphore = _Semaphore_Get( id, &location );
10b7b6: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
10b7b9: 50 push %eax
10b7ba: 53 push %ebx
10b7bb: 68 a0 74 12 00 push $0x1274a0
10b7c0: e8 83 16 00 00 call 10ce48 <_Objects_Get>
switch ( location ) {
10b7c5: 83 c4 10 add $0x10,%esp
10b7c8: 8b 55 f4 mov -0xc(%ebp),%edx
10b7cb: 85 d2 test %edx,%edx
10b7cd: 74 0d je 10b7dc <rtems_semaphore_release+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b7cf: b8 04 00 00 00 mov $0x4,%eax
}
10b7d4: 8b 5d fc mov -0x4(%ebp),%ebx
10b7d7: c9 leave
10b7d8: c3 ret
10b7d9: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10b7dc: f6 40 10 30 testb $0x30,0x10(%eax)
10b7e0: 75 26 jne 10b808 <rtems_semaphore_release+0x5c>
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
} else {
semaphore_status = _CORE_semaphore_Surrender(
10b7e2: 52 push %edx
10b7e3: 6a 00 push $0x0
10b7e5: 53 push %ebx
10b7e6: 83 c0 14 add $0x14,%eax
10b7e9: 50 push %eax
10b7ea: e8 61 0c 00 00 call 10c450 <_CORE_semaphore_Surrender>
10b7ef: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10b7f1: e8 06 21 00 00 call 10d8fc <_Thread_Enable_dispatch>
return
10b7f6: 89 1c 24 mov %ebx,(%esp)
10b7f9: e8 3e 00 00 00 call 10b83c <_Semaphore_Translate_core_semaphore_return_code>
10b7fe: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b801: 8b 5d fc mov -0x4(%ebp),%ebx
10b804: c9 leave
10b805: c3 ret
10b806: 66 90 xchg %ax,%ax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
mutex_status = _CORE_mutex_Surrender(
10b808: 51 push %ecx
10b809: 6a 00 push $0x0
10b80b: 53 push %ebx
10b80c: 83 c0 14 add $0x14,%eax
10b80f: 50 push %eax
10b810: e8 03 0b 00 00 call 10c318 <_CORE_mutex_Surrender>
10b815: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.mutex,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10b817: e8 e0 20 00 00 call 10d8fc <_Thread_Enable_dispatch>
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
10b81c: 89 1c 24 mov %ebx,(%esp)
10b81f: e8 08 00 00 00 call 10b82c <_Semaphore_Translate_core_mutex_return_code>
10b824: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b827: 8b 5d fc mov -0x4(%ebp),%ebx
10b82a: c9 leave
10b82b: c3 ret
00117d4c <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
117d4c: 55 push %ebp
117d4d: 89 e5 mov %esp,%ebp
117d4f: 53 push %ebx
117d50: 83 ec 14 sub $0x14,%esp
117d53: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
117d56: 85 db test %ebx,%ebx
117d58: 75 0a jne 117d64 <rtems_signal_send+0x18>
return RTEMS_INVALID_NUMBER;
117d5a: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117d5f: 8b 5d fc mov -0x4(%ebp),%ebx
117d62: c9 leave
117d63: c3 ret
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
117d64: 83 ec 08 sub $0x8,%esp
117d67: 8d 45 f4 lea -0xc(%ebp),%eax
117d6a: 50 push %eax
117d6b: ff 75 08 pushl 0x8(%ebp)
117d6e: e8 2d 40 00 00 call 11bda0 <_Thread_Get>
switch ( location ) {
117d73: 83 c4 10 add $0x10,%esp
117d76: 8b 55 f4 mov -0xc(%ebp),%edx
117d79: 85 d2 test %edx,%edx
117d7b: 74 0b je 117d88 <rtems_signal_send+0x3c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
117d7d: b8 04 00 00 00 mov $0x4,%eax
}
117d82: 8b 5d fc mov -0x4(%ebp),%ebx
117d85: c9 leave
117d86: c3 ret
117d87: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
117d88: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
117d8e: 8b 4a 0c mov 0xc(%edx),%ecx
117d91: 85 c9 test %ecx,%ecx
117d93: 74 3f je 117dd4 <rtems_signal_send+0x88>
if ( asr->is_enabled ) {
117d95: 80 7a 08 00 cmpb $0x0,0x8(%edx)
117d99: 74 25 je 117dc0 <rtems_signal_send+0x74>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
117d9b: 9c pushf
117d9c: fa cli
117d9d: 59 pop %ecx
*signal_set |= signals;
117d9e: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
117da1: 51 push %ecx
117da2: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
117da3: 8b 15 b4 27 14 00 mov 0x1427b4,%edx
117da9: 85 d2 test %edx,%edx
117dab: 74 1b je 117dc8 <rtems_signal_send+0x7c>
117dad: 3b 05 b8 27 14 00 cmp 0x1427b8,%eax
117db3: 75 13 jne 117dc8 <rtems_signal_send+0x7c><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
117db5: c6 05 c4 27 14 00 01 movb $0x1,0x1427c4
117dbc: eb 0a jmp 117dc8 <rtems_signal_send+0x7c>
117dbe: 66 90 xchg %ax,%ax
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
117dc0: 9c pushf
117dc1: fa cli
117dc2: 58 pop %eax
*signal_set |= signals;
117dc3: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
117dc6: 50 push %eax
117dc7: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
117dc8: e8 af 3f 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
117dcd: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117dcf: 8b 5d fc mov -0x4(%ebp),%ebx
117dd2: c9 leave
117dd3: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
117dd4: e8 a3 3f 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
117dd9: b8 0b 00 00 00 mov $0xb,%eax
117dde: e9 7c ff ff ff jmp 117d5f <rtems_signal_send+0x13>
00107fe0 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
107fe0: 55 push %ebp
107fe1: 89 e5 mov %esp,%ebp
107fe3: 57 push %edi
107fe4: 56 push %esi
107fe5: 8b 45 08 mov 0x8(%ebp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
107fe8: 8b 48 08 mov 0x8(%eax),%ecx
107feb: 85 c9 test %ecx,%ecx
107fed: 74 15 je 108004 <rtems_stack_checker_begin_extension+0x24><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
107fef: 8b b8 bc 00 00 00 mov 0xbc(%eax),%edi
107ff5: 83 c7 08 add $0x8,%edi
107ff8: be 80 a0 12 00 mov $0x12a080,%esi
107ffd: b9 04 00 00 00 mov $0x4,%ecx
108002: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
108004: 5e pop %esi
108005: 5f pop %edi
108006: c9 leave
108007: c3 ret
00107fb8 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
107fb8: 55 push %ebp
107fb9: 89 e5 mov %esp,%ebp
107fbb: 57 push %edi
107fbc: 8b 7d 0c mov 0xc(%ebp),%edi
Stack_check_Initialize();
107fbf: e8 88 ff ff ff call 107f4c <Stack_check_Initialize>
if (the_thread)
107fc4: 85 ff test %edi,%edi
107fc6: 74 12 je 107fda <rtems_stack_checker_create_extension+0x22><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
107fc8: 8b 8f b8 00 00 00 mov 0xb8(%edi),%ecx
107fce: 8b 97 bc 00 00 00 mov 0xbc(%edi),%edx
107fd4: b0 a5 mov $0xa5,%al
107fd6: 89 d7 mov %edx,%edi
107fd8: f3 aa rep stos %al,%es:(%edi)
return true;
}
107fda: b0 01 mov $0x1,%al
107fdc: 5f pop %edi
107fdd: c9 leave
107fde: c3 ret
0010811c <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
10811c: 55 push %ebp
10811d: 89 e5 mov %esp,%ebp
10811f: 57 push %edi
108120: 56 push %esi
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
108121: a1 78 a8 12 00 mov 0x12a878,%eax
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
108126: 8b b0 bc 00 00 00 mov 0xbc(%eax),%esi
10812c: 39 f5 cmp %esi,%ebp
10812e: 72 3c jb 10816c <rtems_stack_checker_is_blown+0x50><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
108130: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax
108136: 8d 04 06 lea (%esi,%eax,1),%eax
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
108139: 39 c5 cmp %eax,%ebp
10813b: 0f 96 c0 setbe %al
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
10813e: 8b 15 28 9d 12 00 mov 0x129d28,%edx
108144: 85 d2 test %edx,%edx
108146: 74 30 je 108178 <rtems_stack_checker_is_blown+0x5c><== NEVER TAKEN
pattern_ok = (!memcmp(
108148: 83 c6 08 add $0x8,%esi
10814b: bf 80 a0 12 00 mov $0x12a080,%edi
108150: b9 10 00 00 00 mov $0x10,%ecx
108155: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
108157: 0f 94 c2 sete %dl
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
10815a: 84 c0 test %al,%al
10815c: 74 1e je 10817c <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
10815e: 84 d2 test %dl,%dl
108160: 74 1a je 10817c <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
108162: 31 c0 xor %eax,%eax
108164: 8d 65 f8 lea -0x8(%ebp),%esp
108167: 5e pop %esi
108168: 5f pop %edi
108169: c9 leave
10816a: c3 ret
10816b: 90 nop
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
10816c: 31 c0 xor %eax,%eax
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
10816e: 8b 15 28 9d 12 00 mov 0x129d28,%edx <== NOT EXECUTED
108174: 85 d2 test %edx,%edx <== NOT EXECUTED
108176: 75 d0 jne 108148 <rtems_stack_checker_is_blown+0x2c><== NOT EXECUTED
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
108178: b2 01 mov $0x1,%dl <== NOT EXECUTED
10817a: eb de jmp 10815a <rtems_stack_checker_is_blown+0x3e><== NOT EXECUTED
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
10817c: 57 push %edi <== NOT EXECUTED
10817d: 57 push %edi <== NOT EXECUTED
10817e: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
108181: 52 push %edx <== NOT EXECUTED
108182: ff 35 78 a8 12 00 pushl 0x12a878 <== NOT EXECUTED
108188: e8 7b fe ff ff call 108008 <Stack_check_report_blown_task><== NOT EXECUTED
001081f8 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
1081f8: 55 push %ebp <== NOT EXECUTED
1081f9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1081fb: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
1081fe: 68 0c 9c 10 00 push $0x109c0c <== NOT EXECUTED
108203: 6a 00 push $0x0 <== NOT EXECUTED
108205: e8 86 ff ff ff call 108190 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
10820a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10820d: c9 leave <== NOT EXECUTED
10820e: c3 ret <== NOT EXECUTED
00108190 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
108190: 55 push %ebp <== NOT EXECUTED
108191: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108193: 56 push %esi <== NOT EXECUTED
108194: 53 push %ebx <== NOT EXECUTED
108195: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
108198: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if ( !print )
10819b: 85 db test %ebx,%ebx <== NOT EXECUTED
10819d: 74 50 je 1081ef <rtems_stack_checker_report_usage_with_plugin+0x5f><== NOT EXECUTED
return;
print_context = context;
10819f: 89 35 20 9d 12 00 mov %esi,0x129d20 <== NOT EXECUTED
print_handler = print;
1081a5: 89 1d 24 9d 12 00 mov %ebx,0x129d24 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
1081ab: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1081ae: 68 c8 35 12 00 push $0x1235c8 <== NOT EXECUTED
1081b3: 56 push %esi <== NOT EXECUTED
1081b4: ff d3 call *%ebx <== NOT EXECUTED
(*print)( context,
1081b6: 59 pop %ecx <== NOT EXECUTED
1081b7: 58 pop %eax <== NOT EXECUTED
1081b8: 68 4c 36 12 00 push $0x12364c <== NOT EXECUTED
1081bd: 56 push %esi <== NOT EXECUTED
1081be: ff d3 call *%ebx <== 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 );
1081c0: c7 04 24 e0 7d 10 00 movl $0x107de0,(%esp) <== NOT EXECUTED
1081c7: e8 60 70 00 00 call 10f22c <rtems_iterate_over_all_threads><== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
1081cc: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
1081d3: e8 08 fc ff ff call 107de0 <Stack_check_Dump_threads_usage><== NOT EXECUTED
#endif
print_context = NULL;
1081d8: c7 05 20 9d 12 00 00 movl $0x0,0x129d20 <== NOT EXECUTED
1081df: 00 00 00
print_handler = NULL;
1081e2: c7 05 24 9d 12 00 00 movl $0x0,0x129d24 <== NOT EXECUTED
1081e9: 00 00 00
1081ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1081ef: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1081f2: 5b pop %ebx <== NOT EXECUTED
1081f3: 5e pop %esi <== NOT EXECUTED
1081f4: c9 leave <== NOT EXECUTED
1081f5: c3 ret <== NOT EXECUTED
001080c4 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
1080c4: 55 push %ebp
1080c5: 89 e5 mov %esp,%ebp
1080c7: 57 push %edi
1080c8: 56 push %esi
1080c9: 8b 45 08 mov 0x8(%ebp),%eax
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = Stack_check_Get_pattern_area(the_stack);
1080cc: 8b 90 bc 00 00 00 mov 0xbc(%eax),%edx
1080d2: 8d 72 08 lea 0x8(%edx),%esi
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
1080d5: 39 d5 cmp %edx,%ebp
1080d7: 72 0a jb 1080e3 <rtems_stack_checker_switch_extension+0x1f><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
1080d9: 03 90 b8 00 00 00 add 0xb8(%eax),%edx
1080df: 39 d5 cmp %edx,%ebp
1080e1: 76 1d jbe 108100 <rtems_stack_checker_switch_extension+0x3c><== ALWAYS TAKEN
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
1080e3: bf 80 a0 12 00 mov $0x12a080,%edi <== NOT EXECUTED
1080e8: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED
1080ed: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
1080ef: 0f 94 c2 sete %dl <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
1080f2: 56 push %esi <== NOT EXECUTED
1080f3: 56 push %esi <== NOT EXECUTED
1080f4: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
1080f7: 52 push %edx <== NOT EXECUTED
1080f8: 50 push %eax <== NOT EXECUTED
1080f9: e8 0a ff ff ff call 108008 <Stack_check_report_blown_task><== NOT EXECUTED
1080fe: 66 90 xchg %ax,%ax <== 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,
108100: bf 80 a0 12 00 mov $0x12a080,%edi
108105: b9 10 00 00 00 mov $0x10,%ecx
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
10810a: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10810c: 75 07 jne 108115 <rtems_stack_checker_switch_extension+0x51><== NEVER TAKEN
Stack_check_report_blown_task( running, pattern_ok );
}
}
10810e: 8d 65 f8 lea -0x8(%ebp),%esp
108111: 5e pop %esi
108112: 5f pop %edi
108113: c9 leave
108114: c3 ret
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 ) {
108115: 31 d2 xor %edx,%edx <== NOT EXECUTED
108117: eb d9 jmp 1080f2 <rtems_stack_checker_switch_extension+0x2e><== NOT EXECUTED
00110b20 <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110b20: 55 push %ebp
110b21: 89 e5 mov %esp,%ebp
110b23: 57 push %edi
110b24: 56 push %esi
110b25: 53 push %ebx
110b26: 83 ec 2c sub $0x2c,%esp
110b29: 8b 75 08 mov 0x8(%ebp),%esi
110b2c: 8b 5d 0c mov 0xc(%ebp),%ebx
110b2f: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110b32: 85 db test %ebx,%ebx
110b34: 74 72 je 110ba8 <rtems_string_to_double+0x88>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110b36: e8 01 2f 00 00 call 113a3c <__errno>
110b3b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110b41: c7 03 00 00 00 00 movl $0x0,(%ebx)
110b47: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
110b4e: 83 ec 08 sub $0x8,%esp
110b51: 8d 45 e4 lea -0x1c(%ebp),%eax
110b54: 50 push %eax
110b55: 56 push %esi
110b56: e8 e9 58 00 00 call 116444 <strtod>
#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 )
110b5b: 83 c4 10 add $0x10,%esp
110b5e: 85 ff test %edi,%edi
110b60: 74 56 je 110bb8 <rtems_string_to_double+0x98>
*endptr = end;
110b62: 8b 45 e4 mov -0x1c(%ebp),%eax
110b65: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110b67: 39 c6 cmp %eax,%esi
110b69: 74 55 je 110bc0 <rtems_string_to_double+0xa0>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110b6b: dd 05 30 58 12 00 fldl 0x125830
110b71: d9 c9 fxch %st(1)
110b73: dd e1 fucom %st(1)
110b75: df e0 fnstsw %ax
110b77: dd d9 fstp %st(1)
110b79: f6 c4 45 test $0x45,%ah
110b7c: 74 0e je 110b8c <rtems_string_to_double+0x6c>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110b7e: dd 1b fstpl (%ebx)
#endif
return RTEMS_SUCCESSFUL;
110b80: 31 c0 xor %eax,%eax
}
110b82: 8d 65 f4 lea -0xc(%ebp),%esp
110b85: 5b pop %ebx
110b86: 5e pop %esi
110b87: 5f pop %edi
110b88: c9 leave
110b89: c3 ret
110b8a: 66 90 xchg %ax,%ax
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110b8c: dd 5d c8 fstpl -0x38(%ebp)
110b8f: e8 a8 2e 00 00 call 113a3c <__errno>
110b94: 83 38 22 cmpl $0x22,(%eax)
110b97: dd 45 c8 fldl -0x38(%ebp)
110b9a: 75 e2 jne 110b7e <rtems_string_to_double+0x5e><== NEVER TAKEN
110b9c: dd d8 fstp %st(0)
return RTEMS_INVALID_NUMBER;
110b9e: b8 0a 00 00 00 mov $0xa,%eax
110ba3: eb dd jmp 110b82 <rtems_string_to_double+0x62>
110ba5: 8d 76 00 lea 0x0(%esi),%esi
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110ba8: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110bad: 8d 65 f4 lea -0xc(%ebp),%esp
110bb0: 5b pop %ebx
110bb1: 5e pop %esi
110bb2: 5f pop %edi
110bb3: c9 leave
110bb4: c3 ret
110bb5: 8d 76 00 lea 0x0(%esi),%esi
#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 )
110bb8: 8b 45 e4 mov -0x1c(%ebp),%eax
110bbb: eb aa jmp 110b67 <rtems_string_to_double+0x47>
110bbd: 8d 76 00 lea 0x0(%esi),%esi
110bc0: dd d8 fstp %st(0)
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110bc2: b8 0b 00 00 00 mov $0xb,%eax
110bc7: eb b9 jmp 110b82 <rtems_string_to_double+0x62>
00110bcc <rtems_string_to_float>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110bcc: 55 push %ebp
110bcd: 89 e5 mov %esp,%ebp
110bcf: 57 push %edi
110bd0: 56 push %esi
110bd1: 53 push %ebx
110bd2: 83 ec 2c sub $0x2c,%esp
110bd5: 8b 75 08 mov 0x8(%ebp),%esi
110bd8: 8b 5d 0c mov 0xc(%ebp),%ebx
110bdb: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110bde: 85 db test %ebx,%ebx
110be0: 74 6a je 110c4c <rtems_string_to_float+0x80>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110be2: e8 55 2e 00 00 call 113a3c <__errno>
110be7: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110bed: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
110bf3: 83 ec 08 sub $0x8,%esp
110bf6: 8d 45 e4 lea -0x1c(%ebp),%eax
110bf9: 50 push %eax
110bfa: 56 push %esi
110bfb: e8 60 58 00 00 call 116460 <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 )
110c00: 83 c4 10 add $0x10,%esp
110c03: 85 ff test %edi,%edi
110c05: 74 55 je 110c5c <rtems_string_to_float+0x90>
*endptr = end;
110c07: 8b 45 e4 mov -0x1c(%ebp),%eax
110c0a: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110c0c: 39 c6 cmp %eax,%esi
110c0e: 74 54 je 110c64 <rtems_string_to_float+0x98>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110c10: d9 05 38 58 12 00 flds 0x125838
110c16: d9 c9 fxch %st(1)
110c18: dd e1 fucom %st(1)
110c1a: df e0 fnstsw %ax
110c1c: dd d9 fstp %st(1)
110c1e: f6 c4 45 test $0x45,%ah
110c21: 74 0d je 110c30 <rtems_string_to_float+0x64>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110c23: d9 1b fstps (%ebx)
#endif
return RTEMS_SUCCESSFUL;
110c25: 31 c0 xor %eax,%eax
}
110c27: 8d 65 f4 lea -0xc(%ebp),%esp
110c2a: 5b pop %ebx
110c2b: 5e pop %esi
110c2c: 5f pop %edi
110c2d: c9 leave
110c2e: c3 ret
110c2f: 90 nop
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110c30: d9 5d c8 fstps -0x38(%ebp)
110c33: e8 04 2e 00 00 call 113a3c <__errno>
110c38: 83 38 22 cmpl $0x22,(%eax)
110c3b: d9 45 c8 flds -0x38(%ebp)
110c3e: 75 e3 jne 110c23 <rtems_string_to_float+0x57><== NEVER TAKEN
110c40: dd d8 fstp %st(0)
return RTEMS_INVALID_NUMBER;
110c42: b8 0a 00 00 00 mov $0xa,%eax
110c47: eb de jmp 110c27 <rtems_string_to_float+0x5b>
110c49: 8d 76 00 lea 0x0(%esi),%esi
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110c4c: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110c51: 8d 65 f4 lea -0xc(%ebp),%esp
110c54: 5b pop %ebx
110c55: 5e pop %esi
110c56: 5f pop %edi
110c57: c9 leave
110c58: c3 ret
110c59: 8d 76 00 lea 0x0(%esi),%esi
#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 )
110c5c: 8b 45 e4 mov -0x1c(%ebp),%eax
110c5f: eb ab jmp 110c0c <rtems_string_to_float+0x40>
110c61: 8d 76 00 lea 0x0(%esi),%esi
110c64: dd d8 fstp %st(0)
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110c66: b8 0b 00 00 00 mov $0xb,%eax
110c6b: eb ba jmp 110c27 <rtems_string_to_float+0x5b>
00110c70 <rtems_string_to_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110c70: 55 push %ebp
110c71: 89 e5 mov %esp,%ebp
110c73: 57 push %edi
110c74: 56 push %esi
110c75: 53 push %ebx
110c76: 83 ec 2c sub $0x2c,%esp
110c79: 8b 75 08 mov 0x8(%ebp),%esi
110c7c: 8b 5d 0c mov 0xc(%ebp),%ebx
110c7f: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110c82: 85 db test %ebx,%ebx
110c84: 74 5e je 110ce4 <rtems_string_to_int+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110c86: e8 b1 2d 00 00 call 113a3c <__errno>
110c8b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110c91: c7 03 00 00 00 00 movl $0x0,(%ebx)
#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 );
110c97: 50 push %eax
110c98: ff 75 14 pushl 0x14(%ebp)
110c9b: 8d 45 e4 lea -0x1c(%ebp),%eax
110c9e: 50 push %eax
110c9f: 56 push %esi
110ca0: e8 7f 59 00 00 call 116624 <strtol>
110ca5: 89 c2 mov %eax,%edx
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110ca7: 83 c4 10 add $0x10,%esp
110caa: 85 ff test %edi,%edi
110cac: 74 46 je 110cf4 <rtems_string_to_int+0x84>
*endptr = end;
110cae: 8b 45 e4 mov -0x1c(%ebp),%eax
110cb1: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110cb3: 39 c6 cmp %eax,%esi
110cb5: 74 45 je 110cfc <rtems_string_to_int+0x8c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110cb7: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
110cbd: 74 0d je 110ccc <rtems_string_to_int+0x5c>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110cbf: 89 13 mov %edx,(%ebx)
#endif
return RTEMS_SUCCESSFUL;
110cc1: 31 c0 xor %eax,%eax
}
110cc3: 8d 65 f4 lea -0xc(%ebp),%esp
110cc6: 5b pop %ebx
110cc7: 5e pop %esi
110cc8: 5f pop %edi
110cc9: c9 leave
110cca: c3 ret
110ccb: 90 nop
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110ccc: 89 55 d4 mov %edx,-0x2c(%ebp)
110ccf: e8 68 2d 00 00 call 113a3c <__errno>
110cd4: 83 38 22 cmpl $0x22,(%eax)
110cd7: 8b 55 d4 mov -0x2c(%ebp),%edx
110cda: 75 e3 jne 110cbf <rtems_string_to_int+0x4f>
return RTEMS_INVALID_NUMBER;
110cdc: b8 0a 00 00 00 mov $0xa,%eax
110ce1: eb e0 jmp 110cc3 <rtems_string_to_int+0x53>
110ce3: 90 nop
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110ce4: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110ce9: 8d 65 f4 lea -0xc(%ebp),%esp
110cec: 5b pop %ebx
110ced: 5e pop %esi
110cee: 5f pop %edi
110cef: c9 leave
110cf0: c3 ret
110cf1: 8d 76 00 lea 0x0(%esi),%esi
#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 )
110cf4: 8b 45 e4 mov -0x1c(%ebp),%eax
110cf7: eb ba jmp 110cb3 <rtems_string_to_int+0x43>
110cf9: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110cfc: b8 0b 00 00 00 mov $0xb,%eax
110d01: eb c0 jmp 110cc3 <rtems_string_to_int+0x53>
00110db4 <rtems_string_to_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110db4: 55 push %ebp
110db5: 89 e5 mov %esp,%ebp
110db7: 57 push %edi
110db8: 56 push %esi
110db9: 53 push %ebx
110dba: 83 ec 1c sub $0x1c,%esp
110dbd: 8b 7d 08 mov 0x8(%ebp),%edi
110dc0: 8b 5d 0c mov 0xc(%ebp),%ebx
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110dc3: 85 db test %ebx,%ebx
110dc5: 74 69 je 110e30 <rtems_string_to_long+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110dc7: e8 70 2c 00 00 call 113a3c <__errno>
110dcc: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110dd2: c7 03 00 00 00 00 movl $0x0,(%ebx)
#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 );
110dd8: 52 push %edx
110dd9: ff 75 14 pushl 0x14(%ebp)
110ddc: 8d 45 e4 lea -0x1c(%ebp),%eax
110ddf: 50 push %eax
110de0: 57 push %edi
110de1: e8 3e 58 00 00 call 116624 <strtol>
110de6: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110de8: 83 c4 10 add $0x10,%esp
110deb: 8b 45 10 mov 0x10(%ebp),%eax
110dee: 85 c0 test %eax,%eax
110df0: 74 4e je 110e40 <rtems_string_to_long+0x8c>
*endptr = end;
110df2: 8b 45 e4 mov -0x1c(%ebp),%eax
110df5: 8b 55 10 mov 0x10(%ebp),%edx
110df8: 89 02 mov %eax,(%edx)
/* nothing was converted */
if ( end == s )
110dfa: 39 c7 cmp %eax,%edi
110dfc: 74 4a je 110e48 <rtems_string_to_long+0x94>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110dfe: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi
110e04: 74 16 je 110e1c <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))
110e06: 81 fe 00 00 00 80 cmp $0x80000000,%esi
110e0c: 74 0e je 110e1c <rtems_string_to_long+0x68>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110e0e: 89 33 mov %esi,(%ebx)
#endif
return RTEMS_SUCCESSFUL;
110e10: 31 c0 xor %eax,%eax
}
110e12: 8d 65 f4 lea -0xc(%ebp),%esp
110e15: 5b pop %ebx
110e16: 5e pop %esi
110e17: 5f pop %edi
110e18: c9 leave
110e19: c3 ret
110e1a: 66 90 xchg %ax,%ax
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
110e1c: e8 1b 2c 00 00 call 113a3c <__errno>
110e21: 83 38 22 cmpl $0x22,(%eax)
110e24: 75 e8 jne 110e0e <rtems_string_to_long+0x5a>
return RTEMS_INVALID_NUMBER;
110e26: b8 0a 00 00 00 mov $0xa,%eax
110e2b: eb e5 jmp 110e12 <rtems_string_to_long+0x5e>
110e2d: 8d 76 00 lea 0x0(%esi),%esi
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110e30: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110e35: 8d 65 f4 lea -0xc(%ebp),%esp
110e38: 5b pop %ebx
110e39: 5e pop %esi
110e3a: 5f pop %edi
110e3b: c9 leave
110e3c: c3 ret
110e3d: 8d 76 00 lea 0x0(%esi),%esi
#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 )
110e40: 8b 45 e4 mov -0x1c(%ebp),%eax
110e43: eb b5 jmp 110dfa <rtems_string_to_long+0x46>
110e45: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110e48: b8 0b 00 00 00 mov $0xb,%eax
110e4d: eb c3 jmp 110e12 <rtems_string_to_long+0x5e>
00110d04 <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110d04: 55 push %ebp
110d05: 89 e5 mov %esp,%ebp
110d07: 57 push %edi
110d08: 56 push %esi
110d09: 53 push %ebx
110d0a: 83 ec 2c sub $0x2c,%esp
110d0d: 8b 5d 0c mov 0xc(%ebp),%ebx
110d10: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110d13: 85 db test %ebx,%ebx
110d15: 74 7d je 110d94 <rtems_string_to_long_long+0x90>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110d17: e8 20 2d 00 00 call 113a3c <__errno>
110d1c: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110d22: c7 03 00 00 00 00 movl $0x0,(%ebx)
110d28: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
#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 );
110d2f: 50 push %eax
110d30: ff 75 14 pushl 0x14(%ebp)
110d33: 8d 45 e4 lea -0x1c(%ebp),%eax
110d36: 50 push %eax
110d37: ff 75 08 pushl 0x8(%ebp)
110d3a: e8 01 59 00 00 call 116640 <strtoll>
110d3f: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110d41: 83 c4 10 add $0x10,%esp
110d44: 85 ff test %edi,%edi
110d46: 74 5c je 110da4 <rtems_string_to_long_long+0xa0>
*endptr = end;
110d48: 8b 45 e4 mov -0x1c(%ebp),%eax
110d4b: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110d4d: 39 45 08 cmp %eax,0x8(%ebp)
110d50: 74 5a je 110dac <rtems_string_to_long_long+0xa8>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110d52: 89 d1 mov %edx,%ecx
110d54: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx
110d5a: 89 f0 mov %esi,%eax
110d5c: f7 d0 not %eax
110d5e: 09 c1 or %eax,%ecx
110d60: 74 1a je 110d7c <rtems_string_to_long_long+0x78>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
110d62: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax
110d68: 09 f0 or %esi,%eax
110d6a: 74 10 je 110d7c <rtems_string_to_long_long+0x78>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110d6c: 89 33 mov %esi,(%ebx)
110d6e: 89 53 04 mov %edx,0x4(%ebx)
#endif
return RTEMS_SUCCESSFUL;
110d71: 31 c0 xor %eax,%eax
}
110d73: 8d 65 f4 lea -0xc(%ebp),%esp
110d76: 5b pop %ebx
110d77: 5e pop %esi
110d78: 5f pop %edi
110d79: c9 leave
110d7a: c3 ret
110d7b: 90 nop
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
110d7c: 89 55 d4 mov %edx,-0x2c(%ebp)
110d7f: e8 b8 2c 00 00 call 113a3c <__errno>
110d84: 83 38 22 cmpl $0x22,(%eax)
110d87: 8b 55 d4 mov -0x2c(%ebp),%edx
110d8a: 75 e0 jne 110d6c <rtems_string_to_long_long+0x68>
return RTEMS_INVALID_NUMBER;
110d8c: b8 0a 00 00 00 mov $0xa,%eax
110d91: eb e0 jmp 110d73 <rtems_string_to_long_long+0x6f>
110d93: 90 nop
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110d94: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110d99: 8d 65 f4 lea -0xc(%ebp),%esp
110d9c: 5b pop %ebx
110d9d: 5e pop %esi
110d9e: 5f pop %edi
110d9f: c9 leave
110da0: c3 ret
110da1: 8d 76 00 lea 0x0(%esi),%esi
#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 )
110da4: 8b 45 e4 mov -0x1c(%ebp),%eax
110da7: eb a4 jmp 110d4d <rtems_string_to_long_long+0x49>
110da9: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110dac: b8 0b 00 00 00 mov $0xb,%eax
110db1: eb c0 jmp 110d73 <rtems_string_to_long_long+0x6f>
00110e50 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110e50: 55 push %ebp
110e51: 89 e5 mov %esp,%ebp
110e53: 57 push %edi
110e54: 56 push %esi
110e55: 53 push %ebx
110e56: 83 ec 2c sub $0x2c,%esp
110e59: 8b 75 08 mov 0x8(%ebp),%esi
110e5c: 8b 5d 0c mov 0xc(%ebp),%ebx
110e5f: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110e62: 85 db test %ebx,%ebx
110e64: 74 5a je 110ec0 <rtems_string_to_pointer+0x70>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110e66: e8 d1 2b 00 00 call 113a3c <__errno>
110e6b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110e71: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
110e77: 50 push %eax
110e78: 6a 10 push $0x10
110e7a: 8d 45 e4 lea -0x1c(%ebp),%eax
110e7d: 50 push %eax
110e7e: 56 push %esi
110e7f: e8 68 5c 00 00 call 116aec <strtoul>
110e84: 89 c2 mov %eax,%edx
#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 )
110e86: 83 c4 10 add $0x10,%esp
110e89: 85 ff test %edi,%edi
110e8b: 74 43 je 110ed0 <rtems_string_to_pointer+0x80>
*endptr = end;
110e8d: 8b 45 e4 mov -0x1c(%ebp),%eax
110e90: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110e92: 39 c6 cmp %eax,%esi
110e94: 74 42 je 110ed8 <rtems_string_to_pointer+0x88>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110e96: 83 fa ff cmp $0xffffffff,%edx
110e99: 74 0d je 110ea8 <rtems_string_to_pointer+0x58><== NEVER TAKEN
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
110e9b: 89 13 mov %edx,(%ebx)
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
110e9d: 31 c0 xor %eax,%eax
}
110e9f: 8d 65 f4 lea -0xc(%ebp),%esp
110ea2: 5b pop %ebx
110ea3: 5e pop %esi
110ea4: 5f pop %edi
110ea5: c9 leave
110ea6: c3 ret
110ea7: 90 nop
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110ea8: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
110eab: e8 8c 2b 00 00 call 113a3c <__errno> <== NOT EXECUTED
110eb0: 83 38 22 cmpl $0x22,(%eax) <== NOT EXECUTED
110eb3: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
110eb6: 75 e3 jne 110e9b <rtems_string_to_pointer+0x4b><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
110eb8: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
110ebd: eb e0 jmp 110e9f <rtems_string_to_pointer+0x4f><== NOT EXECUTED
110ebf: 90 nop <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110ec0: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110ec5: 8d 65 f4 lea -0xc(%ebp),%esp
110ec8: 5b pop %ebx
110ec9: 5e pop %esi
110eca: 5f pop %edi
110ecb: c9 leave
110ecc: c3 ret
110ecd: 8d 76 00 lea 0x0(%esi),%esi
#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 )
110ed0: 8b 45 e4 mov -0x1c(%ebp),%eax
110ed3: eb bd jmp 110e92 <rtems_string_to_pointer+0x42>
110ed5: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110ed8: b8 0b 00 00 00 mov $0xb,%eax
110edd: eb c0 jmp 110e9f <rtems_string_to_pointer+0x4f>
00110ee0 <rtems_string_to_unsigned_char>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110ee0: 55 push %ebp
110ee1: 89 e5 mov %esp,%ebp
110ee3: 57 push %edi
110ee4: 56 push %esi
110ee5: 53 push %ebx
110ee6: 83 ec 1c sub $0x1c,%esp
110ee9: 8b 75 08 mov 0x8(%ebp),%esi
110eec: 8b 5d 0c mov 0xc(%ebp),%ebx
110eef: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110ef2: 85 db test %ebx,%ebx
110ef4: 74 3a je 110f30 <rtems_string_to_unsigned_char+0x50>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110ef6: e8 41 2b 00 00 call 113a3c <__errno>
110efb: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110f01: c6 03 00 movb $0x0,(%ebx)
#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 );
110f04: 50 push %eax
110f05: ff 75 14 pushl 0x14(%ebp)
110f08: 8d 45 e4 lea -0x1c(%ebp),%eax
110f0b: 50 push %eax
110f0c: 56 push %esi
110f0d: e8 da 5b 00 00 call 116aec <strtoul>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110f12: 83 c4 10 add $0x10,%esp
110f15: 85 ff test %edi,%edi
110f17: 74 27 je 110f40 <rtems_string_to_unsigned_char+0x60>
*endptr = end;
110f19: 8b 55 e4 mov -0x1c(%ebp),%edx
110f1c: 89 17 mov %edx,(%edi)
/* nothing was converted */
if ( end == s )
110f1e: 39 d6 cmp %edx,%esi
110f20: 74 26 je 110f48 <rtems_string_to_unsigned_char+0x68>
#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 );
110f22: 88 03 mov %al,(%ebx)
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
110f24: 31 c0 xor %eax,%eax
}
110f26: 8d 65 f4 lea -0xc(%ebp),%esp
110f29: 5b pop %ebx
110f2a: 5e pop %esi
110f2b: 5f pop %edi
110f2c: c9 leave
110f2d: c3 ret
110f2e: 66 90 xchg %ax,%ax
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110f30: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110f35: 8d 65 f4 lea -0xc(%ebp),%esp
110f38: 5b pop %ebx
110f39: 5e pop %esi
110f3a: 5f pop %edi
110f3b: c9 leave
110f3c: c3 ret
110f3d: 8d 76 00 lea 0x0(%esi),%esi
#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 )
110f40: 8b 55 e4 mov -0x1c(%ebp),%edx
110f43: eb d9 jmp 110f1e <rtems_string_to_unsigned_char+0x3e>
110f45: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110f48: b8 0b 00 00 00 mov $0xb,%eax
110f4d: eb d7 jmp 110f26 <rtems_string_to_unsigned_char+0x46>
00110f50 <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110f50: 55 push %ebp
110f51: 89 e5 mov %esp,%ebp
110f53: 57 push %edi
110f54: 56 push %esi
110f55: 53 push %ebx
110f56: 83 ec 2c sub $0x2c,%esp
110f59: 8b 75 08 mov 0x8(%ebp),%esi
110f5c: 8b 5d 0c mov 0xc(%ebp),%ebx
110f5f: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110f62: 85 db test %ebx,%ebx
110f64: 74 5a je 110fc0 <rtems_string_to_unsigned_int+0x70>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110f66: e8 d1 2a 00 00 call 113a3c <__errno>
110f6b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110f71: c7 03 00 00 00 00 movl $0x0,(%ebx)
#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 );
110f77: 50 push %eax
110f78: ff 75 14 pushl 0x14(%ebp)
110f7b: 8d 45 e4 lea -0x1c(%ebp),%eax
110f7e: 50 push %eax
110f7f: 56 push %esi
110f80: e8 67 5b 00 00 call 116aec <strtoul>
110f85: 89 c2 mov %eax,%edx
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110f87: 83 c4 10 add $0x10,%esp
110f8a: 85 ff test %edi,%edi
110f8c: 74 42 je 110fd0 <rtems_string_to_unsigned_int+0x80>
*endptr = end;
110f8e: 8b 45 e4 mov -0x1c(%ebp),%eax
110f91: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110f93: 39 c6 cmp %eax,%esi
110f95: 74 41 je 110fd8 <rtems_string_to_unsigned_int+0x88>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110f97: 83 fa ff cmp $0xffffffff,%edx
110f9a: 74 0c je 110fa8 <rtems_string_to_unsigned_int+0x58>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110f9c: 89 13 mov %edx,(%ebx)
#endif
return RTEMS_SUCCESSFUL;
110f9e: 31 c0 xor %eax,%eax
}
110fa0: 8d 65 f4 lea -0xc(%ebp),%esp
110fa3: 5b pop %ebx
110fa4: 5e pop %esi
110fa5: 5f pop %edi
110fa6: c9 leave
110fa7: c3 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110fa8: 89 55 d4 mov %edx,-0x2c(%ebp)
110fab: e8 8c 2a 00 00 call 113a3c <__errno>
110fb0: 83 38 22 cmpl $0x22,(%eax)
110fb3: 8b 55 d4 mov -0x2c(%ebp),%edx
110fb6: 75 e4 jne 110f9c <rtems_string_to_unsigned_int+0x4c><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
110fb8: b8 0a 00 00 00 mov $0xa,%eax
110fbd: eb e1 jmp 110fa0 <rtems_string_to_unsigned_int+0x50>
110fbf: 90 nop
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110fc0: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110fc5: 8d 65 f4 lea -0xc(%ebp),%esp
110fc8: 5b pop %ebx
110fc9: 5e pop %esi
110fca: 5f pop %edi
110fcb: c9 leave
110fcc: c3 ret
110fcd: 8d 76 00 lea 0x0(%esi),%esi
#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 )
110fd0: 8b 45 e4 mov -0x1c(%ebp),%eax
110fd3: eb be jmp 110f93 <rtems_string_to_unsigned_int+0x43>
110fd5: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110fd8: b8 0b 00 00 00 mov $0xb,%eax
110fdd: eb c1 jmp 110fa0 <rtems_string_to_unsigned_int+0x50>
0011107c <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
11107c: 55 push %ebp
11107d: 89 e5 mov %esp,%ebp
11107f: 57 push %edi
111080: 56 push %esi
111081: 53 push %ebx
111082: 83 ec 2c sub $0x2c,%esp
111085: 8b 75 08 mov 0x8(%ebp),%esi
111088: 8b 5d 0c mov 0xc(%ebp),%ebx
11108b: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
11108e: 85 db test %ebx,%ebx
111090: 74 5a je 1110ec <rtems_string_to_unsigned_long+0x70>
return RTEMS_INVALID_ADDRESS;
errno = 0;
111092: e8 a5 29 00 00 call 113a3c <__errno>
111097: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
11109d: c7 03 00 00 00 00 movl $0x0,(%ebx)
#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 );
1110a3: 50 push %eax
1110a4: ff 75 14 pushl 0x14(%ebp)
1110a7: 8d 45 e4 lea -0x1c(%ebp),%eax
1110aa: 50 push %eax
1110ab: 56 push %esi
1110ac: e8 3b 5a 00 00 call 116aec <strtoul>
1110b1: 89 c2 mov %eax,%edx
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
1110b3: 83 c4 10 add $0x10,%esp
1110b6: 85 ff test %edi,%edi
1110b8: 74 42 je 1110fc <rtems_string_to_unsigned_long+0x80>
*endptr = end;
1110ba: 8b 45 e4 mov -0x1c(%ebp),%eax
1110bd: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
1110bf: 39 c6 cmp %eax,%esi
1110c1: 74 41 je 111104 <rtems_string_to_unsigned_long+0x88>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
1110c3: 83 fa ff cmp $0xffffffff,%edx
1110c6: 74 0c je 1110d4 <rtems_string_to_unsigned_long+0x58>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
1110c8: 89 13 mov %edx,(%ebx)
#endif
return RTEMS_SUCCESSFUL;
1110ca: 31 c0 xor %eax,%eax
}
1110cc: 8d 65 f4 lea -0xc(%ebp),%esp
1110cf: 5b pop %ebx
1110d0: 5e pop %esi
1110d1: 5f pop %edi
1110d2: c9 leave
1110d3: c3 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
1110d4: 89 55 d4 mov %edx,-0x2c(%ebp)
1110d7: e8 60 29 00 00 call 113a3c <__errno>
1110dc: 83 38 22 cmpl $0x22,(%eax)
1110df: 8b 55 d4 mov -0x2c(%ebp),%edx
1110e2: 75 e4 jne 1110c8 <rtems_string_to_unsigned_long+0x4c><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
1110e4: b8 0a 00 00 00 mov $0xa,%eax
1110e9: eb e1 jmp 1110cc <rtems_string_to_unsigned_long+0x50>
1110eb: 90 nop
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
1110ec: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
1110f1: 8d 65 f4 lea -0xc(%ebp),%esp
1110f4: 5b pop %ebx
1110f5: 5e pop %esi
1110f6: 5f pop %edi
1110f7: c9 leave
1110f8: c3 ret
1110f9: 8d 76 00 lea 0x0(%esi),%esi
#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 )
1110fc: 8b 45 e4 mov -0x1c(%ebp),%eax
1110ff: eb be jmp 1110bf <rtems_string_to_unsigned_long+0x43>
111101: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
111104: b8 0b 00 00 00 mov $0xb,%eax
111109: eb c1 jmp 1110cc <rtems_string_to_unsigned_long+0x50>
00110fe0 <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110fe0: 55 push %ebp
110fe1: 89 e5 mov %esp,%ebp
110fe3: 57 push %edi
110fe4: 56 push %esi
110fe5: 53 push %ebx
110fe6: 83 ec 2c sub $0x2c,%esp
110fe9: 8b 5d 0c mov 0xc(%ebp),%ebx
110fec: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110fef: 85 db test %ebx,%ebx
110ff1: 74 69 je 11105c <rtems_string_to_unsigned_long_long+0x7c><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
errno = 0;
110ff3: e8 44 2a 00 00 call 113a3c <__errno>
110ff8: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110ffe: c7 03 00 00 00 00 movl $0x0,(%ebx)
111004: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
#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 );
11100b: 50 push %eax
11100c: ff 75 14 pushl 0x14(%ebp)
11100f: 8d 45 e4 lea -0x1c(%ebp),%eax
111012: 50 push %eax
111013: ff 75 08 pushl 0x8(%ebp)
111016: e8 ed 5a 00 00 call 116b08 <strtoull>
11101b: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
11101d: 83 c4 10 add $0x10,%esp
111020: 85 ff test %edi,%edi
111022: 74 48 je 11106c <rtems_string_to_unsigned_long_long+0x8c>
*endptr = end;
111024: 8b 45 e4 mov -0x1c(%ebp),%eax
111027: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
111029: 39 45 08 cmp %eax,0x8(%ebp)
11102c: 74 46 je 111074 <rtems_string_to_unsigned_long_long+0x94>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
11102e: 89 f0 mov %esi,%eax
111030: 21 d0 and %edx,%eax
111032: 40 inc %eax
111033: 74 0f je 111044 <rtems_string_to_unsigned_long_long+0x64>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
111035: 89 33 mov %esi,(%ebx)
111037: 89 53 04 mov %edx,0x4(%ebx)
#endif
return RTEMS_SUCCESSFUL;
11103a: 31 c0 xor %eax,%eax
}
11103c: 8d 65 f4 lea -0xc(%ebp),%esp
11103f: 5b pop %ebx
111040: 5e pop %esi
111041: 5f pop %edi
111042: c9 leave
111043: c3 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
111044: 89 55 d4 mov %edx,-0x2c(%ebp)
111047: e8 f0 29 00 00 call 113a3c <__errno>
11104c: 83 38 22 cmpl $0x22,(%eax)
11104f: 8b 55 d4 mov -0x2c(%ebp),%edx
111052: 75 e1 jne 111035 <rtems_string_to_unsigned_long_long+0x55><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
111054: b8 0a 00 00 00 mov $0xa,%eax
111059: eb e1 jmp 11103c <rtems_string_to_unsigned_long_long+0x5c>
11105b: 90 nop
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
11105c: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
111061: 8d 65 f4 lea -0xc(%ebp),%esp
111064: 5b pop %ebx
111065: 5e pop %esi
111066: 5f pop %edi
111067: c9 leave
111068: c3 ret
111069: 8d 76 00 lea 0x0(%esi),%esi
#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 )
11106c: 8b 45 e4 mov -0x1c(%ebp),%eax
11106f: eb b8 jmp 111029 <rtems_string_to_unsigned_long_long+0x49>
111071: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
111074: b8 0b 00 00 00 mov $0xb,%eax
111079: eb c1 jmp 11103c <rtems_string_to_unsigned_long_long+0x5c>
00107e04 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
107e04: 55 push %ebp
107e05: 89 e5 mov %esp,%ebp
107e07: 57 push %edi
107e08: 56 push %esi
107e09: 53 push %ebx
107e0a: 81 ec d8 01 00 00 sub $0x1d8,%esp
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
107e10: 31 c0 xor %eax,%eax
107e12: b9 ff ff ff ff mov $0xffffffff,%ecx
107e17: 8b 7d 08 mov 0x8(%ebp),%edi
107e1a: f2 ae repnz scas %es:(%edi),%al
107e1c: f7 d1 not %ecx
107e1e: 49 dec %ecx
107e1f: 6a 00 push $0x0
107e21: 8d 45 d0 lea -0x30(%ebp),%eax
107e24: 89 85 2c fe ff ff mov %eax,-0x1d4(%ebp)
107e2a: 50 push %eax
107e2b: 6a 00 push $0x0
107e2d: 51 push %ecx
107e2e: ff 75 08 pushl 0x8(%ebp)
107e31: e8 9a 0a 00 00 call 1088d0 <rtems_filesystem_evaluate_path>
107e36: 89 85 44 fe ff ff mov %eax,-0x1bc(%ebp)
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
107e3c: 83 c4 20 add $0x20,%esp
107e3f: 85 c0 test %eax,%eax
107e41: 0f 85 61 01 00 00 jne 107fa8 <rtems_tarfs_load+0x1a4>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
107e47: 8b 45 dc mov -0x24(%ebp),%eax
107e4a: 3d 60 65 12 00 cmp $0x126560,%eax
107e4f: 0f 85 47 01 00 00 jne 107f9c <rtems_tarfs_load+0x198>
107e55: 31 db xor %ebx,%ebx
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
107e57: 8d 45 bc lea -0x44(%ebp),%eax
107e5a: 89 85 30 fe ff ff mov %eax,-0x1d0(%ebp)
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
107e60: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx
107e66: 89 95 34 fe ff ff mov %edx,-0x1cc(%ebp)
107e6c: eb 15 jmp 107e83 <rtems_tarfs_load+0x7f>
107e6e: 66 90 xchg %ax,%ax
* IMFS_create_node 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.
*/
else if (linkflag == REGTYPE) {
107e70: 80 bd 53 fe ff ff 30 cmpb $0x30,-0x1ad(%ebp)
107e77: 0f 84 43 01 00 00 je 107fc0 <rtems_tarfs_load+0x1bc>
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
107e7d: 8b 9d 54 fe ff ff mov -0x1ac(%ebp),%ebx
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
107e83: 8d 83 00 02 00 00 lea 0x200(%ebx),%eax
107e89: 89 85 54 fe ff ff mov %eax,-0x1ac(%ebp)
107e8f: 8b 55 10 mov 0x10(%ebp),%edx
107e92: 39 d0 cmp %edx,%eax
107e94: 0f 87 18 01 00 00 ja 107fb2 <rtems_tarfs_load+0x1ae><== NEVER TAKEN
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
107e9a: 03 5d 0c add 0xc(%ebp),%ebx
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
107e9d: 8d b3 01 01 00 00 lea 0x101(%ebx),%esi
107ea3: bf a8 65 12 00 mov $0x1265a8,%edi
107ea8: b9 05 00 00 00 mov $0x5,%ecx
107ead: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
107eaf: 0f 85 fd 00 00 00 jne 107fb2 <rtems_tarfs_load+0x1ae>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
107eb5: 57 push %edi
107eb6: 6a 63 push $0x63
107eb8: 53 push %ebx
107eb9: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax
107ebf: 50 push %eax
107ec0: e8 67 fe 00 00 call 117d2c <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
107ec5: c6 45 bb 00 movb $0x0,-0x45(%ebp)
linkflag = hdr_ptr[156];
107ec9: 8a 93 9c 00 00 00 mov 0x9c(%ebx),%dl
107ecf: 88 95 53 fe ff ff mov %dl,-0x1ad(%ebp)
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
107ed5: 59 pop %ecx
107ed6: 5e pop %esi
107ed7: 6a 08 push $0x8
107ed9: 8d 43 64 lea 0x64(%ebx),%eax
107edc: 50 push %eax
107edd: e8 5e 7c 00 00 call 10fb40 <_rtems_octal2ulong>
107ee2: 89 85 48 fe ff ff mov %eax,-0x1b8(%ebp)
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
107ee8: 58 pop %eax
107ee9: 5a pop %edx
107eea: 6a 0c push $0xc
107eec: 8d 43 7c lea 0x7c(%ebx),%eax
107eef: 50 push %eax
107ef0: e8 4b 7c 00 00 call 10fb40 <_rtems_octal2ulong>
107ef5: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp)
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
107efb: 5e pop %esi
107efc: 5f pop %edi
107efd: 6a 08 push $0x8
107eff: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax
107f05: 50 push %eax
107f06: e8 35 7c 00 00 call 10fb40 <_rtems_octal2ulong>
107f0b: 89 c6 mov %eax,%esi
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
107f0d: 89 1c 24 mov %ebx,(%esp)
107f10: e8 ff 80 00 00 call 110014 <_rtems_tar_header_checksum>
107f15: 83 c4 10 add $0x10,%esp
107f18: 39 f0 cmp %esi,%eax
107f1a: 0f 85 92 00 00 00 jne 107fb2 <rtems_tarfs_load+0x1ae><== NEVER TAKEN
* Generate an IMFS node depending on the file type.
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
107f20: 80 bd 53 fe ff ff 35 cmpb $0x35,-0x1ad(%ebp)
107f27: 0f 85 43 ff ff ff jne 107e70 <rtems_tarfs_load+0x6c>
strcpy(full_filename, mountpoint);
107f2d: 83 ec 08 sub $0x8,%esp
107f30: ff 75 08 pushl 0x8(%ebp)
107f33: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax
107f39: 50 push %eax
107f3a: e8 85 fa 00 00 call 1179c4 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
107f3f: 31 c0 xor %eax,%eax
107f41: b9 ff ff ff ff mov $0xffffffff,%ecx
107f46: 8b bd 34 fe ff ff mov -0x1cc(%ebp),%edi
107f4c: f2 ae repnz scas %es:(%edi),%al
107f4e: f7 d1 not %ecx
107f50: 49 dec %ecx
107f51: 83 c4 10 add $0x10,%esp
107f54: 80 bc 0d 57 fe ff ff cmpb $0x2f,-0x1a9(%ebp,%ecx,1)
107f5b: 2f
107f5c: 74 0a je 107f68 <rtems_tarfs_load+0x164><== ALWAYS TAKEN
strcat(full_filename, "/");
107f5e: 66 c7 84 0d 58 fe ff movw $0x2f,-0x1a8(%ebp,%ecx,1) <== NOT EXECUTED
107f65: ff 2f 00
strcat(full_filename, filename);
107f68: 83 ec 08 sub $0x8,%esp
107f6b: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
107f71: 52 push %edx
107f72: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax
107f78: 50 push %eax
107f79: e8 92 f8 00 00 call 117810 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
107f7e: 5a pop %edx
107f7f: 59 pop %ecx
107f80: 68 ff 01 00 00 push $0x1ff
107f85: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx
107f8b: 52 push %edx
107f8c: e8 fb 10 00 00 call 10908c <mkdir>
107f91: 83 c4 10 add $0x10,%esp
107f94: e9 e4 fe ff ff jmp 107e7d <rtems_tarfs_load+0x79>
107f99: 8d 76 00 lea 0x0(%esi),%esi
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
107f9c: 3d e0 6f 12 00 cmp $0x126fe0,%eax
107fa1: 0f 84 ae fe ff ff je 107e55 <rtems_tarfs_load+0x51> <== NEVER TAKEN
107fa7: 90 nop
return -1;
107fa8: c7 85 44 fe ff ff ff movl $0xffffffff,-0x1bc(%ebp)
107faf: ff ff ff
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
107fb2: 8b 85 44 fe ff ff mov -0x1bc(%ebp),%eax
107fb8: 8d 65 f4 lea -0xc(%ebp),%esp
107fbb: 5b pop %ebx
107fbc: 5e pop %esi
107fbd: 5f pop %edi
107fbe: c9 leave
107fbf: c3 ret
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
107fc0: 8b bd 30 fe ff ff mov -0x1d0(%ebp),%edi
107fc6: 8b b5 2c fe ff ff mov -0x1d4(%ebp),%esi
107fcc: b9 05 00 00 00 mov $0x5,%ecx
107fd1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
107fd3: 50 push %eax
107fd4: 8d 45 e4 lea -0x1c(%ebp),%eax
107fd7: 50 push %eax
107fd8: 8d 55 bc lea -0x44(%ebp),%edx
107fdb: 52 push %edx
107fdc: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax
107fe2: 50 push %eax
107fe3: e8 0c 88 00 00 call 1107f4 <IMFS_evaluate_for_make>
107fe8: 83 c4 10 add $0x10,%esp
107feb: 85 c0 test %eax,%eax
107fed: 74 1d je 10800c <rtems_tarfs_load+0x208>
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
107fef: 8b 85 4c fe ff ff mov -0x1b4(%ebp),%eax
107ff5: 05 ff 01 00 00 add $0x1ff,%eax
offset += 512 * nblocks;
107ffa: 25 00 fe ff ff and $0xfffffe00,%eax
107fff: 01 85 54 fe ff ff add %eax,-0x1ac(%ebp)
108005: e9 73 fe ff ff jmp 107e7d <rtems_tarfs_load+0x79>
10800a: 66 90 xchg %ax,%ax
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
10800c: 83 ec 0c sub $0xc,%esp
10800f: 6a 00 push $0x0
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
108011: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax
108017: 25 ff 01 00 00 and $0x1ff,%eax
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
10801c: 80 cc 80 or $0x80,%ah
10801f: 50 push %eax
108020: ff 75 e4 pushl -0x1c(%ebp)
108023: 6a 06 push $0x6
108025: 8d 55 bc lea -0x44(%ebp),%edx
108028: 52 push %edx
108029: e8 ce 81 00 00 call 1101fc <IMFS_create_node>
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
10802e: 8b 95 4c fe ff ff mov -0x1b4(%ebp),%edx
108034: 89 50 50 mov %edx,0x50(%eax)
108037: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = &tar_image[offset];
10803e: 8b 55 0c mov 0xc(%ebp),%edx
108041: 03 95 54 fe ff ff add -0x1ac(%ebp),%edx
108047: 89 50 58 mov %edx,0x58(%eax)
10804a: 83 c4 20 add $0x20,%esp
10804d: eb a0 jmp 107fef <rtems_tarfs_load+0x1eb>
0010b84c <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
rtems_id *id
)
{
10b84c: 55 push %ebp
10b84d: 89 e5 mov %esp,%ebp
10b84f: 57 push %edi
10b850: 56 push %esi
10b851: 53 push %ebx
10b852: 83 ec 1c sub $0x1c,%esp
10b855: 8b 5d 08 mov 0x8(%ebp),%ebx
10b858: 8b 7d 0c mov 0xc(%ebp),%edi
10b85b: 8b 75 1c mov 0x1c(%ebp),%esi
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10b85e: 85 f6 test %esi,%esi
10b860: 0f 84 3e 01 00 00 je 10b9a4 <rtems_task_create+0x158>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10b866: 85 db test %ebx,%ebx
10b868: 0f 84 d2 00 00 00 je 10b940 <rtems_task_create+0xf4>
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
10b86e: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp)
10b875: 75 17 jne 10b88e <rtems_task_create+0x42>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10b877: 85 ff test %edi,%edi
10b879: 0f 84 b1 00 00 00 je 10b930 <rtems_task_create+0xe4>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10b87f: 0f b6 05 74 32 12 00 movzbl 0x123274,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10b886: 39 c7 cmp %eax,%edi
10b888: 0f 87 a2 00 00 00 ja 10b930 <rtems_task_create+0xe4>
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10b88e: 83 ec 0c sub $0xc,%esp
10b891: ff 35 3c 76 12 00 pushl 0x12763c
10b897: e8 c8 06 00 00 call 10bf64 <_API_Mutex_Lock>
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
10b89c: c7 04 24 e0 74 12 00 movl $0x1274e0,(%esp)
10b8a3: e8 e8 10 00 00 call 10c990 <_Objects_Allocate>
10b8a8: 89 c2 mov %eax,%edx
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
10b8aa: 83 c4 10 add $0x10,%esp
10b8ad: 85 c0 test %eax,%eax
10b8af: 0f 84 cf 00 00 00 je 10b984 <rtems_task_create+0x138>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
10b8b5: 50 push %eax
10b8b6: 53 push %ebx
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
10b8b7: 8b 45 14 mov 0x14(%ebp),%eax
10b8ba: 83 e0 01 and $0x1,%eax
10b8bd: 50 push %eax
10b8be: 6a 00 push $0x0
10b8c0: 31 c0 xor %eax,%eax
10b8c2: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp)
10b8c9: 0f 95 c0 setne %al
10b8cc: 50 push %eax
10b8cd: 31 c0 xor %eax,%eax
10b8cf: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp)
10b8d6: 0f 94 c0 sete %al
10b8d9: 50 push %eax
10b8da: 57 push %edi
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point(
rtems_attribute attribute_set
)
{
return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false;
10b8db: 8b 45 18 mov 0x18(%ebp),%eax
10b8de: 83 e0 01 and $0x1,%eax
10b8e1: 50 push %eax
10b8e2: ff 75 10 pushl 0x10(%ebp)
10b8e5: 6a 00 push $0x0
10b8e7: 52 push %edx
10b8e8: 68 e0 74 12 00 push $0x1274e0
10b8ed: 89 55 e4 mov %edx,-0x1c(%ebp)
10b8f0: e8 9f 20 00 00 call 10d994 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
10b8f5: 83 c4 30 add $0x30,%esp
10b8f8: 84 c0 test %al,%al
10b8fa: 8b 55 e4 mov -0x1c(%ebp),%edx
10b8fd: 74 51 je 10b950 <rtems_task_create+0x104>
_RTEMS_Unlock_allocator();
return RTEMS_UNSATISFIED;
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
10b8ff: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax
* id - thread id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_task_create(
10b905: f7 45 14 00 04 00 00 testl $0x400,0x14(%ebp)
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
10b90c: 0f 94 40 08 sete 0x8(%eax)
*id = the_thread->Object.id;
10b910: 8b 42 08 mov 0x8(%edx),%eax
10b913: 89 06 mov %eax,(%esi)
);
}
#endif
_RTEMS_Unlock_allocator();
10b915: 83 ec 0c sub $0xc,%esp
10b918: ff 35 3c 76 12 00 pushl 0x12763c
10b91e: e8 89 06 00 00 call 10bfac <_API_Mutex_Unlock>
return RTEMS_SUCCESSFUL;
10b923: 83 c4 10 add $0x10,%esp
10b926: 31 c0 xor %eax,%eax
}
10b928: 8d 65 f4 lea -0xc(%ebp),%esp
10b92b: 5b pop %ebx
10b92c: 5e pop %esi
10b92d: 5f pop %edi
10b92e: c9 leave
10b92f: c3 ret
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) )
return RTEMS_INVALID_PRIORITY;
10b930: b8 13 00 00 00 mov $0x13,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b935: 8d 65 f4 lea -0xc(%ebp),%esp
10b938: 5b pop %ebx
10b939: 5e pop %esi
10b93a: 5f pop %edi
10b93b: c9 leave
10b93c: c3 ret
10b93d: 8d 76 00 lea 0x0(%esi),%esi
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10b940: b8 03 00 00 00 mov $0x3,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b945: 8d 65 f4 lea -0xc(%ebp),%esp
10b948: 5b pop %ebx
10b949: 5e pop %esi
10b94a: 5f pop %edi
10b94b: c9 leave
10b94c: c3 ret
10b94d: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
10b950: 83 ec 0c sub $0xc,%esp
10b953: ff 72 08 pushl 0x8(%edx)
10b956: e8 1d 14 00 00 call 10cd78 <_Objects_Get_information_id>
10b95b: 5a pop %edx
10b95c: 59 pop %ecx
10b95d: 8b 55 e4 mov -0x1c(%ebp),%edx
10b960: 52 push %edx
10b961: 50 push %eax
10b962: e8 a1 13 00 00 call 10cd08 <_Objects_Free>
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10b967: 58 pop %eax
10b968: ff 35 3c 76 12 00 pushl 0x12763c
10b96e: e8 39 06 00 00 call 10bfac <_API_Mutex_Unlock>
return RTEMS_UNSATISFIED;
10b973: 83 c4 10 add $0x10,%esp
10b976: b8 0d 00 00 00 mov $0xd,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b97b: 8d 65 f4 lea -0xc(%ebp),%esp
10b97e: 5b pop %ebx
10b97f: 5e pop %esi
10b980: 5f pop %edi
10b981: c9 leave
10b982: c3 ret
10b983: 90 nop
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10b984: 83 ec 0c sub $0xc,%esp
10b987: ff 35 3c 76 12 00 pushl 0x12763c
10b98d: e8 1a 06 00 00 call 10bfac <_API_Mutex_Unlock>
return RTEMS_TOO_MANY;
10b992: 83 c4 10 add $0x10,%esp
10b995: b8 05 00 00 00 mov $0x5,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b99a: 8d 65 f4 lea -0xc(%ebp),%esp
10b99d: 5b pop %ebx
10b99e: 5e pop %esi
10b99f: 5f pop %edi
10b9a0: c9 leave
10b9a1: c3 ret
10b9a2: 66 90 xchg %ax,%ax
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10b9a4: b8 09 00 00 00 mov $0x9,%eax
10b9a9: eb 8a jmp 10b935 <rtems_task_create+0xe9>
0010b9ac <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
10b9ac: 55 push %ebp
10b9ad: 89 e5 mov %esp,%ebp
10b9af: 53 push %ebx
10b9b0: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
10b9b3: ff 35 3c 76 12 00 pushl 0x12763c
10b9b9: e8 a6 05 00 00 call 10bf64 <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
10b9be: 5a pop %edx
10b9bf: 59 pop %ecx
10b9c0: 8d 45 f4 lea -0xc(%ebp),%eax
10b9c3: 50 push %eax
10b9c4: ff 75 08 pushl 0x8(%ebp)
10b9c7: e8 54 1f 00 00 call 10d920 <_Thread_Get>
10b9cc: 89 c3 mov %eax,%ebx
switch ( location ) {
10b9ce: 83 c4 10 add $0x10,%esp
10b9d1: 8b 45 f4 mov -0xc(%ebp),%eax
10b9d4: 85 c0 test %eax,%eax
10b9d6: 75 44 jne 10ba1c <rtems_task_delete+0x70>
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
10b9d8: 83 ec 0c sub $0xc,%esp
10b9db: ff 73 08 pushl 0x8(%ebx)
10b9de: e8 95 13 00 00 call 10cd78 <_Objects_Get_information_id>
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
10b9e3: 5a pop %edx
10b9e4: 59 pop %ecx
10b9e5: 53 push %ebx
10b9e6: 50 push %eax
10b9e7: e8 d0 1b 00 00 call 10d5bc <_Thread_Close>
10b9ec: 58 pop %eax
10b9ed: ff 73 08 pushl 0x8(%ebx)
10b9f0: e8 83 13 00 00 call 10cd78 <_Objects_Get_information_id>
10b9f5: 5a pop %edx
10b9f6: 59 pop %ecx
10b9f7: 53 push %ebx
10b9f8: 50 push %eax
10b9f9: e8 0a 13 00 00 call 10cd08 <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10b9fe: 58 pop %eax
10b9ff: ff 35 3c 76 12 00 pushl 0x12763c
10ba05: e8 a2 05 00 00 call 10bfac <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
10ba0a: e8 ed 1e 00 00 call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ba0f: 83 c4 10 add $0x10,%esp
10ba12: 31 c0 xor %eax,%eax
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
10ba14: 8b 5d fc mov -0x4(%ebp),%ebx
10ba17: c9 leave
10ba18: c3 ret
10ba19: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
10ba1c: 83 ec 0c sub $0xc,%esp
10ba1f: ff 35 3c 76 12 00 pushl 0x12763c
10ba25: e8 82 05 00 00 call 10bfac <_API_Mutex_Unlock>
return RTEMS_INVALID_ID;
10ba2a: 83 c4 10 add $0x10,%esp
10ba2d: b8 04 00 00 00 mov $0x4,%eax
}
10ba32: 8b 5d fc mov -0x4(%ebp),%ebx
10ba35: c9 leave
10ba36: c3 ret
0010d4d0 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
10d4d0: 55 push %ebp
10d4d1: 89 e5 mov %esp,%ebp
10d4d3: 56 push %esi
10d4d4: 53 push %ebx
10d4d5: 83 ec 10 sub $0x10,%esp
10d4d8: 8b 45 08 mov 0x8(%ebp),%eax
10d4db: 8b 75 0c mov 0xc(%ebp),%esi
10d4de: 8b 5d 10 mov 0x10(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10d4e1: 80 3d e4 61 12 00 00 cmpb $0x0,0x1261e4
10d4e8: 74 6e je 10d558 <rtems_task_get_note+0x88>
return RTEMS_NOT_CONFIGURED;
if ( !note )
10d4ea: 85 db test %ebx,%ebx
10d4ec: 74 7e je 10d56c <rtems_task_get_note+0x9c><== NEVER TAKEN
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10d4ee: 83 fe 0f cmp $0xf,%esi
10d4f1: 77 3d ja 10d530 <rtems_task_get_note+0x60><== NEVER TAKEN
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d4f3: 85 c0 test %eax,%eax
10d4f5: 74 45 je 10d53c <rtems_task_get_note+0x6c>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10d4f7: 8b 15 f8 ad 12 00 mov 0x12adf8,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d4fd: 3b 42 08 cmp 0x8(%edx),%eax
10d500: 74 40 je 10d542 <rtems_task_get_note+0x72>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10d502: 83 ec 08 sub $0x8,%esp
10d505: 8d 55 f4 lea -0xc(%ebp),%edx
10d508: 52 push %edx
10d509: 50 push %eax
10d50a: e8 45 22 00 00 call 10f754 <_Thread_Get>
switch ( location ) {
10d50f: 83 c4 10 add $0x10,%esp
10d512: 8b 55 f4 mov -0xc(%ebp),%edx
10d515: 85 d2 test %edx,%edx
10d517: 75 4b jne 10d564 <rtems_task_get_note+0x94>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10d519: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
10d51f: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10d523: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10d525: e8 06 22 00 00 call 10f730 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d52a: 31 c0 xor %eax,%eax
10d52c: eb 07 jmp 10d535 <rtems_task_get_note+0x65>
10d52e: 66 90 xchg %ax,%ax
* 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 )
return RTEMS_INVALID_NUMBER;
10d530: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d535: 8d 65 f8 lea -0x8(%ebp),%esp
10d538: 5b pop %ebx
10d539: 5e pop %esi
10d53a: c9 leave
10d53b: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d53c: 8b 15 f8 ad 12 00 mov 0x12adf8,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10d542: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax
10d548: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10d54c: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
10d54e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d550: 8d 65 f8 lea -0x8(%ebp),%esp
10d553: 5b pop %ebx
10d554: 5e pop %esi
10d555: c9 leave
10d556: c3 ret
10d557: 90 nop
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
10d558: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d55d: 8d 65 f8 lea -0x8(%ebp),%esp
10d560: 5b pop %ebx
10d561: 5e pop %esi
10d562: c9 leave
10d563: c3 ret
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d564: b8 04 00 00 00 mov $0x4,%eax
10d569: eb ca jmp 10d535 <rtems_task_get_note+0x65>
10d56b: 90 nop
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
return RTEMS_INVALID_ADDRESS;
10d56c: b8 09 00 00 00 mov $0x9,%eax
10d571: eb c2 jmp 10d535 <rtems_task_get_note+0x65>
00118130 <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
118130: 55 push %ebp
118131: 89 e5 mov %esp,%ebp
118133: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
118136: 8d 45 f4 lea -0xc(%ebp),%eax
118139: 50 push %eax
11813a: ff 75 08 pushl 0x8(%ebp)
11813d: e8 5e 3c 00 00 call 11bda0 <_Thread_Get>
switch ( location ) {
118142: 83 c4 10 add $0x10,%esp
118145: 8b 55 f4 mov -0xc(%ebp),%edx
118148: 85 d2 test %edx,%edx
11814a: 74 08 je 118154 <rtems_task_is_suspended+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11814c: b8 04 00 00 00 mov $0x4,%eax
}
118151: c9 leave
118152: c3 ret
118153: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
118154: f6 40 10 02 testb $0x2,0x10(%eax)
118158: 74 0e je 118168 <rtems_task_is_suspended+0x38><== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
11815a: e8 1d 3c 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
11815f: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118164: c9 leave
118165: c3 ret
118166: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
118168: e8 0f 3c 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11816d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11816f: c9 leave
118170: c3 ret
00112eb4 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
112eb4: 55 push %ebp
112eb5: 89 e5 mov %esp,%ebp
112eb7: 57 push %edi
112eb8: 56 push %esi
112eb9: 53 push %ebx
112eba: 83 ec 1c sub $0x1c,%esp
112ebd: 8b 4d 10 mov 0x10(%ebp),%ecx
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
112ec0: 85 c9 test %ecx,%ecx
112ec2: 0f 84 40 01 00 00 je 113008 <rtems_task_mode+0x154>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
112ec8: 8b 1d 38 7b 12 00 mov 0x127b38,%ebx
api = executing->API_Extensions[ THREAD_API_RTEMS ];
112ece: 8b bb e8 00 00 00 mov 0xe8(%ebx),%edi
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
112ed4: 80 7b 74 01 cmpb $0x1,0x74(%ebx)
112ed8: 19 f6 sbb %esi,%esi
112eda: 81 e6 00 01 00 00 and $0x100,%esi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
112ee0: 8b 53 7c mov 0x7c(%ebx),%edx
112ee3: 85 d2 test %edx,%edx
112ee5: 0f 85 f1 00 00 00 jne 112fdc <rtems_task_mode+0x128>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
112eeb: 80 7f 08 01 cmpb $0x1,0x8(%edi)
112eef: 19 d2 sbb %edx,%edx
112ef1: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= _ISR_Get_level();
112ef7: 89 55 e4 mov %edx,-0x1c(%ebp)
112efa: 89 4d e0 mov %ecx,-0x20(%ebp)
112efd: e8 5a be ff ff call 10ed5c <_CPU_ISR_Get_level>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
112f02: 8b 55 e4 mov -0x1c(%ebp),%edx
112f05: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
112f07: 09 f0 or %esi,%eax
112f09: 8b 4d e0 mov -0x20(%ebp),%ecx
112f0c: 89 01 mov %eax,(%ecx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
112f0e: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
112f15: 74 0b je 112f22 <rtems_task_mode+0x6e>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
112f17: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp)
112f1e: 0f 94 43 74 sete 0x74(%ebx)
if ( mask & RTEMS_TIMESLICE_MASK ) {
112f22: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
112f29: 74 1c je 112f47 <rtems_task_mode+0x93>
if ( _Modes_Is_timeslice(mode_set) ) {
112f2b: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
112f32: 0f 84 b8 00 00 00 je 112ff0 <rtems_task_mode+0x13c>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
112f38: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
112f3f: a1 20 75 12 00 mov 0x127520,%eax
112f44: 89 43 78 mov %eax,0x78(%ebx)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
112f47: f6 45 0c 01 testb $0x1,0xc(%ebp)
112f4b: 74 0b je 112f58 <rtems_task_mode+0xa4>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
112f4d: f6 45 08 01 testb $0x1,0x8(%ebp)
112f51: 0f 84 91 00 00 00 je 112fe8 <rtems_task_mode+0x134>
112f57: fa cli
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
112f58: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
112f5f: 74 3f je 112fa0 <rtems_task_mode+0xec>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
112f61: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp)
112f68: 0f 94 c0 sete %al
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
112f6b: 38 47 08 cmp %al,0x8(%edi)
112f6e: 74 30 je 112fa0 <rtems_task_mode+0xec>
asr->is_enabled = is_asr_enabled;
112f70: 88 47 08 mov %al,0x8(%edi)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
112f73: 9c pushf
112f74: fa cli
112f75: 58 pop %eax
_signals = information->signals_pending;
112f76: 8b 57 18 mov 0x18(%edi),%edx
information->signals_pending = information->signals_posted;
112f79: 8b 4f 14 mov 0x14(%edi),%ecx
112f7c: 89 4f 18 mov %ecx,0x18(%edi)
information->signals_posted = _signals;
112f7f: 89 57 14 mov %edx,0x14(%edi)
_ISR_Enable( _level );
112f82: 50 push %eax
112f83: 9d popf
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
112f84: 8b 47 14 mov 0x14(%edi),%eax
112f87: 85 c0 test %eax,%eax
112f89: 0f 95 c0 setne %al
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
112f8c: 83 3d 20 77 12 00 03 cmpl $0x3,0x127720
112f93: 74 16 je 112fab <rtems_task_mode+0xf7> <== ALWAYS TAKEN
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
112f95: 31 c0 xor %eax,%eax
}
112f97: 83 c4 1c add $0x1c,%esp
112f9a: 5b pop %ebx
112f9b: 5e pop %esi
112f9c: 5f pop %edi
112f9d: c9 leave
112f9e: c3 ret
112f9f: 90 nop
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
112fa0: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
112fa2: 83 3d 20 77 12 00 03 cmpl $0x3,0x127720
112fa9: 75 ea jne 112f95 <rtems_task_mode+0xe1> <== NEVER TAKEN
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
112fab: 8b 15 38 7b 12 00 mov 0x127b38,%edx
if ( are_signals_pending ||
112fb1: 84 c0 test %al,%al
112fb3: 75 0e jne 112fc3 <rtems_task_mode+0x10f>
112fb5: 3b 15 3c 7b 12 00 cmp 0x127b3c,%edx
112fbb: 74 d8 je 112f95 <rtems_task_mode+0xe1>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
112fbd: 80 7a 74 00 cmpb $0x0,0x74(%edx)
112fc1: 74 d2 je 112f95 <rtems_task_mode+0xe1> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
112fc3: c6 05 44 7b 12 00 01 movb $0x1,0x127b44
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
112fca: e8 b5 a7 ff ff call 10d784 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
112fcf: 31 c0 xor %eax,%eax
}
112fd1: 83 c4 1c add $0x1c,%esp
112fd4: 5b pop %ebx
112fd5: 5e pop %esi
112fd6: 5f pop %edi
112fd7: c9 leave
112fd8: c3 ret
112fd9: 8d 76 00 lea 0x0(%esi),%esi
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
112fdc: 81 ce 00 02 00 00 or $0x200,%esi
112fe2: e9 04 ff ff ff jmp 112eeb <rtems_task_mode+0x37>
112fe7: 90 nop
112fe8: fb sti
112fe9: e9 6a ff ff ff jmp 112f58 <rtems_task_mode+0xa4>
112fee: 66 90 xchg %ax,%ax
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
112ff0: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
112ff7: f6 45 0c 01 testb $0x1,0xc(%ebp)
112ffb: 0f 84 57 ff ff ff je 112f58 <rtems_task_mode+0xa4>
113001: e9 47 ff ff ff jmp 112f4d <rtems_task_mode+0x99>
113006: 66 90 xchg %ax,%ax
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
113008: b8 09 00 00 00 mov $0x9,%eax
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
11300d: 83 c4 1c add $0x1c,%esp
113010: 5b pop %ebx
113011: 5e pop %esi
113012: 5f pop %edi
113013: c9 leave
113014: c3 ret
0010ecb8 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
rtems_id id
)
{
10ecb8: 55 push %ebp
10ecb9: 89 e5 mov %esp,%ebp
10ecbb: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ecbe: 8d 45 f4 lea -0xc(%ebp),%eax
10ecc1: 50 push %eax
10ecc2: ff 75 08 pushl 0x8(%ebp)
10ecc5: e8 6a 1f 00 00 call 110c34 <_Thread_Get>
switch ( location ) {
10ecca: 83 c4 10 add $0x10,%esp
10eccd: 8b 55 f4 mov -0xc(%ebp),%edx
10ecd0: 85 d2 test %edx,%edx
10ecd2: 74 08 je 10ecdc <rtems_task_resume+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10ecd4: b8 04 00 00 00 mov $0x4,%eax
}
10ecd9: c9 leave
10ecda: c3 ret
10ecdb: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
10ecdc: f6 40 10 02 testb $0x2,0x10(%eax)
10ece0: 75 0e jne 10ecf0 <rtems_task_resume+0x38>
_Thread_Resume( the_thread, true );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10ece2: e8 29 1f 00 00 call 110c10 <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
10ece7: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ecec: c9 leave
10eced: c3 ret
10ecee: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
_Thread_Resume( the_thread, true );
10ecf0: 83 ec 08 sub $0x8,%esp
10ecf3: 6a 01 push $0x1
10ecf5: 50 push %eax
10ecf6: e8 55 27 00 00 call 111450 <_Thread_Resume>
_Thread_Enable_dispatch();
10ecfb: e8 10 1f 00 00 call 110c10 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ed00: 83 c4 10 add $0x10,%esp
10ed03: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ed05: c9 leave
10ed06: c3 ret
0010d648 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
10d648: 55 push %ebp
10d649: 89 e5 mov %esp,%ebp
10d64b: 56 push %esi
10d64c: 53 push %ebx
10d64d: 83 ec 10 sub $0x10,%esp
10d650: 8b 45 08 mov 0x8(%ebp),%eax
10d653: 8b 5d 0c mov 0xc(%ebp),%ebx
10d656: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10d659: 80 3d e4 61 12 00 00 cmpb $0x0,0x1261e4
10d660: 74 66 je 10d6c8 <rtems_task_set_note+0x80>
/*
* 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 )
10d662: 83 fb 0f cmp $0xf,%ebx
10d665: 77 39 ja 10d6a0 <rtems_task_set_note+0x58>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d667: 85 c0 test %eax,%eax
10d669: 74 41 je 10d6ac <rtems_task_set_note+0x64>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10d66b: 8b 15 f8 ad 12 00 mov 0x12adf8,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d671: 3b 42 08 cmp 0x8(%edx),%eax
10d674: 74 3c je 10d6b2 <rtems_task_set_note+0x6a>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10d676: 83 ec 08 sub $0x8,%esp
10d679: 8d 55 f4 lea -0xc(%ebp),%edx
10d67c: 52 push %edx
10d67d: 50 push %eax
10d67e: e8 d1 20 00 00 call 10f754 <_Thread_Get>
switch ( location ) {
10d683: 83 c4 10 add $0x10,%esp
10d686: 8b 55 f4 mov -0xc(%ebp),%edx
10d689: 85 d2 test %edx,%edx
10d68b: 75 47 jne 10d6d4 <rtems_task_set_note+0x8c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10d68d: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
10d693: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
_Thread_Enable_dispatch();
10d697: e8 94 20 00 00 call 10f730 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d69c: 31 c0 xor %eax,%eax
10d69e: eb 05 jmp 10d6a5 <rtems_task_set_note+0x5d>
* 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 )
return RTEMS_INVALID_NUMBER;
10d6a0: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d6a5: 8d 65 f8 lea -0x8(%ebp),%esp
10d6a8: 5b pop %ebx
10d6a9: 5e pop %esi
10d6aa: c9 leave
10d6ab: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d6ac: 8b 15 f8 ad 12 00 mov 0x12adf8,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10d6b2: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax
10d6b8: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
return RTEMS_SUCCESSFUL;
10d6bc: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d6be: 8d 65 f8 lea -0x8(%ebp),%esp
10d6c1: 5b pop %ebx
10d6c2: 5e pop %esi
10d6c3: c9 leave
10d6c4: c3 ret
10d6c5: 8d 76 00 lea 0x0(%esi),%esi
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
10d6c8: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d6cd: 8d 65 f8 lea -0x8(%ebp),%esp
10d6d0: 5b pop %ebx
10d6d1: 5e pop %esi
10d6d2: c9 leave
10d6d3: c3 ret
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d6d4: b8 04 00 00 00 mov $0x4,%eax
}
10d6d9: 8d 65 f8 lea -0x8(%ebp),%esp
10d6dc: 5b pop %ebx
10d6dd: 5e pop %esi
10d6de: c9 leave
10d6df: c3 ret
0010f98c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10f98c: 55 push %ebp
10f98d: 89 e5 mov %esp,%ebp
10f98f: 56 push %esi
10f990: 53 push %ebx
10f991: 83 ec 10 sub $0x10,%esp
10f994: 8b 5d 0c mov 0xc(%ebp),%ebx
10f997: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10f99a: 85 db test %ebx,%ebx
10f99c: 74 0b je 10f9a9 <rtems_task_set_priority+0x1d>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10f99e: 0f b6 05 34 72 12 00 movzbl 0x127234,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10f9a5: 39 c3 cmp %eax,%ebx
10f9a7: 77 5f ja 10fa08 <rtems_task_set_priority+0x7c>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10f9a9: 85 f6 test %esi,%esi
10f9ab: 74 67 je 10fa14 <rtems_task_set_priority+0x88>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10f9ad: 83 ec 08 sub $0x8,%esp
10f9b0: 8d 45 f4 lea -0xc(%ebp),%eax
10f9b3: 50 push %eax
10f9b4: ff 75 08 pushl 0x8(%ebp)
10f9b7: e8 c8 20 00 00 call 111a84 <_Thread_Get>
switch ( location ) {
10f9bc: 83 c4 10 add $0x10,%esp
10f9bf: 8b 55 f4 mov -0xc(%ebp),%edx
10f9c2: 85 d2 test %edx,%edx
10f9c4: 75 36 jne 10f9fc <rtems_task_set_priority+0x70>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10f9c6: 8b 50 14 mov 0x14(%eax),%edx
10f9c9: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10f9cb: 85 db test %ebx,%ebx
10f9cd: 74 1c je 10f9eb <rtems_task_set_priority+0x5f>
the_thread->real_priority = new_priority;
10f9cf: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10f9d2: 8b 48 1c mov 0x1c(%eax),%ecx
10f9d5: 85 c9 test %ecx,%ecx
10f9d7: 74 05 je 10f9de <rtems_task_set_priority+0x52>
10f9d9: 3b 58 14 cmp 0x14(%eax),%ebx
10f9dc: 73 0d jae 10f9eb <rtems_task_set_priority+0x5f><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10f9de: 52 push %edx
10f9df: 6a 00 push $0x0
10f9e1: 53 push %ebx
10f9e2: 50 push %eax
10f9e3: e8 c4 1b 00 00 call 1115ac <_Thread_Change_priority>
10f9e8: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10f9eb: e8 70 20 00 00 call 111a60 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10f9f0: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10f9f2: 8d 65 f8 lea -0x8(%ebp),%esp
10f9f5: 5b pop %ebx
10f9f6: 5e pop %esi
10f9f7: c9 leave
10f9f8: c3 ret
10f9f9: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10f9fc: b8 04 00 00 00 mov $0x4,%eax
}
10fa01: 8d 65 f8 lea -0x8(%ebp),%esp
10fa04: 5b pop %ebx
10fa05: 5e pop %esi
10fa06: c9 leave
10fa07: c3 ret
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10fa08: b8 13 00 00 00 mov $0x13,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa0d: 8d 65 f8 lea -0x8(%ebp),%esp
10fa10: 5b pop %ebx
10fa11: 5e pop %esi
10fa12: c9 leave
10fa13: c3 ret
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10fa14: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa19: 8d 65 f8 lea -0x8(%ebp),%esp
10fa1c: 5b pop %ebx
10fa1d: 5e pop %esi
10fa1e: c9 leave
10fa1f: c3 ret
0010baf4 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
10baf4: 55 push %ebp
10baf5: 89 e5 mov %esp,%ebp
10baf7: 53 push %ebx
10baf8: 83 ec 14 sub $0x14,%esp
10bafb: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10bafe: 85 db test %ebx,%ebx
10bb00: 74 4e je 10bb50 <rtems_task_start+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10bb02: 83 ec 08 sub $0x8,%esp
10bb05: 8d 45 f4 lea -0xc(%ebp),%eax
10bb08: 50 push %eax
10bb09: ff 75 08 pushl 0x8(%ebp)
10bb0c: e8 0f 1e 00 00 call 10d920 <_Thread_Get>
switch ( location ) {
10bb11: 83 c4 10 add $0x10,%esp
10bb14: 8b 55 f4 mov -0xc(%ebp),%edx
10bb17: 85 d2 test %edx,%edx
10bb19: 75 29 jne 10bb44 <rtems_task_start+0x50>
case OBJECTS_LOCAL:
if ( _Thread_Start(
10bb1b: 83 ec 0c sub $0xc,%esp
10bb1e: ff 75 10 pushl 0x10(%ebp)
10bb21: 6a 00 push $0x0
10bb23: 53 push %ebx
10bb24: 6a 00 push $0x0
10bb26: 50 push %eax
10bb27: e8 e0 27 00 00 call 10e30c <_Thread_Start>
10bb2c: 83 c4 20 add $0x20,%esp
10bb2f: 84 c0 test %al,%al
10bb31: 75 29 jne 10bb5c <rtems_task_start+0x68>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10bb33: e8 c4 1d 00 00 call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
10bb38: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bb3d: 8b 5d fc mov -0x4(%ebp),%ebx
10bb40: c9 leave
10bb41: c3 ret
10bb42: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10bb44: b8 04 00 00 00 mov $0x4,%eax
}
10bb49: 8b 5d fc mov -0x4(%ebp),%ebx
10bb4c: c9 leave
10bb4d: c3 ret
10bb4e: 66 90 xchg %ax,%ax
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
10bb50: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bb55: 8b 5d fc mov -0x4(%ebp),%ebx
10bb58: c9 leave
10bb59: c3 ret
10bb5a: 66 90 xchg %ax,%ax
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
10bb5c: e8 9b 1d 00 00 call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10bb61: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bb63: 8b 5d fc mov -0x4(%ebp),%ebx
10bb66: c9 leave
10bb67: c3 ret
00110f40 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
110f40: 55 push %ebp
110f41: 89 e5 mov %esp,%ebp
110f43: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
110f46: 8d 45 f4 lea -0xc(%ebp),%eax
110f49: 50 push %eax
110f4a: ff 75 08 pushl 0x8(%ebp)
110f4d: e8 ce c9 ff ff call 10d920 <_Thread_Get>
switch ( location ) {
110f52: 83 c4 10 add $0x10,%esp
110f55: 8b 55 f4 mov -0xc(%ebp),%edx
110f58: 85 d2 test %edx,%edx
110f5a: 74 08 je 110f64 <rtems_task_suspend+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
110f5c: b8 04 00 00 00 mov $0x4,%eax
}
110f61: c9 leave
110f62: c3 ret
110f63: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
110f64: f6 40 10 02 testb $0x2,0x10(%eax)
110f68: 74 0e je 110f78 <rtems_task_suspend+0x38>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
110f6a: e8 8d c9 ff ff call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
110f6f: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110f74: c9 leave
110f75: c3 ret
110f76: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Suspend( the_thread );
110f78: 83 ec 0c sub $0xc,%esp
110f7b: 50 push %eax
110f7c: e8 ff 09 00 00 call 111980 <_Thread_Suspend>
_Thread_Enable_dispatch();
110f81: e8 76 c9 ff ff call 10d8fc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
110f86: 83 c4 10 add $0x10,%esp
110f89: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110f8b: c9 leave
110f8c: c3 ret
0010c650 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
10c650: 55 push %ebp
10c651: 89 e5 mov %esp,%ebp
10c653: 57 push %edi
10c654: 56 push %esi
10c655: 53 push %ebx
10c656: 83 ec 1c sub $0x1c,%esp
10c659: 8b 5d 0c mov 0xc(%ebp),%ebx
10c65c: 8b 7d 10 mov 0x10(%ebp),%edi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
10c65f: 85 db test %ebx,%ebx
10c661: 0f 84 9d 00 00 00 je 10c704 <rtems_task_variable_add+0xb4>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10c667: 83 ec 08 sub $0x8,%esp
10c66a: 8d 45 e4 lea -0x1c(%ebp),%eax
10c66d: 50 push %eax
10c66e: ff 75 08 pushl 0x8(%ebp)
10c671: e8 ba 1f 00 00 call 10e630 <_Thread_Get>
10c676: 89 c6 mov %eax,%esi
switch (location) {
10c678: 83 c4 10 add $0x10,%esp
10c67b: 8b 45 e4 mov -0x1c(%ebp),%eax
10c67e: 85 c0 test %eax,%eax
10c680: 74 0e je 10c690 <rtems_task_variable_add+0x40>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c682: b8 04 00 00 00 mov $0x4,%eax
}
10c687: 8d 65 f4 lea -0xc(%ebp),%esp
10c68a: 5b pop %ebx
10c68b: 5e pop %esi
10c68c: 5f pop %edi
10c68d: c9 leave
10c68e: c3 ret
10c68f: 90 nop
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
10c690: 8b 86 f4 00 00 00 mov 0xf4(%esi),%eax
while (tvp) {
10c696: 85 c0 test %eax,%eax
10c698: 75 44 jne 10c6de <rtems_task_variable_add+0x8e>
10c69a: 66 90 xchg %ax,%ax
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
10c69c: 83 ec 0c sub $0xc,%esp
10c69f: 6a 14 push $0x14
10c6a1: e8 ca 2f 00 00 call 10f670 <_Workspace_Allocate>
if (new == NULL) {
10c6a6: 83 c4 10 add $0x10,%esp
10c6a9: 85 c0 test %eax,%eax
10c6ab: 74 4b je 10c6f8 <rtems_task_variable_add+0xa8>
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
10c6ad: 8b 13 mov (%ebx),%edx
10c6af: 89 50 08 mov %edx,0x8(%eax)
new->ptr = ptr;
10c6b2: 89 58 04 mov %ebx,0x4(%eax)
new->dtor = dtor;
10c6b5: 89 78 10 mov %edi,0x10(%eax)
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
10c6b8: 8b 96 f4 00 00 00 mov 0xf4(%esi),%edx
10c6be: 89 10 mov %edx,(%eax)
the_thread->task_variables = new;
10c6c0: 89 86 f4 00 00 00 mov %eax,0xf4(%esi)
_Thread_Enable_dispatch();
10c6c6: e8 41 1f 00 00 call 10e60c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c6cb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c6cd: 8d 65 f4 lea -0xc(%ebp),%esp
10c6d0: 5b pop %ebx
10c6d1: 5e pop %esi
10c6d2: 5f pop %edi
10c6d3: c9 leave
10c6d4: c3 ret
10c6d5: 8d 76 00 lea 0x0(%esi),%esi
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10c6d8: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
10c6da: 85 c0 test %eax,%eax
10c6dc: 74 be je 10c69c <rtems_task_variable_add+0x4c>
if (tvp->ptr == ptr) {
10c6de: 39 58 04 cmp %ebx,0x4(%eax)
10c6e1: 75 f5 jne 10c6d8 <rtems_task_variable_add+0x88>
tvp->dtor = dtor;
10c6e3: 89 78 10 mov %edi,0x10(%eax)
_Thread_Enable_dispatch();
10c6e6: e8 21 1f 00 00 call 10e60c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c6eb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c6ed: 8d 65 f4 lea -0xc(%ebp),%esp
10c6f0: 5b pop %ebx
10c6f1: 5e pop %esi
10c6f2: 5f pop %edi
10c6f3: c9 leave
10c6f4: c3 ret
10c6f5: 8d 76 00 lea 0x0(%esi),%esi
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
10c6f8: e8 0f 1f 00 00 call 10e60c <_Thread_Enable_dispatch>
return RTEMS_NO_MEMORY;
10c6fd: b8 1a 00 00 00 mov $0x1a,%eax
10c702: eb 83 jmp 10c687 <rtems_task_variable_add+0x37>
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
10c704: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c709: 8d 65 f4 lea -0xc(%ebp),%esp
10c70c: 5b pop %ebx
10c70d: 5e pop %esi
10c70e: 5f pop %edi
10c70f: c9 leave
10c710: c3 ret
0010c714 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
10c714: 55 push %ebp
10c715: 89 e5 mov %esp,%ebp
10c717: 53 push %ebx
10c718: 83 ec 14 sub $0x14,%esp
10c71b: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
10c71e: 85 db test %ebx,%ebx
10c720: 74 76 je 10c798 <rtems_task_variable_delete+0x84>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
10c722: 83 ec 08 sub $0x8,%esp
10c725: 8d 45 f4 lea -0xc(%ebp),%eax
10c728: 50 push %eax
10c729: ff 75 08 pushl 0x8(%ebp)
10c72c: e8 ff 1e 00 00 call 10e630 <_Thread_Get>
switch (location) {
10c731: 83 c4 10 add $0x10,%esp
10c734: 8b 55 f4 mov -0xc(%ebp),%edx
10c737: 85 d2 test %edx,%edx
10c739: 74 0d je 10c748 <rtems_task_variable_delete+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c73b: b8 04 00 00 00 mov $0x4,%eax
}
10c740: 8b 5d fc mov -0x4(%ebp),%ebx
10c743: c9 leave
10c744: c3 ret
10c745: 8d 76 00 lea 0x0(%esi),%esi
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
10c748: 8b 88 f4 00 00 00 mov 0xf4(%eax),%ecx
while (tvp) {
10c74e: 85 c9 test %ecx,%ecx
10c750: 74 17 je 10c769 <rtems_task_variable_delete+0x55>
if (tvp->ptr == ptr) {
10c752: 39 59 04 cmp %ebx,0x4(%ecx)
10c755: 75 0c jne 10c763 <rtems_task_variable_delete+0x4f>
10c757: eb 49 jmp 10c7a2 <rtems_task_variable_delete+0x8e>
10c759: 8d 76 00 lea 0x0(%esi),%esi
10c75c: 39 5a 04 cmp %ebx,0x4(%edx)
10c75f: 74 17 je 10c778 <rtems_task_variable_delete+0x64>
10c761: 89 d1 mov %edx,%ecx
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
10c763: 8b 11 mov (%ecx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
10c765: 85 d2 test %edx,%edx
10c767: 75 f3 jne 10c75c <rtems_task_variable_delete+0x48><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10c769: e8 9e 1e 00 00 call 10e60c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
10c76e: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c773: 8b 5d fc mov -0x4(%ebp),%ebx
10c776: c9 leave
10c777: c3 ret
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
10c778: 8b 1a mov (%edx),%ebx
10c77a: 89 19 mov %ebx,(%ecx)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
10c77c: 83 ec 08 sub $0x8,%esp
10c77f: 52 push %edx
10c780: 50 push %eax
10c781: e8 b2 00 00 00 call 10c838 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
10c786: e8 81 1e 00 00 call 10e60c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c78b: 83 c4 10 add $0x10,%esp
10c78e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c790: 8b 5d fc mov -0x4(%ebp),%ebx
10c793: c9 leave
10c794: c3 ret
10c795: 8d 76 00 lea 0x0(%esi),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
10c798: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c79d: 8b 5d fc mov -0x4(%ebp),%ebx
10c7a0: c9 leave
10c7a1: c3 ret
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
10c7a2: 8b 11 mov (%ecx),%edx
10c7a4: 89 90 f4 00 00 00 mov %edx,0xf4(%eax)
10c7aa: 89 ca mov %ecx,%edx
10c7ac: eb ce jmp 10c77c <rtems_task_variable_delete+0x68>
0010c7b0 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
10c7b0: 55 push %ebp
10c7b1: 89 e5 mov %esp,%ebp
10c7b3: 56 push %esi
10c7b4: 53 push %ebx
10c7b5: 83 ec 10 sub $0x10,%esp
10c7b8: 8b 5d 0c mov 0xc(%ebp),%ebx
10c7bb: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
10c7be: 85 db test %ebx,%ebx
10c7c0: 74 56 je 10c818 <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
if ( !result )
10c7c2: 85 f6 test %esi,%esi
10c7c4: 74 52 je 10c818 <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10c7c6: 83 ec 08 sub $0x8,%esp
10c7c9: 8d 45 f4 lea -0xc(%ebp),%eax
10c7cc: 50 push %eax
10c7cd: ff 75 08 pushl 0x8(%ebp)
10c7d0: e8 5b 1e 00 00 call 10e630 <_Thread_Get>
switch (location) {
10c7d5: 83 c4 10 add $0x10,%esp
10c7d8: 8b 55 f4 mov -0xc(%ebp),%edx
10c7db: 85 d2 test %edx,%edx
10c7dd: 75 2d jne 10c80c <rtems_task_variable_get+0x5c>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
10c7df: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
while (tvp) {
10c7e5: 85 c0 test %eax,%eax
10c7e7: 75 09 jne 10c7f2 <rtems_task_variable_get+0x42>
10c7e9: eb 39 jmp 10c824 <rtems_task_variable_get+0x74>
10c7eb: 90 nop
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10c7ec: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
10c7ee: 85 c0 test %eax,%eax
10c7f0: 74 32 je 10c824 <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
10c7f2: 39 58 04 cmp %ebx,0x4(%eax)
10c7f5: 75 f5 jne 10c7ec <rtems_task_variable_get+0x3c>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
10c7f7: 8b 40 0c mov 0xc(%eax),%eax
10c7fa: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10c7fc: e8 0b 1e 00 00 call 10e60c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c801: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c803: 8d 65 f8 lea -0x8(%ebp),%esp
10c806: 5b pop %ebx
10c807: 5e pop %esi
10c808: c9 leave
10c809: c3 ret
10c80a: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c80c: b8 04 00 00 00 mov $0x4,%eax
}
10c811: 8d 65 f8 lea -0x8(%ebp),%esp
10c814: 5b pop %ebx
10c815: 5e pop %esi
10c816: c9 leave
10c817: c3 ret
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
10c818: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c81d: 8d 65 f8 lea -0x8(%ebp),%esp
10c820: 5b pop %ebx
10c821: 5e pop %esi
10c822: c9 leave
10c823: c3 ret
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10c824: e8 e3 1d 00 00 call 10e60c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
10c829: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c82e: 8d 65 f8 lea -0x8(%ebp),%esp
10c831: 5b pop %ebx
10c832: 5e pop %esi
10c833: c9 leave
10c834: c3 ret
0010c9b8 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
10c9b8: 55 push %ebp
10c9b9: 89 e5 mov %esp,%ebp
10c9bb: 53 push %ebx
10c9bc: 83 ec 14 sub $0x14,%esp
10c9bf: 8b 5d 08 mov 0x8(%ebp),%ebx
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10c9c2: 80 3d 84 a2 12 00 00 cmpb $0x0,0x12a284
10c9c9: 0f 84 a9 00 00 00 je 10ca78 <rtems_task_wake_when+0xc0>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10c9cf: 85 db test %ebx,%ebx
10c9d1: 0f 84 ad 00 00 00 je 10ca84 <rtems_task_wake_when+0xcc>
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
10c9d7: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
if ( !_TOD_Validate( time_buffer ) )
10c9de: 83 ec 0c sub $0xc,%esp
10c9e1: 53 push %ebx
10c9e2: e8 c5 f3 ff ff call 10bdac <_TOD_Validate>
10c9e7: 83 c4 10 add $0x10,%esp
10c9ea: 84 c0 test %al,%al
10c9ec: 75 0a jne 10c9f8 <rtems_task_wake_when+0x40>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
10c9ee: b8 14 00 00 00 mov $0x14,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c9f3: 8b 5d fc mov -0x4(%ebp),%ebx
10c9f6: c9 leave
10c9f7: c3 ret
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
10c9f8: 83 ec 0c sub $0xc,%esp
10c9fb: 53 push %ebx
10c9fc: e8 1f f3 ff ff call 10bd20 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
10ca01: 83 c4 10 add $0x10,%esp
10ca04: 3b 05 44 a3 12 00 cmp 0x12a344,%eax
10ca0a: 76 e2 jbe 10c9ee <rtems_task_wake_when+0x36>
10ca0c: 8b 15 70 a2 12 00 mov 0x12a270,%edx
10ca12: 42 inc %edx
10ca13: 89 15 70 a2 12 00 mov %edx,0x12a270
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
10ca19: 83 ec 08 sub $0x8,%esp
10ca1c: 6a 10 push $0x10
10ca1e: ff 35 58 a8 12 00 pushl 0x12a858
10ca24: 89 45 f4 mov %eax,-0xc(%ebp)
10ca27: e8 70 26 00 00 call 10f09c <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
10ca2c: 8b 15 58 a8 12 00 mov 0x12a858,%edx
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
_Watchdog_Initialize(
10ca32: 8b 4a 08 mov 0x8(%edx),%ecx
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10ca35: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_watchdog->routine = routine;
10ca3c: c7 42 64 84 e6 10 00 movl $0x10e684,0x64(%edx)
the_watchdog->id = id;
10ca43: 89 4a 68 mov %ecx,0x68(%edx)
the_watchdog->user_data = user_data;
10ca46: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx)
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_seconds(
10ca4d: 8b 45 f4 mov -0xc(%ebp),%eax
10ca50: 2b 05 44 a3 12 00 sub 0x12a344,%eax
10ca56: 89 42 54 mov %eax,0x54(%edx)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
10ca59: 58 pop %eax
10ca5a: 59 pop %ecx
10ca5b: 83 c2 48 add $0x48,%edx
10ca5e: 52 push %edx
10ca5f: 68 70 a3 12 00 push $0x12a370
10ca64: e8 4b 2c 00 00 call 10f6b4 <_Watchdog_Insert>
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
10ca69: e8 ca 1d 00 00 call 10e838 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ca6e: 83 c4 10 add $0x10,%esp
10ca71: 31 c0 xor %eax,%eax
10ca73: e9 7b ff ff ff jmp 10c9f3 <rtems_task_wake_when+0x3b>
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
10ca78: b8 0b 00 00 00 mov $0xb,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca7d: 8b 5d fc mov -0x4(%ebp),%ebx
10ca80: c9 leave
10ca81: c3 ret
10ca82: 66 90 xchg %ax,%ax
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
10ca84: b8 09 00 00 00 mov $0x9,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca89: 8b 5d fc mov -0x4(%ebp),%ebx
10ca8c: c9 leave
10ca8d: c3 ret
0010a8c8 <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
10a8c8: 55 push %ebp
10a8c9: 89 e5 mov %esp,%ebp
10a8cb: 8b 45 08 mov 0x8(%ebp),%eax
int baud_index;
switch (termios_baud) {
10a8ce: 83 f8 09 cmp $0x9,%eax
10a8d1: 0f 84 f1 00 00 00 je 10a9c8 <rtems_termios_baud_to_index+0x100>
10a8d7: 7e 37 jle 10a910 <rtems_termios_baud_to_index+0x48>
10a8d9: 83 f8 0e cmp $0xe,%eax
10a8dc: 0f 84 f6 00 00 00 je 10a9d8 <rtems_termios_baud_to_index+0x110>
10a8e2: 7e 5c jle 10a940 <rtems_termios_baud_to_index+0x78>
10a8e4: 3d 02 10 00 00 cmp $0x1002,%eax
10a8e9: 0f 84 01 01 00 00 je 10a9f0 <rtems_termios_baud_to_index+0x128>
10a8ef: 0f 8e 97 00 00 00 jle 10a98c <rtems_termios_baud_to_index+0xc4>
10a8f5: 3d 03 10 00 00 cmp $0x1003,%eax
10a8fa: 0f 84 e0 00 00 00 je 10a9e0 <rtems_termios_baud_to_index+0x118>
10a900: 3d 04 10 00 00 cmp $0x1004,%eax
10a905: 75 51 jne 10a958 <rtems_termios_baud_to_index+0x90><== NEVER TAKEN
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;
10a907: b8 13 00 00 00 mov $0x13,%eax
default: baud_index = -1; break;
}
return baud_index;
}
10a90c: c9 leave
10a90d: c3 ret
10a90e: 66 90 xchg %ax,%ax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a910: 83 f8 04 cmp $0x4,%eax
10a913: 0f 84 b7 00 00 00 je 10a9d0 <rtems_termios_baud_to_index+0x108>
10a919: 7f 45 jg 10a960 <rtems_termios_baud_to_index+0x98>
10a91b: 83 f8 01 cmp $0x1,%eax
10a91e: 0f 84 8c 00 00 00 je 10a9b0 <rtems_termios_baud_to_index+0xe8>
10a924: 0f 8e de 00 00 00 jle 10aa08 <rtems_termios_baud_to_index+0x140>
10a92a: 83 f8 02 cmp $0x2,%eax
10a92d: 0f 84 c5 00 00 00 je 10a9f8 <rtems_termios_baud_to_index+0x130>
10a933: 83 f8 03 cmp $0x3,%eax
10a936: 75 20 jne 10a958 <rtems_termios_baud_to_index+0x90><== NEVER TAKEN
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
10a938: b8 03 00 00 00 mov $0x3,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a93d: c9 leave
10a93e: c3 ret
10a93f: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a940: 83 f8 0b cmp $0xb,%eax
10a943: 0f 84 9f 00 00 00 je 10a9e8 <rtems_termios_baud_to_index+0x120>
10a949: 7c 39 jl 10a984 <rtems_termios_baud_to_index+0xbc>
10a94b: 83 f8 0c cmp $0xc,%eax
10a94e: 74 50 je 10a9a0 <rtems_termios_baud_to_index+0xd8>
10a950: 83 f8 0d cmp $0xd,%eax
10a953: 74 62 je 10a9b7 <rtems_termios_baud_to_index+0xef><== ALWAYS TAKEN
10a955: 8d 76 00 lea 0x0(%esi),%esi
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;
default: baud_index = -1; break;
10a958: b8 ff ff ff ff mov $0xffffffff,%eax
}
return baud_index;
}
10a95d: c9 leave
10a95e: c3 ret
10a95f: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a960: 83 f8 06 cmp $0x6,%eax
10a963: 74 43 je 10a9a8 <rtems_termios_baud_to_index+0xe0>
10a965: 7c 15 jl 10a97c <rtems_termios_baud_to_index+0xb4>
10a967: 83 f8 07 cmp $0x7,%eax
10a96a: 0f 84 90 00 00 00 je 10aa00 <rtems_termios_baud_to_index+0x138>
10a970: 83 f8 08 cmp $0x8,%eax
10a973: 75 e3 jne 10a958 <rtems_termios_baud_to_index+0x90><== NEVER TAKEN
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;
10a975: b8 08 00 00 00 mov $0x8,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a97a: c9 leave
10a97b: c3 ret
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;
10a97c: b8 05 00 00 00 mov $0x5,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a981: c9 leave
10a982: c3 ret
10a983: 90 nop
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;
10a984: b8 0a 00 00 00 mov $0xa,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a989: c9 leave
10a98a: c3 ret
10a98b: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a98c: 83 f8 0f cmp $0xf,%eax
10a98f: 74 2f je 10a9c0 <rtems_termios_baud_to_index+0xf8>
10a991: 3d 01 10 00 00 cmp $0x1001,%eax
10a996: 75 c0 jne 10a958 <rtems_termios_baud_to_index+0x90><== NEVER TAKEN
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;
10a998: b8 10 00 00 00 mov $0x10,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a99d: c9 leave
10a99e: c3 ret
10a99f: 90 nop
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;
10a9a0: b8 0c 00 00 00 mov $0xc,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9a5: c9 leave
10a9a6: c3 ret
10a9a7: 90 nop
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;
10a9a8: b8 06 00 00 00 mov $0x6,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9ad: c9 leave
10a9ae: c3 ret
10a9af: 90 nop
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
10a9b0: b8 01 00 00 00 mov $0x1,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9b5: c9 leave
10a9b6: c3 ret
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;
10a9b7: b8 0d 00 00 00 mov $0xd,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9bc: c9 leave
10a9bd: c3 ret
10a9be: 66 90 xchg %ax,%ax
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;
10a9c0: b8 0f 00 00 00 mov $0xf,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9c5: c9 leave
10a9c6: c3 ret
10a9c7: 90 nop
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;
10a9c8: b8 09 00 00 00 mov $0x9,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9cd: c9 leave
10a9ce: c3 ret
10a9cf: 90 nop
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;
10a9d0: b8 04 00 00 00 mov $0x4,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9d5: c9 leave
10a9d6: c3 ret
10a9d7: 90 nop
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;
10a9d8: b8 0e 00 00 00 mov $0xe,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9dd: c9 leave
10a9de: c3 ret
10a9df: 90 nop
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;
10a9e0: b8 12 00 00 00 mov $0x12,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9e5: c9 leave
10a9e6: c3 ret
10a9e7: 90 nop
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;
10a9e8: b8 0b 00 00 00 mov $0xb,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9ed: c9 leave
10a9ee: c3 ret
10a9ef: 90 nop
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;
10a9f0: b8 11 00 00 00 mov $0x11,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9f5: c9 leave
10a9f6: c3 ret
10a9f7: 90 nop
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
10a9f8: b8 02 00 00 00 mov $0x2,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9fd: c9 leave
10a9fe: c3 ret
10a9ff: 90 nop
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;
10aa00: b8 07 00 00 00 mov $0x7,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa05: c9 leave
10aa06: c3 ret
10aa07: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10aa08: 85 c0 test %eax,%eax
10aa0a: 0f 85 48 ff ff ff jne 10a958 <rtems_termios_baud_to_index+0x90>
case B0: baud_index = 0; break;
10aa10: 31 c0 xor %eax,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa12: c9 leave
10aa13: c3 ret
00108f38 <rtems_termios_baud_to_number>:
extern rtems_assoc_t termios_assoc_table[];
int32_t rtems_termios_baud_to_number(
int termios_baud
)
{
108f38: 55 push %ebp
108f39: 89 e5 mov %esp,%ebp
108f3b: 53 push %ebx
108f3c: 83 ec 0c sub $0xc,%esp
108f3f: 8b 5d 08 mov 0x8(%ebp),%ebx
int baud;
baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud );
108f42: 53 push %ebx
108f43: 68 a0 50 12 00 push $0x1250a0
108f48: e8 43 6c 00 00 call 10fb90 <rtems_assoc_local_by_remote>
if ( baud == 0 && termios_baud != 0 )
108f4d: 83 c4 10 add $0x10,%esp
108f50: 85 c0 test %eax,%eax
108f52: 74 08 je 108f5c <rtems_termios_baud_to_number+0x24>
return -1;
return baud;
}
108f54: 8b 5d fc mov -0x4(%ebp),%ebx
108f57: c9 leave
108f58: c3 ret
108f59: 8d 76 00 lea 0x0(%esi),%esi
)
{
int baud;
baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud );
if ( baud == 0 && termios_baud != 0 )
108f5c: 85 db test %ebx,%ebx
108f5e: 74 f4 je 108f54 <rtems_termios_baud_to_number+0x1c>
return -1;
108f60: b8 ff ff ff ff mov $0xffffffff,%eax
108f65: eb ed jmp 108f54 <rtems_termios_baud_to_number+0x1c>
001094bc <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
1094bc: 55 push %ebp
1094bd: 89 e5 mov %esp,%ebp
1094bf: 56 push %esi
1094c0: 53 push %ebx
1094c1: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1094c4: 8b 06 mov (%esi),%eax
1094c6: 8b 58 34 mov 0x34(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain(
1094c9: 52 push %edx
1094ca: 6a 00 push $0x0
1094cc: 6a 00 push $0x0
1094ce: ff 35 2c 74 12 00 pushl 0x12742c
1094d4: e8 d7 21 00 00 call 10b6b0 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1094d9: 83 c4 10 add $0x10,%esp
1094dc: 85 c0 test %eax,%eax
1094de: 0f 85 9a 01 00 00 jne 10967e <rtems_termios_close+0x1c2><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
1094e4: 8b 43 08 mov 0x8(%ebx),%eax
1094e7: 48 dec %eax
1094e8: 89 43 08 mov %eax,0x8(%ebx)
1094eb: 85 c0 test %eax,%eax
1094ed: 0f 85 bf 00 00 00 jne 1095b2 <rtems_termios_close+0xf6>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
1094f3: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
1094f9: c1 e0 05 shl $0x5,%eax
1094fc: 8b 80 c4 70 12 00 mov 0x1270c4(%eax),%eax
109502: 85 c0 test %eax,%eax
109504: 0f 84 0a 01 00 00 je 109614 <rtems_termios_close+0x158>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
10950a: 83 ec 0c sub $0xc,%esp
10950d: 53 push %ebx
10950e: ff d0 call *%eax
109510: 83 c4 10 add $0x10,%esp
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
109513: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
10951a: 0f 84 2c 01 00 00 je 10964c <rtems_termios_close+0x190><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
109520: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
109526: 85 c0 test %eax,%eax
109528: 74 0d je 109537 <rtems_termios_close+0x7b>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
10952a: 51 push %ecx
10952b: 56 push %esi
10952c: ff 73 10 pushl 0x10(%ebx)
10952f: ff 73 0c pushl 0xc(%ebx)
109532: ff d0 call *%eax
109534: 83 c4 10 add $0x10,%esp
if (tty->forw == NULL) {
109537: 8b 03 mov (%ebx),%eax
109539: 85 c0 test %eax,%eax
10953b: 0f 84 b7 00 00 00 je 1095f8 <rtems_termios_close+0x13c>
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
109541: 8b 53 04 mov 0x4(%ebx),%edx
109544: 89 50 04 mov %edx,0x4(%eax)
109547: 8b 53 04 mov 0x4(%ebx),%edx
}
if (tty->back == NULL) {
10954a: 85 d2 test %edx,%edx
10954c: 0f 84 8a 00 00 00 je 1095dc <rtems_termios_close+0x120><== ALWAYS TAKEN
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
109552: 89 02 mov %eax,(%edx)
}
rtems_semaphore_delete (tty->isem);
109554: 83 ec 0c sub $0xc,%esp
109557: ff 73 14 pushl 0x14(%ebx)
10955a: e8 ad 20 00 00 call 10b60c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
10955f: 5a pop %edx
109560: ff 73 18 pushl 0x18(%ebx)
109563: e8 a4 20 00 00 call 10b60c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
109568: 58 pop %eax
109569: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10956f: e8 98 20 00 00 call 10b60c <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
109574: 83 c4 10 add $0x10,%esp
109577: 8b b3 a0 00 00 00 mov 0xa0(%ebx),%esi
10957d: 85 f6 test %esi,%esi
10957f: 74 4b je 1095cc <rtems_termios_close+0x110>
109581: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109588: 74 42 je 1095cc <rtems_termios_close+0x110>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
10958a: 83 ec 0c sub $0xc,%esp
10958d: ff 73 58 pushl 0x58(%ebx)
109590: e8 1f eb ff ff call 1080b4 <free>
free (tty->rawOutBuf.theBuf);
109595: 59 pop %ecx
109596: ff 73 7c pushl 0x7c(%ebx)
109599: e8 16 eb ff ff call 1080b4 <free>
free (tty->cbuf);
10959e: 5a pop %edx
10959f: ff 73 1c pushl 0x1c(%ebx)
1095a2: e8 0d eb ff ff call 1080b4 <free>
free (tty);
1095a7: 89 1c 24 mov %ebx,(%esp)
1095aa: e8 05 eb ff ff call 1080b4 <free>
1095af: 83 c4 10 add $0x10,%esp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
1095b2: 83 ec 0c sub $0xc,%esp
1095b5: ff 35 2c 74 12 00 pushl 0x12742c
1095bb: e8 ec 21 00 00 call 10b7ac <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
1095c0: 31 c0 xor %eax,%eax
1095c2: 8d 65 f8 lea -0x8(%ebp),%esp
1095c5: 5b pop %ebx
1095c6: 5e pop %esi
1095c7: c9 leave
1095c8: c3 ret
1095c9: 8d 76 00 lea 0x0(%esi),%esi
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);
1095cc: 83 ec 0c sub $0xc,%esp
1095cf: ff 73 68 pushl 0x68(%ebx)
1095d2: e8 35 20 00 00 call 10b60c <rtems_semaphore_delete>
1095d7: 83 c4 10 add $0x10,%esp
1095da: eb ae jmp 10958a <rtems_termios_close+0xce>
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
1095dc: a3 34 74 12 00 mov %eax,0x127434
if ( rtems_termios_ttyHead != NULL ) {
1095e1: 85 c0 test %eax,%eax
1095e3: 0f 84 6b ff ff ff je 109554 <rtems_termios_close+0x98>
rtems_termios_ttyHead->back = NULL;
1095e9: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
1095f0: e9 5f ff ff ff jmp 109554 <rtems_termios_close+0x98>
1095f5: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
1095f8: 8b 53 04 mov 0x4(%ebx),%edx
1095fb: 89 15 30 74 12 00 mov %edx,0x127430
if ( rtems_termios_ttyTail != NULL ) {
109601: 85 d2 test %edx,%edx
109603: 74 d7 je 1095dc <rtems_termios_close+0x120>
rtems_termios_ttyTail->forw = NULL;
109605: c7 02 00 00 00 00 movl $0x0,(%edx)
10960b: 8b 03 mov (%ebx),%eax
10960d: e9 40 ff ff ff jmp 109552 <rtems_termios_close+0x96>
109612: 66 90 xchg %ax,%ax
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
109614: 50 push %eax
109615: 6a 00 push $0x0
109617: 6a 00 push $0x0
109619: ff 73 18 pushl 0x18(%ebx)
10961c: e8 8f 20 00 00 call 10b6b0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
109621: 83 c4 10 add $0x10,%esp
109624: 85 c0 test %eax,%eax
109626: 75 56 jne 10967e <rtems_termios_close+0x1c2><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
109628: 89 d8 mov %ebx,%eax
10962a: e8 75 f9 ff ff call 108fa4 <drainOutput>
rtems_semaphore_release (tty->osem);
10962f: 83 ec 0c sub $0xc,%esp
109632: ff 73 18 pushl 0x18(%ebx)
109635: e8 72 21 00 00 call 10b7ac <rtems_semaphore_release>
10963a: 83 c4 10 add $0x10,%esp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10963d: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109644: 0f 85 d6 fe ff ff jne 109520 <rtems_termios_close+0x64>
10964a: 66 90 xchg %ax,%ax
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
10964c: 83 ec 08 sub $0x8,%esp
10964f: 6a 01 push $0x1
109651: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
109657: e8 40 1b 00 00 call 10b19c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10965c: 83 c4 10 add $0x10,%esp
10965f: 85 c0 test %eax,%eax
109661: 75 1b jne 10967e <rtems_termios_close+0x1c2><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
109663: 83 ec 08 sub $0x8,%esp
109666: 6a 01 push $0x1
109668: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
10966e: e8 29 1b 00 00 call 10b19c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
109673: 83 c4 10 add $0x10,%esp
109676: 85 c0 test %eax,%eax
109678: 0f 84 a2 fe ff ff je 109520 <rtems_termios_close+0x64><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
10967e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109681: 50 push %eax <== NOT EXECUTED
109682: e8 79 26 00 00 call 10bd00 <rtems_fatal_error_occurred><== NOT EXECUTED
0010ab64 <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)
{
10ab64: 55 push %ebp
10ab65: 89 e5 mov %esp,%ebp
10ab67: 83 ec 08 sub $0x8,%esp
10ab6a: 8b 45 08 mov 0x8(%ebp),%eax
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
10ab6d: 8b 55 0c mov 0xc(%ebp),%edx
10ab70: 01 90 90 00 00 00 add %edx,0x90(%eax)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10ab76: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
10ab7d: 74 2d je 10abac <rtems_termios_dequeue_characters+0x48>
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
10ab7f: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax)
10ab86: 74 0c je 10ab94 <rtems_termios_dequeue_characters+0x30>
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
10ab88: 89 45 08 mov %eax,0x8(%ebp)
}
10ab8b: c9 leave
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
10ab8c: e9 27 fd ff ff jmp 10a8b8 <rtems_termios_refill_transmitter>
10ab91: 8d 76 00 lea 0x0(%esi),%esi
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
10ab94: 8b 15 74 71 12 00 mov 0x127174,%edx
10ab9a: 85 d2 test %edx,%edx
10ab9c: 74 09 je 10aba7 <rtems_termios_dequeue_characters+0x43><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
10ab9e: 83 ec 0c sub $0xc,%esp
10aba1: 50 push %eax
10aba2: ff d2 call *%edx
10aba4: 83 c4 10 add $0x10,%esp
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
10aba7: 31 c0 xor %eax,%eax
10aba9: c9 leave
10abaa: c3 ret
10abab: 90 nop
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
10abac: 83 ec 08 sub $0x8,%esp
10abaf: 6a 02 push $0x2
10abb1: ff b0 c8 00 00 00 pushl 0xc8(%eax)
10abb7: e8 e0 05 00 00 call 10b19c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10abbc: 83 c4 10 add $0x10,%esp
10abbf: 85 c0 test %eax,%eax
10abc1: 74 e4 je 10aba7 <rtems_termios_dequeue_characters+0x43><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
10abc3: 83 ec 0c sub $0xc,%esp
10abc6: 50 push %eax <== NOT EXECUTED
10abc7: e8 34 11 00 00 call 10bd00 <rtems_fatal_error_occurred><== NOT EXECUTED
0010a540 <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)
{
10a540: 55 push %ebp
10a541: 89 e5 mov %esp,%ebp
10a543: 57 push %edi
10a544: 56 push %esi
10a545: 53 push %ebx
10a546: 83 ec 3c sub $0x3c,%esp
10a549: 8b 5d 08 mov 0x8(%ebp),%ebx
10a54c: 8b 75 0c mov 0xc(%ebp),%esi
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) {
10a54f: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a555: c1 e0 05 shl $0x5,%eax
10a558: 8b 80 d0 70 12 00 mov 0x1270d0(%eax),%eax
10a55e: 85 c0 test %eax,%eax
10a560: 0f 84 8a 00 00 00 je 10a5f0 <rtems_termios_enqueue_raw_characters+0xb0>
while (len--) {
10a566: 8b 4d 10 mov 0x10(%ebp),%ecx
10a569: 85 c9 test %ecx,%ecx
10a56b: 74 2a je 10a597 <rtems_termios_enqueue_raw_characters+0x57><== NEVER TAKEN
10a56d: 31 ff xor %edi,%edi
10a56f: eb 12 jmp 10a583 <rtems_termios_enqueue_raw_characters+0x43>
10a571: 8d 76 00 lea 0x0(%esi),%esi
10a574: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a57a: c1 e0 05 shl $0x5,%eax
10a57d: 8b 80 d0 70 12 00 mov 0x1270d0(%eax),%eax
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
10a583: 83 ec 08 sub $0x8,%esp
10a586: 53 push %ebx
10a587: 0f be 14 3e movsbl (%esi,%edi,1),%edx
10a58b: 52 push %edx
10a58c: ff d0 call *%eax
10a58e: 47 inc %edi
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--) {
10a58f: 83 c4 10 add $0x10,%esp
10a592: 3b 7d 10 cmp 0x10(%ebp),%edi
10a595: 75 dd jne 10a574 <rtems_termios_enqueue_raw_characters+0x34>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
10a597: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx
10a59d: 85 d2 test %edx,%edx
10a59f: 75 3b jne 10a5dc <rtems_termios_enqueue_raw_characters+0x9c><== NEVER TAKEN
10a5a1: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10a5a7: 85 c0 test %eax,%eax
10a5a9: 74 31 je 10a5dc <rtems_termios_enqueue_raw_characters+0x9c><== NEVER TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
10a5ab: 83 ec 08 sub $0x8,%esp
10a5ae: ff b3 e0 00 00 00 pushl 0xe0(%ebx)
10a5b4: 8d 53 30 lea 0x30(%ebx),%edx
10a5b7: 52 push %edx
10a5b8: ff d0 call *%eax
tty->tty_rcvwakeup = 1;
10a5ba: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx)
10a5c1: 00 00 00
10a5c4: 83 c4 10 add $0x10,%esp
}
return 0;
10a5c7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
10a5ce: 8b 45 e0 mov -0x20(%ebp),%eax
10a5d1: 8d 65 f4 lea -0xc(%ebp),%esp
10a5d4: 5b pop %ebx
10a5d5: 5e pop %esi
10a5d6: 5f pop %edi
10a5d7: c9 leave
10a5d8: c3 ret
10a5d9: 8d 76 00 lea 0x0(%esi),%esi
*/
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;
}
return 0;
10a5dc: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
10a5e3: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10a5e6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a5e9: 5b pop %ebx <== NOT EXECUTED
10a5ea: 5e pop %esi <== NOT EXECUTED
10a5eb: 5f pop %edi <== NOT EXECUTED
10a5ec: c9 leave <== NOT EXECUTED
10a5ed: c3 ret <== NOT EXECUTED
10a5ee: 66 90 xchg %ax,%ax <== 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) {
10a5f0: 8b 7d 10 mov 0x10(%ebp),%edi
10a5f3: c6 45 db 00 movb $0x0,-0x25(%ebp)
10a5f7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
/*
* 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);
10a5fe: 8d 43 30 lea 0x30(%ebx),%eax
10a601: 89 45 d0 mov %eax,-0x30(%ebp)
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,
10a604: 8d 53 4a lea 0x4a(%ebx),%edx
10a607: 89 55 cc mov %edx,-0x34(%ebp)
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
10a60a: 85 ff test %edi,%edi
10a60c: 0f 84 0b 01 00 00 je 10a71d <rtems_termios_enqueue_raw_characters+0x1dd><== NEVER TAKEN
10a612: 66 90 xchg %ax,%ax
c = *buf++;
10a614: 8a 06 mov (%esi),%al
10a616: 88 45 e7 mov %al,-0x19(%ebp)
10a619: 46 inc %esi
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
10a61a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a620: f6 c4 02 test $0x2,%ah
10a623: 74 1c je 10a641 <rtems_termios_enqueue_raw_characters+0x101>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
10a625: 0f be 45 e7 movsbl -0x19(%ebp),%eax
10a629: 0f b6 53 4a movzbl 0x4a(%ebx),%edx
10a62d: 39 d0 cmp %edx,%eax
10a62f: 0f 84 07 01 00 00 je 10a73c <rtems_termios_enqueue_raw_characters+0x1fc>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
10a635: 0f b6 53 49 movzbl 0x49(%ebx),%edx
10a639: 39 d0 cmp %edx,%eax
10a63b: 0f 84 4f 01 00 00 je 10a790 <rtems_termios_enqueue_raw_characters+0x250><== NEVER TAKEN
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
10a641: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
10a645: 0f 85 0c 01 00 00 jne 10a757 <rtems_termios_enqueue_raw_characters+0x217><== NEVER TAKEN
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
10a64b: 8b 43 60 mov 0x60(%ebx),%eax
10a64e: 8b 53 64 mov 0x64(%ebx),%edx
10a651: 89 55 dc mov %edx,-0x24(%ebp)
10a654: 40 inc %eax
10a655: 31 d2 xor %edx,%edx
10a657: f7 75 dc divl -0x24(%ebp)
10a65a: 89 d1 mov %edx,%ecx
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
10a65c: 9c pushf
10a65d: fa cli
10a65e: 8f 45 d4 popl -0x2c(%ebp)
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
10a661: 8b 43 5c mov 0x5c(%ebx),%eax
10a664: 89 45 c4 mov %eax,-0x3c(%ebp)
10a667: 8b 43 64 mov 0x64(%ebx),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10a66a: 8b 53 64 mov 0x64(%ebx),%edx
10a66d: 89 55 dc mov %edx,-0x24(%ebp)
}
} 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)
10a670: 2b 45 c4 sub -0x3c(%ebp),%eax
10a673: 01 c8 add %ecx,%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10a675: 31 d2 xor %edx,%edx
10a677: f7 75 dc divl -0x24(%ebp)
}
} 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)
10a67a: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx
10a680: 76 46 jbe 10a6c8 <rtems_termios_enqueue_raw_characters+0x188><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
10a682: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== 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)
% tty->rawInBuf.Size) > tty->highwater) &&
10a688: a8 01 test $0x1,%al <== NOT EXECUTED
10a68a: 75 3c jne 10a6c8 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
10a68c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a692: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
10a695: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
10a69b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a6a1: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
10a6a6: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
10a6ab: 0f 84 22 01 00 00 je 10a7d3 <rtems_termios_enqueue_raw_characters+0x293><== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
10a6b1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a6b7: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
10a6bc: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
10a6c1: 0f 84 50 01 00 00 je 10a817 <rtems_termios_enqueue_raw_characters+0x2d7><== NOT EXECUTED
10a6c7: 90 nop <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
10a6c8: ff 75 d4 pushl -0x2c(%ebp)
10a6cb: 9d popf
if (newTail == tty->rawInBuf.Head) {
10a6cc: 8b 43 5c mov 0x5c(%ebx),%eax
10a6cf: 39 c8 cmp %ecx,%eax
10a6d1: 0f 84 b1 00 00 00 je 10a788 <rtems_termios_enqueue_raw_characters+0x248><== NEVER TAKEN
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
10a6d7: 8b 43 58 mov 0x58(%ebx),%eax
10a6da: 8a 55 e7 mov -0x19(%ebp),%dl
10a6dd: 88 14 08 mov %dl,(%eax,%ecx,1)
tty->rawInBuf.Tail = newTail;
10a6e0: 89 4b 60 mov %ecx,0x60(%ebx)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
10a6e3: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax
10a6e9: 85 c0 test %eax,%eax
10a6eb: 75 27 jne 10a714 <rtems_termios_enqueue_raw_characters+0x1d4><== NEVER TAKEN
10a6ed: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10a6f3: 85 c0 test %eax,%eax
10a6f5: 74 1d je 10a714 <rtems_termios_enqueue_raw_characters+0x1d4><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
10a6f7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a6fa: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
10a700: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
10a703: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
10a705: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
10a70c: 00 00 00
10a70f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a712: 66 90 xchg %ax,%ax <== NOT EXECUTED
10a714: 4f dec %edi
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
10a715: 85 ff test %edi,%edi
10a717: 0f 85 f7 fe ff ff jne 10a614 <rtems_termios_enqueue_raw_characters+0xd4><== NEVER TAKEN
}
}
}
}
tty->rawInBufDropped += dropped;
10a71d: 8b 45 e0 mov -0x20(%ebp),%eax
10a720: 01 43 78 add %eax,0x78(%ebx)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
10a723: 83 ec 0c sub $0xc,%esp
10a726: ff 73 68 pushl 0x68(%ebx)
10a729: e8 7e 10 00 00 call 10b7ac <rtems_semaphore_release>
return dropped;
10a72e: 83 c4 10 add $0x10,%esp
}
10a731: 8b 45 e0 mov -0x20(%ebp),%eax
10a734: 8d 65 f4 lea -0xc(%ebp),%esp
10a737: 5b pop %ebx
10a738: 5e pop %esi
10a739: 5f pop %edi
10a73a: c9 leave
10a73b: c3 ret
/* 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]) {
10a73c: 0f b6 53 49 movzbl 0x49(%ebx),%edx
10a740: 39 d0 cmp %edx,%eax
10a742: 74 7e je 10a7c2 <rtems_termios_enqueue_raw_characters+0x282><== NEVER TAKEN
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
10a744: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a74a: 83 c8 10 or $0x10,%eax
10a74d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
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--) {
10a753: c6 45 db 01 movb $0x1,-0x25(%ebp)
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
10a757: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a75d: 83 e0 30 and $0x30,%eax
10a760: 83 f8 20 cmp $0x20,%eax
10a763: 75 af jne 10a714 <rtems_termios_enqueue_raw_characters+0x1d4><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
10a765: 9c pushf <== NOT EXECUTED
10a766: fa cli <== NOT EXECUTED
10a767: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
10a768: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a76e: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
10a771: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
10a777: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED
10a77d: 85 c0 test %eax,%eax <== NOT EXECUTED
10a77f: 75 20 jne 10a7a1 <rtems_termios_enqueue_raw_characters+0x261><== 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);
10a781: 52 push %edx <== NOT EXECUTED
10a782: 9d popf <== 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;
10a783: 4f dec %edi <== NOT EXECUTED
10a784: eb 8f jmp 10a715 <rtems_termios_enqueue_raw_characters+0x1d5><== NOT EXECUTED
10a786: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
10a788: ff 45 e0 incl -0x20(%ebp) <== 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;
10a78b: 4f dec %edi <== NOT EXECUTED
10a78c: eb 87 jmp 10a715 <rtems_termios_enqueue_raw_characters+0x1d5><== NOT EXECUTED
10a78e: 66 90 xchg %ax,%ax <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
10a790: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a796: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
10a799: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
10a79f: eb b2 jmp 10a753 <rtems_termios_enqueue_raw_characters+0x213><== 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);
10a7a1: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== 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)(
10a7a7: 51 push %ecx <== NOT EXECUTED
10a7a8: 6a 01 push $0x1 <== NOT EXECUTED
10a7aa: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
10a7ad: 50 push %eax <== NOT EXECUTED
10a7ae: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a7b1: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED
10a7b4: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a7ba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a7bd: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
10a7c0: eb bf jmp 10a781 <rtems_termios_enqueue_raw_characters+0x241><== 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;
10a7c2: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a7c8: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
10a7cb: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
10a7d1: eb 80 jmp 10a753 <rtems_termios_enqueue_raw_characters+0x213><== 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) ||
10a7d3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a7d9: a8 20 test $0x20,%al <== NOT EXECUTED
10a7db: 75 0e jne 10a7eb <rtems_termios_enqueue_raw_characters+0x2ab><== NOT EXECUTED
10a7dd: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED
10a7e3: 85 c0 test %eax,%eax <== NOT EXECUTED
10a7e5: 0f 85 dd fe ff ff jne 10a6c8 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
10a7eb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a7f1: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
10a7f4: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
10a7fa: 52 push %edx <== NOT EXECUTED
10a7fb: 6a 01 push $0x1 <== NOT EXECUTED
10a7fd: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
10a800: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a803: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
10a806: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a80c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a80f: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
10a812: e9 b1 fe ff ff jmp 10a6c8 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
10a817: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a81d: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
10a820: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
10a826: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED
10a82c: 85 c0 test %eax,%eax <== NOT EXECUTED
10a82e: 0f 84 94 fe ff ff je 10a6c8 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
10a834: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a837: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a83a: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
10a83d: ff d0 call *%eax <== NOT EXECUTED
10a83f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a842: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
10a845: e9 7e fe ff ff jmp 10a6c8 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
00108f68 <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
108f68: 55 push %ebp
108f69: 89 e5 mov %esp,%ebp
108f6b: 83 ec 08 sub $0x8,%esp
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
108f6e: a1 2c 74 12 00 mov 0x12742c,%eax
108f73: 85 c0 test %eax,%eax
108f75: 74 05 je 108f7c <rtems_termios_initialize+0x14>
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
108f77: c9 leave
108f78: c3 ret
108f79: 8d 76 00 lea 0x0(%esi),%esi
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
108f7c: 83 ec 0c sub $0xc,%esp
108f7f: 68 2c 74 12 00 push $0x12742c
108f84: 6a 00 push $0x0
108f86: 6a 54 push $0x54
108f88: 6a 01 push $0x1
108f8a: 68 69 6d 52 54 push $0x54526d69
108f8f: e8 a0 24 00 00 call 10b434 <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)
108f94: 83 c4 20 add $0x20,%esp
108f97: 85 c0 test %eax,%eax
108f99: 74 dc je 108f77 <rtems_termios_initialize+0xf>
rtems_fatal_error_occurred (sc);
108f9b: 83 ec 0c sub $0xc,%esp
108f9e: 50 push %eax
108f9f: e8 5c 2d 00 00 call 10bd00 <rtems_fatal_error_occurred>
001096a8 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
1096a8: 55 push %ebp
1096a9: 89 e5 mov %esp,%ebp
1096ab: 57 push %edi
1096ac: 56 push %esi
1096ad: 53 push %ebx
1096ae: 83 ec 20 sub $0x20,%esp
1096b1: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1096b4: 8b 03 mov (%ebx),%eax
1096b6: 8b 40 34 mov 0x34(%eax),%eax
1096b9: 89 45 e4 mov %eax,-0x1c(%ebp)
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
1096bc: 8b 73 08 mov 0x8(%ebx),%esi
rtems_status_code sc;
args->ioctl_return = 0;
1096bf: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
1096c6: 6a 00 push $0x0
1096c8: 6a 00 push $0x0
1096ca: ff 70 18 pushl 0x18(%eax)
1096cd: e8 de 1f 00 00 call 10b6b0 <rtems_semaphore_obtain>
1096d2: 89 45 e0 mov %eax,-0x20(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
1096d5: 83 c4 10 add $0x10,%esp
1096d8: 85 c0 test %eax,%eax
1096da: 75 24 jne 109700 <rtems_termios_ioctl+0x58><== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
1096dc: 8b 43 04 mov 0x4(%ebx),%eax
1096df: 83 f8 04 cmp $0x4,%eax
1096e2: 74 70 je 109754 <rtems_termios_ioctl+0xac>
1096e4: 77 2a ja 109710 <rtems_termios_ioctl+0x68>
1096e6: 83 f8 02 cmp $0x2,%eax
1096e9: 0f 84 9d 00 00 00 je 10978c <rtems_termios_ioctl+0xe4>
1096ef: 0f 86 3f 02 00 00 jbe 109934 <rtems_termios_ioctl+0x28c>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
1096f5: 8b 45 e4 mov -0x1c(%ebp),%eax
1096f8: e8 a7 f8 ff ff call 108fa4 <drainOutput>
break;
1096fd: eb 69 jmp 109768 <rtems_termios_ioctl+0xc0>
1096ff: 90 nop
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
109700: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
return sc;
}
109703: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
109706: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109709: 5b pop %ebx <== NOT EXECUTED
10970a: 5e pop %esi <== NOT EXECUTED
10970b: 5f pop %edi <== NOT EXECUTED
10970c: c9 leave <== NOT EXECUTED
10970d: c3 ret <== NOT EXECUTED
10970e: 66 90 xchg %ax,%ax <== 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) {
109710: 3d 7f 66 04 40 cmp $0x4004667f,%eax
109715: 0f 84 f1 01 00 00 je 10990c <rtems_termios_ioctl+0x264><== NEVER TAKEN
10971b: 0f 87 33 02 00 00 ja 109954 <rtems_termios_ioctl+0x2ac>
109721: 83 f8 05 cmp $0x5,%eax
109724: 0f 84 ae 02 00 00 je 1099d8 <rtems_termios_ioctl+0x330>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
10972a: 8b 55 e4 mov -0x1c(%ebp),%edx
10972d: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax
109733: c1 e0 05 shl $0x5,%eax
109736: 8b 80 d8 70 12 00 mov 0x1270d8(%eax),%eax
10973c: 85 c0 test %eax,%eax
10973e: 0f 84 b8 02 00 00 je 1099fc <rtems_termios_ioctl+0x354><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
109744: 83 ec 08 sub $0x8,%esp
109747: 53 push %ebx
109748: 52 push %edx
109749: ff d0 call *%eax
10974b: 89 45 e0 mov %eax,-0x20(%ebp)
10974e: 83 c4 10 add $0x10,%esp
109751: eb 15 jmp 109768 <rtems_termios_ioctl+0xc0>
109753: 90 nop
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
109754: 8b 06 mov (%esi),%eax
109756: 8b 56 04 mov 0x4(%esi),%edx
109759: 8b 4d e4 mov -0x1c(%ebp),%ecx
10975c: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx)
109762: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx)
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
109768: 83 ec 0c sub $0xc,%esp
10976b: 8b 45 e4 mov -0x1c(%ebp),%eax
10976e: ff 70 18 pushl 0x18(%eax)
109771: e8 36 20 00 00 call 10b7ac <rtems_semaphore_release>
args->ioctl_return = sc;
109776: 8b 55 e0 mov -0x20(%ebp),%edx
109779: 89 53 0c mov %edx,0xc(%ebx)
return sc;
10977c: 83 c4 10 add $0x10,%esp
}
10977f: 8b 45 e0 mov -0x20(%ebp),%eax
109782: 8d 65 f4 lea -0xc(%ebp),%esp
109785: 5b pop %ebx
109786: 5e pop %esi
109787: 5f pop %edi
109788: c9 leave
109789: c3 ret
10978a: 66 90 xchg %ax,%ax
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
10978c: 8b 73 08 mov 0x8(%ebx),%esi
10978f: 8b 4d e4 mov -0x1c(%ebp),%ecx
109792: 83 c1 30 add $0x30,%ecx
109795: 89 4d dc mov %ecx,-0x24(%ebp)
109798: b9 09 00 00 00 mov $0x9,%ecx
10979d: 8b 7d dc mov -0x24(%ebp),%edi
1097a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
1097a2: 8b 55 e4 mov -0x1c(%ebp),%edx
1097a5: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
1097ab: f6 c4 02 test $0x2,%ah
1097ae: 74 44 je 1097f4 <rtems_termios_ioctl+0x14c>
1097b0: f6 42 31 04 testb $0x4,0x31(%edx)
1097b4: 75 3e jne 1097f4 <rtems_termios_ioctl+0x14c><== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
1097b6: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
1097bc: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED
1097c1: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
1097c7: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
1097cd: a8 20 test $0x20,%al <== NOT EXECUTED
1097cf: 74 23 je 1097f4 <rtems_termios_ioctl+0x14c><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
1097d1: 9c pushf <== NOT EXECUTED
1097d2: fa cli <== NOT EXECUTED
1097d3: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
1097d4: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
1097da: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
1097dd: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
1097e3: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED
1097e9: 85 ff test %edi,%edi <== NOT EXECUTED
1097eb: 0f 85 bb 02 00 00 jne 109aac <rtems_termios_ioctl+0x404><== 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);
1097f1: 56 push %esi <== NOT EXECUTED
1097f2: 9d popf <== NOT EXECUTED
1097f3: 90 nop <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
1097f4: 8b 4d e4 mov -0x1c(%ebp),%ecx
1097f7: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax
1097fd: f6 c4 04 test $0x4,%ah
109800: 74 24 je 109826 <rtems_termios_ioctl+0x17e>
109802: f6 41 31 10 testb $0x10,0x31(%ecx)
109806: 75 1e jne 109826 <rtems_termios_ioctl+0x17e><== ALWAYS TAKEN
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
109808: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED
10980e: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED
109811: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
109817: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED
10981d: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
109820: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
109826: 8b 55 e4 mov -0x1c(%ebp),%edx
109829: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
10982f: f6 c4 01 test $0x1,%ah
109832: 0f 84 bc 01 00 00 je 1099f4 <rtems_termios_ioctl+0x34c><== ALWAYS TAKEN
109838: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
10983b: 8b 41 38 mov 0x38(%ecx),%eax <== NOT EXECUTED
10983e: 85 c0 test %eax,%eax <== NOT EXECUTED
109840: 0f 88 12 02 00 00 js 109a58 <rtems_termios_ioctl+0x3b0><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
109846: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED
10984c: 80 e6 fe and $0xfe,%dh <== NOT EXECUTED
10984f: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
109855: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED
10985b: 83 e2 04 and $0x4,%edx <== NOT EXECUTED
10985e: 74 1b je 10987b <rtems_termios_ioctl+0x1d3><== NOT EXECUTED
109860: 8b 91 b0 00 00 00 mov 0xb0(%ecx),%edx <== NOT EXECUTED
109866: 85 d2 test %edx,%edx <== NOT EXECUTED
109868: 74 11 je 10987b <rtems_termios_ioctl+0x1d3><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
10986a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10986d: ff 71 10 pushl 0x10(%ecx) <== NOT EXECUTED
109870: ff d2 call *%edx <== NOT EXECUTED
109872: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
109875: 8b 42 38 mov 0x38(%edx),%eax <== NOT EXECUTED
109878: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
10987b: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
10987e: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED
109884: 83 e2 fb and $0xfffffffb,%edx <== NOT EXECUTED
109887: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== 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) {
10988d: 85 c0 test %eax,%eax
10988f: 0f 88 c3 01 00 00 js 109a58 <rtems_termios_ioctl+0x3b0><== NEVER TAKEN
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
109895: 8b 4d e4 mov -0x1c(%ebp),%ecx
109898: 8b 41 30 mov 0x30(%ecx),%eax
10989b: f6 c4 10 test $0x10,%ah
10989e: 74 0f je 1098af <rtems_termios_ioctl+0x207>
tty->flow_ctrl |= FL_MDXOF;
1098a0: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx
1098a6: 80 ce 04 or $0x4,%dh
1098a9: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
1098af: f6 c4 04 test $0x4,%ah
1098b2: 74 12 je 1098c6 <rtems_termios_ioctl+0x21e>
tty->flow_ctrl |= FL_MDXON;
1098b4: 8b 55 e4 mov -0x1c(%ebp),%edx
1098b7: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
1098bd: 80 cc 02 or $0x2,%ah
1098c0: 89 82 b8 00 00 00 mov %eax,0xb8(%edx)
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) {
1098c6: 8b 4d e4 mov -0x1c(%ebp),%ecx
1098c9: f6 41 3c 02 testb $0x2,0x3c(%ecx)
1098cd: 0f 84 41 01 00 00 je 109a14 <rtems_termios_ioctl+0x36c>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
1098d3: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
1098da: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
1098e1: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx)
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
1098e8: 8b 55 e4 mov -0x1c(%ebp),%edx
1098eb: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax
1098f1: 85 c0 test %eax,%eax
1098f3: 0f 84 6f fe ff ff je 109768 <rtems_termios_ioctl+0xc0><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
1098f9: 83 ec 08 sub $0x8,%esp
1098fc: ff 75 dc pushl -0x24(%ebp)
1098ff: ff 72 10 pushl 0x10(%edx)
109902: ff d0 call *%eax
109904: 83 c4 10 add $0x10,%esp
109907: e9 5c fe ff ff jmp 109768 <rtems_termios_ioctl+0xc0>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
10990c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
10990f: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED
109912: 89 d1 mov %edx,%ecx <== NOT EXECUTED
109914: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED
if ( rawnc < 0 )
109917: 29 d0 sub %edx,%eax <== NOT EXECUTED
109919: 0f 88 e9 00 00 00 js 109a08 <rtems_termios_ioctl+0x360><== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
10991f: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
109922: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
109925: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED
109928: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED
10992b: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
break;
10992d: e9 36 fe ff ff jmp 109768 <rtems_termios_ioctl+0xc0><== NOT EXECUTED
109932: 66 90 xchg %ax,%ax <== 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) {
109934: 48 dec %eax
109935: 0f 85 ef fd ff ff jne 10972a <rtems_termios_ioctl+0x82><== NEVER TAKEN
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
10993b: 8b 43 08 mov 0x8(%ebx),%eax
10993e: 8b 75 e4 mov -0x1c(%ebp),%esi
109941: 83 c6 30 add $0x30,%esi
109944: b9 09 00 00 00 mov $0x9,%ecx
109949: 89 c7 mov %eax,%edi
10994b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
10994d: e9 16 fe ff ff jmp 109768 <rtems_termios_ioctl+0xc0>
109952: 66 90 xchg %ax,%ax
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
109954: 3d 1a 74 04 40 cmp $0x4004741a,%eax
109959: 74 69 je 1099c4 <rtems_termios_ioctl+0x31c>
10995b: 3d 1b 74 04 80 cmp $0x8004741b,%eax
109960: 0f 85 c4 fd ff ff jne 10972a <rtems_termios_ioctl+0x82><== NEVER TAKEN
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
109966: 8b 55 e4 mov -0x1c(%ebp),%edx
109969: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax
10996f: c1 e0 05 shl $0x5,%eax
109972: 8b 80 c4 70 12 00 mov 0x1270c4(%eax),%eax
109978: 85 c0 test %eax,%eax
10997a: 74 0c je 109988 <rtems_termios_ioctl+0x2e0>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
10997c: 83 ec 0c sub $0xc,%esp
10997f: 52 push %edx
109980: ff d0 call *%eax
109982: 89 45 e0 mov %eax,-0x20(%ebp)
109985: 83 c4 10 add $0x10,%esp
}
tty->t_line=*(int*)(args->buffer);
109988: 8b 43 08 mov 0x8(%ebx),%eax
10998b: 8b 00 mov (%eax),%eax
10998d: 8b 4d e4 mov -0x1c(%ebp),%ecx
109990: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx)
tty->t_sc = NULL; /* ensure that no more valid data */
109996: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx)
10999d: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
1099a0: c1 e0 05 shl $0x5,%eax
1099a3: 8b 80 c0 70 12 00 mov 0x1270c0(%eax),%eax
1099a9: 85 c0 test %eax,%eax
1099ab: 0f 84 b7 fd ff ff je 109768 <rtems_termios_ioctl+0xc0><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
1099b1: 83 ec 0c sub $0xc,%esp
1099b4: 51 push %ecx
1099b5: ff d0 call *%eax
1099b7: 89 45 e0 mov %eax,-0x20(%ebp)
1099ba: 83 c4 10 add $0x10,%esp
1099bd: e9 a6 fd ff ff jmp 109768 <rtems_termios_ioctl+0xc0>
1099c2: 66 90 xchg %ax,%ax
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
1099c4: 8b 43 08 mov 0x8(%ebx),%eax
1099c7: 8b 4d e4 mov -0x1c(%ebp),%ecx
1099ca: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx
1099d0: 89 10 mov %edx,(%eax)
break;
1099d2: e9 91 fd ff ff jmp 109768 <rtems_termios_ioctl+0xc0>
1099d7: 90 nop
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
1099d8: 8b 06 mov (%esi),%eax
1099da: 8b 56 04 mov 0x4(%esi),%edx
1099dd: 8b 4d e4 mov -0x1c(%ebp),%ecx
1099e0: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx)
1099e6: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx)
break;
1099ec: e9 77 fd ff ff jmp 109768 <rtems_termios_ioctl+0xc0>
1099f1: 8d 76 00 lea 0x0(%esi),%esi
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
1099f4: 8b 42 38 mov 0x38(%edx),%eax
1099f7: e9 91 fe ff ff jmp 10988d <rtems_termios_ioctl+0x1e5>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
1099fc: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED
109a03: e9 60 fd ff ff jmp 109768 <rtems_termios_ioctl+0xc0><== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
109a08: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED
109a0b: 01 d0 add %edx,%eax <== NOT EXECUTED
109a0d: e9 0d ff ff ff jmp 10991f <rtems_termios_ioctl+0x277><== NOT EXECUTED
109a12: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
109a14: 8b 45 e4 mov -0x1c(%ebp),%eax
109a17: 0f b6 70 46 movzbl 0x46(%eax),%esi
rtems_clock_get_ticks_per_second() / 10;
109a1b: e8 74 15 00 00 call 10af94 <rtems_clock_get_ticks_per_second>
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
109a20: 0f af c6 imul %esi,%eax
rtems_clock_get_ticks_per_second() / 10;
109a23: ba cd cc cc cc mov $0xcccccccd,%edx
109a28: f7 e2 mul %edx
109a2a: c1 ea 03 shr $0x3,%edx
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
109a2d: 8b 4d e4 mov -0x1c(%ebp),%ecx
109a30: 89 51 54 mov %edx,0x54(%ecx)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
109a33: 80 79 46 00 cmpb $0x0,0x46(%ecx)
109a37: 74 36 je 109a6f <rtems_termios_ioctl+0x3c7>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
109a39: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
109a40: 89 51 70 mov %edx,0x70(%ecx)
if (tty->termios.c_cc[VMIN])
109a43: 80 79 47 00 cmpb $0x0,0x47(%ecx)
109a47: 74 49 je 109a92 <rtems_termios_ioctl+0x3ea>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
109a49: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx)
109a50: e9 93 fe ff ff jmp 1098e8 <rtems_termios_ioctl+0x240>
109a55: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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;
109a58: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
109a5b: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
109a61: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
109a64: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
109a6a: e9 26 fe ff ff jmp 109895 <rtems_termios_ioctl+0x1ed><== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
109a6f: 8b 55 e4 mov -0x1c(%ebp),%edx
109a72: 80 7a 47 00 cmpb $0x0,0x47(%edx)
109a76: 74 25 je 109a9d <rtems_termios_ioctl+0x3f5><== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
109a78: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
109a7f: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
109a86: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED
109a8d: e9 56 fe ff ff jmp 1098e8 <rtems_termios_ioctl+0x240><== 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;
109a92: 8b 45 e4 mov -0x1c(%ebp),%eax
109a95: 89 50 74 mov %edx,0x74(%eax)
109a98: e9 4b fe ff ff jmp 1098e8 <rtems_termios_ioctl+0x240>
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
109a9d: 8b 4d e4 mov -0x1c(%ebp),%ecx
109aa0: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx)
109aa7: e9 3c fe ff ff jmp 1098e8 <rtems_termios_ioctl+0x240>
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);
109aac: 8b 82 84 00 00 00 mov 0x84(%edx),%eax <== 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)(
109ab2: 51 push %ecx <== NOT EXECUTED
109ab3: 6a 01 push $0x1 <== NOT EXECUTED
109ab5: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED
109ab8: 50 push %eax <== NOT EXECUTED
109ab9: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED
109abc: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED
109ac2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109ac5: e9 27 fd ff ff jmp 1097f1 <rtems_termios_ioctl+0x149><== NOT EXECUTED
0010aa80 <rtems_termios_number_to_baud>:
extern rtems_assoc_t termios_assoc_table[];
int rtems_termios_number_to_baud(
int32_t baud
)
{
10aa80: 55 push %ebp
10aa81: 89 e5 mov %esp,%ebp
10aa83: 53 push %ebx
10aa84: 83 ec 0c sub $0xc,%esp
10aa87: 8b 5d 08 mov 0x8(%ebp),%ebx
int termios_baud;
termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud );
10aa8a: 53 push %ebx
10aa8b: 68 80 89 12 00 push $0x128980
10aa90: e8 fb 6e 00 00 call 111990 <rtems_assoc_remote_by_local>
if ( termios_baud == 0 && baud != 0 )
10aa95: 83 c4 10 add $0x10,%esp
10aa98: 85 c0 test %eax,%eax
10aa9a: 74 08 je 10aaa4 <rtems_termios_number_to_baud+0x24>
return -1;
return termios_baud;
}
10aa9c: 8b 5d fc mov -0x4(%ebp),%ebx
10aa9f: c9 leave
10aaa0: c3 ret
10aaa1: 8d 76 00 lea 0x0(%esi),%esi
)
{
int termios_baud;
termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud );
if ( termios_baud == 0 && baud != 0 )
10aaa4: 85 db test %ebx,%ebx
10aaa6: 74 f4 je 10aa9c <rtems_termios_number_to_baud+0x1c>
return -1;
10aaa8: b8 ff ff ff ff mov $0xffffffff,%eax
10aaad: eb ed jmp 10aa9c <rtems_termios_number_to_baud+0x1c>
00109014 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
109014: 55 push %ebp
109015: 89 e5 mov %esp,%ebp
109017: 57 push %edi
109018: 56 push %esi
109019: 53 push %ebx
10901a: 83 ec 40 sub $0x40,%esp
10901d: 8b 55 08 mov 0x8(%ebp),%edx
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
109020: 6a 00 push $0x0
109022: 6a 00 push $0x0
109024: ff 35 2c 74 12 00 pushl 0x12742c
10902a: 89 55 dc mov %edx,-0x24(%ebp)
10902d: e8 7e 26 00 00 call 10b6b0 <rtems_semaphore_obtain>
109032: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109035: 83 c4 10 add $0x10,%esp
109038: 85 c0 test %eax,%eax
10903a: 8b 55 dc mov -0x24(%ebp),%edx
10903d: 75 6d jne 1090ac <rtems_termios_open+0x98><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
10903f: 8b 35 34 74 12 00 mov 0x127434,%esi
109045: 85 f6 test %esi,%esi
109047: 0f 84 a7 00 00 00 je 1090f4 <rtems_termios_open+0xe0>
10904d: 89 f3 mov %esi,%ebx
10904f: 8b 45 0c mov 0xc(%ebp),%eax
109052: eb 0a jmp 10905e <rtems_termios_open+0x4a>
109054: 8b 1b mov (%ebx),%ebx
109056: 85 db test %ebx,%ebx
109058: 0f 84 96 00 00 00 je 1090f4 <rtems_termios_open+0xe0><== ALWAYS TAKEN
if ((tty->major == major) && (tty->minor == minor))
10905e: 39 53 0c cmp %edx,0xc(%ebx)
109061: 75 f1 jne 109054 <rtems_termios_open+0x40>
109063: 39 43 10 cmp %eax,0x10(%ebx)
109066: 75 ec jne 109054 <rtems_termios_open+0x40><== NEVER TAKEN
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
109068: 8b 75 10 mov 0x10(%ebp),%esi
10906b: 8b 06 mov (%esi),%eax
10906d: 89 58 34 mov %ebx,0x34(%eax)
if (!tty->refcount++) {
109070: 8b 43 08 mov 0x8(%ebx),%eax
109073: 8d 48 01 lea 0x1(%eax),%ecx
109076: 89 4b 08 mov %ecx,0x8(%ebx)
109079: 85 c0 test %eax,%eax
10907b: 75 1e jne 10909b <rtems_termios_open+0x87>
if (tty->device.firstOpen)
10907d: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
109083: 85 c0 test %eax,%eax
109085: 74 0b je 109092 <rtems_termios_open+0x7e>
(*tty->device.firstOpen)(major, minor, arg);
109087: 57 push %edi
109088: 56 push %esi
109089: ff 75 0c pushl 0xc(%ebp)
10908c: 52 push %edx
10908d: ff d0 call *%eax
10908f: 83 c4 10 add $0x10,%esp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
109092: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109099: 74 1c je 1090b7 <rtems_termios_open+0xa3>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10909b: 83 ec 0c sub $0xc,%esp
10909e: ff 35 2c 74 12 00 pushl 0x12742c
1090a4: e8 03 27 00 00 call 10b7ac <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
1090a9: 83 c4 10 add $0x10,%esp
}
1090ac: 8b 45 e4 mov -0x1c(%ebp),%eax
1090af: 8d 65 f4 lea -0xc(%ebp),%esp
1090b2: 5b pop %ebx
1090b3: 5e pop %esi
1090b4: 5f pop %edi
1090b5: c9 leave
1090b6: c3 ret
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
1090b7: 56 push %esi
1090b8: 53 push %ebx
1090b9: 68 4c a8 10 00 push $0x10a84c
1090be: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
1090c4: e8 2b 2a 00 00 call 10baf4 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
1090c9: 83 c4 10 add $0x10,%esp
1090cc: 85 c0 test %eax,%eax
1090ce: 0f 85 3f 03 00 00 jne 109413 <rtems_termios_open+0x3ff><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
1090d4: 51 push %ecx
1090d5: 53 push %ebx
1090d6: 68 fc aa 10 00 push $0x10aafc
1090db: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
1090e1: e8 0e 2a 00 00 call 10baf4 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
1090e6: 83 c4 10 add $0x10,%esp
1090e9: 85 c0 test %eax,%eax
1090eb: 74 ae je 10909b <rtems_termios_open+0x87><== ALWAYS TAKEN
1090ed: e9 21 03 00 00 jmp 109413 <rtems_termios_open+0x3ff><== NOT EXECUTED
1090f2: 66 90 xchg %ax,%ax <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
1090f4: 83 ec 08 sub $0x8,%esp
1090f7: 68 e8 00 00 00 push $0xe8
1090fc: 6a 01 push $0x1
1090fe: 89 55 dc mov %edx,-0x24(%ebp)
109101: e8 1e ee ff ff call 107f24 <calloc>
109106: 89 45 e0 mov %eax,-0x20(%ebp)
109109: 89 c3 mov %eax,%ebx
if (tty == NULL) {
10910b: 83 c4 10 add $0x10,%esp
10910e: 85 c0 test %eax,%eax
109110: 8b 55 dc mov -0x24(%ebp),%edx
109113: 0f 84 75 02 00 00 je 10938e <rtems_termios_open+0x37a>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
109119: a1 a4 51 12 00 mov 0x1251a4,%eax
10911e: 8b 4d e0 mov -0x20(%ebp),%ecx
109121: 89 41 64 mov %eax,0x64(%ecx)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
109124: 8b 41 64 mov 0x64(%ecx),%eax
109127: 83 ec 0c sub $0xc,%esp
10912a: 50 push %eax
10912b: 89 55 dc mov %edx,-0x24(%ebp)
10912e: e8 55 f2 ff ff call 108388 <malloc>
109133: 89 45 c4 mov %eax,-0x3c(%ebp)
109136: 8b 7d e0 mov -0x20(%ebp),%edi
109139: 89 47 58 mov %eax,0x58(%edi)
if (tty->rawInBuf.theBuf == NULL) {
10913c: 83 c4 10 add $0x10,%esp
10913f: 85 c0 test %eax,%eax
109141: 8b 55 dc mov -0x24(%ebp),%edx
109144: 0f 84 61 02 00 00 je 1093ab <rtems_termios_open+0x397>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
10914a: a1 a8 51 12 00 mov 0x1251a8,%eax
10914f: 8b 4d e0 mov -0x20(%ebp),%ecx
109152: 89 81 88 00 00 00 mov %eax,0x88(%ecx)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
109158: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax
10915e: 83 ec 0c sub $0xc,%esp
109161: 50 push %eax
109162: 89 55 dc mov %edx,-0x24(%ebp)
109165: e8 1e f2 ff ff call 108388 <malloc>
10916a: 89 c7 mov %eax,%edi
10916c: 8b 45 e0 mov -0x20(%ebp),%eax
10916f: 89 78 7c mov %edi,0x7c(%eax)
if (tty->rawOutBuf.theBuf == NULL) {
109172: 83 c4 10 add $0x10,%esp
109175: 85 ff test %edi,%edi
109177: 8b 55 dc mov -0x24(%ebp),%edx
10917a: 0f 84 4f 02 00 00 je 1093cf <rtems_termios_open+0x3bb><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
109180: 83 ec 0c sub $0xc,%esp
109183: ff 35 a0 51 12 00 pushl 0x1251a0
109189: 89 55 dc mov %edx,-0x24(%ebp)
10918c: e8 f7 f1 ff ff call 108388 <malloc>
109191: 8b 4d e0 mov -0x20(%ebp),%ecx
109194: 89 41 1c mov %eax,0x1c(%ecx)
if (tty->cbuf == NULL) {
109197: 83 c4 10 add $0x10,%esp
10919a: 85 c0 test %eax,%eax
10919c: 8b 55 dc mov -0x24(%ebp),%edx
10919f: 0f 84 77 02 00 00 je 10941c <rtems_termios_open+0x408>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
1091a5: 8b 7d e0 mov -0x20(%ebp),%edi
1091a8: c7 87 d4 00 00 00 00 movl $0x0,0xd4(%edi)
1091af: 00 00 00
tty->tty_snd.sw_arg = NULL;
1091b2: c7 87 d8 00 00 00 00 movl $0x0,0xd8(%edi)
1091b9: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
1091bc: c7 87 dc 00 00 00 00 movl $0x0,0xdc(%edi)
1091c3: 00 00 00
tty->tty_rcv.sw_arg = NULL;
1091c6: c7 87 e0 00 00 00 00 movl $0x0,0xe0(%edi)
1091cd: 00 00 00
tty->tty_rcvwakeup = 0;
1091d0: c7 87 e4 00 00 00 00 movl $0x0,0xe4(%edi)
1091d7: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
1091da: 89 37 mov %esi,(%edi)
tty->back = NULL;
1091dc: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
if (rtems_termios_ttyHead != NULL)
1091e3: 85 f6 test %esi,%esi
1091e5: 74 03 je 1091ea <rtems_termios_open+0x1d6>
rtems_termios_ttyHead->back = tty;
1091e7: 89 7e 04 mov %edi,0x4(%esi)
rtems_termios_ttyHead = tty;
1091ea: 8b 45 e0 mov -0x20(%ebp),%eax
1091ed: a3 34 74 12 00 mov %eax,0x127434
if (rtems_termios_ttyTail == NULL)
1091f2: 8b 0d 30 74 12 00 mov 0x127430,%ecx
1091f8: 85 c9 test %ecx,%ecx
1091fa: 0f 84 af 02 00 00 je 1094af <rtems_termios_open+0x49b>
rtems_termios_ttyTail = tty;
tty->minor = minor;
109200: 8b 75 0c mov 0xc(%ebp),%esi
109203: 8b 4d e0 mov -0x20(%ebp),%ecx
109206: 89 71 10 mov %esi,0x10(%ecx)
tty->major = major;
109209: 89 51 0c mov %edx,0xc(%ecx)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
10920c: 83 ec 0c sub $0xc,%esp
10920f: 89 c8 mov %ecx,%eax
109211: 83 c0 14 add $0x14,%eax
109214: 50 push %eax
109215: 6a 00 push $0x0
109217: 6a 54 push $0x54
109219: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'i', c),
10921b: 0f be 05 ac 51 12 00 movsbl 0x1251ac,%eax
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
109222: 0d 00 69 52 54 or $0x54526900,%eax
109227: 50 push %eax
109228: 89 55 dc mov %edx,-0x24(%ebp)
10922b: e8 04 22 00 00 call 10b434 <rtems_semaphore_create>
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)
109230: 83 c4 20 add $0x20,%esp
109233: 85 c0 test %eax,%eax
109235: 8b 55 dc mov -0x24(%ebp),%edx
109238: 0f 85 d5 01 00 00 jne 109413 <rtems_termios_open+0x3ff>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
10923e: 83 ec 0c sub $0xc,%esp
109241: 8b 45 e0 mov -0x20(%ebp),%eax
109244: 83 c0 18 add $0x18,%eax
109247: 50 push %eax
109248: 6a 00 push $0x0
10924a: 6a 54 push $0x54
10924c: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'o', c),
10924e: 0f be 05 ac 51 12 00 movsbl 0x1251ac,%eax
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
109255: 0d 00 6f 52 54 or $0x54526f00,%eax
10925a: 50 push %eax
10925b: 89 55 dc mov %edx,-0x24(%ebp)
10925e: e8 d1 21 00 00 call 10b434 <rtems_semaphore_create>
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)
109263: 83 c4 20 add $0x20,%esp
109266: 85 c0 test %eax,%eax
109268: 8b 55 dc mov -0x24(%ebp),%edx
10926b: 0f 85 a2 01 00 00 jne 109413 <rtems_termios_open+0x3ff>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
109271: 83 ec 0c sub $0xc,%esp
109274: 8b 45 e0 mov -0x20(%ebp),%eax
109277: 05 8c 00 00 00 add $0x8c,%eax
10927c: 50 push %eax
10927d: 6a 00 push $0x0
10927f: 6a 20 push $0x20
109281: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'x', c),
109283: 0f be 05 ac 51 12 00 movsbl 0x1251ac,%eax
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
10928a: 0d 00 78 52 54 or $0x54527800,%eax
10928f: 50 push %eax
109290: 89 55 dc mov %edx,-0x24(%ebp)
109293: e8 9c 21 00 00 call 10b434 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
109298: 83 c4 20 add $0x20,%esp
10929b: 85 c0 test %eax,%eax
10929d: 8b 55 dc mov -0x24(%ebp),%edx
1092a0: 0f 85 6d 01 00 00 jne 109413 <rtems_termios_open+0x3ff>
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
1092a6: 8b 7d e0 mov -0x20(%ebp),%edi
1092a9: c7 87 94 00 00 00 00 movl $0x0,0x94(%edi)
1092b0: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
1092b3: 81 c7 98 00 00 00 add $0x98,%edi
1092b9: b9 08 00 00 00 mov $0x8,%ecx
1092be: 8b 75 14 mov 0x14(%ebp),%esi
1092c1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1092c3: 8b 7d e0 mov -0x20(%ebp),%edi
1092c6: 83 bf b4 00 00 00 02 cmpl $0x2,0xb4(%edi)
1092cd: 0f 84 64 01 00 00 je 109437 <rtems_termios_open+0x423><== NEVER TAKEN
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
1092d3: 8b 45 e0 mov -0x20(%ebp),%eax
1092d6: 8b 88 a0 00 00 00 mov 0xa0(%eax),%ecx
1092dc: 85 c9 test %ecx,%ecx
1092de: 0f 84 fc 00 00 00 je 1093e0 <rtems_termios_open+0x3cc>
1092e4: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
1092eb: 0f 84 ef 00 00 00 je 1093e0 <rtems_termios_open+0x3cc><== NEVER TAKEN
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
1092f1: 8b 4d e0 mov -0x20(%ebp),%ecx
1092f4: c7 41 30 02 25 00 00 movl $0x2502,0x30(%ecx)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
1092fb: c7 41 34 05 18 00 00 movl $0x1805,0x34(%ecx)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
109302: c7 41 38 bd 08 00 00 movl $0x8bd,0x38(%ecx)
tty->termios.c_lflag =
109309: c7 41 3c 3b 82 00 00 movl $0x823b,0x3c(%ecx)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
109310: c6 41 41 03 movb $0x3,0x41(%ecx)
tty->termios.c_cc[VQUIT] = '\034';
109314: c6 41 42 1c movb $0x1c,0x42(%ecx)
tty->termios.c_cc[VERASE] = '\177';
109318: c6 41 43 7f movb $0x7f,0x43(%ecx)
tty->termios.c_cc[VKILL] = '\025';
10931c: c6 41 44 15 movb $0x15,0x44(%ecx)
tty->termios.c_cc[VEOF] = '\004';
109320: c6 41 45 04 movb $0x4,0x45(%ecx)
tty->termios.c_cc[VEOL] = '\000';
109324: c6 41 4c 00 movb $0x0,0x4c(%ecx)
tty->termios.c_cc[VEOL2] = '\000';
109328: c6 41 51 00 movb $0x0,0x51(%ecx)
tty->termios.c_cc[VSTART] = '\021';
10932c: c6 41 49 11 movb $0x11,0x49(%ecx)
tty->termios.c_cc[VSTOP] = '\023';
109330: c6 41 4a 13 movb $0x13,0x4a(%ecx)
tty->termios.c_cc[VSUSP] = '\032';
109334: c6 41 4b 1a movb $0x1a,0x4b(%ecx)
tty->termios.c_cc[VREPRINT] = '\022';
109338: c6 41 4d 12 movb $0x12,0x4d(%ecx)
tty->termios.c_cc[VDISCARD] = '\017';
10933c: c6 41 4e 0f movb $0xf,0x4e(%ecx)
tty->termios.c_cc[VWERASE] = '\027';
109340: c6 41 4f 17 movb $0x17,0x4f(%ecx)
tty->termios.c_cc[VLNEXT] = '\026';
109344: c6 41 50 16 movb $0x16,0x50(%ecx)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
109348: c7 81 b8 00 00 00 00 movl $0x0,0xb8(%ecx)
10934f: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
109352: 8b 41 64 mov 0x64(%ecx),%eax
109355: d1 e8 shr %eax
109357: 89 81 bc 00 00 00 mov %eax,0xbc(%ecx)
tty->highwater = tty->rawInBuf.Size * 3/4;
10935d: 8b 41 64 mov 0x64(%ecx),%eax
109360: 8d 04 40 lea (%eax,%eax,2),%eax
109363: c1 e8 02 shr $0x2,%eax
109366: 89 81 c0 00 00 00 mov %eax,0xc0(%ecx)
/*
* Bump name characer
*/
if (c++ == 'z')
10936c: a0 ac 51 12 00 mov 0x1251ac,%al
109371: 8d 48 01 lea 0x1(%eax),%ecx
109374: 88 0d ac 51 12 00 mov %cl,0x1251ac
10937a: 3c 7a cmp $0x7a,%al
10937c: 0f 85 e6 fc ff ff jne 109068 <rtems_termios_open+0x54>
c = 'a';
109382: c6 05 ac 51 12 00 61 movb $0x61,0x1251ac
109389: e9 da fc ff ff jmp 109068 <rtems_termios_open+0x54>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
10938e: 83 ec 0c sub $0xc,%esp
109391: ff 35 2c 74 12 00 pushl 0x12742c
109397: e8 10 24 00 00 call 10b7ac <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
10939c: 83 c4 10 add $0x10,%esp
10939f: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp)
1093a6: e9 01 fd ff ff jmp 1090ac <rtems_termios_open+0x98>
* 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);
1093ab: 83 ec 0c sub $0xc,%esp
1093ae: 57 push %edi
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
free(tty);
1093af: e8 00 ed ff ff call 1080b4 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
1093b4: 5f pop %edi
1093b5: ff 35 2c 74 12 00 pushl 0x12742c
1093bb: e8 ec 23 00 00 call 10b7ac <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
1093c0: 83 c4 10 add $0x10,%esp
1093c3: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp)
1093ca: e9 dd fc ff ff jmp 1090ac <rtems_termios_open+0x98>
* 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));
1093cf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1093d2: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
1093d5: e8 da ec ff ff call 1080b4 <free> <== NOT EXECUTED
free(tty);
1093da: 58 pop %eax <== NOT EXECUTED
1093db: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
1093de: eb cf jmp 1093af <rtems_termios_open+0x39b><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
1093e0: 83 ec 0c sub $0xc,%esp
1093e3: 8b 45 e0 mov -0x20(%ebp),%eax
1093e6: 83 c0 68 add $0x68,%eax
1093e9: 50 push %eax
1093ea: 6a 00 push $0x0
1093ec: 6a 24 push $0x24
1093ee: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'r', c),
1093f0: 0f be 05 ac 51 12 00 movsbl 0x1251ac,%eax
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
1093f7: 0d 00 72 52 54 or $0x54527200,%eax
1093fc: 50 push %eax
1093fd: 89 55 dc mov %edx,-0x24(%ebp)
109400: e8 2f 20 00 00 call 10b434 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
109405: 83 c4 20 add $0x20,%esp
109408: 85 c0 test %eax,%eax
10940a: 8b 55 dc mov -0x24(%ebp),%edx
10940d: 0f 84 de fe ff ff je 1092f1 <rtems_termios_open+0x2dd>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
109413: 83 ec 0c sub $0xc,%esp
109416: 50 push %eax
109417: e8 e4 28 00 00 call 10bd00 <rtems_fatal_error_occurred>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
10941c: 83 ec 0c sub $0xc,%esp
10941f: 57 push %edi
109420: e8 8f ec ff ff call 1080b4 <free>
free((void *)(tty->rawInBuf.theBuf));
109425: 5e pop %esi
109426: ff 75 c4 pushl -0x3c(%ebp)
109429: e8 86 ec ff ff call 1080b4 <free>
free(tty);
10942e: 5b pop %ebx
10942f: ff 75 e0 pushl -0x20(%ebp)
109432: e9 78 ff ff ff jmp 1093af <rtems_termios_open+0x39b>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
109437: 50 push %eax
109438: 50 push %eax
109439: 89 f8 mov %edi,%eax
10943b: 05 c8 00 00 00 add $0xc8,%eax
109440: 50 push %eax
109441: 6a 00 push $0x0
109443: 68 00 05 00 00 push $0x500
109448: 68 00 04 00 00 push $0x400
10944d: 6a 0a push $0xa
rtems_build_name ('T', 'x', 'T', c),
10944f: 0f be 05 ac 51 12 00 movsbl 0x1251ac,%eax
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
109456: 0d 00 54 78 54 or $0x54785400,%eax
10945b: 50 push %eax
10945c: 89 55 dc mov %edx,-0x24(%ebp)
10945f: e8 e8 23 00 00 call 10b84c <rtems_task_create>
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
109464: 83 c4 20 add $0x20,%esp
109467: 85 c0 test %eax,%eax
109469: 8b 55 dc mov -0x24(%ebp),%edx
10946c: 75 a5 jne 109413 <rtems_termios_open+0x3ff><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
10946e: 56 push %esi
10946f: 56 push %esi
109470: 8b 45 e0 mov -0x20(%ebp),%eax
109473: 05 c4 00 00 00 add $0xc4,%eax
109478: 50 push %eax
109479: 6a 00 push $0x0
10947b: 68 00 05 00 00 push $0x500
109480: 68 00 04 00 00 push $0x400
109485: 6a 09 push $0x9
rtems_build_name ('R', 'x', 'T', c),
109487: 0f be 05 ac 51 12 00 movsbl 0x1251ac,%eax
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
10948e: 0d 00 54 78 52 or $0x52785400,%eax
109493: 50 push %eax
109494: 89 55 dc mov %edx,-0x24(%ebp)
109497: e8 b0 23 00 00 call 10b84c <rtems_task_create>
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
10949c: 83 c4 20 add $0x20,%esp
10949f: 85 c0 test %eax,%eax
1094a1: 8b 55 dc mov -0x24(%ebp),%edx
1094a4: 0f 84 29 fe ff ff je 1092d3 <rtems_termios_open+0x2bf>
1094aa: e9 64 ff ff ff jmp 109413 <rtems_termios_open+0x3ff><== 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;
1094af: a3 30 74 12 00 mov %eax,0x127430
1094b4: e9 47 fd ff ff jmp 109200 <rtems_termios_open+0x1ec>
00109acc <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
109acc: 55 push %ebp
109acd: 89 e5 mov %esp,%ebp
109acf: 57 push %edi
109ad0: 56 push %esi
109ad1: 53 push %ebx
109ad2: 83 ec 1c sub $0x1c,%esp
109ad5: 8b 45 08 mov 0x8(%ebp),%eax
109ad8: 8b 55 0c mov 0xc(%ebp),%edx
109adb: 89 55 e4 mov %edx,-0x1c(%ebp)
109ade: 8b 5d 10 mov 0x10(%ebp),%ebx
const unsigned char *buf = _buf;
109ae1: 89 c6 mov %eax,%esi
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
109ae3: 8b 8b b4 00 00 00 mov 0xb4(%ebx),%ecx
109ae9: 85 c9 test %ecx,%ecx
109aeb: 0f 84 eb 00 00 00 je 109bdc <rtems_termios_puts+0x110>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
109af1: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
109af7: 89 45 e0 mov %eax,-0x20(%ebp)
while (len) {
109afa: 8b 55 e4 mov -0x1c(%ebp),%edx
109afd: 85 d2 test %edx,%edx
109aff: 0f 84 cf 00 00 00 je 109bd4 <rtems_termios_puts+0x108><== NEVER TAKEN
109b05: 8d 76 00 lea 0x0(%esi),%esi
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
109b08: 8b 45 e0 mov -0x20(%ebp),%eax
109b0b: 40 inc %eax
109b0c: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
109b12: 31 d2 xor %edx,%edx
109b14: f7 f1 div %ecx
109b16: 89 55 dc mov %edx,-0x24(%ebp)
109b19: 89 55 e0 mov %edx,-0x20(%ebp)
rtems_interrupt_disable (level);
109b1c: 9c pushf
109b1d: fa cli
109b1e: 5f pop %edi
while (newHead == tty->rawOutBuf.Tail) {
109b1f: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
109b25: 3b 55 e0 cmp -0x20(%ebp),%edx
109b28: 75 3e jne 109b68 <rtems_termios_puts+0x9c>
109b2a: 89 f8 mov %edi,%eax
109b2c: 89 f7 mov %esi,%edi
109b2e: 89 d6 mov %edx,%esi
tty->rawOutBufState = rob_wait;
109b30: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
109b37: 00 00 00
rtems_interrupt_enable (level);
109b3a: 50 push %eax
109b3b: 9d popf
sc = rtems_semaphore_obtain(
109b3c: 50 push %eax
109b3d: 6a 00 push $0x0
109b3f: 6a 00 push $0x0
109b41: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
109b47: e8 64 1b 00 00 call 10b6b0 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109b4c: 83 c4 10 add $0x10,%esp
109b4f: 85 c0 test %eax,%eax
109b51: 0f 85 a0 00 00 00 jne 109bf7 <rtems_termios_puts+0x12b><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
109b57: 9c pushf
109b58: fa cli
109b59: 58 pop %eax
* 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) {
109b5a: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
109b60: 39 f2 cmp %esi,%edx
109b62: 74 cc je 109b30 <rtems_termios_puts+0x64><== NEVER TAKEN
109b64: 89 fe mov %edi,%esi
109b66: 89 c7 mov %eax,%edi
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
109b68: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
109b6e: 8b 4b 7c mov 0x7c(%ebx),%ecx
109b71: 8a 16 mov (%esi),%dl
109b73: 88 14 01 mov %dl,(%ecx,%eax,1)
tty->rawOutBuf.Head = newHead;
109b76: 8b 45 dc mov -0x24(%ebp),%eax
109b79: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
if (tty->rawOutBufState == rob_idle) {
109b7f: 8b 8b 94 00 00 00 mov 0x94(%ebx),%ecx
109b85: 85 c9 test %ecx,%ecx
109b87: 75 23 jne 109bac <rtems_termios_puts+0xe0>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
109b89: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109b8f: a8 10 test $0x10,%al
109b91: 74 26 je 109bb9 <rtems_termios_puts+0xed><== ALWAYS TAKEN
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
109b93: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109b99: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
109b9c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
109ba2: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
109ba9: 00 00 00
}
rtems_interrupt_enable (level);
109bac: 57 push %edi
109bad: 9d popf
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
109bae: ff 4d e4 decl -0x1c(%ebp)
109bb1: 74 21 je 109bd4 <rtems_termios_puts+0x108>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
109bb3: 46 inc %esi
109bb4: e9 4f ff ff ff jmp 109b08 <rtems_termios_puts+0x3c>
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,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
109bb9: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
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,
109bbf: 52 push %edx
109bc0: 6a 01 push $0x1
109bc2: 03 43 7c add 0x7c(%ebx),%eax
109bc5: 50 push %eax
109bc6: ff 73 10 pushl 0x10(%ebx)
109bc9: ff 93 a4 00 00 00 call *0xa4(%ebx)
109bcf: 83 c4 10 add $0x10,%esp
109bd2: eb ce jmp 109ba2 <rtems_termios_puts+0xd6>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
109bd4: 8d 65 f4 lea -0xc(%ebp),%esp
109bd7: 5b pop %ebx
109bd8: 5e pop %esi
109bd9: 5f pop %edi
109bda: c9 leave
109bdb: c3 ret
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);
109bdc: 89 55 10 mov %edx,0x10(%ebp)
109bdf: 89 45 0c mov %eax,0xc(%ebp)
109be2: 8b 43 10 mov 0x10(%ebx),%eax
109be5: 89 45 08 mov %eax,0x8(%ebp)
109be8: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
109bee: 8d 65 f4 lea -0xc(%ebp),%esp
109bf1: 5b pop %ebx
109bf2: 5e pop %esi
109bf3: 5f pop %edi
109bf4: c9 leave
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);
109bf5: ff e0 jmp *%eax
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
109bf7: 83 ec 0c sub $0xc,%esp
109bfa: 50 push %eax <== NOT EXECUTED
109bfb: e8 00 21 00 00 call 10bd00 <rtems_fatal_error_occurred><== NOT EXECUTED
0010a1d8 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
10a1d8: 55 push %ebp
10a1d9: 89 e5 mov %esp,%ebp
10a1db: 57 push %edi
10a1dc: 56 push %esi
10a1dd: 53 push %ebx
10a1de: 83 ec 30 sub $0x30,%esp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a1e1: 8b 55 08 mov 0x8(%ebp),%edx
10a1e4: 8b 02 mov (%edx),%eax
10a1e6: 8b 58 34 mov 0x34(%eax),%ebx
uint32_t count = args->count;
10a1e9: 8b 4a 10 mov 0x10(%edx),%ecx
10a1ec: 89 4d dc mov %ecx,-0x24(%ebp)
char *buffer = args->buffer;
10a1ef: 8b 42 0c mov 0xc(%edx),%eax
10a1f2: 89 45 d8 mov %eax,-0x28(%ebp)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a1f5: 6a 00 push $0x0
10a1f7: 6a 00 push $0x0
10a1f9: ff 73 14 pushl 0x14(%ebx)
10a1fc: e8 af 14 00 00 call 10b6b0 <rtems_semaphore_obtain>
10a201: 89 45 e0 mov %eax,-0x20(%ebp)
if (sc != RTEMS_SUCCESSFUL)
10a204: 83 c4 10 add $0x10,%esp
10a207: 85 c0 test %eax,%eax
10a209: 75 35 jne 10a240 <rtems_termios_read+0x68><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
10a20b: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a211: c1 e0 05 shl $0x5,%eax
10a214: 8b 80 c8 70 12 00 mov 0x1270c8(%eax),%eax
10a21a: 85 c0 test %eax,%eax
10a21c: 74 2e je 10a24c <rtems_termios_read+0x74>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
10a21e: 83 ec 08 sub $0x8,%esp
10a221: ff 75 08 pushl 0x8(%ebp)
10a224: 53 push %ebx
10a225: ff d0 call *%eax
10a227: 89 45 e0 mov %eax,-0x20(%ebp)
tty->tty_rcvwakeup = 0;
10a22a: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10a231: 00 00 00
rtems_semaphore_release (tty->isem);
10a234: 59 pop %ecx
10a235: ff 73 14 pushl 0x14(%ebx)
10a238: e8 6f 15 00 00 call 10b7ac <rtems_semaphore_release>
return sc;
10a23d: 83 c4 10 add $0x10,%esp
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
10a240: 8b 45 e0 mov -0x20(%ebp),%eax
10a243: 8d 65 f4 lea -0xc(%ebp),%esp
10a246: 5b pop %ebx
10a247: 5e pop %esi
10a248: 5f pop %edi
10a249: c9 leave
10a24a: c3 ret
10a24b: 90 nop
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
10a24c: 8b 53 20 mov 0x20(%ebx),%edx
10a24f: 39 53 24 cmp %edx,0x24(%ebx)
10a252: 74 5f je 10a2b3 <rtems_termios_read+0xdb><== ALWAYS TAKEN
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10a254: 8b 45 dc mov -0x24(%ebp),%eax
10a257: 85 c0 test %eax,%eax
10a259: 74 29 je 10a284 <rtems_termios_read+0xac><== NEVER TAKEN
10a25b: 8b 43 24 mov 0x24(%ebx),%eax
10a25e: 3b 43 20 cmp 0x20(%ebx),%eax
10a261: 7d 21 jge 10a284 <rtems_termios_read+0xac><== NEVER TAKEN
10a263: 8b 55 d8 mov -0x28(%ebp),%edx
10a266: 8b 7d dc mov -0x24(%ebp),%edi
10a269: eb 06 jmp 10a271 <rtems_termios_read+0x99>
10a26b: 90 nop
10a26c: 39 43 20 cmp %eax,0x20(%ebx)
10a26f: 7e 10 jle 10a281 <rtems_termios_read+0xa9>
*buffer++ = tty->cbuf[tty->cindex++];
10a271: 8b 73 1c mov 0x1c(%ebx),%esi
10a274: 8a 0c 06 mov (%esi,%eax,1),%cl
10a277: 88 0a mov %cl,(%edx)
10a279: 42 inc %edx
10a27a: 40 inc %eax
10a27b: 89 43 24 mov %eax,0x24(%ebx)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10a27e: 4f dec %edi
10a27f: 75 eb jne 10a26c <rtems_termios_read+0x94>
10a281: 89 7d dc mov %edi,-0x24(%ebp)
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
10a284: 8b 55 08 mov 0x8(%ebp),%edx
10a287: 8b 42 10 mov 0x10(%edx),%eax
10a28a: 2b 45 dc sub -0x24(%ebp),%eax
10a28d: 89 42 18 mov %eax,0x18(%edx)
tty->tty_rcvwakeup = 0;
10a290: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10a297: 00 00 00
rtems_semaphore_release (tty->isem);
10a29a: 83 ec 0c sub $0xc,%esp
10a29d: ff 73 14 pushl 0x14(%ebx)
10a2a0: e8 07 15 00 00 call 10b7ac <rtems_semaphore_release>
return sc;
10a2a5: 83 c4 10 add $0x10,%esp
}
10a2a8: 8b 45 e0 mov -0x20(%ebp),%eax
10a2ab: 8d 65 f4 lea -0xc(%ebp),%esp
10a2ae: 5b pop %ebx
10a2af: 5e pop %esi
10a2b0: 5f pop %edi
10a2b1: c9 leave
10a2b2: c3 ret
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
10a2b3: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
10a2ba: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
tty->read_start_column = tty->column;
10a2c1: 8b 43 28 mov 0x28(%ebx),%eax
10a2c4: 89 43 2c mov %eax,0x2c(%ebx)
if (tty->device.pollRead != NULL &&
10a2c7: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
10a2cd: 85 c0 test %eax,%eax
10a2cf: 74 0e je 10a2df <rtems_termios_read+0x107>
10a2d1: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx
10a2d7: 85 d2 test %edx,%edx
10a2d9: 0f 84 82 01 00 00 je 10a461 <rtems_termios_read+0x289>
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
10a2df: 8b 73 74 mov 0x74(%ebx),%esi
rtems_status_code sc;
int wait = (int)1;
10a2e2: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
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)(
10a2e9: 8d 4b 49 lea 0x49(%ebx),%ecx
10a2ec: 89 4d d4 mov %ecx,-0x2c(%ebp)
10a2ef: 90 nop
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a2f0: 8b 53 5c mov 0x5c(%ebx),%edx
10a2f3: 8b 43 60 mov 0x60(%ebx),%eax
10a2f6: 39 c2 cmp %eax,%edx
10a2f8: 0f 84 06 01 00 00 je 10a404 <rtems_termios_read+0x22c>
(tty->ccount < (CBUFSIZE-1))) {
10a2fe: a1 a0 51 12 00 mov 0x1251a0,%eax
10a303: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a304: 3b 43 20 cmp 0x20(%ebx),%eax
10a307: 7f 3c jg 10a345 <rtems_termios_read+0x16d><== ALWAYS TAKEN
10a309: e9 f6 00 00 00 jmp 10a404 <rtems_termios_read+0x22c><== NOT EXECUTED
10a30e: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
10a310: 0f b6 c1 movzbl %cl,%eax
10a313: 89 da mov %ebx,%edx
10a315: e8 9e fd ff ff call 10a0b8 <siproc>
10a31a: 85 c0 test %eax,%eax
10a31c: 74 07 je 10a325 <rtems_termios_read+0x14d>
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
10a31e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
timeout = tty->rawInBufSemaphoreTimeout;
10a325: 8b 73 70 mov 0x70(%ebx),%esi
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a328: 8b 53 5c mov 0x5c(%ebx),%edx
10a32b: 8b 43 60 mov 0x60(%ebx),%eax
10a32e: 39 c2 cmp %eax,%edx
10a330: 0f 84 ce 00 00 00 je 10a404 <rtems_termios_read+0x22c>
(tty->ccount < (CBUFSIZE-1))) {
10a336: a1 a0 51 12 00 mov 0x1251a0,%eax
10a33b: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a33c: 39 43 20 cmp %eax,0x20(%ebx)
10a33f: 0f 8d bf 00 00 00 jge 10a404 <rtems_termios_read+0x22c><== NEVER TAKEN
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
10a345: 8b 43 5c mov 0x5c(%ebx),%eax
10a348: 8b 4b 64 mov 0x64(%ebx),%ecx
10a34b: 40 inc %eax
10a34c: 31 d2 xor %edx,%edx
10a34e: f7 f1 div %ecx
c = tty->rawInBuf.theBuf[newHead];
10a350: 8b 43 58 mov 0x58(%ebx),%eax
10a353: 8a 0c 10 mov (%eax,%edx,1),%cl
tty->rawInBuf.Head = newHead;
10a356: 89 53 5c mov %edx,0x5c(%ebx)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
10a359: 8b 43 60 mov 0x60(%ebx),%eax
10a35c: 8b 7b 64 mov 0x64(%ebx),%edi
% tty->rawInBuf.Size)
10a35f: 8b 73 64 mov 0x64(%ebx),%esi
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
10a362: 8d 04 07 lea (%edi,%eax,1),%eax
10a365: 29 d0 sub %edx,%eax
% tty->rawInBuf.Size)
10a367: 31 d2 xor %edx,%edx
10a369: f7 f6 div %esi
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
10a36b: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx
10a371: 73 5d jae 10a3d0 <rtems_termios_read+0x1f8><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
10a373: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a379: 83 e0 fe and $0xfffffffe,%eax
10a37c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
10a382: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a388: 25 02 02 00 00 and $0x202,%eax
10a38d: 3d 02 02 00 00 cmp $0x202,%eax
10a392: 0f 84 94 00 00 00 je 10a42c <rtems_termios_read+0x254><== NEVER TAKEN
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
10a398: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a39e: f6 c4 01 test $0x1,%ah
10a3a1: 74 2d je 10a3d0 <rtems_termios_read+0x1f8><== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
10a3a3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a3a9: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
10a3ac: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
10a3b2: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
10a3b8: 85 c0 test %eax,%eax <== NOT EXECUTED
10a3ba: 74 14 je 10a3d0 <rtems_termios_read+0x1f8><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
10a3bc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a3bf: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a3c2: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED
10a3c5: ff d0 call *%eax <== NOT EXECUTED
10a3c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a3ca: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED
10a3cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
10a3d0: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10a3d4: 0f 85 36 ff ff ff jne 10a310 <rtems_termios_read+0x138><== ALWAYS TAKEN
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
10a3da: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
10a3dd: 89 da mov %ebx,%edx <== NOT EXECUTED
10a3df: e8 d4 fc ff ff call 10a0b8 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
10a3e4: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED
10a3e8: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
10a3eb: 0f 8d 2d ff ff ff jge 10a31e <rtems_termios_read+0x146><== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
10a3f1: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a3f4: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
10a3f7: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
10a3fa: 39 c2 cmp %eax,%edx <== NOT EXECUTED
10a3fc: 0f 85 34 ff ff ff jne 10a336 <rtems_termios_read+0x15e><== NOT EXECUTED
10a402: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
10a404: 8b 4d e4 mov -0x1c(%ebp),%ecx
10a407: 85 c9 test %ecx,%ecx
10a409: 0f 84 45 fe ff ff je 10a254 <rtems_termios_read+0x7c>
sc = rtems_semaphore_obtain(
10a40f: 52 push %edx
10a410: 56 push %esi
10a411: ff 73 6c pushl 0x6c(%ebx)
10a414: ff 73 68 pushl 0x68(%ebx)
10a417: e8 94 12 00 00 call 10b6b0 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
10a41c: 83 c4 10 add $0x10,%esp
10a41f: 85 c0 test %eax,%eax
10a421: 0f 84 c9 fe ff ff je 10a2f0 <rtems_termios_read+0x118><== ALWAYS TAKEN
10a427: e9 28 fe ff ff jmp 10a254 <rtems_termios_read+0x7c><== NOT EXECUTED
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
10a42c: 8b bb 94 00 00 00 mov 0x94(%ebx),%edi <== NOT EXECUTED
10a432: 85 ff test %edi,%edi <== NOT EXECUTED
10a434: 74 0e je 10a444 <rtems_termios_read+0x26c><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
10a436: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a43c: a8 20 test $0x20,%al <== NOT EXECUTED
10a43e: 0f 84 54 ff ff ff je 10a398 <rtems_termios_read+0x1c0><== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
10a444: 56 push %esi <== NOT EXECUTED
10a445: 6a 01 push $0x1 <== NOT EXECUTED
10a447: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10a44a: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a44d: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED
10a450: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a456: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a459: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED
10a45c: e9 6f ff ff ff jmp 10a3d0 <rtems_termios_read+0x1f8><== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
10a461: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10a465: 75 1d jne 10a484 <rtems_termios_read+0x2ac><== NEVER TAKEN
10a467: eb 39 jmp 10a4a2 <rtems_termios_read+0x2ca>
10a469: 8d 76 00 lea 0x0(%esi),%esi
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
10a46c: 0f b6 c0 movzbl %al,%eax
10a46f: 89 da mov %ebx,%edx
10a471: e8 42 fc ff ff call 10a0b8 <siproc>
10a476: 85 c0 test %eax,%eax
10a478: 0f 85 d6 fd ff ff jne 10a254 <rtems_termios_read+0x7c>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
10a47e: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10a484: 83 ec 0c sub $0xc,%esp
10a487: ff 73 10 pushl 0x10(%ebx)
10a48a: ff d0 call *%eax
if (n < 0) {
10a48c: 83 c4 10 add $0x10,%esp
10a48f: 85 c0 test %eax,%eax
10a491: 79 d9 jns 10a46c <rtems_termios_read+0x294><== NEVER TAKEN
rtems_task_wake_after (1);
10a493: 83 ec 0c sub $0xc,%esp
10a496: 6a 01 push $0x1
10a498: e8 cb 16 00 00 call 10bb68 <rtems_task_wake_after>
10a49d: 83 c4 10 add $0x10,%esp
10a4a0: eb dc jmp 10a47e <rtems_termios_read+0x2a6>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
10a4a2: e8 01 0b 00 00 call 10afa8 <rtems_clock_get_ticks_since_boot>
10a4a7: 89 c6 mov %eax,%esi
10a4a9: 8d 76 00 lea 0x0(%esi),%esi
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10a4ac: 83 ec 0c sub $0xc,%esp
10a4af: ff 73 10 pushl 0x10(%ebx)
10a4b2: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
10a4b8: 83 c4 10 add $0x10,%esp
10a4bb: 85 c0 test %eax,%eax
10a4bd: 78 25 js 10a4e4 <rtems_termios_read+0x30c>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
10a4bf: 0f b6 c0 movzbl %al,%eax
10a4c2: 89 da mov %ebx,%edx
10a4c4: e8 ef fb ff ff call 10a0b8 <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
10a4c9: 8a 43 47 mov 0x47(%ebx),%al
10a4cc: 0f b6 d0 movzbl %al,%edx
10a4cf: 39 53 20 cmp %edx,0x20(%ebx)
10a4d2: 0f 8d 7c fd ff ff jge 10a254 <rtems_termios_read+0x7c><== NEVER TAKEN
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
10a4d8: 84 c0 test %al,%al
10a4da: 74 d0 je 10a4ac <rtems_termios_read+0x2d4><== NEVER TAKEN
10a4dc: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
10a4e0: 74 ca je 10a4ac <rtems_termios_read+0x2d4><== NEVER TAKEN
10a4e2: eb be jmp 10a4a2 <rtems_termios_read+0x2ca>
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
10a4e4: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
10a4e8: 74 1d je 10a507 <rtems_termios_read+0x32f><== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
10a4ea: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
10a4ee: 74 08 je 10a4f8 <rtems_termios_read+0x320><== NEVER TAKEN
10a4f0: 8b 43 20 mov 0x20(%ebx),%eax
10a4f3: 85 c0 test %eax,%eax
10a4f5: 75 1a jne 10a511 <rtems_termios_read+0x339>
10a4f7: 90 nop
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
10a4f8: 83 ec 0c sub $0xc,%esp
10a4fb: 6a 01 push $0x1
10a4fd: e8 66 16 00 00 call 10bb68 <rtems_task_wake_after>
10a502: 83 c4 10 add $0x10,%esp
10a505: eb a5 jmp 10a4ac <rtems_termios_read+0x2d4>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
10a507: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10a50b: 0f 84 43 fd ff ff je 10a254 <rtems_termios_read+0x7c><== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
10a511: e8 92 0a 00 00 call 10afa8 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
10a516: 29 f0 sub %esi,%eax
10a518: 3b 43 54 cmp 0x54(%ebx),%eax
10a51b: 76 db jbe 10a4f8 <rtems_termios_read+0x320>
10a51d: e9 32 fd ff ff jmp 10a254 <rtems_termios_read+0x7c>
0010a8b8 <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)
{
10a8b8: 55 push %ebp
10a8b9: 89 e5 mov %esp,%ebp
10a8bb: 57 push %edi
10a8bc: 56 push %esi
10a8bd: 53 push %ebx
10a8be: 83 ec 0c sub $0xc,%esp
10a8c1: 8b 5d 08 mov 0x8(%ebp),%ebx
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
10a8c4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a8ca: 25 03 04 00 00 and $0x403,%eax
10a8cf: 3d 01 04 00 00 cmp $0x401,%eax
10a8d4: 0f 84 62 01 00 00 je 10aa3c <rtems_termios_refill_transmitter+0x184><== NEVER TAKEN
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
10a8da: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a8e0: 83 e0 03 and $0x3,%eax
10a8e3: 83 f8 02 cmp $0x2,%eax
10a8e6: 0f 84 8c 01 00 00 je 10aa78 <rtems_termios_refill_transmitter+0x1c0><== NEVER TAKEN
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
10a8ec: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
10a8f2: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
10a8f8: 39 c2 cmp %eax,%edx
10a8fa: 0f 84 a4 00 00 00 je 10a9a4 <rtems_termios_refill_transmitter+0xec>
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
10a900: 9c pushf
10a901: fa cli
10a902: 58 pop %eax
len = tty->t_dqlen;
10a903: 8b b3 90 00 00 00 mov 0x90(%ebx),%esi
tty->t_dqlen = 0;
10a909: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
10a910: 00 00 00
rtems_interrupt_enable(level);
10a913: 50 push %eax
10a914: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
10a915: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
10a91b: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
10a921: 8d 04 06 lea (%esi,%eax,1),%eax
10a924: 31 d2 xor %edx,%edx
10a926: f7 f1 div %ecx
10a928: 89 d6 mov %edx,%esi
tty->rawOutBuf.Tail = newTail;
10a92a: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
10a930: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
10a937: 0f 84 e7 00 00 00 je 10aa24 <rtems_termios_refill_transmitter+0x16c>
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
10a93d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10a943: 39 f0 cmp %esi,%eax
10a945: 74 79 je 10a9c0 <rtems_termios_refill_transmitter+0x108>
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))
10a947: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a94d: 25 10 02 00 00 and $0x210,%eax
10a952: 3d 10 02 00 00 cmp $0x210,%eax
10a957: 0f 84 57 01 00 00 je 10aab4 <rtems_termios_refill_transmitter+0x1fc><== NEVER TAKEN
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
10a95d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10a963: 39 c6 cmp %eax,%esi
10a965: 0f 87 91 00 00 00 ja 10a9fc <rtems_termios_refill_transmitter+0x144>
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
10a96b: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi
10a971: 29 f7 sub %esi,%edi
/* 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)) {
10a973: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a979: f6 c4 06 test $0x6,%ah
10a97c: 0f 85 91 00 00 00 jne 10aa13 <rtems_termios_refill_transmitter+0x15b>
10a982: 89 f8 mov %edi,%eax
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
10a984: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
10a98b: 00 00 00
(*tty->device.write)(
10a98e: 52 push %edx
10a98f: 50 push %eax
10a990: 8b 43 7c mov 0x7c(%ebx),%eax
10a993: 01 f0 add %esi,%eax
10a995: 50 push %eax
10a996: ff 73 10 pushl 0x10(%ebx)
10a999: ff 93 a4 00 00 00 call *0xa4(%ebx)
10a99f: 83 c4 10 add $0x10,%esp
10a9a2: eb 48 jmp 10a9ec <rtems_termios_refill_transmitter+0x134>
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
10a9a4: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
10a9ab: 0f 84 2b 01 00 00 je 10aadc <rtems_termios_refill_transmitter+0x224><== NEVER TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
10a9b1: 31 ff xor %edi,%edi
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10a9b3: 89 f8 mov %edi,%eax
10a9b5: 8d 65 f4 lea -0xc(%ebp),%esp
10a9b8: 5b pop %ebx
10a9b9: 5e pop %esi
10a9ba: 5f pop %edi
10a9bb: c9 leave
10a9bc: c3 ret
10a9bd: 8d 76 00 lea 0x0(%esi),%esi
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
10a9c0: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
10a9c7: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
10a9ca: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax
10a9d0: 85 c0 test %eax,%eax
10a9d2: 0f 84 1c 01 00 00 je 10aaf4 <rtems_termios_refill_transmitter+0x23c><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
10a9d8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a9db: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED
10a9e1: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
10a9e4: 52 push %edx <== NOT EXECUTED
10a9e5: ff d0 call *%eax <== NOT EXECUTED
10a9e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
10a9ea: 31 ff xor %edi,%edi <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
10a9ec: 89 b3 84 00 00 00 mov %esi,0x84(%ebx)
}
return nToSend;
}
10a9f2: 89 f8 mov %edi,%eax
10a9f4: 8d 65 f4 lea -0xc(%ebp),%esp
10a9f7: 5b pop %ebx
10a9f8: 5e pop %esi
10a9f9: 5f pop %edi
10a9fa: c9 leave
10a9fb: c3 ret
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
10a9fc: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi
10aa02: 29 f7 sub %esi,%edi
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)) {
10aa04: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10aa0a: f6 c4 06 test $0x6,%ah
10aa0d: 0f 84 6f ff ff ff je 10a982 <rtems_termios_refill_transmitter+0xca><== ALWAYS TAKEN
10aa13: b8 01 00 00 00 mov $0x1,%eax
nToSend = 1;
10aa18: bf 01 00 00 00 mov $0x1,%edi
10aa1d: e9 62 ff ff ff jmp 10a984 <rtems_termios_refill_transmitter+0xcc>
10aa22: 66 90 xchg %ax,%ax
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
10aa24: 83 ec 0c sub $0xc,%esp
10aa27: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10aa2d: e8 7a 0d 00 00 call 10b7ac <rtems_semaphore_release>
10aa32: 83 c4 10 add $0x10,%esp
10aa35: e9 03 ff ff ff jmp 10a93d <rtems_termios_refill_transmitter+0x85>
10aa3a: 66 90 xchg %ax,%ax
/* 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, (void *)&(tty->termios.c_cc[VSTOP]), 1);
10aa3c: 56 push %esi <== NOT EXECUTED
10aa3d: 6a 01 push $0x1 <== NOT EXECUTED
10aa3f: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
10aa42: 50 push %eax <== NOT EXECUTED
10aa43: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10aa46: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
10aa4c: 9c pushf <== NOT EXECUTED
10aa4d: fa cli <== NOT EXECUTED
10aa4e: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
10aa4f: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
10aa55: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10aa5b: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
10aa5e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
10aa64: 52 push %edx <== NOT EXECUTED
10aa65: 9d popf <== NOT EXECUTED
10aa66: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend = 1;
10aa69: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10aa6e: 89 f8 mov %edi,%eax <== NOT EXECUTED
10aa70: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10aa73: 5b pop %ebx <== NOT EXECUTED
10aa74: 5e pop %esi <== NOT EXECUTED
10aa75: 5f pop %edi <== NOT EXECUTED
10aa76: c9 leave <== NOT EXECUTED
10aa77: c3 ret <== 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, (void *)&(tty->termios.c_cc[VSTART]), 1);
10aa78: 51 push %ecx <== NOT EXECUTED
10aa79: 6a 01 push $0x1 <== NOT EXECUTED
10aa7b: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
10aa7e: 50 push %eax <== NOT EXECUTED
10aa7f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10aa82: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
10aa88: 9c pushf <== NOT EXECUTED
10aa89: fa cli <== NOT EXECUTED
10aa8a: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
10aa8b: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
10aa91: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10aa97: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
10aa9a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
10aaa0: 52 push %edx <== NOT EXECUTED
10aaa1: 9d popf <== NOT EXECUTED
10aaa2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend = 1;
10aaa5: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10aaaa: 89 f8 mov %edi,%eax <== NOT EXECUTED
10aaac: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10aaaf: 5b pop %ebx <== NOT EXECUTED
10aab0: 5e pop %esi <== NOT EXECUTED
10aab1: 5f pop %edi <== NOT EXECUTED
10aab2: c9 leave <== NOT EXECUTED
10aab3: c3 ret <== 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);
10aab4: 9c pushf <== NOT EXECUTED
10aab5: fa cli <== NOT EXECUTED
10aab6: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
10aab7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10aabd: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
10aac0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
10aac6: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
10aacd: 00 00 00
rtems_interrupt_enable(level);
10aad0: 52 push %edx <== NOT EXECUTED
10aad1: 9d popf <== NOT EXECUTED
nToSend = 0;
10aad2: 31 ff xor %edi,%edi <== NOT EXECUTED
10aad4: e9 13 ff ff ff jmp 10a9ec <rtems_termios_refill_transmitter+0x134><== NOT EXECUTED
10aad9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
10aadc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10aadf: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED
10aae5: e8 c2 0c 00 00 call 10b7ac <rtems_semaphore_release><== NOT EXECUTED
10aaea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
10aaed: 31 ff xor %edi,%edi <== NOT EXECUTED
10aaef: e9 bf fe ff ff jmp 10a9b3 <rtems_termios_refill_transmitter+0xfb><== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
10aaf4: 31 ff xor %edi,%edi
10aaf6: e9 f1 fe ff ff jmp 10a9ec <rtems_termios_refill_transmitter+0x134>
0010a84c <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
10a84c: 55 push %ebp
10a84d: 89 e5 mov %esp,%ebp
10a84f: 57 push %edi
10a850: 56 push %esi
10a851: 53 push %ebx
10a852: 83 ec 1c sub $0x1c,%esp
10a855: 8b 5d 08 mov 0x8(%ebp),%ebx
10a858: 8d 75 e0 lea -0x20(%ebp),%esi
10a85b: 8d 7d e7 lea -0x19(%ebp),%edi
10a85e: eb 14 jmp 10a874 <rtems_termios_rxdaemon+0x28>
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
10a860: 83 ec 0c sub $0xc,%esp
10a863: ff 73 10 pushl 0x10(%ebx)
10a866: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (c != EOF) {
10a86c: 83 c4 10 add $0x10,%esp
10a86f: 83 f8 ff cmp $0xffffffff,%eax
10a872: 75 30 jne 10a8a4 <rtems_termios_rxdaemon+0x58>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
10a874: 56 push %esi
10a875: 6a 00 push $0x0
10a877: 6a 02 push $0x2
10a879: 6a 03 push $0x3
10a87b: e8 94 07 00 00 call 10b014 <rtems_event_receive>
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
10a880: 83 c4 10 add $0x10,%esp
10a883: f6 45 e0 01 testb $0x1,-0x20(%ebp)
10a887: 74 d7 je 10a860 <rtems_termios_rxdaemon+0x14><== ALWAYS TAKEN
tty->rxTaskId = 0;
10a889: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
10a890: 00 00 00
rtems_task_delete(RTEMS_SELF);
10a893: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a896: 6a 00 push $0x0 <== NOT EXECUTED
10a898: e8 0f 11 00 00 call 10b9ac <rtems_task_delete> <== NOT EXECUTED
10a89d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a8a0: eb be jmp 10a860 <rtems_termios_rxdaemon+0x14><== NOT EXECUTED
10a8a2: 66 90 xchg %ax,%ax <== NOT EXECUTED
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
10a8a4: 88 45 e7 mov %al,-0x19(%ebp)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
10a8a7: 50 push %eax
10a8a8: 6a 01 push $0x1
10a8aa: 57 push %edi
10a8ab: 53 push %ebx
10a8ac: e8 8f fc ff ff call 10a540 <rtems_termios_enqueue_raw_characters>
10a8b1: 83 c4 10 add $0x10,%esp
10a8b4: eb be jmp 10a874 <rtems_termios_rxdaemon+0x28>
0010aafc <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
10aafc: 55 push %ebp
10aafd: 89 e5 mov %esp,%ebp
10aaff: 56 push %esi
10ab00: 53 push %ebx
10ab01: 83 ec 10 sub $0x10,%esp
10ab04: 8b 5d 08 mov 0x8(%ebp),%ebx
10ab07: 8d 75 f4 lea -0xc(%ebp),%esi
10ab0a: eb 28 jmp 10ab34 <rtems_termios_txdaemon+0x38>
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
10ab0c: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10ab12: c1 e0 05 shl $0x5,%eax
10ab15: 8b 80 d4 70 12 00 mov 0x1270d4(%eax),%eax
10ab1b: 85 c0 test %eax,%eax
10ab1d: 74 09 je 10ab28 <rtems_termios_txdaemon+0x2c><== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
10ab1f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ab22: 53 push %ebx <== NOT EXECUTED
10ab23: ff d0 call *%eax <== NOT EXECUTED
10ab25: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
10ab28: 83 ec 0c sub $0xc,%esp
10ab2b: 53 push %ebx
10ab2c: e8 87 fd ff ff call 10a8b8 <rtems_termios_refill_transmitter>
}
10ab31: 83 c4 10 add $0x10,%esp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
10ab34: 56 push %esi
10ab35: 6a 00 push $0x0
10ab37: 6a 02 push $0x2
10ab39: 6a 03 push $0x3
10ab3b: e8 d4 04 00 00 call 10b014 <rtems_event_receive>
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
10ab40: 83 c4 10 add $0x10,%esp
10ab43: f6 45 f4 01 testb $0x1,-0xc(%ebp)
10ab47: 74 c3 je 10ab0c <rtems_termios_txdaemon+0x10><== ALWAYS TAKEN
tty->txTaskId = 0;
10ab49: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
10ab50: 00 00 00
rtems_task_delete(RTEMS_SELF);
10ab53: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ab56: 6a 00 push $0x0 <== NOT EXECUTED
10ab58: e8 4f 0e 00 00 call 10b9ac <rtems_task_delete> <== NOT EXECUTED
10ab5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ab60: eb aa jmp 10ab0c <rtems_termios_txdaemon+0x10><== NOT EXECUTED
0010a10c <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
10a10c: 55 push %ebp
10a10d: 89 e5 mov %esp,%ebp
10a10f: 57 push %edi
10a110: 56 push %esi
10a111: 53 push %ebx
10a112: 83 ec 20 sub $0x20,%esp
10a115: 8b 7d 08 mov 0x8(%ebp),%edi
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a118: 8b 07 mov (%edi),%eax
10a11a: 8b 70 34 mov 0x34(%eax),%esi
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a11d: 6a 00 push $0x0
10a11f: 6a 00 push $0x0
10a121: ff 76 18 pushl 0x18(%esi)
10a124: e8 87 15 00 00 call 10b6b0 <rtems_semaphore_obtain>
10a129: 89 45 e4 mov %eax,-0x1c(%ebp)
if (sc != RTEMS_SUCCESSFUL)
10a12c: 83 c4 10 add $0x10,%esp
10a12f: 85 c0 test %eax,%eax
10a131: 75 29 jne 10a15c <rtems_termios_write+0x50><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
10a133: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
10a139: c1 e0 05 shl $0x5,%eax
10a13c: 8b 80 cc 70 12 00 mov 0x1270cc(%eax),%eax
10a142: 85 c0 test %eax,%eax
10a144: 74 22 je 10a168 <rtems_termios_write+0x5c>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
10a146: 83 ec 08 sub $0x8,%esp
10a149: 57 push %edi
10a14a: 56 push %esi
10a14b: ff d0 call *%eax
10a14d: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_semaphore_release (tty->osem);
10a150: 5f pop %edi
10a151: ff 76 18 pushl 0x18(%esi)
10a154: e8 53 16 00 00 call 10b7ac <rtems_semaphore_release>
return sc;
10a159: 83 c4 10 add $0x10,%esp
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
10a15c: 8b 45 e4 mov -0x1c(%ebp),%eax
10a15f: 8d 65 f4 lea -0xc(%ebp),%esp
10a162: 5b pop %ebx
10a163: 5e pop %esi
10a164: 5f pop %edi
10a165: c9 leave
10a166: c3 ret
10a167: 90 nop
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) {
10a168: f6 46 34 01 testb $0x1,0x34(%esi)
10a16c: 74 4e je 10a1bc <rtems_termios_write+0xb0><== NEVER TAKEN
uint32_t count = args->count;
10a16e: 8b 47 10 mov 0x10(%edi),%eax
10a171: 89 45 e0 mov %eax,-0x20(%ebp)
char *buffer = args->buffer;
10a174: 8b 47 0c mov 0xc(%edi),%eax
while (count--)
10a177: 8b 5d e0 mov -0x20(%ebp),%ebx
10a17a: 85 db test %ebx,%ebx
10a17c: 74 56 je 10a1d4 <rtems_termios_write+0xc8><== NEVER TAKEN
10a17e: 31 db xor %ebx,%ebx
10a180: 89 7d dc mov %edi,-0x24(%ebp)
10a183: 89 c7 mov %eax,%edi
10a185: 8d 76 00 lea 0x0(%esi),%esi
oproc (*buffer++, tty);
10a188: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax
10a18c: 89 f2 mov %esi,%edx
10a18e: e8 6d fa ff ff call 109c00 <oproc>
10a193: 43 inc %ebx
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
10a194: 39 5d e0 cmp %ebx,-0x20(%ebp)
10a197: 75 ef jne 10a188 <rtems_termios_write+0x7c>
10a199: 8b 7d dc mov -0x24(%ebp),%edi
10a19c: 8b 47 10 mov 0x10(%edi),%eax
oproc (*buffer++, tty);
args->bytes_moved = args->count;
10a19f: 89 47 18 mov %eax,0x18(%edi)
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
10a1a2: 83 ec 0c sub $0xc,%esp
10a1a5: ff 76 18 pushl 0x18(%esi)
10a1a8: e8 ff 15 00 00 call 10b7ac <rtems_semaphore_release>
return sc;
10a1ad: 83 c4 10 add $0x10,%esp
}
10a1b0: 8b 45 e4 mov -0x1c(%ebp),%eax
10a1b3: 8d 65 f4 lea -0xc(%ebp),%esp
10a1b6: 5b pop %ebx
10a1b7: 5e pop %esi
10a1b8: 5f pop %edi
10a1b9: c9 leave
10a1ba: c3 ret
10a1bb: 90 nop
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
10a1bc: 51 push %ecx <== NOT EXECUTED
10a1bd: 56 push %esi <== NOT EXECUTED
10a1be: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED
10a1c1: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED
10a1c4: e8 03 f9 ff ff call 109acc <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
10a1c9: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED
10a1cc: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED
10a1cf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a1d2: eb ce jmp 10a1a2 <rtems_termios_write+0x96><== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
10a1d4: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a1d6: eb c7 jmp 10a19f <rtems_termios_write+0x93><== NOT EXECUTED
001186cc <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
1186cc: 55 push %ebp
1186cd: 89 e5 mov %esp,%ebp
1186cf: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
1186d2: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
1186d5: 50 push %eax
1186d6: ff 75 08 pushl 0x8(%ebp)
1186d9: 68 40 2c 14 00 push $0x142c40
1186de: e8 e5 2b 00 00 call 11b2c8 <_Objects_Get>
switch ( location ) {
1186e3: 83 c4 10 add $0x10,%esp
1186e6: 8b 55 f4 mov -0xc(%ebp),%edx
1186e9: 85 d2 test %edx,%edx
1186eb: 74 07 je 1186f4 <rtems_timer_cancel+0x28>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1186ed: b8 04 00 00 00 mov $0x4,%eax
}
1186f2: c9 leave
1186f3: c3 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
1186f4: 83 78 38 04 cmpl $0x4,0x38(%eax)
1186f8: 74 0f je 118709 <rtems_timer_cancel+0x3d><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
1186fa: 83 ec 0c sub $0xc,%esp
1186fd: 83 c0 10 add $0x10,%eax
118700: 50 push %eax
118701: e8 46 48 00 00 call 11cf4c <_Watchdog_Remove>
118706: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
118709: e8 6e 36 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11870e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118710: c9 leave
118711: c3 ret
0010bfe8 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
10bfe8: 55 push %ebp
10bfe9: 89 e5 mov %esp,%ebp
10bfeb: 57 push %edi
10bfec: 56 push %esi
10bfed: 53 push %ebx
10bfee: 83 ec 0c sub $0xc,%esp
10bff1: 8b 5d 08 mov 0x8(%ebp),%ebx
10bff4: 8b 75 0c mov 0xc(%ebp),%esi
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
10bff7: 85 db test %ebx,%ebx
10bff9: 74 6d je 10c068 <rtems_timer_create+0x80>
return RTEMS_INVALID_NAME;
if ( !id )
10bffb: 85 f6 test %esi,%esi
10bffd: 0f 84 89 00 00 00 je 10c08c <rtems_timer_create+0xa4>
10c003: a1 b0 8f 12 00 mov 0x128fb0,%eax
10c008: 40 inc %eax
10c009: a3 b0 8f 12 00 mov %eax,0x128fb0
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
10c00e: 83 ec 0c sub $0xc,%esp
10c011: 68 20 9a 12 00 push $0x129a20
10c016: e8 31 0f 00 00 call 10cf4c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
10c01b: 83 c4 10 add $0x10,%esp
10c01e: 85 c0 test %eax,%eax
10c020: 74 56 je 10c078 <rtems_timer_create+0x90>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
10c022: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c029: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c030: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10c037: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10c03e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c045: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10c048: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c04b: 8b 0d 3c 9a 12 00 mov 0x129a3c,%ecx
10c051: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c054: 89 58 0c mov %ebx,0xc(%eax)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
10c057: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10c059: e8 5a 1e 00 00 call 10deb8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c05e: 31 c0 xor %eax,%eax
}
10c060: 8d 65 f4 lea -0xc(%ebp),%esp
10c063: 5b pop %ebx
10c064: 5e pop %esi
10c065: 5f pop %edi
10c066: c9 leave
10c067: c3 ret
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10c068: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c06d: 8d 65 f4 lea -0xc(%ebp),%esp
10c070: 5b pop %ebx
10c071: 5e pop %esi
10c072: 5f pop %edi
10c073: c9 leave
10c074: c3 ret
10c075: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
10c078: e8 3b 1e 00 00 call 10deb8 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10c07d: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c082: 8d 65 f4 lea -0xc(%ebp),%esp
10c085: 5b pop %ebx
10c086: 5e pop %esi
10c087: 5f pop %edi
10c088: c9 leave
10c089: c3 ret
10c08a: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10c08c: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c091: 8d 65 f4 lea -0xc(%ebp),%esp
10c094: 5b pop %ebx
10c095: 5e pop %esi
10c096: 5f pop %edi
10c097: c9 leave
10c098: c3 ret
001187c8 <rtems_timer_delete>:
*/
rtems_status_code rtems_timer_delete(
rtems_id id
)
{
1187c8: 55 push %ebp
1187c9: 89 e5 mov %esp,%ebp
1187cb: 53 push %ebx
1187cc: 83 ec 18 sub $0x18,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
1187cf: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
1187d2: 50 push %eax
1187d3: ff 75 08 pushl 0x8(%ebp)
1187d6: 68 40 2c 14 00 push $0x142c40
1187db: e8 e8 2a 00 00 call 11b2c8 <_Objects_Get>
1187e0: 89 c3 mov %eax,%ebx
switch ( location ) {
1187e2: 83 c4 10 add $0x10,%esp
1187e5: 8b 4d f4 mov -0xc(%ebp),%ecx
1187e8: 85 c9 test %ecx,%ecx
1187ea: 75 38 jne 118824 <rtems_timer_delete+0x5c>
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
1187ec: 83 ec 08 sub $0x8,%esp
1187ef: 50 push %eax
1187f0: 68 40 2c 14 00 push $0x142c40
1187f5: e8 56 26 00 00 call 11ae50 <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
1187fa: 8d 43 10 lea 0x10(%ebx),%eax
1187fd: 89 04 24 mov %eax,(%esp)
118800: e8 47 47 00 00 call 11cf4c <_Watchdog_Remove>
*/
RTEMS_INLINE_ROUTINE void _Timer_Free (
Timer_Control *the_timer
)
{
_Objects_Free( &_Timer_Information, &the_timer->Object );
118805: 58 pop %eax
118806: 5a pop %edx
118807: 53 push %ebx
118808: 68 40 2c 14 00 push $0x142c40
11880d: e8 3a 29 00 00 call 11b14c <_Objects_Free>
_Timer_Free( the_timer );
_Thread_Enable_dispatch();
118812: e8 65 35 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118817: 83 c4 10 add $0x10,%esp
11881a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11881c: 8b 5d fc mov -0x4(%ebp),%ebx
11881f: c9 leave
118820: c3 ret
118821: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118824: b8 04 00 00 00 mov $0x4,%eax
}
118829: 8b 5d fc mov -0x4(%ebp),%ebx
11882c: c9 leave
11882d: c3 ret
0010c09c <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
10c09c: 55 push %ebp
10c09d: 89 e5 mov %esp,%ebp
10c09f: 57 push %edi
10c0a0: 56 push %esi
10c0a1: 53 push %ebx
10c0a2: 83 ec 2c sub $0x2c,%esp
10c0a5: 8b 5d 0c mov 0xc(%ebp),%ebx
10c0a8: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10c0ab: 85 db test %ebx,%ebx
10c0ad: 0f 84 99 00 00 00 je 10c14c <rtems_timer_fire_after+0xb0>
return RTEMS_INVALID_NUMBER;
if ( !routine )
10c0b3: 85 f6 test %esi,%esi
10c0b5: 0f 84 b1 00 00 00 je 10c16c <rtems_timer_fire_after+0xd0>
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
10c0bb: 57 push %edi
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
10c0bc: 8d 45 e4 lea -0x1c(%ebp),%eax
10c0bf: 50 push %eax
10c0c0: ff 75 08 pushl 0x8(%ebp)
10c0c3: 68 20 9a 12 00 push $0x129a20
10c0c8: e8 37 13 00 00 call 10d404 <_Objects_Get>
10c0cd: 89 c7 mov %eax,%edi
switch ( location ) {
10c0cf: 83 c4 10 add $0x10,%esp
10c0d2: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c0d5: 85 c9 test %ecx,%ecx
10c0d7: 74 0f je 10c0e8 <rtems_timer_fire_after+0x4c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c0d9: b8 04 00 00 00 mov $0x4,%eax
}
10c0de: 8d 65 f4 lea -0xc(%ebp),%esp
10c0e1: 5b pop %ebx
10c0e2: 5e pop %esi
10c0e3: 5f pop %edi
10c0e4: c9 leave
10c0e5: c3 ret
10c0e6: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
10c0e8: 8d 50 10 lea 0x10(%eax),%edx
10c0eb: 83 ec 0c sub $0xc,%esp
10c0ee: 52 push %edx
10c0ef: 89 55 d4 mov %edx,-0x2c(%ebp)
10c0f2: e8 fd 2c 00 00 call 10edf4 <_Watchdog_Remove>
_ISR_Disable( level );
10c0f7: 9c pushf
10c0f8: fa cli
10c0f9: 58 pop %eax
/*
* 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 ) {
10c0fa: 83 c4 10 add $0x10,%esp
10c0fd: 8b 57 18 mov 0x18(%edi),%edx
10c100: 85 d2 test %edx,%edx
10c102: 8b 55 d4 mov -0x2c(%ebp),%edx
10c105: 75 55 jne 10c15c <rtems_timer_fire_after+0xc0>
/*
* 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;
10c107: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c10e: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10c115: 89 77 2c mov %esi,0x2c(%edi)
the_watchdog->id = id;
10c118: 8b 4d 08 mov 0x8(%ebp),%ecx
10c11b: 89 4f 30 mov %ecx,0x30(%edi)
the_watchdog->user_data = user_data;
10c11e: 8b 4d 14 mov 0x14(%ebp),%ecx
10c121: 89 4f 34 mov %ecx,0x34(%edi)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
10c124: 50 push %eax
10c125: 9d popf
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c126: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c129: 83 ec 08 sub $0x8,%esp
10c12c: 52 push %edx
10c12d: 68 bc 90 12 00 push $0x1290bc
10c132: e8 85 2b 00 00 call 10ecbc <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
10c137: e8 7c 1d 00 00 call 10deb8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c13c: 83 c4 10 add $0x10,%esp
10c13f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c141: 8d 65 f4 lea -0xc(%ebp),%esp
10c144: 5b pop %ebx
10c145: 5e pop %esi
10c146: 5f pop %edi
10c147: c9 leave
10c148: c3 ret
10c149: 8d 76 00 lea 0x0(%esi),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
10c14c: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c151: 8d 65 f4 lea -0xc(%ebp),%esp
10c154: 5b pop %ebx
10c155: 5e pop %esi
10c156: 5f pop %edi
10c157: c9 leave
10c158: c3 ret
10c159: 8d 76 00 lea 0x0(%esi),%esi
* 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 );
10c15c: 50 push %eax
10c15d: 9d popf
_Thread_Enable_dispatch();
10c15e: e8 55 1d 00 00 call 10deb8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c163: 31 c0 xor %eax,%eax
10c165: e9 74 ff ff ff jmp 10c0de <rtems_timer_fire_after+0x42>
10c16a: 66 90 xchg %ax,%ax
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
10c16c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c171: 8d 65 f4 lea -0xc(%ebp),%esp
10c174: 5b pop %ebx
10c175: 5e pop %esi
10c176: 5f pop %edi
10c177: c9 leave
10c178: c3 ret
00118910 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118910: 55 push %ebp
118911: 89 e5 mov %esp,%ebp
118913: 57 push %edi
118914: 56 push %esi
118915: 53 push %ebx
118916: 83 ec 2c sub $0x2c,%esp
118919: 8b 75 08 mov 0x8(%ebp),%esi
11891c: 8b 7d 0c mov 0xc(%ebp),%edi
11891f: 8b 5d 10 mov 0x10(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
118922: 80 3d e4 21 14 00 00 cmpb $0x0,0x1421e4
118929: 75 0d jne 118938 <rtems_timer_fire_when+0x28>
return RTEMS_NOT_DEFINED;
11892b: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118930: 8d 65 f4 lea -0xc(%ebp),%esp
118933: 5b pop %ebx
118934: 5e pop %esi
118935: 5f pop %edi
118936: c9 leave
118937: c3 ret
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
118938: 83 ec 0c sub $0xc,%esp
11893b: 57 push %edi
11893c: e8 87 d4 ff ff call 115dc8 <_TOD_Validate>
118941: 83 c4 10 add $0x10,%esp
118944: 84 c0 test %al,%al
118946: 74 1e je 118966 <rtems_timer_fire_when+0x56>
return RTEMS_INVALID_CLOCK;
if ( !routine )
118948: 85 db test %ebx,%ebx
11894a: 0f 84 a4 00 00 00 je 1189f4 <rtems_timer_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
118950: 83 ec 0c sub $0xc,%esp
118953: 57 push %edi
118954: e8 e3 d3 ff ff call 115d3c <_TOD_To_seconds>
118959: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
11895b: 83 c4 10 add $0x10,%esp
11895e: 3b 05 a4 22 14 00 cmp 0x1422a4,%eax
118964: 77 0e ja 118974 <rtems_timer_fire_when+0x64>
return RTEMS_INVALID_CLOCK;
118966: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11896b: 8d 65 f4 lea -0xc(%ebp),%esp
11896e: 5b pop %ebx
11896f: 5e pop %esi
118970: 5f pop %edi
118971: c9 leave
118972: c3 ret
118973: 90 nop
118974: 50 push %eax
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
118975: 8d 45 e4 lea -0x1c(%ebp),%eax
118978: 50 push %eax
118979: 56 push %esi
11897a: 68 40 2c 14 00 push $0x142c40
11897f: e8 44 29 00 00 call 11b2c8 <_Objects_Get>
switch ( location ) {
118984: 83 c4 10 add $0x10,%esp
118987: 8b 4d e4 mov -0x1c(%ebp),%ecx
11898a: 85 c9 test %ecx,%ecx
11898c: 75 5a jne 1189e8 <rtems_timer_fire_when+0xd8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11898e: 8d 48 10 lea 0x10(%eax),%ecx
118991: 83 ec 0c sub $0xc,%esp
118994: 51 push %ecx
118995: 89 45 d0 mov %eax,-0x30(%ebp)
118998: 89 4d d4 mov %ecx,-0x2c(%ebp)
11899b: e8 ac 45 00 00 call 11cf4c <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
1189a0: 8b 55 d0 mov -0x30(%ebp),%edx
1189a3: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1189aa: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
1189b1: 89 5a 2c mov %ebx,0x2c(%edx)
the_watchdog->id = id;
1189b4: 89 72 30 mov %esi,0x30(%edx)
the_watchdog->user_data = user_data;
1189b7: 8b 45 14 mov 0x14(%ebp),%eax
1189ba: 89 42 34 mov %eax,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
1189bd: 2b 3d a4 22 14 00 sub 0x1422a4,%edi
1189c3: 89 7a 1c mov %edi,0x1c(%edx)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
1189c6: 58 pop %eax
1189c7: 5a pop %edx
1189c8: 8b 4d d4 mov -0x2c(%ebp),%ecx
1189cb: 51 push %ecx
1189cc: 68 d0 22 14 00 push $0x1422d0
1189d1: e8 3e 44 00 00 call 11ce14 <_Watchdog_Insert>
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
1189d6: e8 a1 33 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1189db: 83 c4 10 add $0x10,%esp
1189de: 31 c0 xor %eax,%eax
1189e0: e9 4b ff ff ff jmp 118930 <rtems_timer_fire_when+0x20>
1189e5: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1189e8: b8 04 00 00 00 mov $0x4,%eax
1189ed: e9 3e ff ff ff jmp 118930 <rtems_timer_fire_when+0x20>
1189f2: 66 90 xchg %ax,%ax
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
1189f4: b8 09 00 00 00 mov $0x9,%eax
1189f9: e9 32 ff ff ff jmp 118930 <rtems_timer_fire_when+0x20>
001190a8 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
1190a8: 55 push %ebp
1190a9: 89 e5 mov %esp,%ebp
1190ab: 56 push %esi
1190ac: 53 push %ebx
1190ad: 83 ec 10 sub $0x10,%esp
1190b0: 8b 45 08 mov 0x8(%ebp),%eax
1190b3: 85 c0 test %eax,%eax
1190b5: 74 41 je 1190f8 <rtems_timer_initiate_server+0x50>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
1190b7: 0f b6 15 b4 9a 13 00 movzbl 0x139ab4,%edx
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
1190be: 39 d0 cmp %edx,%eax
1190c0: 76 42 jbe 119104 <rtems_timer_initiate_server+0x5c>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
1190c2: 40 inc %eax
1190c3: 75 33 jne 1190f8 <rtems_timer_initiate_server+0x50>
return RTEMS_INVALID_PRIORITY;
_priority = 0;
1190c5: 31 f6 xor %esi,%esi
1190c7: 8b 15 d0 21 14 00 mov 0x1421d0,%edx
1190cd: 42 inc %edx
1190ce: 89 15 d0 21 14 00 mov %edx,0x1421d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
1190d4: 8a 1d 00 db 13 00 mov 0x13db00,%bl
initialized = true;
1190da: c6 05 00 db 13 00 01 movb $0x1,0x13db00
_Thread_Enable_dispatch();
1190e1: e8 96 2c 00 00 call 11bd7c <_Thread_Enable_dispatch>
if ( tmpInitialized )
1190e6: 84 db test %bl,%bl
1190e8: 74 1e je 119108 <rtems_timer_initiate_server+0x60>
return RTEMS_INCORRECT_STATE;
1190ea: b8 0e 00 00 00 mov $0xe,%eax
initialized = false;
}
#endif
return status;
}
1190ef: 8d 65 f8 lea -0x8(%ebp),%esp
1190f2: 5b pop %ebx
1190f3: 5e pop %esi
1190f4: c9 leave
1190f5: c3 ret
1190f6: 66 90 xchg %ax,%ax
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
return RTEMS_INVALID_PRIORITY;
1190f8: b8 13 00 00 00 mov $0x13,%eax
initialized = false;
}
#endif
return status;
}
1190fd: 8d 65 f8 lea -0x8(%ebp),%esp
119100: 5b pop %ebx
119101: 5e pop %esi
119102: c9 leave
119103: c3 ret
119104: 89 c6 mov %eax,%esi
119106: eb bf jmp 1190c7 <rtems_timer_initiate_server+0x1f>
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
119108: 83 ec 08 sub $0x8,%esp
11910b: 8d 45 f4 lea -0xc(%ebp),%eax
11910e: 50 push %eax
11910f: 8b 45 10 mov 0x10(%ebp),%eax
119112: 80 cc 80 or $0x80,%ah
119115: 50 push %eax
119116: 68 00 01 00 00 push $0x100
11911b: ff 75 0c pushl 0xc(%ebp)
11911e: 56 push %esi
11911f: 68 45 4d 49 54 push $0x54494d45
119124: e8 bb ec ff ff call 117de4 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
119129: 83 c4 20 add $0x20,%esp
11912c: 85 c0 test %eax,%eax
11912e: 74 10 je 119140 <rtems_timer_initiate_server+0x98>
initialized = false;
119130: c6 05 00 db 13 00 00 movb $0x0,0x13db00
initialized = false;
}
#endif
return status;
}
119137: 8d 65 f8 lea -0x8(%ebp),%esp
11913a: 5b pop %ebx
11913b: 5e pop %esi
11913c: c9 leave
11913d: c3 ret
11913e: 66 90 xchg %ax,%ax
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
119140: 8b 45 f4 mov -0xc(%ebp),%eax
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
119143: 0f b7 c8 movzwl %ax,%ecx
119146: 8b 15 7c 21 14 00 mov 0x14217c,%edx
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
11914c: 8b 14 8a mov (%edx,%ecx,4),%edx
11914f: 89 15 80 da 13 00 mov %edx,0x13da80
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
119155: c7 05 b0 da 13 00 b4 movl $0x13dab4,0x13dab0
11915c: da 13 00
head->previous = NULL;
11915f: c7 05 b4 da 13 00 00 movl $0x0,0x13dab4
119166: 00 00 00
tail->previous = head;
119169: c7 05 b8 da 13 00 b0 movl $0x13dab0,0x13dab8
119170: da 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
119173: c7 05 e8 da 13 00 ec movl $0x13daec,0x13dae8
11917a: da 13 00
head->previous = NULL;
11917d: c7 05 ec da 13 00 00 movl $0x0,0x13daec
119184: 00 00 00
tail->previous = head;
119187: c7 05 f0 da 13 00 e8 movl $0x13dae8,0x13daf0
11918e: da 13 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
119191: c7 05 90 da 13 00 00 movl $0x0,0x13da90
119198: 00 00 00
the_watchdog->routine = routine;
11919b: c7 05 a4 da 13 00 c8 movl $0x11bbc8,0x13daa4
1191a2: bb 11 00
the_watchdog->id = id;
1191a5: a3 a8 da 13 00 mov %eax,0x13daa8
the_watchdog->user_data = user_data;
1191aa: c7 05 ac da 13 00 00 movl $0x0,0x13daac
1191b1: 00 00 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1191b4: c7 05 c8 da 13 00 00 movl $0x0,0x13dac8
1191bb: 00 00 00
the_watchdog->routine = routine;
1191be: c7 05 dc da 13 00 c8 movl $0x11bbc8,0x13dadc
1191c5: bb 11 00
the_watchdog->id = id;
1191c8: a3 e0 da 13 00 mov %eax,0x13dae0
the_watchdog->user_data = user_data;
1191cd: c7 05 e4 da 13 00 00 movl $0x0,0x13dae4
1191d4: 00 00 00
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
1191d7: c7 05 84 da 13 00 78 movl $0x118f78,0x13da84
1191de: 8f 11 00
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
1191e1: 8b 15 44 23 14 00 mov 0x142344,%edx
1191e7: 89 15 bc da 13 00 mov %edx,0x13dabc
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
1191ed: 8b 15 a4 22 14 00 mov 0x1422a4,%edx
1191f3: 89 15 f4 da 13 00 mov %edx,0x13daf4
ts->insert_chain = NULL;
1191f9: c7 05 f8 da 13 00 00 movl $0x0,0x13daf8
119200: 00 00 00
ts->active = false;
119203: c6 05 fc da 13 00 00 movb $0x0,0x13dafc
/*
* The default timer server is now available.
*/
_Timer_server = ts;
11920a: c7 05 80 2c 14 00 80 movl $0x13da80,0x142c80
119211: da 13 00
/*
* Start the timer server
*/
status = rtems_task_start(
119214: 53 push %ebx
119215: 68 80 da 13 00 push $0x13da80
11921a: 68 b0 8d 11 00 push $0x118db0
11921f: 50 push %eax
119220: e8 7f f2 ff ff call 1184a4 <rtems_task_start>
if (status) {
initialized = false;
}
#endif
return status;
119225: 83 c4 10 add $0x10,%esp
119228: e9 d0 fe ff ff jmp 1190fd <rtems_timer_initiate_server+0x55>
00118a88 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
118a88: 55 push %ebp
118a89: 89 e5 mov %esp,%ebp
118a8b: 56 push %esi
118a8c: 53 push %ebx
118a8d: 83 ec 24 sub $0x24,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
118a90: 8d 45 f4 lea -0xc(%ebp),%eax
118a93: 50 push %eax
118a94: ff 75 08 pushl 0x8(%ebp)
118a97: 68 40 2c 14 00 push $0x142c40
118a9c: e8 27 28 00 00 call 11b2c8 <_Objects_Get>
118aa1: 89 c3 mov %eax,%ebx
switch ( location ) {
118aa3: 83 c4 10 add $0x10,%esp
118aa6: 8b 45 f4 mov -0xc(%ebp),%eax
118aa9: 85 c0 test %eax,%eax
118aab: 74 0f je 118abc <rtems_timer_reset+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118aad: b8 04 00 00 00 mov $0x4,%eax
}
118ab2: 8d 65 f8 lea -0x8(%ebp),%esp
118ab5: 5b pop %ebx
118ab6: 5e pop %esi
118ab7: c9 leave
118ab8: c3 ret
118ab9: 8d 76 00 lea 0x0(%esi),%esi
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
118abc: 8b 43 38 mov 0x38(%ebx),%eax
118abf: 85 c0 test %eax,%eax
118ac1: 74 1d je 118ae0 <rtems_timer_reset+0x58>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
118ac3: 48 dec %eax
118ac4: 74 3a je 118b00 <rtems_timer_reset+0x78>
/*
* Must be dormant or time of day timer (e.g. TIMER_DORMANT,
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
118ac6: b8 0b 00 00 00 mov $0xb,%eax
}
_Thread_Enable_dispatch();
118acb: 89 45 e4 mov %eax,-0x1c(%ebp)
118ace: e8 a9 32 00 00 call 11bd7c <_Thread_Enable_dispatch>
return status;
118ad3: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118ad6: 8d 65 f8 lea -0x8(%ebp),%esp
118ad9: 5b pop %ebx
118ada: 5e pop %esi
118adb: c9 leave
118adc: c3 ret
118add: 8d 76 00 lea 0x0(%esi),%esi
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
118ae0: 83 c3 10 add $0x10,%ebx
118ae3: 83 ec 0c sub $0xc,%esp
118ae6: 53 push %ebx
118ae7: e8 60 44 00 00 call 11cf4c <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
118aec: 59 pop %ecx
118aed: 5e pop %esi
118aee: 53 push %ebx
118aef: 68 dc 22 14 00 push $0x1422dc
118af4: e8 1b 43 00 00 call 11ce14 <_Watchdog_Insert>
118af9: 83 c4 10 add $0x10,%esp
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
118afc: 31 c0 xor %eax,%eax
118afe: eb cb jmp 118acb <rtems_timer_reset+0x43>
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;
118b00: 8b 35 80 2c 14 00 mov 0x142c80,%esi
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
118b06: 83 ec 0c sub $0xc,%esp
118b09: 8d 43 10 lea 0x10(%ebx),%eax
118b0c: 50 push %eax
118b0d: e8 3a 44 00 00 call 11cf4c <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
118b12: 58 pop %eax
118b13: 5a pop %edx
118b14: 53 push %ebx
118b15: 56 push %esi
118b16: ff 56 04 call *0x4(%esi)
118b19: 83 c4 10 add $0x10,%esp
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
118b1c: 31 c0 xor %eax,%eax
118b1e: eb ab jmp 118acb <rtems_timer_reset+0x43>
00118b20 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118b20: 55 push %ebp
118b21: 89 e5 mov %esp,%ebp
118b23: 57 push %edi
118b24: 56 push %esi
118b25: 53 push %ebx
118b26: 83 ec 2c sub $0x2c,%esp
118b29: 8b 7d 0c mov 0xc(%ebp),%edi
118b2c: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
118b2f: 8b 1d 80 2c 14 00 mov 0x142c80,%ebx
if ( !timer_server )
118b35: 85 db test %ebx,%ebx
118b37: 0f 84 9f 00 00 00 je 118bdc <rtems_timer_server_fire_after+0xbc>
return RTEMS_INCORRECT_STATE;
if ( !routine )
118b3d: 85 f6 test %esi,%esi
118b3f: 0f 84 a3 00 00 00 je 118be8 <rtems_timer_server_fire_after+0xc8>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
118b45: 85 ff test %edi,%edi
118b47: 75 0f jne 118b58 <rtems_timer_server_fire_after+0x38>
return RTEMS_INVALID_NUMBER;
118b49: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118b4e: 8d 65 f4 lea -0xc(%ebp),%esp
118b51: 5b pop %ebx
118b52: 5e pop %esi
118b53: 5f pop %edi
118b54: c9 leave
118b55: c3 ret
118b56: 66 90 xchg %ax,%ax
118b58: 52 push %edx
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
118b59: 8d 45 e4 lea -0x1c(%ebp),%eax
118b5c: 50 push %eax
118b5d: ff 75 08 pushl 0x8(%ebp)
118b60: 68 40 2c 14 00 push $0x142c40
118b65: e8 5e 27 00 00 call 11b2c8 <_Objects_Get>
118b6a: 89 c2 mov %eax,%edx
switch ( location ) {
118b6c: 83 c4 10 add $0x10,%esp
118b6f: 8b 45 e4 mov -0x1c(%ebp),%eax
118b72: 85 c0 test %eax,%eax
118b74: 75 56 jne 118bcc <rtems_timer_server_fire_after+0xac>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
118b76: 83 ec 0c sub $0xc,%esp
118b79: 8d 42 10 lea 0x10(%edx),%eax
118b7c: 50 push %eax
118b7d: 89 55 d4 mov %edx,-0x2c(%ebp)
118b80: e8 c7 43 00 00 call 11cf4c <_Watchdog_Remove>
_ISR_Disable( level );
118b85: 9c pushf
118b86: fa cli
118b87: 58 pop %eax
/*
* 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 ) {
118b88: 83 c4 10 add $0x10,%esp
118b8b: 8b 55 d4 mov -0x2c(%ebp),%edx
118b8e: 8b 4a 18 mov 0x18(%edx),%ecx
118b91: 85 c9 test %ecx,%ecx
118b93: 75 5f jne 118bf4 <rtems_timer_server_fire_after+0xd4>
/*
* 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;
118b95: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
118b9c: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
118ba3: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
118ba6: 8b 4d 08 mov 0x8(%ebp),%ecx
118ba9: 89 4a 30 mov %ecx,0x30(%edx)
the_watchdog->user_data = user_data;
118bac: 8b 4d 14 mov 0x14(%ebp),%ecx
118baf: 89 4a 34 mov %ecx,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
118bb2: 89 7a 1c mov %edi,0x1c(%edx)
_ISR_Enable( level );
118bb5: 50 push %eax
118bb6: 9d popf
(*timer_server->schedule_operation)( timer_server, the_timer );
118bb7: 83 ec 08 sub $0x8,%esp
118bba: 52 push %edx
118bbb: 53 push %ebx
118bbc: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
118bbf: e8 b8 31 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118bc4: 83 c4 10 add $0x10,%esp
118bc7: 31 c0 xor %eax,%eax
118bc9: eb 83 jmp 118b4e <rtems_timer_server_fire_after+0x2e>
118bcb: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118bcc: b8 04 00 00 00 mov $0x4,%eax
}
118bd1: 8d 65 f4 lea -0xc(%ebp),%esp
118bd4: 5b pop %ebx
118bd5: 5e pop %esi
118bd6: 5f pop %edi
118bd7: c9 leave
118bd8: c3 ret
118bd9: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
118bdc: b8 0e 00 00 00 mov $0xe,%eax
118be1: e9 68 ff ff ff jmp 118b4e <rtems_timer_server_fire_after+0x2e>
118be6: 66 90 xchg %ax,%ax
if ( !routine )
return RTEMS_INVALID_ADDRESS;
118be8: b8 09 00 00 00 mov $0x9,%eax
118bed: e9 5c ff ff ff jmp 118b4e <rtems_timer_server_fire_after+0x2e>
118bf2: 66 90 xchg %ax,%ax
* 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 );
118bf4: 50 push %eax
118bf5: 9d popf
_Thread_Enable_dispatch();
118bf6: e8 81 31 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118bfb: 31 c0 xor %eax,%eax
118bfd: e9 4c ff ff ff jmp 118b4e <rtems_timer_server_fire_after+0x2e>
00118c04 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118c04: 55 push %ebp
118c05: 89 e5 mov %esp,%ebp
118c07: 57 push %edi
118c08: 56 push %esi
118c09: 53 push %ebx
118c0a: 83 ec 2c sub $0x2c,%esp
118c0d: 8b 7d 0c mov 0xc(%ebp),%edi
118c10: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
118c13: 8b 1d 80 2c 14 00 mov 0x142c80,%ebx
if ( !timer_server )
118c19: 85 db test %ebx,%ebx
118c1b: 0f 84 d7 00 00 00 je 118cf8 <rtems_timer_server_fire_when+0xf4>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
118c21: 80 3d e4 21 14 00 00 cmpb $0x0,0x1421e4
118c28: 0f 84 aa 00 00 00 je 118cd8 <rtems_timer_server_fire_when+0xd4><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
118c2e: 85 f6 test %esi,%esi
118c30: 0f 84 b2 00 00 00 je 118ce8 <rtems_timer_server_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
118c36: 83 ec 0c sub $0xc,%esp
118c39: 57 push %edi
118c3a: e8 89 d1 ff ff call 115dc8 <_TOD_Validate>
118c3f: 83 c4 10 add $0x10,%esp
118c42: 84 c0 test %al,%al
118c44: 75 0e jne 118c54 <rtems_timer_server_fire_when+0x50>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
118c46: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118c4b: 8d 65 f4 lea -0xc(%ebp),%esp
118c4e: 5b pop %ebx
118c4f: 5e pop %esi
118c50: 5f pop %edi
118c51: c9 leave
118c52: c3 ret
118c53: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
118c54: 83 ec 0c sub $0xc,%esp
118c57: 57 push %edi
118c58: e8 df d0 ff ff call 115d3c <_TOD_To_seconds>
118c5d: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
118c5f: 83 c4 10 add $0x10,%esp
118c62: 3b 05 a4 22 14 00 cmp 0x1422a4,%eax
118c68: 76 dc jbe 118c46 <rtems_timer_server_fire_when+0x42>
118c6a: 52 push %edx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
118c6b: 8d 45 e4 lea -0x1c(%ebp),%eax
118c6e: 50 push %eax
118c6f: ff 75 08 pushl 0x8(%ebp)
118c72: 68 40 2c 14 00 push $0x142c40
118c77: e8 4c 26 00 00 call 11b2c8 <_Objects_Get>
118c7c: 89 c2 mov %eax,%edx
switch ( location ) {
118c7e: 83 c4 10 add $0x10,%esp
118c81: 8b 45 e4 mov -0x1c(%ebp),%eax
118c84: 85 c0 test %eax,%eax
118c86: 75 7c jne 118d04 <rtems_timer_server_fire_when+0x100>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
118c88: 83 ec 0c sub $0xc,%esp
118c8b: 8d 42 10 lea 0x10(%edx),%eax
118c8e: 50 push %eax
118c8f: 89 55 d4 mov %edx,-0x2c(%ebp)
118c92: e8 b5 42 00 00 call 11cf4c <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
118c97: 8b 55 d4 mov -0x2c(%ebp),%edx
118c9a: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
118ca1: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
118ca8: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
118cab: 8b 45 08 mov 0x8(%ebp),%eax
118cae: 89 42 30 mov %eax,0x30(%edx)
the_watchdog->user_data = user_data;
118cb1: 8b 45 14 mov 0x14(%ebp),%eax
118cb4: 89 42 34 mov %eax,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
118cb7: 2b 3d a4 22 14 00 sub 0x1422a4,%edi
118cbd: 89 7a 1c mov %edi,0x1c(%edx)
(*timer_server->schedule_operation)( timer_server, the_timer );
118cc0: 58 pop %eax
118cc1: 59 pop %ecx
118cc2: 52 push %edx
118cc3: 53 push %ebx
118cc4: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
118cc7: e8 b0 30 00 00 call 11bd7c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118ccc: 83 c4 10 add $0x10,%esp
118ccf: 31 c0 xor %eax,%eax
118cd1: e9 75 ff ff ff jmp 118c4b <rtems_timer_server_fire_when+0x47>
118cd6: 66 90 xchg %ax,%ax
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
118cd8: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118cdd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
118ce0: 5b pop %ebx <== NOT EXECUTED
118ce1: 5e pop %esi <== NOT EXECUTED
118ce2: 5f pop %edi <== NOT EXECUTED
118ce3: c9 leave <== NOT EXECUTED
118ce4: c3 ret <== NOT EXECUTED
118ce5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
118ce8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118ced: 8d 65 f4 lea -0xc(%ebp),%esp
118cf0: 5b pop %ebx
118cf1: 5e pop %esi
118cf2: 5f pop %edi
118cf3: c9 leave
118cf4: c3 ret
118cf5: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
118cf8: b8 0e 00 00 00 mov $0xe,%eax
118cfd: e9 49 ff ff ff jmp 118c4b <rtems_timer_server_fire_when+0x47>
118d02: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118d04: b8 04 00 00 00 mov $0x4,%eax
118d09: e9 3d ff ff ff jmp 118c4b <rtems_timer_server_fire_when+0x47>
0010c6dc <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
10c6dc: 55 push %ebp
10c6dd: 89 e5 mov %esp,%ebp
10c6df: 57 push %edi
10c6e0: 56 push %esi
10c6e1: 53 push %ebx
10c6e2: 83 ec 1c sub $0x1c,%esp
10c6e5: 89 c3 mov %eax,%ebx
10c6e7: 89 d6 mov %edx,%esi
10c6e9: 89 cf mov %ecx,%edi
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
10c6eb: a9 00 00 00 20 test $0x20000000,%eax
10c6f0: 74 2b je 10c71d <rtems_verror+0x41>
if (rtems_panic_in_progress++)
10c6f2: 8b 15 20 e1 12 00 mov 0x12e120,%edx
10c6f8: 8d 42 01 lea 0x1(%edx),%eax
10c6fb: a3 20 e1 12 00 mov %eax,0x12e120
10c700: 85 d2 test %edx,%edx
10c702: 74 10 je 10c714 <rtems_verror+0x38> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c704: a1 90 e2 12 00 mov 0x12e290,%eax <== NOT EXECUTED
10c709: 40 inc %eax <== NOT EXECUTED
10c70a: a3 90 e2 12 00 mov %eax,0x12e290 <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
10c70f: a1 20 e1 12 00 mov 0x12e120,%eax <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
10c714: 83 f8 02 cmp $0x2,%eax
10c717: 0f 8f af 00 00 00 jg 10c7cc <rtems_verror+0xf0> <== NEVER TAKEN
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
10c71d: 83 ec 0c sub $0xc,%esp
10c720: a1 e0 be 12 00 mov 0x12bee0,%eax
10c725: ff 70 08 pushl 0x8(%eax)
10c728: e8 47 c1 00 00 call 118874 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
10c72d: 89 d8 mov %ebx,%eax
10c72f: 25 ff ff ff 8f and $0x8fffffff,%eax
10c734: 89 45 e4 mov %eax,-0x1c(%ebp)
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
10c737: 83 c4 10 add $0x10,%esp
10c73a: 81 e3 00 00 00 40 and $0x40000000,%ebx
10c740: 0f 85 be 00 00 00 jne 10c804 <rtems_verror+0x128> <== NEVER TAKEN
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
10c746: 31 db xor %ebx,%ebx
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
10c748: 50 push %eax
10c749: 57 push %edi
10c74a: 56 push %esi
10c74b: a1 e0 be 12 00 mov 0x12bee0,%eax
10c750: ff 70 0c pushl 0xc(%eax)
10c753: e8 98 1e 01 00 call 11e5f0 <vfprintf>
10c758: 89 c6 mov %eax,%esi
if (status)
10c75a: 83 c4 10 add $0x10,%esp
10c75d: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c760: 85 c9 test %ecx,%ecx
10c762: 75 74 jne 10c7d8 <rtems_verror+0xfc> <== NEVER TAKEN
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
10c764: 83 fb 00 cmp $0x0,%ebx
10c767: 74 30 je 10c799 <rtems_verror+0xbd>
if ((local_errno > 0) && *strerror(local_errno))
10c769: 7e 15 jle 10c780 <rtems_verror+0xa4>
10c76b: 83 ec 0c sub $0xc,%esp
10c76e: 53 push %ebx
10c76f: e8 48 cd 00 00 call 1194bc <strerror>
10c774: 83 c4 10 add $0x10,%esp
10c777: 80 38 00 cmpb $0x0,(%eax)
10c77a: 0f 85 90 00 00 00 jne 10c810 <rtems_verror+0x134> <== ALWAYS TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
10c780: 52 push %edx
10c781: 53 push %ebx
10c782: 68 49 6a 12 00 push $0x126a49
10c787: a1 e0 be 12 00 mov 0x12bee0,%eax
10c78c: ff 70 0c pushl 0xc(%eax)
10c78f: e8 d4 c4 00 00 call 118c68 <fprintf>
10c794: 01 c6 add %eax,%esi
10c796: 83 c4 10 add $0x10,%esp
}
chars_written += fprintf(stderr, "\n");
10c799: 83 ec 08 sub $0x8,%esp
10c79c: 68 02 5d 12 00 push $0x125d02
10c7a1: a1 e0 be 12 00 mov 0x12bee0,%eax
10c7a6: ff 70 0c pushl 0xc(%eax)
10c7a9: e8 ba c4 00 00 call 118c68 <fprintf>
10c7ae: 8d 34 30 lea (%eax,%esi,1),%esi
(void) fflush(stderr);
10c7b1: 58 pop %eax
10c7b2: a1 e0 be 12 00 mov 0x12bee0,%eax
10c7b7: ff 70 0c pushl 0xc(%eax)
10c7ba: e8 b5 c0 00 00 call 118874 <fflush>
return chars_written;
10c7bf: 83 c4 10 add $0x10,%esp
}
10c7c2: 89 f0 mov %esi,%eax
10c7c4: 8d 65 f4 lea -0xc(%ebp),%esp
10c7c7: 5b pop %ebx
10c7c8: 5e pop %esi
10c7c9: 5f pop %edi
10c7ca: c9 leave
10c7cb: c3 ret
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
10c7cc: 31 f6 xor %esi,%esi
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
return chars_written;
}
10c7ce: 89 f0 mov %esi,%eax <== NOT EXECUTED
10c7d0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c7d3: 5b pop %ebx <== NOT EXECUTED
10c7d4: 5e pop %esi <== NOT EXECUTED
10c7d5: 5f pop %edi <== NOT EXECUTED
10c7d6: c9 leave <== NOT EXECUTED
10c7d7: c3 ret <== NOT EXECUTED
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
10c7d8: 83 ec 0c sub $0xc,%esp
10c7db: ff 75 e4 pushl -0x1c(%ebp)
10c7de: e8 e1 fe ff ff call 10c6c4 <rtems_status_text>
10c7e3: 83 c4 0c add $0xc,%esp
10c7e6: 50 push %eax
10c7e7: 68 2e 6a 12 00 push $0x126a2e
10c7ec: a1 e0 be 12 00 mov 0x12bee0,%eax
10c7f1: ff 70 0c pushl 0xc(%eax)
10c7f4: e8 6f c4 00 00 call 118c68 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
10c7f9: 01 c6 add %eax,%esi
10c7fb: 83 c4 10 add $0x10,%esp
10c7fe: e9 61 ff ff ff jmp 10c764 <rtems_verror+0x88>
10c803: 90 nop
(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;
10c804: e8 d3 bc 00 00 call 1184dc <__errno>
10c809: 8b 18 mov (%eax),%ebx
10c80b: e9 38 ff ff ff jmp 10c748 <rtems_verror+0x6c>
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));
10c810: 83 ec 0c sub $0xc,%esp
10c813: 53 push %ebx
10c814: e8 a3 cc 00 00 call 1194bc <strerror>
10c819: 83 c4 0c add $0xc,%esp
10c81c: 50 push %eax
10c81d: 68 3c 6a 12 00 push $0x126a3c
10c822: e9 60 ff ff ff jmp 10c787 <rtems_verror+0xab>
001086a4 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
1086a4: 55 push %ebp
1086a5: 89 e5 mov %esp,%ebp
1086a7: 57 push %edi
1086a8: 56 push %esi
1086a9: 53 push %ebx
1086aa: 83 ec 1c sub $0x1c,%esp
1086ad: 89 c6 mov %eax,%esi
1086af: 89 55 e0 mov %edx,-0x20(%ebp)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
1086b2: 31 ff xor %edi,%edi
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
1086b4: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp)
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
1086bb: 31 db xor %ebx,%ebx
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
1086bd: 8b 46 04 mov 0x4(%esi),%eax
1086c0: 48 dec %eax
1086c1: 89 46 04 mov %eax,0x4(%esi)
1086c4: 85 c0 test %eax,%eax
1086c6: 78 52 js 10871a <scanInt+0x76> <== NEVER TAKEN
1086c8: 8b 06 mov (%esi),%eax
1086ca: 0f b6 08 movzbl (%eax),%ecx
1086cd: 40 inc %eax
1086ce: 89 06 mov %eax,(%esi)
if (c == ':')
1086d0: 83 f9 3a cmp $0x3a,%ecx
1086d3: 74 5f je 108734 <scanInt+0x90>
break;
if (sign == 0) {
1086d5: 85 ff test %edi,%edi
1086d7: 75 0e jne 1086e7 <scanInt+0x43>
if (c == '-') {
1086d9: 83 f9 2d cmp $0x2d,%ecx
1086dc: 0f 84 8a 00 00 00 je 10876c <scanInt+0xc8>
sign = -1;
limit++;
continue;
}
sign = 1;
1086e2: bf 01 00 00 00 mov $0x1,%edi
}
if (!isdigit(c))
1086e7: a1 94 6c 12 00 mov 0x126c94,%eax
1086ec: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1)
1086f1: 74 6d je 108760 <scanInt+0xbc>
return 0;
d = c - '0';
if ((i > (limit / 10))
1086f3: b8 cd cc cc cc mov $0xcccccccd,%eax
1086f8: f7 65 e4 mull -0x1c(%ebp)
1086fb: c1 ea 03 shr $0x3,%edx
1086fe: 39 d3 cmp %edx,%ebx
108700: 77 5e ja 108760 <scanInt+0xbc>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
108702: 83 e9 30 sub $0x30,%ecx
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
108705: 39 d3 cmp %edx,%ebx
108707: 74 47 je 108750 <scanInt+0xac>
return 0;
i = i * 10 + d;
108709: 8d 04 9b lea (%ebx,%ebx,4),%eax
10870c: 8d 1c 41 lea (%ecx,%eax,2),%ebx
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
10870f: 8b 46 04 mov 0x4(%esi),%eax
108712: 48 dec %eax
108713: 89 46 04 mov %eax,0x4(%esi)
108716: 85 c0 test %eax,%eax
108718: 79 ae jns 1086c8 <scanInt+0x24> <== ALWAYS TAKEN
10871a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10871d: 56 push %esi <== NOT EXECUTED
10871e: ff 35 a0 6c 12 00 pushl 0x126ca0 <== NOT EXECUTED
108724: e8 37 ce 00 00 call 115560 <__srget_r> <== NOT EXECUTED
108729: 89 c1 mov %eax,%ecx <== NOT EXECUTED
10872b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (c == ':')
10872e: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED
108731: 75 a2 jne 1086d5 <scanInt+0x31> <== NOT EXECUTED
108733: 90 nop <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
108734: 85 ff test %edi,%edi
108736: 74 28 je 108760 <scanInt+0xbc> <== NEVER TAKEN
return 0;
*val = i * sign;
108738: 0f af df imul %edi,%ebx
10873b: 8b 45 e0 mov -0x20(%ebp),%eax
10873e: 89 18 mov %ebx,(%eax)
return 1;
108740: b8 01 00 00 00 mov $0x1,%eax
}
108745: 8d 65 f4 lea -0xc(%ebp),%esp
108748: 5b pop %ebx
108749: 5e pop %esi
10874a: 5f pop %edi
10874b: c9 leave
10874c: c3 ret
10874d: 8d 76 00 lea 0x0(%esi),%esi
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
108750: 8d 04 9b lea (%ebx,%ebx,4),%eax
108753: d1 e0 shl %eax
108755: 8b 55 e4 mov -0x1c(%ebp),%edx
108758: 29 c2 sub %eax,%edx
10875a: 39 d1 cmp %edx,%ecx
10875c: 76 ab jbe 108709 <scanInt+0x65> <== NEVER TAKEN
10875e: 66 90 xchg %ax,%ax
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
108760: 31 c0 xor %eax,%eax
*val = i * sign;
return 1;
}
108762: 8d 65 f4 lea -0xc(%ebp),%esp
108765: 5b pop %ebx
108766: 5e pop %esi
108767: 5f pop %edi
108768: c9 leave
108769: c3 ret
10876a: 66 90 xchg %ax,%ax
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
10876c: ff 45 e4 incl -0x1c(%ebp)
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
10876f: bf ff ff ff ff mov $0xffffffff,%edi
limit++;
continue;
108774: e9 44 ff ff ff jmp 1086bd <scanInt+0x19>
0010877c <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
10877c: 55 push %ebp
10877d: 89 e5 mov %esp,%ebp
10877f: 57 push %edi
108780: 56 push %esi
108781: 53 push %ebx
108782: 83 ec 0c sub $0xc,%esp
108785: 89 c3 mov %eax,%ebx
108787: 89 ce mov %ecx,%esi
108789: 8b 7d 08 mov 0x8(%ebp),%edi
int c;
*name = *bufp;
10878c: 8b 01 mov (%ecx),%eax
10878e: 89 02 mov %eax,(%edx)
108790: eb 26 jmp 1087b8 <scanString+0x3c>
108792: 66 90 xchg %ax,%ax
for (;;) {
c = getc(fp);
108794: 8b 13 mov (%ebx),%edx
108796: 0f b6 02 movzbl (%edx),%eax
108799: 42 inc %edx
10879a: 89 13 mov %edx,(%ebx)
if (c == ':') {
10879c: 83 f8 3a cmp $0x3a,%eax
10879f: 74 3b je 1087dc <scanString+0x60>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
1087a1: 83 f8 0a cmp $0xa,%eax
1087a4: 74 56 je 1087fc <scanString+0x80>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
1087a6: 83 f8 ff cmp $0xffffffff,%eax
1087a9: 74 59 je 108804 <scanString+0x88>
return 0;
if (*nleft < 2)
1087ab: 83 3f 01 cmpl $0x1,(%edi)
1087ae: 76 54 jbe 108804 <scanString+0x88>
return 0;
**bufp = c;
1087b0: 8b 16 mov (%esi),%edx
1087b2: 88 02 mov %al,(%edx)
++(*bufp);
1087b4: ff 06 incl (%esi)
--(*nleft);
1087b6: ff 0f decl (%edi)
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
1087b8: 8b 43 04 mov 0x4(%ebx),%eax
1087bb: 48 dec %eax
1087bc: 89 43 04 mov %eax,0x4(%ebx)
1087bf: 85 c0 test %eax,%eax
1087c1: 79 d1 jns 108794 <scanString+0x18>
1087c3: 83 ec 08 sub $0x8,%esp
1087c6: 53 push %ebx
1087c7: ff 35 a0 6c 12 00 pushl 0x126ca0
1087cd: e8 8e cd 00 00 call 115560 <__srget_r>
1087d2: 83 c4 10 add $0x10,%esp
if (c == ':') {
1087d5: 83 f8 3a cmp $0x3a,%eax
1087d8: 75 c7 jne 1087a1 <scanString+0x25> <== ALWAYS TAKEN
1087da: 66 90 xchg %ax,%ax
if (nlFlag)
1087dc: 8b 55 0c mov 0xc(%ebp),%edx
1087df: 85 d2 test %edx,%edx
1087e1: 75 21 jne 108804 <scanString+0x88>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
1087e3: 8b 06 mov (%esi),%eax
1087e5: c6 00 00 movb $0x0,(%eax)
++(*bufp);
1087e8: ff 06 incl (%esi)
--(*nleft);
1087ea: ff 0f decl (%edi)
return 1;
1087ec: b8 01 00 00 00 mov $0x1,%eax
}
1087f1: 8d 65 f4 lea -0xc(%ebp),%esp
1087f4: 5b pop %ebx
1087f5: 5e pop %esi
1087f6: 5f pop %edi
1087f7: c9 leave
1087f8: c3 ret
1087f9: 8d 76 00 lea 0x0(%esi),%esi
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
1087fc: 8b 45 0c mov 0xc(%ebp),%eax
1087ff: 85 c0 test %eax,%eax
108801: 75 e0 jne 1087e3 <scanString+0x67>
108803: 90 nop
break;
}
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
108804: 31 c0 xor %eax,%eax
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
108806: 8d 65 f4 lea -0xc(%ebp),%esp
108809: 5b pop %ebx
10880a: 5e pop %esi
10880b: 5f pop %edi
10880c: c9 leave
10880d: c3 ret
00108810 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
108810: 55 push %ebp
108811: 89 e5 mov %esp,%ebp
108813: 57 push %edi
108814: 56 push %esi
108815: 53 push %ebx
108816: 83 ec 34 sub $0x34,%esp
108819: 89 c6 mov %eax,%esi
10881b: 89 d3 mov %edx,%ebx
10881d: 89 4d d4 mov %ecx,-0x2c(%ebp)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
108820: 8d 7d d4 lea -0x2c(%ebp),%edi
108823: 6a 00 push $0x0
108825: 8d 45 08 lea 0x8(%ebp),%eax
108828: 50 push %eax
108829: 89 f9 mov %edi,%ecx
10882b: 89 f0 mov %esi,%eax
10882d: e8 4a ff ff ff call 10877c <scanString>
108832: 83 c4 10 add $0x10,%esp
108835: 85 c0 test %eax,%eax
108837: 75 0b jne 108844 <scangr+0x34>
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
108839: 31 c0 xor %eax,%eax
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
10883b: 8d 65 f4 lea -0xc(%ebp),%esp
10883e: 5b pop %ebx
10883f: 5e pop %esi
108840: 5f pop %edi
108841: c9 leave
108842: c3 ret
108843: 90 nop
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
108844: 83 ec 08 sub $0x8,%esp
108847: 8d 53 04 lea 0x4(%ebx),%edx
10884a: 6a 00 push $0x0
10884c: 8d 45 08 lea 0x8(%ebp),%eax
10884f: 50 push %eax
108850: 89 f9 mov %edi,%ecx
108852: 89 f0 mov %esi,%eax
108854: e8 23 ff ff ff call 10877c <scanString>
108859: 83 c4 10 add $0x10,%esp
10885c: 85 c0 test %eax,%eax
10885e: 74 d9 je 108839 <scangr+0x29> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
108860: 8d 55 e4 lea -0x1c(%ebp),%edx
108863: 89 f0 mov %esi,%eax
108865: e8 3a fe ff ff call 1086a4 <scanInt>
10886a: 85 c0 test %eax,%eax
10886c: 74 cb je 108839 <scangr+0x29> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
10886e: 83 ec 08 sub $0x8,%esp
108871: 8d 55 e0 lea -0x20(%ebp),%edx
108874: 6a 01 push $0x1
108876: 8d 45 08 lea 0x8(%ebp),%eax
108879: 50 push %eax
10887a: 89 f9 mov %edi,%ecx
10887c: 89 f0 mov %esi,%eax
10887e: e8 f9 fe ff ff call 10877c <scanString>
108883: 83 c4 10 add $0x10,%esp
108886: 85 c0 test %eax,%eax
108888: 74 af je 108839 <scangr+0x29> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
10888a: 8b 45 e4 mov -0x1c(%ebp),%eax
10888d: 66 89 43 08 mov %ax,0x8(%ebx)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
108891: 8b 7d e0 mov -0x20(%ebp),%edi
108894: 8a 07 mov (%edi),%al
108896: 84 c0 test %al,%al
108898: 74 7d je 108917 <scangr+0x107> <== NEVER TAKEN
10889a: 89 fa mov %edi,%edx
10889c: b9 01 00 00 00 mov $0x1,%ecx
1088a1: eb 08 jmp 1088ab <scangr+0x9b>
1088a3: 90 nop
1088a4: 42 inc %edx
1088a5: 8a 02 mov (%edx),%al
1088a7: 84 c0 test %al,%al
1088a9: 74 09 je 1088b4 <scangr+0xa4>
if(*cp == ',')
1088ab: 3c 2c cmp $0x2c,%al
1088ad: 75 f5 jne 1088a4 <scangr+0x94>
memcount++;
1088af: 41 inc %ecx
1088b0: eb f2 jmp 1088a4 <scangr+0x94>
1088b2: 66 90 xchg %ax,%ax
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1088b4: 8d 04 8d 13 00 00 00 lea 0x13(,%ecx,4),%eax
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
1088bb: 39 45 08 cmp %eax,0x8(%ebp)
1088be: 0f 82 75 ff ff ff jb 108839 <scangr+0x29> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
1088c4: 8b 75 d4 mov -0x2c(%ebp),%esi
1088c7: 83 c6 0f add $0xf,%esi
1088ca: 83 e6 f0 and $0xfffffff0,%esi
1088cd: 89 73 0c mov %esi,0xc(%ebx)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
1088d0: 89 3e mov %edi,(%esi)
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1088d2: 8b 45 e0 mov -0x20(%ebp),%eax
1088d5: 8a 10 mov (%eax),%dl
1088d7: 84 d2 test %dl,%dl
1088d9: 74 43 je 10891e <scangr+0x10e> <== NEVER TAKEN
}
/*
* Extract a single group record from the database
*/
static int scangr(
1088db: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1088dc: b9 01 00 00 00 mov $0x1,%ecx
1088e1: eb 08 jmp 1088eb <scangr+0xdb>
1088e3: 90 nop
1088e4: 8a 10 mov (%eax),%dl
1088e6: 40 inc %eax
1088e7: 84 d2 test %dl,%dl
1088e9: 74 15 je 108900 <scangr+0xf0>
if(*cp == ',') {
1088eb: 80 fa 2c cmp $0x2c,%dl
1088ee: 75 f4 jne 1088e4 <scangr+0xd4>
*cp = '\0';
1088f0: c6 40 ff 00 movb $0x0,-0x1(%eax)
grp->gr_mem[memcount++] = cp + 1;
1088f4: 8b 53 0c mov 0xc(%ebx),%edx
1088f7: 89 04 8a mov %eax,(%edx,%ecx,4)
1088fa: 41 inc %ecx
1088fb: eb e7 jmp 1088e4 <scangr+0xd4>
1088fd: 8d 76 00 lea 0x0(%esi),%esi
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
108900: 8b 73 0c mov 0xc(%ebx),%esi
108903: c1 e1 02 shl $0x2,%ecx
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
108906: c7 04 0e 00 00 00 00 movl $0x0,(%esi,%ecx,1)
return 1;
10890d: b8 01 00 00 00 mov $0x1,%eax
108912: e9 24 ff ff ff jmp 10883b <scangr+0x2b>
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
108917: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED
10891c: eb 9d jmp 1088bb <scangr+0xab> <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
10891e: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED
108923: eb e1 jmp 108906 <scangr+0xf6> <== NOT EXECUTED
00108928 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
108928: 55 push %ebp
108929: 89 e5 mov %esp,%ebp
10892b: 57 push %edi
10892c: 56 push %esi
10892d: 53 push %ebx
10892e: 83 ec 34 sub $0x34,%esp
108931: 89 c6 mov %eax,%esi
108933: 89 d3 mov %edx,%ebx
108935: 89 4d d4 mov %ecx,-0x2c(%ebp)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
108938: 8d 7d d4 lea -0x2c(%ebp),%edi
10893b: 6a 00 push $0x0
10893d: 8d 45 08 lea 0x8(%ebp),%eax
108940: 50 push %eax
108941: 89 f9 mov %edi,%ecx
108943: 89 f0 mov %esi,%eax
108945: e8 32 fe ff ff call 10877c <scanString>
10894a: 83 c4 10 add $0x10,%esp
10894d: 85 c0 test %eax,%eax
10894f: 75 0b jne 10895c <scanpw+0x34>
|| !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))
return 0;
108951: 31 c0 xor %eax,%eax
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
108953: 8d 65 f4 lea -0xc(%ebp),%esp
108956: 5b pop %ebx
108957: 5e pop %esi
108958: 5f pop %edi
108959: c9 leave
10895a: c3 ret
10895b: 90 nop
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
10895c: 83 ec 08 sub $0x8,%esp
10895f: 8d 53 04 lea 0x4(%ebx),%edx
108962: 6a 00 push $0x0
108964: 8d 45 08 lea 0x8(%ebp),%eax
108967: 50 push %eax
108968: 89 f9 mov %edi,%ecx
10896a: 89 f0 mov %esi,%eax
10896c: e8 0b fe ff ff call 10877c <scanString>
108971: 83 c4 10 add $0x10,%esp
108974: 85 c0 test %eax,%eax
108976: 74 d9 je 108951 <scanpw+0x29> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
108978: 8d 55 e4 lea -0x1c(%ebp),%edx
10897b: 89 f0 mov %esi,%eax
10897d: e8 22 fd ff ff call 1086a4 <scanInt>
108982: 85 c0 test %eax,%eax
108984: 74 cb je 108951 <scanpw+0x29>
|| !scanInt(fp, &pwgid)
108986: 8d 55 e0 lea -0x20(%ebp),%edx
108989: 89 f0 mov %esi,%eax
10898b: e8 14 fd ff ff call 1086a4 <scanInt>
108990: 85 c0 test %eax,%eax
108992: 74 bd je 108951 <scanpw+0x29>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
108994: 83 ec 08 sub $0x8,%esp
108997: 8d 53 0c lea 0xc(%ebx),%edx
10899a: 6a 00 push $0x0
10899c: 8d 45 08 lea 0x8(%ebp),%eax
10899f: 50 push %eax
1089a0: 89 f9 mov %edi,%ecx
1089a2: 89 f0 mov %esi,%eax
1089a4: e8 d3 fd ff ff call 10877c <scanString>
1089a9: 83 c4 10 add $0x10,%esp
1089ac: 85 c0 test %eax,%eax
1089ae: 74 a1 je 108951 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
1089b0: 83 ec 08 sub $0x8,%esp
1089b3: 8d 53 10 lea 0x10(%ebx),%edx
1089b6: 6a 00 push $0x0
1089b8: 8d 45 08 lea 0x8(%ebp),%eax
1089bb: 50 push %eax
1089bc: 89 f9 mov %edi,%ecx
1089be: 89 f0 mov %esi,%eax
1089c0: e8 b7 fd ff ff call 10877c <scanString>
1089c5: 83 c4 10 add $0x10,%esp
1089c8: 85 c0 test %eax,%eax
1089ca: 74 85 je 108951 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
1089cc: 83 ec 08 sub $0x8,%esp
1089cf: 8d 53 14 lea 0x14(%ebx),%edx
1089d2: 6a 00 push $0x0
1089d4: 8d 45 08 lea 0x8(%ebp),%eax
1089d7: 50 push %eax
1089d8: 89 f9 mov %edi,%ecx
1089da: 89 f0 mov %esi,%eax
1089dc: e8 9b fd ff ff call 10877c <scanString>
1089e1: 83 c4 10 add $0x10,%esp
1089e4: 85 c0 test %eax,%eax
1089e6: 0f 84 65 ff ff ff je 108951 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
1089ec: 83 ec 08 sub $0x8,%esp
1089ef: 8d 53 18 lea 0x18(%ebx),%edx
1089f2: 6a 01 push $0x1
1089f4: 8d 45 08 lea 0x8(%ebp),%eax
1089f7: 50 push %eax
1089f8: 89 f9 mov %edi,%ecx
1089fa: 89 f0 mov %esi,%eax
1089fc: e8 7b fd ff ff call 10877c <scanString>
108a01: 83 c4 10 add $0x10,%esp
108a04: 85 c0 test %eax,%eax
108a06: 0f 84 45 ff ff ff je 108951 <scanpw+0x29>
return 0;
pwd->pw_uid = pwuid;
108a0c: 8b 45 e4 mov -0x1c(%ebp),%eax
108a0f: 66 89 43 08 mov %ax,0x8(%ebx)
pwd->pw_gid = pwgid;
108a13: 8b 45 e0 mov -0x20(%ebp),%eax
108a16: 66 89 43 0a mov %ax,0xa(%ebx)
return 1;
108a1a: b8 01 00 00 00 mov $0x1,%eax
108a1f: e9 2f ff ff ff jmp 108953 <scanpw+0x2b>
0010be24 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
10be24: 55 push %ebp
10be25: 89 e5 mov %esp,%ebp
10be27: 83 ec 08 sub $0x8,%esp
10be2a: 8b 45 08 mov 0x8(%ebp),%eax
switch ( policy ) {
10be2d: 85 c0 test %eax,%eax
10be2f: 78 0a js 10be3b <sched_get_priority_max+0x17>
10be31: 83 f8 02 cmp $0x2,%eax
10be34: 7e 1a jle 10be50 <sched_get_priority_max+0x2c>
10be36: 83 f8 04 cmp $0x4,%eax
10be39: 74 15 je 10be50 <sched_get_priority_max+0x2c><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10be3b: e8 f4 81 00 00 call 114034 <__errno>
10be40: c7 00 16 00 00 00 movl $0x16,(%eax)
10be46: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
10be4b: c9 leave
10be4c: c3 ret
10be4d: 8d 76 00 lea 0x0(%esi),%esi
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
10be50: 0f b6 05 7c 45 12 00 movzbl 0x12457c,%eax
10be57: 48 dec %eax
}
10be58: c9 leave
10be59: c3 ret
0010be5c <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
10be5c: 55 push %ebp
10be5d: 89 e5 mov %esp,%ebp
10be5f: 83 ec 08 sub $0x8,%esp
10be62: 8b 45 08 mov 0x8(%ebp),%eax
switch ( policy ) {
10be65: 85 c0 test %eax,%eax
10be67: 78 0a js 10be73 <sched_get_priority_min+0x17>
10be69: 83 f8 02 cmp $0x2,%eax
10be6c: 7e 1a jle 10be88 <sched_get_priority_min+0x2c><== ALWAYS TAKEN
10be6e: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
10be71: 74 15 je 10be88 <sched_get_priority_min+0x2c><== NOT EXECUTED
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10be73: e8 bc 81 00 00 call 114034 <__errno>
10be78: c7 00 16 00 00 00 movl $0x16,(%eax)
10be7e: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10be83: c9 leave
10be84: c3 ret
10be85: 8d 76 00 lea 0x0(%esi),%esi
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
10be88: b8 01 00 00 00 mov $0x1,%eax
}
10be8d: c9 leave
10be8e: c3 ret
0010be90 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
10be90: 55 push %ebp
10be91: 89 e5 mov %esp,%ebp
10be93: 56 push %esi
10be94: 53 push %ebx
10be95: 8b 75 08 mov 0x8(%ebp),%esi
10be98: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10be9b: 85 f6 test %esi,%esi
10be9d: 75 21 jne 10bec0 <sched_rr_get_interval+0x30><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
10be9f: 85 db test %ebx,%ebx
10bea1: 74 38 je 10bedb <sched_rr_get_interval+0x4b>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10bea3: 83 ec 08 sub $0x8,%esp
10bea6: 53 push %ebx
10bea7: ff 35 00 88 12 00 pushl 0x128800
10bead: e8 9a 35 00 00 call 10f44c <_Timespec_From_ticks>
return 0;
10beb2: 83 c4 10 add $0x10,%esp
10beb5: 31 c0 xor %eax,%eax
}
10beb7: 8d 65 f8 lea -0x8(%ebp),%esp
10beba: 5b pop %ebx
10bebb: 5e pop %esi
10bebc: c9 leave
10bebd: c3 ret
10bebe: 66 90 xchg %ax,%ax
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10bec0: e8 fb c8 ff ff call 1087c0 <getpid>
10bec5: 39 f0 cmp %esi,%eax
10bec7: 74 d6 je 10be9f <sched_rr_get_interval+0xf>
rtems_set_errno_and_return_minus_one( ESRCH );
10bec9: e8 66 81 00 00 call 114034 <__errno>
10bece: c7 00 03 00 00 00 movl $0x3,(%eax)
10bed4: b8 ff ff ff ff mov $0xffffffff,%eax
10bed9: eb dc jmp 10beb7 <sched_rr_get_interval+0x27>
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10bedb: e8 54 81 00 00 call 114034 <__errno>
10bee0: c7 00 16 00 00 00 movl $0x16,(%eax)
10bee6: b8 ff ff ff ff mov $0xffffffff,%eax
10beeb: eb ca jmp 10beb7 <sched_rr_get_interval+0x27>
0010e5f4 <sem_close>:
*/
int sem_close(
sem_t *sem
)
{
10e5f4: 55 push %ebp
10e5f5: 89 e5 mov %esp,%ebp
10e5f7: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e5fa: 8d 45 f4 lea -0xc(%ebp),%eax
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
_Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location );
10e5fd: 50 push %eax
10e5fe: 8b 45 08 mov 0x8(%ebp),%eax
10e601: ff 30 pushl (%eax)
10e603: 68 20 d6 12 00 push $0x12d620
10e608: e8 cf 21 00 00 call 1107dc <_Objects_Get>
switch ( location ) {
10e60d: 83 c4 10 add $0x10,%esp
10e610: 8b 55 f4 mov -0xc(%ebp),%edx
10e613: 85 d2 test %edx,%edx
10e615: 74 15 je 10e62c <sem_close+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e617: e8 44 90 00 00 call 117660 <__errno>
10e61c: c7 00 16 00 00 00 movl $0x16,(%eax)
10e622: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e627: c9 leave
10e628: c3 ret
10e629: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_semaphore->open_count -= 1;
10e62c: ff 48 18 decl 0x18(%eax)
_POSIX_Semaphore_Delete( the_semaphore );
10e62f: 83 ec 0c sub $0xc,%esp
10e632: 50 push %eax
10e633: e8 1c 64 00 00 call 114a54 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10e638: e8 d3 2c 00 00 call 111310 <_Thread_Enable_dispatch>
return 0;
10e63d: 83 c4 10 add $0x10,%esp
10e640: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e642: c9 leave
10e643: c3 ret
0010e644 <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
10e644: 55 push %ebp
10e645: 89 e5 mov %esp,%ebp
10e647: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e64a: 8d 45 f4 lea -0xc(%ebp),%eax
10e64d: 50 push %eax
10e64e: 8b 45 08 mov 0x8(%ebp),%eax
10e651: ff 30 pushl (%eax)
10e653: 68 20 d6 12 00 push $0x12d620
10e658: e8 7f 21 00 00 call 1107dc <_Objects_Get>
switch ( location ) {
10e65d: 83 c4 10 add $0x10,%esp
10e660: 8b 55 f4 mov -0xc(%ebp),%edx
10e663: 85 d2 test %edx,%edx
10e665: 74 15 je 10e67c <sem_destroy+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e667: e8 f4 8f 00 00 call 117660 <__errno>
10e66c: c7 00 16 00 00 00 movl $0x16,(%eax)
10e672: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e677: c9 leave
10e678: c3 ret
10e679: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
10e67c: 80 78 14 00 cmpb $0x0,0x14(%eax)
10e680: 75 16 jne 10e698 <sem_destroy+0x54>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
10e682: 83 ec 0c sub $0xc,%esp
10e685: 50 push %eax
10e686: e8 c9 63 00 00 call 114a54 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10e68b: e8 80 2c 00 00 call 111310 <_Thread_Enable_dispatch>
return 0;
10e690: 83 c4 10 add $0x10,%esp
10e693: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e695: c9 leave
10e696: c3 ret
10e697: 90 nop
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
_Thread_Enable_dispatch();
10e698: e8 73 2c 00 00 call 111310 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
10e69d: e8 be 8f 00 00 call 117660 <__errno>
10e6a2: c7 00 16 00 00 00 movl $0x16,(%eax)
10e6a8: b8 ff ff ff ff mov $0xffffffff,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e6ad: c9 leave
10e6ae: c3 ret
0010e6b0 <sem_getvalue>:
int sem_getvalue(
sem_t *sem,
int *sval
)
{
10e6b0: 55 push %ebp
10e6b1: 89 e5 mov %esp,%ebp
10e6b3: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e6b6: 8d 45 f4 lea -0xc(%ebp),%eax
10e6b9: 50 push %eax
10e6ba: 8b 45 08 mov 0x8(%ebp),%eax
10e6bd: ff 30 pushl (%eax)
10e6bf: 68 20 d6 12 00 push $0x12d620
10e6c4: e8 13 21 00 00 call 1107dc <_Objects_Get>
switch ( location ) {
10e6c9: 83 c4 10 add $0x10,%esp
10e6cc: 8b 55 f4 mov -0xc(%ebp),%edx
10e6cf: 85 d2 test %edx,%edx
10e6d1: 74 15 je 10e6e8 <sem_getvalue+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e6d3: e8 88 8f 00 00 call 117660 <__errno>
10e6d8: c7 00 16 00 00 00 movl $0x16,(%eax)
10e6de: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e6e3: c9 leave
10e6e4: c3 ret
10e6e5: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
10e6e8: 8b 50 64 mov 0x64(%eax),%edx
10e6eb: 8b 45 0c mov 0xc(%ebp),%eax
10e6ee: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10e6f0: e8 1b 2c 00 00 call 111310 <_Thread_Enable_dispatch>
return 0;
10e6f5: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e6f7: c9 leave
10e6f8: c3 ret
0010e744 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10e744: 55 push %ebp
10e745: 89 e5 mov %esp,%ebp
10e747: 57 push %edi
10e748: 56 push %esi
10e749: 53 push %ebx
10e74a: 83 ec 2c sub $0x2c,%esp
10e74d: 8b 75 08 mov 0x8(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10e750: a1 d0 d2 12 00 mov 0x12d2d0,%eax
10e755: 40 inc %eax
10e756: a3 d0 d2 12 00 mov %eax,0x12d2d0
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10e75b: 8b 7d 0c mov 0xc(%ebp),%edi
10e75e: 81 e7 00 02 00 00 and $0x200,%edi
10e764: 0f 85 86 00 00 00 jne 10e7f0 <sem_open+0xac>
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
10e76a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
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 );
10e771: 83 ec 08 sub $0x8,%esp
10e774: 8d 45 e4 lea -0x1c(%ebp),%eax
10e777: 50 push %eax
10e778: 56 push %esi
10e779: e8 26 63 00 00 call 114aa4 <_POSIX_Semaphore_Name_to_id>
10e77e: 89 c3 mov %eax,%ebx
* 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 ) {
10e780: 83 c4 10 add $0x10,%esp
10e783: 85 c0 test %eax,%eax
10e785: 74 25 je 10e7ac <sem_open+0x68>
/*
* 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) ) ) {
10e787: 83 f8 02 cmp $0x2,%eax
10e78a: 75 04 jne 10e790 <sem_open+0x4c> <== NEVER TAKEN
10e78c: 85 ff test %edi,%edi
10e78e: 75 6c jne 10e7fc <sem_open+0xb8>
_Thread_Enable_dispatch();
10e790: e8 7b 2b 00 00 call 111310 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10e795: e8 c6 8e 00 00 call 117660 <__errno>
10e79a: 89 18 mov %ebx,(%eax)
10e79c: b8 ff ff ff ff mov $0xffffffff,%eax
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
10e7a1: 8d 65 f4 lea -0xc(%ebp),%esp
10e7a4: 5b pop %ebx
10e7a5: 5e pop %esi
10e7a6: 5f pop %edi
10e7a7: c9 leave
10e7a8: c3 ret
10e7a9: 8d 76 00 lea 0x0(%esi),%esi
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10e7ac: 8b 45 0c mov 0xc(%ebp),%eax
10e7af: 25 00 0a 00 00 and $0xa00,%eax
10e7b4: 3d 00 0a 00 00 cmp $0xa00,%eax
10e7b9: 74 65 je 10e820 <sem_open+0xdc>
10e7bb: 50 push %eax
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
10e7bc: 8d 45 dc lea -0x24(%ebp),%eax
10e7bf: 50 push %eax
10e7c0: ff 75 e4 pushl -0x1c(%ebp)
10e7c3: 68 20 d6 12 00 push $0x12d620
10e7c8: e8 0f 20 00 00 call 1107dc <_Objects_Get>
10e7cd: 89 45 e0 mov %eax,-0x20(%ebp)
the_semaphore->open_count += 1;
10e7d0: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10e7d3: e8 38 2b 00 00 call 111310 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10e7d8: e8 33 2b 00 00 call 111310 <_Thread_Enable_dispatch>
goto return_id;
10e7dd: 83 c4 10 add $0x10,%esp
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;
10e7e0: 8b 45 e0 mov -0x20(%ebp),%eax
10e7e3: 83 c0 08 add $0x8,%eax
#endif
return id;
}
10e7e6: 8d 65 f4 lea -0xc(%ebp),%esp
10e7e9: 5b pop %ebx
10e7ea: 5e pop %esi
10e7eb: 5f pop %edi
10e7ec: c9 leave
10e7ed: c3 ret
10e7ee: 66 90 xchg %ax,%ax
_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 );
10e7f0: 8b 45 14 mov 0x14(%ebp),%eax
10e7f3: 89 45 d4 mov %eax,-0x2c(%ebp)
10e7f6: e9 76 ff ff ff jmp 10e771 <sem_open+0x2d>
10e7fb: 90 nop
/*
* 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(
10e7fc: 8d 45 e0 lea -0x20(%ebp),%eax
10e7ff: 50 push %eax
10e800: ff 75 d4 pushl -0x2c(%ebp)
10e803: 6a 00 push $0x0
10e805: 56 push %esi
10e806: e8 3d 61 00 00 call 114948 <_POSIX_Semaphore_Create_support>
10e80b: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10e80d: e8 fe 2a 00 00 call 111310 <_Thread_Enable_dispatch>
if ( status == -1 )
10e812: 83 c4 10 add $0x10,%esp
10e815: 43 inc %ebx
10e816: 75 c8 jne 10e7e0 <sem_open+0x9c>
return SEM_FAILED;
10e818: b8 ff ff ff ff mov $0xffffffff,%eax
10e81d: eb c7 jmp 10e7e6 <sem_open+0xa2>
10e81f: 90 nop
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
10e820: e8 eb 2a 00 00 call 111310 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10e825: e8 36 8e 00 00 call 117660 <__errno>
10e82a: c7 00 11 00 00 00 movl $0x11,(%eax)
10e830: b8 ff ff ff ff mov $0xffffffff,%eax
10e835: eb af jmp 10e7e6 <sem_open+0xa2>
0010e838 <sem_post>:
*/
int sem_post(
sem_t *sem
)
{
10e838: 55 push %ebp
10e839: 89 e5 mov %esp,%ebp
10e83b: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e83e: 8d 45 f4 lea -0xc(%ebp),%eax
10e841: 50 push %eax
10e842: 8b 45 08 mov 0x8(%ebp),%eax
10e845: ff 30 pushl (%eax)
10e847: 68 20 d6 12 00 push $0x12d620
10e84c: e8 8b 1f 00 00 call 1107dc <_Objects_Get>
switch ( location ) {
10e851: 83 c4 10 add $0x10,%esp
10e854: 8b 4d f4 mov -0xc(%ebp),%ecx
10e857: 85 c9 test %ecx,%ecx
10e859: 74 15 je 10e870 <sem_post+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e85b: e8 00 8e 00 00 call 117660 <__errno>
10e860: c7 00 16 00 00 00 movl $0x16,(%eax)
10e866: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e86b: c9 leave
10e86c: c3 ret
10e86d: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Surrender(
10e870: 52 push %edx
10e871: 6a 00 push $0x0
10e873: ff 70 08 pushl 0x8(%eax)
10e876: 83 c0 1c add $0x1c,%eax
10e879: 50 push %eax
10e87a: e8 65 15 00 00 call 10fde4 <_CORE_semaphore_Surrender>
NULL /* XXX need to define a routine to handle this case */
#else
NULL
#endif
);
_Thread_Enable_dispatch();
10e87f: e8 8c 2a 00 00 call 111310 <_Thread_Enable_dispatch>
return 0;
10e884: 83 c4 10 add $0x10,%esp
10e887: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e889: c9 leave
10e88a: c3 ret
0010e88c <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
10e88c: 55 push %ebp
10e88d: 89 e5 mov %esp,%ebp
10e88f: 53 push %ebx
10e890: 83 ec 1c sub $0x1c,%esp
10e893: 8b 5d 08 mov 0x8(%ebp),%ebx
*
* 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 );
10e896: 8d 45 f4 lea -0xc(%ebp),%eax
10e899: 50 push %eax
10e89a: ff 75 0c pushl 0xc(%ebp)
10e89d: e8 36 55 00 00 call 113dd8 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10e8a2: 83 c4 10 add $0x10,%esp
10e8a5: 83 f8 03 cmp $0x3,%eax
10e8a8: 74 16 je 10e8c0 <sem_timedwait+0x34> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10e8aa: 50 push %eax <== NOT EXECUTED
10e8ab: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED
10e8ae: 6a 00 push $0x0 <== NOT EXECUTED
10e8b0: 53 push %ebx <== NOT EXECUTED
10e8b1: e8 5a 62 00 00 call 114b10 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED
10e8b6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
10e8b9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10e8bc: c9 leave <== NOT EXECUTED
10e8bd: c3 ret <== NOT EXECUTED
10e8be: 66 90 xchg %ax,%ax <== 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 );
10e8c0: 52 push %edx
10e8c1: ff 75 f4 pushl -0xc(%ebp)
10e8c4: 6a 01 push $0x1
10e8c6: 53 push %ebx
10e8c7: e8 44 62 00 00 call 114b10 <_POSIX_Semaphore_Wait_support>
10e8cc: 83 c4 10 add $0x10,%esp
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
10e8cf: 8b 5d fc mov -0x4(%ebp),%ebx
10e8d2: c9 leave
10e8d3: c3 ret
0010b2f4 <setitimer>:
int setitimer(
int which,
const struct itimerval *value,
struct itimerval *ovalue
)
{
10b2f4: 55 push %ebp
10b2f5: 89 e5 mov %esp,%ebp
10b2f7: 83 ec 08 sub $0x8,%esp
if ( !value )
10b2fa: 8b 55 0c mov 0xc(%ebp),%edx
10b2fd: 85 d2 test %edx,%edx
10b2ff: 74 33 je 10b334 <setitimer+0x40>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
10b301: 8b 45 10 mov 0x10(%ebp),%eax
10b304: 85 c0 test %eax,%eax
10b306: 74 2c je 10b334 <setitimer+0x40>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
10b308: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b30c: 76 12 jbe 10b320 <setitimer+0x2c>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b30e: e8 41 87 00 00 call 113a54 <__errno>
10b313: c7 00 16 00 00 00 movl $0x16,(%eax)
}
10b319: b8 ff ff ff ff mov $0xffffffff,%eax
10b31e: c9 leave
10b31f: c3 ret
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
10b320: e8 2f 87 00 00 call 113a54 <__errno>
10b325: c7 00 58 00 00 00 movl $0x58,(%eax)
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b32b: b8 ff ff ff ff mov $0xffffffff,%eax
10b330: c9 leave
10b331: c3 ret
10b332: 66 90 xchg %ax,%ax
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
rtems_set_errno_and_return_minus_one( EFAULT );
10b334: e8 1b 87 00 00 call 113a54 <__errno>
10b339: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b33f: eb d8 jmp 10b319 <setitimer+0x25>
0010bd40 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
10bd40: 55 push %ebp
10bd41: 89 e5 mov %esp,%ebp
10bd43: 57 push %edi
10bd44: 56 push %esi
10bd45: 53 push %ebx
10bd46: 83 ec 1c sub $0x1c,%esp
10bd49: 8b 5d 08 mov 0x8(%ebp),%ebx
10bd4c: 8b 45 0c mov 0xc(%ebp),%eax
10bd4f: 8b 55 10 mov 0x10(%ebp),%edx
ISR_Level level;
if ( oact )
10bd52: 85 d2 test %edx,%edx
10bd54: 74 13 je 10bd69 <sigaction+0x29>
*oact = _POSIX_signals_Vectors[ sig ];
10bd56: 8d 0c 5b lea (%ebx,%ebx,2),%ecx
10bd59: 8d 34 8d c0 9b 12 00 lea 0x129bc0(,%ecx,4),%esi
10bd60: b9 03 00 00 00 mov $0x3,%ecx
10bd65: 89 d7 mov %edx,%edi
10bd67: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
10bd69: 85 db test %ebx,%ebx
10bd6b: 74 77 je 10bde4 <sigaction+0xa4>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10bd6d: 8d 53 ff lea -0x1(%ebx),%edx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
10bd70: 83 fa 1f cmp $0x1f,%edx
10bd73: 77 6f ja 10bde4 <sigaction+0xa4>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
10bd75: 83 fb 09 cmp $0x9,%ebx
10bd78: 74 6a je 10bde4 <sigaction+0xa4>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
10bd7a: 85 c0 test %eax,%eax
10bd7c: 74 62 je 10bde0 <sigaction+0xa0> <== NEVER TAKEN
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
10bd7e: 9c pushf
10bd7f: fa cli
10bd80: 8f 45 e4 popl -0x1c(%ebp)
if ( act->sa_handler == SIG_DFL ) {
10bd83: 8b 50 08 mov 0x8(%eax),%edx
10bd86: 85 d2 test %edx,%edx
10bd88: 74 36 je 10bdc0 <sigaction+0x80>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
10bd8a: 83 ec 0c sub $0xc,%esp
10bd8d: 53 push %ebx
10bd8e: 89 45 e0 mov %eax,-0x20(%ebp)
10bd91: e8 96 57 00 00 call 11152c <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
10bd96: 8d 14 5b lea (%ebx,%ebx,2),%edx
10bd99: 8d 14 95 c0 9b 12 00 lea 0x129bc0(,%edx,4),%edx
10bda0: b9 03 00 00 00 mov $0x3,%ecx
10bda5: 8b 45 e0 mov -0x20(%ebp),%eax
10bda8: 89 d7 mov %edx,%edi
10bdaa: 89 c6 mov %eax,%esi
10bdac: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10bdae: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10bdb1: ff 75 e4 pushl -0x1c(%ebp)
10bdb4: 9d popf
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
10bdb5: 31 c0 xor %eax,%eax
}
10bdb7: 8d 65 f4 lea -0xc(%ebp),%esp
10bdba: 5b pop %ebx
10bdbb: 5e pop %esi
10bdbc: 5f pop %edi
10bdbd: c9 leave
10bdbe: c3 ret
10bdbf: 90 nop
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
10bdc0: 8d 34 5b lea (%ebx,%ebx,2),%esi
10bdc3: c1 e6 02 shl $0x2,%esi
10bdc6: 8d 86 c0 9b 12 00 lea 0x129bc0(%esi),%eax
10bdcc: 81 c6 40 30 12 00 add $0x123040,%esi
10bdd2: b9 03 00 00 00 mov $0x3,%ecx
10bdd7: 89 c7 mov %eax,%edi
10bdd9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10bddb: eb d4 jmp 10bdb1 <sigaction+0x71>
10bddd: 8d 76 00 lea 0x0(%esi),%esi
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
10bde0: 31 c0 xor %eax,%eax
10bde2: eb d3 jmp 10bdb7 <sigaction+0x77> <== NOT EXECUTED
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
10bde4: e8 47 85 00 00 call 114330 <__errno>
10bde9: c7 00 16 00 00 00 movl $0x16,(%eax)
10bdef: b8 ff ff ff ff mov $0xffffffff,%eax
10bdf4: eb c1 jmp 10bdb7 <sigaction+0x77>
0010c110 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10c110: 55 push %ebp
10c111: 89 e5 mov %esp,%ebp
10c113: 57 push %edi
10c114: 56 push %esi
10c115: 53 push %ebx
10c116: 83 ec 2c sub $0x2c,%esp
10c119: 8b 5d 08 mov 0x8(%ebp),%ebx
10c11c: 8b 7d 0c mov 0xc(%ebp),%edi
10c11f: 8b 75 10 mov 0x10(%ebp),%esi
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10c122: 85 db test %ebx,%ebx
10c124: 0f 84 9e 01 00 00 je 10c2c8 <sigtimedwait+0x1b8>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10c12a: 85 f6 test %esi,%esi
10c12c: 0f 84 3e 01 00 00 je 10c270 <sigtimedwait+0x160>
if ( !_Timespec_Is_valid( timeout ) )
10c132: 83 ec 0c sub $0xc,%esp
10c135: 56 push %esi
10c136: e8 21 36 00 00 call 10f75c <_Timespec_Is_valid>
10c13b: 83 c4 10 add $0x10,%esp
10c13e: 84 c0 test %al,%al
10c140: 0f 84 82 01 00 00 je 10c2c8 <sigtimedwait+0x1b8>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10c146: 83 ec 0c sub $0xc,%esp
10c149: 56 push %esi
10c14a: e8 75 36 00 00 call 10f7c4 <_Timespec_To_ticks>
if ( !interval )
10c14f: 83 c4 10 add $0x10,%esp
10c152: 85 c0 test %eax,%eax
10c154: 0f 84 6e 01 00 00 je 10c2c8 <sigtimedwait+0x1b8> <== NEVER TAKEN
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c15a: 85 ff test %edi,%edi
10c15c: 0f 84 18 01 00 00 je 10c27a <sigtimedwait+0x16a> <== NEVER TAKEN
the_thread = _Thread_Executing;
10c162: 8b 0d 38 a2 12 00 mov 0x12a238,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10c168: 8b 91 ec 00 00 00 mov 0xec(%ecx),%edx
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10c16e: 9c pushf
10c16f: fa cli
10c170: 8f 45 d0 popl -0x30(%ebp)
if ( *set & api->signals_pending ) {
10c173: 8b 33 mov (%ebx),%esi
10c175: 89 75 d4 mov %esi,-0x2c(%ebp)
10c178: 8b b2 d4 00 00 00 mov 0xd4(%edx),%esi
10c17e: 85 75 d4 test %esi,-0x2c(%ebp)
10c181: 0f 85 fd 00 00 00 jne 10c284 <sigtimedwait+0x174>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10c187: 8b 35 a8 a4 12 00 mov 0x12a4a8,%esi
10c18d: 85 75 d4 test %esi,-0x2c(%ebp)
10c190: 0f 85 96 00 00 00 jne 10c22c <sigtimedwait+0x11c>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
10c196: c7 07 ff ff ff ff movl $0xffffffff,(%edi)
10c19c: 8b 35 50 9c 12 00 mov 0x129c50,%esi
10c1a2: 46 inc %esi
10c1a3: 89 35 50 9c 12 00 mov %esi,0x129c50
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10c1a9: c7 41 44 40 a4 12 00 movl $0x12a440,0x44(%ecx)
the_thread->Wait.return_code = EINTR;
10c1b0: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx)
the_thread->Wait.option = *set;
10c1b7: 8b 33 mov (%ebx),%esi
10c1b9: 89 71 30 mov %esi,0x30(%ecx)
the_thread->Wait.return_argument = the_info;
10c1bc: 89 79 28 mov %edi,0x28(%ecx)
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;
10c1bf: c7 05 70 a4 12 00 01 movl $0x1,0x12a470
10c1c6: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10c1c9: ff 75 d0 pushl -0x30(%ebp)
10c1cc: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10c1cd: 51 push %ecx
10c1ce: 68 40 f4 10 00 push $0x10f440
10c1d3: 50 push %eax
10c1d4: 68 40 a4 12 00 push $0x12a440
10c1d9: 89 55 cc mov %edx,-0x34(%ebp)
10c1dc: e8 33 2f 00 00 call 10f114 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c1e1: e8 52 2a 00 00 call 10ec38 <_Thread_Enable_dispatch>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
10c1e6: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c1ed: 6a 00 push $0x0
10c1ef: 57 push %edi
10c1f0: ff 37 pushl (%edi)
10c1f2: 8b 55 cc mov -0x34(%ebp),%edx
10c1f5: 52 push %edx
10c1f6: e8 1d 5a 00 00 call 111c18 <_POSIX_signals_Clear_signals>
/* Set errno only if return code is not EINTR or
* if EINTR was caused by a signal being caught, which
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
10c1fb: 83 c4 20 add $0x20,%esp
10c1fe: a1 38 a2 12 00 mov 0x12a238,%eax
10c203: 83 78 34 04 cmpl $0x4,0x34(%eax)
10c207: 0f 85 d3 00 00 00 jne 10c2e0 <sigtimedwait+0x1d0>
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
10c20d: 8b 37 mov (%edi),%esi
10c20f: 8d 4e ff lea -0x1(%esi),%ecx
10c212: b8 01 00 00 00 mov $0x1,%eax
10c217: d3 e0 shl %cl,%eax
10c219: 85 03 test %eax,(%ebx)
10c21b: 0f 84 bf 00 00 00 je 10c2e0 <sigtimedwait+0x1d0> <== NEVER TAKEN
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c221: 89 f0 mov %esi,%eax
10c223: 8d 65 f4 lea -0xc(%ebp),%esp
10c226: 5b pop %ebx
10c227: 5e pop %esi
10c228: 5f pop %edi
10c229: c9 leave
10c22a: c3 ret
10c22b: 90 nop
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
10c22c: 83 ec 0c sub $0xc,%esp
10c22f: 56 push %esi
10c230: 89 55 cc mov %edx,-0x34(%ebp)
10c233: e8 94 fe ff ff call 10c0cc <_POSIX_signals_Get_lowest>
10c238: 89 c6 mov %eax,%esi
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10c23a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c241: 6a 01 push $0x1
10c243: 57 push %edi
10c244: 50 push %eax
10c245: 8b 55 cc mov -0x34(%ebp),%edx
10c248: 52 push %edx
10c249: e8 ca 59 00 00 call 111c18 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10c24e: ff 75 d0 pushl -0x30(%ebp)
10c251: 9d popf
the_info->si_signo = signo;
10c252: 89 37 mov %esi,(%edi)
the_info->si_code = SI_USER;
10c254: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi)
the_info->si_value.sival_int = 0;
10c25b: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return signo;
10c262: 83 c4 20 add $0x20,%esp
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c265: 89 f0 mov %esi,%eax
10c267: 8d 65 f4 lea -0xc(%ebp),%esp
10c26a: 5b pop %ebx
10c26b: 5e pop %esi
10c26c: 5f pop %edi
10c26d: c9 leave
10c26e: c3 ret
10c26f: 90 nop
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
10c270: 31 c0 xor %eax,%eax
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c272: 85 ff test %edi,%edi
10c274: 0f 85 e8 fe ff ff jne 10c162 <sigtimedwait+0x52>
10c27a: 8d 7d dc lea -0x24(%ebp),%edi
10c27d: e9 e0 fe ff ff jmp 10c162 <sigtimedwait+0x52>
10c282: 66 90 xchg %ax,%ax
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
10c284: 83 ec 0c sub $0xc,%esp
10c287: 56 push %esi
10c288: 89 55 cc mov %edx,-0x34(%ebp)
10c28b: e8 3c fe ff ff call 10c0cc <_POSIX_signals_Get_lowest>
10c290: 89 07 mov %eax,(%edi)
_POSIX_signals_Clear_signals(
10c292: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c299: 6a 00 push $0x0
10c29b: 57 push %edi
10c29c: 50 push %eax
10c29d: 8b 55 cc mov -0x34(%ebp),%edx
10c2a0: 52 push %edx
10c2a1: e8 72 59 00 00 call 111c18 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10c2a6: ff 75 d0 pushl -0x30(%ebp)
10c2a9: 9d popf
the_info->si_code = SI_USER;
10c2aa: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi)
the_info->si_value.sival_int = 0;
10c2b1: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return the_info->si_signo;
10c2b8: 8b 37 mov (%edi),%esi
10c2ba: 83 c4 20 add $0x20,%esp
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c2bd: 89 f0 mov %esi,%eax
10c2bf: 8d 65 f4 lea -0xc(%ebp),%esp
10c2c2: 5b pop %ebx
10c2c3: 5e pop %esi
10c2c4: 5f pop %edi
10c2c5: c9 leave
10c2c6: c3 ret
10c2c7: 90 nop
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c2c8: e8 a7 86 00 00 call 114974 <__errno>
10c2cd: c7 00 16 00 00 00 movl $0x16,(%eax)
10c2d3: be ff ff ff ff mov $0xffffffff,%esi
10c2d8: e9 44 ff ff ff jmp 10c221 <sigtimedwait+0x111>
10c2dd: 8d 76 00 lea 0x0(%esi),%esi
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
errno = _Thread_Executing->Wait.return_code;
10c2e0: e8 8f 86 00 00 call 114974 <__errno>
10c2e5: 8b 15 38 a2 12 00 mov 0x12a238,%edx
10c2eb: 8b 52 34 mov 0x34(%edx),%edx
10c2ee: 89 10 mov %edx,(%eax)
return -1;
10c2f0: be ff ff ff ff mov $0xffffffff,%esi
10c2f5: e9 27 ff ff ff jmp 10c221 <sigtimedwait+0x111>
0010df98 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10df98: 55 push %ebp
10df99: 89 e5 mov %esp,%ebp
10df9b: 53 push %ebx
10df9c: 83 ec 08 sub $0x8,%esp
10df9f: 8b 5d 0c mov 0xc(%ebp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10dfa2: 6a 00 push $0x0
10dfa4: 6a 00 push $0x0
10dfa6: ff 75 08 pushl 0x8(%ebp)
10dfa9: e8 e6 fd ff ff call 10dd94 <sigtimedwait>
if ( status != -1 ) {
10dfae: 83 c4 10 add $0x10,%esp
10dfb1: 83 f8 ff cmp $0xffffffff,%eax
10dfb4: 74 0e je 10dfc4 <sigwait+0x2c>
if ( sig )
10dfb6: 85 db test %ebx,%ebx
10dfb8: 74 16 je 10dfd0 <sigwait+0x38> <== NEVER TAKEN
*sig = status;
10dfba: 89 03 mov %eax,(%ebx)
return 0;
10dfbc: 31 c0 xor %eax,%eax
}
return errno;
}
10dfbe: 8b 5d fc mov -0x4(%ebp),%ebx
10dfc1: c9 leave
10dfc2: c3 ret
10dfc3: 90 nop
if ( sig )
*sig = status;
return 0;
}
return errno;
10dfc4: e8 7b 81 00 00 call 116144 <__errno>
10dfc9: 8b 00 mov (%eax),%eax
}
10dfcb: 8b 5d fc mov -0x4(%ebp),%ebx
10dfce: c9 leave
10dfcf: c3 ret
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
10dfd0: 31 c0 xor %eax,%eax
}
return errno;
}
10dfd2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10dfd5: c9 leave <== NOT EXECUTED
10dfd6: c3 ret <== NOT EXECUTED
0010a0b8 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
10a0b8: 55 push %ebp
10a0b9: 89 e5 mov %esp,%ebp
10a0bb: 56 push %esi
10a0bc: 53 push %ebx
10a0bd: 89 d3 mov %edx,%ebx
10a0bf: 89 c6 mov %eax,%esi
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
10a0c1: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx)
10a0c8: 75 12 jne 10a0dc <siproc+0x24> <== ALWAYS TAKEN
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
10a0ca: 0f b6 c0 movzbl %al,%eax
10a0cd: 89 da mov %ebx,%edx
}
return i;
}
10a0cf: 8d 65 f8 lea -0x8(%ebp),%esp
10a0d2: 5b pop %ebx <== NOT EXECUTED
10a0d3: 5e pop %esi <== NOT EXECUTED
10a0d4: c9 leave <== 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);
10a0d5: e9 92 fe ff ff jmp 109f6c <iproc> <== NOT EXECUTED
10a0da: 66 90 xchg %ax,%ax <== 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);
10a0dc: 52 push %edx
10a0dd: 6a 00 push $0x0
10a0df: 6a 00 push $0x0
10a0e1: ff 73 18 pushl 0x18(%ebx)
10a0e4: e8 c7 15 00 00 call 10b6b0 <rtems_semaphore_obtain>
i = iproc (c, tty);
10a0e9: 89 f2 mov %esi,%edx
10a0eb: 0f b6 c2 movzbl %dl,%eax
10a0ee: 89 da mov %ebx,%edx
10a0f0: e8 77 fe ff ff call 109f6c <iproc>
10a0f5: 89 c6 mov %eax,%esi
rtems_semaphore_release (tty->osem);
10a0f7: 58 pop %eax
10a0f8: ff 73 18 pushl 0x18(%ebx)
10a0fb: e8 ac 16 00 00 call 10b7ac <rtems_semaphore_release>
10a100: 83 c4 10 add $0x10,%esp
}
else {
i = iproc (c, tty);
}
return i;
}
10a103: 89 f0 mov %esi,%eax
10a105: 8d 65 f8 lea -0x8(%ebp),%esp
10a108: 5b pop %ebx
10a109: 5e pop %esi
10a10a: c9 leave
10a10b: c3 ret
00108ebc <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
108ebc: 55 push %ebp
108ebd: 89 e5 mov %esp,%ebp
108ebf: 57 push %edi
108ec0: 56 push %esi
108ec1: 53 push %ebx
108ec2: 83 ec 3c sub $0x3c,%esp
108ec5: 8b 55 08 mov 0x8(%ebp),%edx
108ec8: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
108ecb: 85 f6 test %esi,%esi
108ecd: 74 65 je 108f34 <stat+0x78>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
108ecf: b9 ff ff ff ff mov $0xffffffff,%ecx
108ed4: 89 d7 mov %edx,%edi
108ed6: 31 c0 xor %eax,%eax
108ed8: f2 ae repnz scas %es:(%edi),%al
108eda: f7 d1 not %ecx
108edc: 49 dec %ecx
108edd: 83 ec 0c sub $0xc,%esp
108ee0: 6a 01 push $0x1
108ee2: 8d 5d d4 lea -0x2c(%ebp),%ebx
108ee5: 53 push %ebx
108ee6: 6a 00 push $0x0
108ee8: 51 push %ecx
108ee9: 52 push %edx
108eea: e8 45 f1 ff ff call 108034 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
108eef: 83 c4 20 add $0x20,%esp
108ef2: 85 c0 test %eax,%eax
108ef4: 74 0e je 108f04 <stat+0x48>
return -1;
108ef6: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
108efb: 8d 65 f4 lea -0xc(%ebp),%esp
108efe: 5b pop %ebx
108eff: 5e pop %esi
108f00: 5f pop %edi
108f01: c9 leave
108f02: c3 ret
108f03: 90 nop
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
108f04: b9 48 00 00 00 mov $0x48,%ecx
108f09: 89 f7 mov %esi,%edi
108f0b: f3 aa rep stos %al,%es:(%edi)
status = (*loc.handlers->fstat_h)( &loc, buf );
108f0d: 83 ec 08 sub $0x8,%esp
108f10: 56 push %esi
108f11: 53 push %ebx
108f12: 8b 45 dc mov -0x24(%ebp),%eax
108f15: ff 50 18 call *0x18(%eax)
rtems_filesystem_freenode( &loc );
108f18: 89 1c 24 mov %ebx,(%esp)
108f1b: 89 45 c4 mov %eax,-0x3c(%ebp)
108f1e: e8 e9 f1 ff ff call 10810c <rtems_filesystem_freenode>
return status;
108f23: 83 c4 10 add $0x10,%esp
108f26: 8b 45 c4 mov -0x3c(%ebp),%eax
}
108f29: 8d 65 f4 lea -0xc(%ebp),%esp
108f2c: 5b pop %ebx
108f2d: 5e pop %esi
108f2e: 5f pop %edi
108f2f: c9 leave
108f30: c3 ret
108f31: 8d 76 00 lea 0x0(%esi),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
108f34: e8 07 88 00 00 call 111740 <__errno>
108f39: c7 00 0e 00 00 00 movl $0xe,(%eax)
108f3f: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
108f44: 8d 65 f4 lea -0xc(%ebp),%esp
108f47: 5b pop %ebx
108f48: 5e pop %esi
108f49: 5f pop %edi
108f4a: c9 leave
108f4b: c3 ret
0010b32c <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
10b32c: 55 push %ebp
10b32d: 89 e5 mov %esp,%ebp
10b32f: 57 push %edi
10b330: 56 push %esi
10b331: 53 push %ebx
10b332: 83 ec 48 sub $0x48,%esp
10b335: 8b 55 08 mov 0x8(%ebp),%edx
* 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 ) )
10b338: 31 f6 xor %esi,%esi
10b33a: b9 ff ff ff ff mov $0xffffffff,%ecx
10b33f: 89 d7 mov %edx,%edi
10b341: 89 f0 mov %esi,%eax
10b343: f2 ae repnz scas %es:(%edi),%al
10b345: f7 d1 not %ecx
10b347: 49 dec %ecx
10b348: 6a 01 push $0x1
10b34a: 8d 5d d4 lea -0x2c(%ebp),%ebx
10b34d: 53 push %ebx
10b34e: 6a 00 push $0x0
10b350: 51 push %ecx
10b351: 52 push %edx
10b352: e8 ad eb ff ff call 109f04 <rtems_filesystem_evaluate_path>
10b357: 83 c4 20 add $0x20,%esp
10b35a: 85 c0 test %eax,%eax
10b35c: 74 0e je 10b36c <statvfs+0x40> <== ALWAYS TAKEN
return -1;
10b35e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
rtems_filesystem_freenode( &loc );
return result;
}
10b363: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b366: 5b pop %ebx <== NOT EXECUTED
10b367: 5e pop %esi <== NOT EXECUTED
10b368: 5f pop %edi <== NOT EXECUTED
10b369: c9 leave <== NOT EXECUTED
10b36a: c3 ret <== NOT EXECUTED
10b36b: 90 nop <== NOT EXECUTED
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
10b36c: 8b 55 e4 mov -0x1c(%ebp),%edx
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
10b36f: b9 38 00 00 00 mov $0x38,%ecx
10b374: 8b 7d 0c mov 0xc(%ebp),%edi
10b377: 89 f0 mov %esi,%eax
10b379: f3 aa rep stos %al,%es:(%edi)
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
10b37b: 83 ec 08 sub $0x8,%esp
10b37e: 8b 42 28 mov 0x28(%edx),%eax
10b381: ff 75 0c pushl 0xc(%ebp)
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
10b384: 83 c2 1c add $0x1c,%edx
memset (sb, 0, sizeof (struct statvfs));
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
10b387: 52 push %edx
10b388: ff 50 44 call *0x44(%eax)
rtems_filesystem_freenode( &loc );
10b38b: 89 1c 24 mov %ebx,(%esp)
10b38e: 89 45 c4 mov %eax,-0x3c(%ebp)
10b391: e8 46 ec ff ff call 109fdc <rtems_filesystem_freenode>
return result;
10b396: 83 c4 10 add $0x10,%esp
10b399: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10b39c: 8d 65 f4 lea -0xc(%ebp),%esp
10b39f: 5b pop %ebx
10b3a0: 5e pop %esi
10b3a1: 5f pop %edi
10b3a2: c9 leave
10b3a3: c3 ret
0010acd4 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
10acd4: 55 push %ebp
10acd5: 89 e5 mov %esp,%ebp
10acd7: 56 push %esi
10acd8: 53 push %ebx
10acd9: 83 ec 34 sub $0x34,%esp
10acdc: 8b 75 0c mov 0xc(%ebp),%esi
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
10acdf: 8d 5d dc lea -0x24(%ebp),%ebx
10ace2: 53 push %ebx
10ace3: 8d 45 f4 lea -0xc(%ebp),%eax
10ace6: 50 push %eax
10ace7: 56 push %esi
10ace8: e8 0f ff ff ff call 10abfc <rtems_filesystem_get_start_loc>
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
10aced: 83 c4 0c add $0xc,%esp
10acf0: 8d 45 f0 lea -0x10(%ebp),%eax
10acf3: 50 push %eax
10acf4: 53 push %ebx
10acf5: 03 75 f4 add -0xc(%ebp),%esi
10acf8: 56 push %esi
10acf9: 8b 45 e8 mov -0x18(%ebp),%eax
10acfc: ff 50 04 call *0x4(%eax)
if ( result != 0 )
10acff: 83 c4 10 add $0x10,%esp
10ad02: 85 c0 test %eax,%eax
10ad04: 74 0e je 10ad14 <symlink+0x40>
return -1;
10ad06: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
10ad0b: 8d 65 f8 lea -0x8(%ebp),%esp
10ad0e: 5b pop %ebx
10ad0f: 5e pop %esi
10ad10: c9 leave
10ad11: c3 ret
10ad12: 66 90 xchg %ax,%ax
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
10ad14: 50 push %eax
10ad15: ff 75 f0 pushl -0x10(%ebp)
10ad18: ff 75 08 pushl 0x8(%ebp)
10ad1b: 53 push %ebx
10ad1c: 8b 45 e8 mov -0x18(%ebp),%eax
10ad1f: ff 50 38 call *0x38(%eax)
rtems_filesystem_freenode( &loc );
10ad22: 89 1c 24 mov %ebx,(%esp)
10ad25: 89 45 d4 mov %eax,-0x2c(%ebp)
10ad28: e8 6f ec ff ff call 10999c <rtems_filesystem_freenode>
return result;
10ad2d: 83 c4 10 add $0x10,%esp
10ad30: 8b 45 d4 mov -0x2c(%ebp),%eax
}
10ad33: 8d 65 f8 lea -0x8(%ebp),%esp
10ad36: 5b pop %ebx
10ad37: 5e pop %esi
10ad38: c9 leave
10ad39: c3 ret
0010a1cc <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
10a1cc: 55 push %ebp
10a1cd: 89 e5 mov %esp,%ebp
10a1cf: 53 push %ebx
10a1d0: 83 ec 04 sub $0x4,%esp
10a1d3: 8b 45 08 mov 0x8(%ebp),%eax
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
10a1d6: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx
if ( this_reent ) {
10a1dc: 85 d2 test %edx,%edx
10a1de: 74 33 je 10a213 <sync_per_thread+0x47> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
10a1e0: 8b 0d 78 97 12 00 mov 0x129778,%ecx
10a1e6: 8b 99 e4 00 00 00 mov 0xe4(%ecx),%ebx
_Thread_Executing->libc_reent = this_reent;
10a1ec: 89 91 e4 00 00 00 mov %edx,0xe4(%ecx)
_fwalk (t->libc_reent, sync_wrapper);
10a1f2: 83 ec 08 sub $0x8,%esp
10a1f5: 68 18 a2 10 00 push $0x10a218
10a1fa: ff b0 e4 00 00 00 pushl 0xe4(%eax)
10a200: e8 c7 b1 00 00 call 1153cc <_fwalk>
_Thread_Executing->libc_reent = current_reent;
10a205: a1 78 97 12 00 mov 0x129778,%eax
10a20a: 89 98 e4 00 00 00 mov %ebx,0xe4(%eax)
10a210: 83 c4 10 add $0x10,%esp
}
}
10a213: 8b 5d fc mov -0x4(%ebp),%ebx
10a216: c9 leave
10a217: c3 ret
0010a870 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
10a870: 55 push %ebp
10a871: 89 e5 mov %esp,%ebp
10a873: 56 push %esi
10a874: 53 push %ebx
10a875: 8b 5d 08 mov 0x8(%ebp),%ebx
10a878: 8b 45 0c mov 0xc(%ebp),%eax
10a87b: 8b 75 10 mov 0x10(%ebp),%esi
switch (opt) {
10a87e: 85 c0 test %eax,%eax
10a880: 74 2c je 10a8ae <tcsetattr+0x3e>
10a882: 48 dec %eax
10a883: 74 17 je 10a89c <tcsetattr+0x2c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10a885: e8 22 a6 00 00 call 114eac <__errno>
10a88a: c7 00 86 00 00 00 movl $0x86,(%eax)
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
10a890: b8 ff ff ff ff mov $0xffffffff,%eax
10a895: 8d 65 f8 lea -0x8(%ebp),%esp
10a898: 5b pop %ebx
10a899: 5e pop %esi
10a89a: c9 leave
10a89b: c3 ret
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
10a89c: 50 push %eax
10a89d: 6a 00 push $0x0
10a89f: 6a 03 push $0x3
10a8a1: 53 push %ebx
10a8a2: e8 dd 71 00 00 call 111a84 <ioctl>
10a8a7: 83 c4 10 add $0x10,%esp
10a8aa: 85 c0 test %eax,%eax
10a8ac: 78 e2 js 10a890 <tcsetattr+0x20> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
10a8ae: 89 75 10 mov %esi,0x10(%ebp)
10a8b1: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp)
10a8b8: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10a8bb: 8d 65 f8 lea -0x8(%ebp),%esp
10a8be: 5b pop %ebx
10a8bf: 5e pop %esi
10a8c0: c9 leave
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
10a8c1: e9 be 71 00 00 jmp 111a84 <ioctl>
0010b4ec <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
10b4ec: 55 push %ebp
10b4ed: 89 e5 mov %esp,%ebp
10b4ef: 56 push %esi
10b4f0: 53 push %ebx
10b4f1: 8b 5d 0c mov 0xc(%ebp),%ebx
10b4f4: 8b 75 10 mov 0x10(%ebp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
10b4f7: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10b4fb: 0f 85 db 00 00 00 jne 10b5dc <timer_create+0xf0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
10b501: 85 f6 test %esi,%esi
10b503: 0f 84 d3 00 00 00 je 10b5dc <timer_create+0xf0>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
10b509: 85 db test %ebx,%ebx
10b50b: 74 21 je 10b52e <timer_create+0x42>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
10b50d: 8b 03 mov (%ebx),%eax
10b50f: 48 dec %eax
10b510: 83 f8 01 cmp $0x1,%eax
10b513: 0f 87 c3 00 00 00 ja 10b5dc <timer_create+0xf0> <== NEVER TAKEN
( 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 )
10b519: 8b 43 04 mov 0x4(%ebx),%eax
10b51c: 85 c0 test %eax,%eax
10b51e: 0f 84 b8 00 00 00 je 10b5dc <timer_create+0xf0> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10b524: 48 dec %eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
10b525: 83 f8 1f cmp $0x1f,%eax
10b528: 0f 87 ae 00 00 00 ja 10b5dc <timer_create+0xf0> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b52e: a1 70 98 12 00 mov 0x129870,%eax
10b533: 40 inc %eax
10b534: a3 70 98 12 00 mov %eax,0x129870
* 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 );
10b539: 83 ec 0c sub $0xc,%esp
10b53c: 68 00 9c 12 00 push $0x129c00
10b541: e8 a6 1e 00 00 call 10d3ec <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
10b546: 83 c4 10 add $0x10,%esp
10b549: 85 c0 test %eax,%eax
10b54b: 0f 84 a2 00 00 00 je 10b5f3 <timer_create+0x107>
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;
10b551: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10b555: 8b 15 58 9e 12 00 mov 0x129e58,%edx
10b55b: 8b 52 08 mov 0x8(%edx),%edx
10b55e: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
10b561: 85 db test %ebx,%ebx
10b563: 74 11 je 10b576 <timer_create+0x8a>
ptimer->inf.sigev_notify = evp->sigev_notify;
10b565: 8b 13 mov (%ebx),%edx
10b567: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
10b56a: 8b 53 04 mov 0x4(%ebx),%edx
10b56d: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
10b570: 8b 53 08 mov 0x8(%ebx),%edx
10b573: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
10b576: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
10b57d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
10b584: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
10b58b: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
10b592: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b599: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10b5a0: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10b5a7: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10b5ae: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10b5b5: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10b5b8: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b5bb: 8b 0d 1c 9c 12 00 mov 0x129c1c,%ecx
10b5c1: 89 04 99 mov %eax,(%ecx,%ebx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10b5c4: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
10b5cb: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10b5cd: e8 86 2d 00 00 call 10e358 <_Thread_Enable_dispatch>
return 0;
10b5d2: 31 c0 xor %eax,%eax
}
10b5d4: 8d 65 f8 lea -0x8(%ebp),%esp
10b5d7: 5b pop %ebx
10b5d8: 5e pop %esi
10b5d9: c9 leave
10b5da: c3 ret
10b5db: 90 nop
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 );
10b5dc: e8 f7 8a 00 00 call 1140d8 <__errno>
10b5e1: c7 00 16 00 00 00 movl $0x16,(%eax)
10b5e7: b8 ff ff ff ff mov $0xffffffff,%eax
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10b5ec: 8d 65 f8 lea -0x8(%ebp),%esp
10b5ef: 5b pop %ebx
10b5f0: 5e pop %esi
10b5f1: c9 leave
10b5f2: c3 ret
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
10b5f3: e8 60 2d 00 00 call 10e358 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
10b5f8: e8 db 8a 00 00 call 1140d8 <__errno>
10b5fd: c7 00 0b 00 00 00 movl $0xb,(%eax)
10b603: b8 ff ff ff ff mov $0xffffffff,%eax
10b608: eb ca jmp 10b5d4 <timer_create+0xe8>
0010ba34 <timer_delete>:
int timer_delete(
timer_t timerid
)
{
10ba34: 55 push %ebp
10ba35: 89 e5 mov %esp,%ebp
10ba37: 53 push %ebx
10ba38: 83 ec 18 sub $0x18,%esp
* because rtems_timer_delete stops the timer before deleting it.
*/
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
10ba3b: 8d 45 f4 lea -0xc(%ebp),%eax
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
10ba3e: 50 push %eax
10ba3f: ff 75 08 pushl 0x8(%ebp)
10ba42: 68 00 9b 12 00 push $0x129b00
10ba47: e8 ac 21 00 00 call 10dbf8 <_Objects_Get>
10ba4c: 89 c3 mov %eax,%ebx
switch ( location ) {
10ba4e: 83 c4 10 add $0x10,%esp
10ba51: 8b 4d f4 mov -0xc(%ebp),%ecx
10ba54: 85 c9 test %ecx,%ecx
10ba56: 74 18 je 10ba70 <timer_delete+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10ba58: e8 8b 8d 00 00 call 1147e8 <__errno>
10ba5d: c7 00 16 00 00 00 movl $0x16,(%eax)
10ba63: b8 ff ff ff ff mov $0xffffffff,%eax
}
10ba68: 8b 5d fc mov -0x4(%ebp),%ebx
10ba6b: c9 leave
10ba6c: c3 ret
10ba6d: 8d 76 00 lea 0x0(%esi),%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Timer_Information, &ptimer->Object );
10ba70: 83 ec 08 sub $0x8,%esp
10ba73: 50 push %eax
10ba74: 68 00 9b 12 00 push $0x129b00
10ba79: e8 3e 1d 00 00 call 10d7bc <_Objects_Close>
ptimer->state = POSIX_TIMER_STATE_FREE;
10ba7e: c6 43 3c 01 movb $0x1,0x3c(%ebx)
(void) _Watchdog_Remove( &ptimer->Timer );
10ba82: 8d 43 10 lea 0x10(%ebx),%eax
10ba85: 89 04 24 mov %eax,(%esp)
10ba88: e8 43 3c 00 00 call 10f6d0 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free (
POSIX_Timer_Control *the_timer
)
{
_Objects_Free( &_POSIX_Timer_Information, &the_timer->Object );
10ba8d: 58 pop %eax
10ba8e: 5a pop %edx
10ba8f: 53 push %ebx
10ba90: 68 00 9b 12 00 push $0x129b00
10ba95: e8 1e 20 00 00 call 10dab8 <_Objects_Free>
_POSIX_Timer_Free( ptimer );
_Thread_Enable_dispatch();
10ba9a: e8 0d 2c 00 00 call 10e6ac <_Thread_Enable_dispatch>
return 0;
10ba9f: 83 c4 10 add $0x10,%esp
10baa2: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10baa4: 8b 5d fc mov -0x4(%ebp),%ebx
10baa7: c9 leave
10baa8: c3 ret
0010c8f0 <timer_getoverrun>:
* its execution, _POSIX_Timer_TSR will have to set this counter to 0.
*/
int timer_getoverrun(
timer_t timerid
)
{
10c8f0: 55 push %ebp
10c8f1: 89 e5 mov %esp,%ebp
10c8f3: 53 push %ebx
10c8f4: 83 ec 18 sub $0x18,%esp
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
10c8f7: 8d 45 f4 lea -0xc(%ebp),%eax
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
10c8fa: 50 push %eax
10c8fb: ff 75 08 pushl 0x8(%ebp)
10c8fe: 68 c0 b1 12 00 push $0x12b1c0
10c903: e8 34 21 00 00 call 10ea3c <_Objects_Get>
switch ( location ) {
10c908: 83 c4 10 add $0x10,%esp
10c90b: 8b 55 f4 mov -0xc(%ebp),%edx
10c90e: 85 d2 test %edx,%edx
10c910: 74 1a je 10c92c <timer_getoverrun+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10c912: e8 51 89 00 00 call 115268 <__errno>
10c917: c7 00 16 00 00 00 movl $0x16,(%eax)
10c91d: bb ff ff ff ff mov $0xffffffff,%ebx
}
10c922: 89 d8 mov %ebx,%eax
10c924: 8b 5d fc mov -0x4(%ebp),%ebx
10c927: c9 leave
10c928: c3 ret
10c929: 8d 76 00 lea 0x0(%esi),%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
overrun = ptimer->overrun;
10c92c: 8b 58 68 mov 0x68(%eax),%ebx
ptimer->overrun = 0;
10c92f: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
_Thread_Enable_dispatch();
10c936: e8 b5 2b 00 00 call 10f4f0 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c93b: 89 d8 mov %ebx,%eax
10c93d: 8b 5d fc mov -0x4(%ebp),%ebx
10c940: c9 leave
10c941: c3 ret
0010c944 <timer_gettime>:
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
10c944: 55 push %ebp
10c945: 89 e5 mov %esp,%ebp
10c947: 56 push %esi
10c948: 53 push %ebx
10c949: 83 ec 10 sub $0x10,%esp
10c94c: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
10c94f: 85 db test %ebx,%ebx
10c951: 74 65 je 10c9b8 <timer_gettime+0x74>
rtems_set_errno_and_return_minus_one( EINVAL );
/* Reads the current time */
_TOD_Get( ¤t_time );
10c953: 83 ec 0c sub $0xc,%esp
10c956: 8d 45 ec lea -0x14(%ebp),%eax
10c959: 50 push %eax
10c95a: e8 01 17 00 00 call 10e060 <_TOD_Get>
10c95f: 83 c4 0c add $0xc,%esp
ptimer = _POSIX_Timer_Get( timerid, &location );
10c962: 8d 45 f4 lea -0xc(%ebp),%eax
10c965: 50 push %eax
10c966: ff 75 08 pushl 0x8(%ebp)
10c969: 68 c0 b1 12 00 push $0x12b1c0
10c96e: e8 c9 20 00 00 call 10ea3c <_Objects_Get>
10c973: 89 c6 mov %eax,%esi
switch ( location ) {
10c975: 83 c4 10 add $0x10,%esp
10c978: 8b 45 f4 mov -0xc(%ebp),%eax
10c97b: 85 c0 test %eax,%eax
10c97d: 75 39 jne 10c9b8 <timer_gettime+0x74>
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
10c97f: a1 a4 af 12 00 mov 0x12afa4,%eax
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
10c984: 83 ec 08 sub $0x8,%esp
10c987: 8d 53 08 lea 0x8(%ebx),%edx
10c98a: 52 push %edx
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
10c98b: 8b 56 1c mov 0x1c(%esi),%edx
10c98e: 03 56 24 add 0x24(%esi),%edx
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
10c991: 29 c2 sub %eax,%edx
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
10c993: 52 push %edx
10c994: e8 7b 36 00 00 call 110014 <_Timespec_From_ticks>
value->it_interval = ptimer->timer_data.it_interval;
10c999: 8b 46 54 mov 0x54(%esi),%eax
10c99c: 8b 56 58 mov 0x58(%esi),%edx
10c99f: 89 03 mov %eax,(%ebx)
10c9a1: 89 53 04 mov %edx,0x4(%ebx)
_Thread_Enable_dispatch();
10c9a4: e8 47 2b 00 00 call 10f4f0 <_Thread_Enable_dispatch>
return 0;
10c9a9: 83 c4 10 add $0x10,%esp
10c9ac: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c9ae: 8d 65 f8 lea -0x8(%ebp),%esp
10c9b1: 5b pop %ebx
10c9b2: 5e pop %esi
10c9b3: c9 leave
10c9b4: c3 ret
10c9b5: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10c9b8: e8 ab 88 00 00 call 115268 <__errno>
10c9bd: c7 00 16 00 00 00 movl $0x16,(%eax)
10c9c3: b8 ff ff ff ff mov $0xffffffff,%eax
10c9c8: eb e4 jmp 10c9ae <timer_gettime+0x6a>
0010b60c <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
10b60c: 55 push %ebp
10b60d: 89 e5 mov %esp,%ebp
10b60f: 57 push %edi
10b610: 56 push %esi
10b611: 53 push %ebx
10b612: 83 ec 3c sub $0x3c,%esp
10b615: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
10b618: 85 db test %ebx,%ebx
10b61a: 0f 84 50 01 00 00 je 10b770 <timer_settime+0x164> <== NEVER TAKEN
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
10b620: 83 ec 0c sub $0xc,%esp
10b623: 8d 43 08 lea 0x8(%ebx),%eax
10b626: 50 push %eax
10b627: e8 74 38 00 00 call 10eea0 <_Timespec_Is_valid>
10b62c: 83 c4 10 add $0x10,%esp
10b62f: 84 c0 test %al,%al
10b631: 0f 84 39 01 00 00 je 10b770 <timer_settime+0x164>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
10b637: 83 ec 0c sub $0xc,%esp
10b63a: 53 push %ebx
10b63b: e8 60 38 00 00 call 10eea0 <_Timespec_Is_valid>
10b640: 83 c4 10 add $0x10,%esp
10b643: 84 c0 test %al,%al
10b645: 0f 84 25 01 00 00 je 10b770 <timer_settime+0x164> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
10b64b: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10b64f: 0f 84 db 00 00 00 je 10b730 <timer_settime+0x124>
10b655: 8b 45 0c mov 0xc(%ebp),%eax
10b658: 85 c0 test %eax,%eax
10b65a: 0f 85 10 01 00 00 jne 10b770 <timer_settime+0x164>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b660: 8d 45 cc lea -0x34(%ebp),%eax
10b663: 89 45 c4 mov %eax,-0x3c(%ebp)
10b666: b9 04 00 00 00 mov $0x4,%ecx
10b66b: 89 c7 mov %eax,%edi
10b66d: 89 de mov %ebx,%esi
10b66f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
10b671: 50 push %eax
/* If the function reaches this point, then it will be necessary to do
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
10b672: 8d 45 e4 lea -0x1c(%ebp),%eax
10b675: 50 push %eax
10b676: ff 75 08 pushl 0x8(%ebp)
10b679: 68 00 9c 12 00 push $0x129c00
10b67e: e8 21 22 00 00 call 10d8a4 <_Objects_Get>
10b683: 89 c2 mov %eax,%edx
switch ( location ) {
10b685: 83 c4 10 add $0x10,%esp
10b688: 8b 7d e4 mov -0x1c(%ebp),%edi
10b68b: 85 ff test %edi,%edi
10b68d: 0f 85 dd 00 00 00 jne 10b770 <timer_settime+0x164>
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 ) {
10b693: 8b 75 d4 mov -0x2c(%ebp),%esi
10b696: 85 f6 test %esi,%esi
10b698: 75 0b jne 10b6a5 <timer_settime+0x99>
10b69a: 8b 4d d8 mov -0x28(%ebp),%ecx
10b69d: 85 c9 test %ecx,%ecx
10b69f: 0f 84 df 00 00 00 je 10b784 <timer_settime+0x178>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
10b6a5: 83 ec 0c sub $0xc,%esp
10b6a8: 53 push %ebx
10b6a9: 89 55 c0 mov %edx,-0x40(%ebp)
10b6ac: e8 57 38 00 00 call 10ef08 <_Timespec_To_ticks>
10b6b1: 8b 55 c0 mov -0x40(%ebp),%edx
10b6b4: 89 42 64 mov %eax,0x64(%edx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
10b6b7: 8d 45 d4 lea -0x2c(%ebp),%eax
10b6ba: 89 04 24 mov %eax,(%esp)
10b6bd: e8 46 38 00 00 call 10ef08 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
10b6c2: 8b 55 c0 mov -0x40(%ebp),%edx
10b6c5: 89 14 24 mov %edx,(%esp)
10b6c8: 68 f0 b7 10 00 push $0x10b7f0
10b6cd: ff 72 08 pushl 0x8(%edx)
10b6d0: 50 push %eax
10b6d1: 8d 42 10 lea 0x10(%edx),%eax
10b6d4: 50 push %eax
10b6d5: e8 42 61 00 00 call 11181c <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
10b6da: 83 c4 20 add $0x20,%esp
10b6dd: 84 c0 test %al,%al
10b6df: 8b 55 c0 mov -0x40(%ebp),%edx
10b6e2: 0f 84 e8 00 00 00 je 10b7d0 <timer_settime+0x1c4>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
10b6e8: 8b 45 14 mov 0x14(%ebp),%eax
10b6eb: 85 c0 test %eax,%eax
10b6ed: 0f 84 ed 00 00 00 je 10b7e0 <timer_settime+0x1d4>
*ovalue = ptimer->timer_data;
10b6f3: 8d 42 54 lea 0x54(%edx),%eax
10b6f6: b9 04 00 00 00 mov $0x4,%ecx
10b6fb: 8b 7d 14 mov 0x14(%ebp),%edi
10b6fe: 89 c6 mov %eax,%esi
10b700: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
10b702: b9 04 00 00 00 mov $0x4,%ecx
10b707: 89 c7 mov %eax,%edi
10b709: 8b 75 c4 mov -0x3c(%ebp),%esi
10b70c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b70e: c6 42 3c 03 movb $0x3,0x3c(%edx)
_TOD_Get( &ptimer->time );
10b712: 83 ec 0c sub $0xc,%esp
10b715: 83 c2 6c add $0x6c,%edx
10b718: 52 push %edx
10b719: e8 ce 17 00 00 call 10ceec <_TOD_Get>
_Thread_Enable_dispatch();
10b71e: e8 35 2c 00 00 call 10e358 <_Thread_Enable_dispatch>
return 0;
10b723: 83 c4 10 add $0x10,%esp
10b726: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b728: 8d 65 f4 lea -0xc(%ebp),%esp
10b72b: 5b pop %ebx
10b72c: 5e pop %esi
10b72d: 5f pop %edi
10b72e: c9 leave
10b72f: c3 ret
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b730: 8d 45 cc lea -0x34(%ebp),%eax
10b733: 89 45 c4 mov %eax,-0x3c(%ebp)
10b736: 89 c7 mov %eax,%edi
10b738: 89 de mov %ebx,%esi
10b73a: 8b 4d 0c mov 0xc(%ebp),%ecx
10b73d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
10b73f: 83 ec 0c sub $0xc,%esp
10b742: 8d 75 dc lea -0x24(%ebp),%esi
10b745: 56 push %esi
10b746: e8 a1 17 00 00 call 10ceec <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
10b74b: 59 pop %ecx
10b74c: 5f pop %edi
10b74d: 8d 7d d4 lea -0x2c(%ebp),%edi
10b750: 57 push %edi
10b751: 56 push %esi
10b752: e8 25 37 00 00 call 10ee7c <_Timespec_Greater_than>
10b757: 83 c4 10 add $0x10,%esp
10b75a: 84 c0 test %al,%al
10b75c: 75 12 jne 10b770 <timer_settime+0x164>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
10b75e: 52 push %edx
10b75f: 57 push %edi
10b760: 57 push %edi
10b761: 56 push %esi
10b762: e8 61 37 00 00 call 10eec8 <_Timespec_Subtract>
10b767: 83 c4 10 add $0x10,%esp
10b76a: e9 02 ff ff ff jmp 10b671 <timer_settime+0x65>
10b76f: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b770: e8 63 89 00 00 call 1140d8 <__errno>
10b775: c7 00 16 00 00 00 movl $0x16,(%eax)
10b77b: b8 ff ff ff ff mov $0xffffffff,%eax
10b780: eb a6 jmp 10b728 <timer_settime+0x11c>
10b782: 66 90 xchg %ax,%ax
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 );
10b784: 83 ec 0c sub $0xc,%esp
10b787: 8d 40 10 lea 0x10(%eax),%eax
10b78a: 50 push %eax
10b78b: 89 55 c0 mov %edx,-0x40(%ebp)
10b78e: e8 a1 3b 00 00 call 10f334 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
10b793: 83 c4 10 add $0x10,%esp
10b796: 8b 55 14 mov 0x14(%ebp),%edx
10b799: 85 d2 test %edx,%edx
10b79b: 8b 55 c0 mov -0x40(%ebp),%edx
10b79e: 74 48 je 10b7e8 <timer_settime+0x1dc>
*ovalue = ptimer->timer_data;
10b7a0: 8d 42 54 lea 0x54(%edx),%eax
10b7a3: b9 04 00 00 00 mov $0x4,%ecx
10b7a8: 8b 7d 14 mov 0x14(%ebp),%edi
10b7ab: 89 c6 mov %eax,%esi
10b7ad: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
10b7af: b9 04 00 00 00 mov $0x4,%ecx
10b7b4: 89 c7 mov %eax,%edi
10b7b6: 8b 75 c4 mov -0x3c(%ebp),%esi
10b7b9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10b7bb: c6 42 3c 04 movb $0x4,0x3c(%edx)
/* Returns with success */
_Thread_Enable_dispatch();
10b7bf: e8 94 2b 00 00 call 10e358 <_Thread_Enable_dispatch>
return 0;
10b7c4: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7c6: 8d 65 f4 lea -0xc(%ebp),%esp
10b7c9: 5b pop %ebx
10b7ca: 5e pop %esi
10b7cb: 5f pop %edi
10b7cc: c9 leave
10b7cd: c3 ret
10b7ce: 66 90 xchg %ax,%ax
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
10b7d0: e8 83 2b 00 00 call 10e358 <_Thread_Enable_dispatch>
return 0;
10b7d5: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7d7: 8d 65 f4 lea -0xc(%ebp),%esp
10b7da: 5b pop %ebx
10b7db: 5e pop %esi
10b7dc: 5f pop %edi
10b7dd: c9 leave
10b7de: c3 ret
10b7df: 90 nop
10b7e0: 8d 42 54 lea 0x54(%edx),%eax
10b7e3: e9 1a ff ff ff jmp 10b702 <timer_settime+0xf6>
10b7e8: 8d 42 54 lea 0x54(%edx),%eax
10b7eb: eb c2 jmp 10b7af <timer_settime+0x1a3>
0010b410 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
10b410: 55 push %ebp
10b411: 89 e5 mov %esp,%ebp
10b413: 56 push %esi
10b414: 53 push %ebx
10b415: 83 ec 10 sub $0x10,%esp
10b418: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
10b41b: 8b 0d 7c 8f 12 00 mov 0x128f7c,%ecx
10b421: 85 c9 test %ecx,%ecx
10b423: 0f 84 8f 00 00 00 je 10b4b8 <ualarm+0xa8>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
10b429: 83 ec 0c sub $0xc,%esp
10b42c: 68 60 8f 12 00 push $0x128f60
10b431: e8 72 3a 00 00 call 10eea8 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
10b436: 83 e8 02 sub $0x2,%eax
10b439: 83 c4 10 add $0x10,%esp
10b43c: 83 f8 01 cmp $0x1,%eax
10b43f: 0f 86 a3 00 00 00 jbe 10b4e8 <ualarm+0xd8> <== ALWAYS TAKEN
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10b445: 31 f6 xor %esi,%esi
/*
* 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 ) {
10b447: 85 db test %ebx,%ebx
10b449: 74 62 je 10b4ad <ualarm+0x9d>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
10b44b: ba 83 de 1b 43 mov $0x431bde83,%edx
10b450: 89 d8 mov %ebx,%eax
10b452: f7 e2 mul %edx
10b454: c1 ea 12 shr $0x12,%edx
10b457: 89 55 f0 mov %edx,-0x10(%ebp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
10b45a: 8d 04 92 lea (%edx,%edx,4),%eax
10b45d: 8d 04 80 lea (%eax,%eax,4),%eax
10b460: 8d 04 80 lea (%eax,%eax,4),%eax
10b463: 8d 04 80 lea (%eax,%eax,4),%eax
10b466: 8d 04 80 lea (%eax,%eax,4),%eax
10b469: 8d 04 80 lea (%eax,%eax,4),%eax
10b46c: c1 e0 06 shl $0x6,%eax
10b46f: 29 c3 sub %eax,%ebx
10b471: 8d 04 9b lea (%ebx,%ebx,4),%eax
10b474: 8d 04 80 lea (%eax,%eax,4),%eax
10b477: 8d 04 80 lea (%eax,%eax,4),%eax
10b47a: c1 e0 03 shl $0x3,%eax
10b47d: 89 45 f4 mov %eax,-0xc(%ebp)
ticks = _Timespec_To_ticks( &tp );
10b480: 83 ec 0c sub $0xc,%esp
10b483: 8d 5d f0 lea -0x10(%ebp),%ebx
10b486: 53 push %ebx
10b487: e8 78 35 00 00 call 10ea04 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
10b48c: 89 1c 24 mov %ebx,(%esp)
10b48f: e8 70 35 00 00 call 10ea04 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b494: a3 6c 8f 12 00 mov %eax,0x128f6c
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b499: 58 pop %eax
10b49a: 5a pop %edx
10b49b: 68 60 8f 12 00 push $0x128f60
10b4a0: 68 7c 86 12 00 push $0x12867c
10b4a5: e8 c6 38 00 00 call 10ed70 <_Watchdog_Insert>
10b4aa: 83 c4 10 add $0x10,%esp
}
return remaining;
}
10b4ad: 89 f0 mov %esi,%eax
10b4af: 8d 65 f8 lea -0x8(%ebp),%esp
10b4b2: 5b pop %ebx
10b4b3: 5e pop %esi
10b4b4: c9 leave
10b4b5: c3 ret
10b4b6: 66 90 xchg %ax,%ax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b4b8: c7 05 68 8f 12 00 00 movl $0x0,0x128f68
10b4bf: 00 00 00
the_watchdog->routine = routine;
10b4c2: c7 05 7c 8f 12 00 d4 movl $0x10b3d4,0x128f7c
10b4c9: b3 10 00
the_watchdog->id = id;
10b4cc: c7 05 80 8f 12 00 00 movl $0x0,0x128f80
10b4d3: 00 00 00
the_watchdog->user_data = user_data;
10b4d6: c7 05 84 8f 12 00 00 movl $0x0,0x128f84
10b4dd: 00 00 00
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10b4e0: 31 f6 xor %esi,%esi
10b4e2: e9 60 ff ff ff jmp 10b447 <ualarm+0x37>
10b4e7: 90 nop
* 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);
10b4e8: a1 74 8f 12 00 mov 0x128f74,%eax
10b4ed: 03 05 6c 8f 12 00 add 0x128f6c,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10b4f3: 83 ec 08 sub $0x8,%esp
10b4f6: 8d 55 f0 lea -0x10(%ebp),%edx
10b4f9: 52 push %edx
* 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);
10b4fa: 2b 05 78 8f 12 00 sub 0x128f78,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10b500: 50 push %eax
10b501: e8 76 34 00 00 call 10e97c <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
10b506: 8b 45 f0 mov -0x10(%ebp),%eax
10b509: 8d 04 80 lea (%eax,%eax,4),%eax
10b50c: 8d 04 80 lea (%eax,%eax,4),%eax
10b50f: 8d 04 80 lea (%eax,%eax,4),%eax
10b512: 8d 04 80 lea (%eax,%eax,4),%eax
10b515: 8d 04 80 lea (%eax,%eax,4),%eax
10b518: 8d 0c 80 lea (%eax,%eax,4),%ecx
10b51b: c1 e1 06 shl $0x6,%ecx
remaining += tp.tv_nsec / 1000;
10b51e: 8b 75 f4 mov -0xc(%ebp),%esi
10b521: b8 d3 4d 62 10 mov $0x10624dd3,%eax
10b526: f7 ee imul %esi
10b528: 89 d0 mov %edx,%eax
10b52a: c1 f8 06 sar $0x6,%eax
10b52d: c1 fe 1f sar $0x1f,%esi
10b530: 29 f0 sub %esi,%eax
10b532: 8d 34 08 lea (%eax,%ecx,1),%esi
10b535: 83 c4 10 add $0x10,%esp
10b538: e9 0a ff ff ff jmp 10b447 <ualarm+0x37>
0010bb74 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
10bb74: 55 push %ebp
10bb75: 89 e5 mov %esp,%ebp
10bb77: 57 push %edi
10bb78: 56 push %esi
10bb79: 53 push %ebx
10bb7a: 83 ec 58 sub $0x58,%esp
10bb7d: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
10bb80: 53 push %ebx
10bb81: e8 3e d3 ff ff call 108ec4 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
10bb86: 83 c4 10 add $0x10,%esp
10bb89: 85 c0 test %eax,%eax
10bb8b: 0f 85 d3 00 00 00 jne 10bc64 <unlink+0xf0>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
10bb91: 50 push %eax
10bb92: 8d 45 d0 lea -0x30(%ebp),%eax
10bb95: 89 45 b4 mov %eax,-0x4c(%ebp)
10bb98: 50 push %eax
10bb99: 8d 45 e4 lea -0x1c(%ebp),%eax
10bb9c: 50 push %eax
10bb9d: 53 push %ebx
10bb9e: e8 b9 e2 ff ff call 109e5c <rtems_filesystem_get_start_loc>
10bba3: 83 c4 10 add $0x10,%esp
10bba6: 31 d2 xor %edx,%edx
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
10bba8: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
10bbac: 8d 7d bc lea -0x44(%ebp),%edi
10bbaf: b9 05 00 00 00 mov $0x5,%ecx
10bbb4: 8b 75 b4 mov -0x4c(%ebp),%esi
10bbb7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = path + parentpathlen;
10bbb9: 01 d3 add %edx,%ebx
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10bbbb: be ff ff ff ff mov $0xffffffff,%esi
10bbc0: 89 f1 mov %esi,%ecx
10bbc2: 89 df mov %ebx,%edi
10bbc4: 31 c0 xor %eax,%eax
10bbc6: f2 ae repnz scas %es:(%edi),%al
10bbc8: f7 d1 not %ecx
10bbca: 49 dec %ecx
10bbcb: 83 ec 08 sub $0x8,%esp
10bbce: 51 push %ecx
10bbcf: 53 push %ebx
10bbd0: e8 33 d3 ff ff call 108f08 <rtems_filesystem_prefix_separators>
10bbd5: 01 c3 add %eax,%ebx
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10bbd7: 89 f1 mov %esi,%ecx
10bbd9: 89 df mov %ebx,%edi
10bbdb: 31 c0 xor %eax,%eax
10bbdd: f2 ae repnz scas %es:(%edi),%al
10bbdf: f7 d1 not %ecx
10bbe1: 49 dec %ecx
10bbe2: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10bbe9: 8d 75 bc lea -0x44(%ebp),%esi
10bbec: 56 push %esi
10bbed: 6a 00 push $0x0
10bbef: 51 push %ecx
10bbf0: 53 push %ebx
10bbf1: e8 22 d2 ff ff call 108e18 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
10bbf6: 83 c4 20 add $0x20,%esp
10bbf9: 85 c0 test %eax,%eax
10bbfb: 75 53 jne 10bc50 <unlink+0xdc>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
10bbfd: 83 ec 0c sub $0xc,%esp
10bc00: 56 push %esi
10bc01: 8b 45 c8 mov -0x38(%ebp),%eax
10bc04: ff 50 10 call *0x10(%eax)
10bc07: 83 c4 10 add $0x10,%esp
10bc0a: 48 dec %eax
10bc0b: 0f 84 83 00 00 00 je 10bc94 <unlink+0x120>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
10bc11: 83 ec 08 sub $0x8,%esp
10bc14: 56 push %esi
10bc15: ff 75 b4 pushl -0x4c(%ebp)
10bc18: 8b 45 c8 mov -0x38(%ebp),%eax
10bc1b: ff 50 0c call *0xc(%eax)
rtems_filesystem_freenode( &loc );
10bc1e: 89 34 24 mov %esi,(%esp)
10bc21: 89 45 ac mov %eax,-0x54(%ebp)
10bc24: e8 2f d3 ff ff call 108f58 <rtems_filesystem_freenode>
if ( free_parentloc )
10bc29: 83 c4 10 add $0x10,%esp
10bc2c: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
10bc30: 8b 45 ac mov -0x54(%ebp),%eax
10bc33: 74 11 je 10bc46 <unlink+0xd2>
rtems_filesystem_freenode( &parentloc );
10bc35: 83 ec 0c sub $0xc,%esp
10bc38: ff 75 b4 pushl -0x4c(%ebp)
10bc3b: e8 18 d3 ff ff call 108f58 <rtems_filesystem_freenode>
10bc40: 83 c4 10 add $0x10,%esp
10bc43: 8b 45 ac mov -0x54(%ebp),%eax
return result;
}
10bc46: 8d 65 f4 lea -0xc(%ebp),%esp
10bc49: 5b pop %ebx
10bc4a: 5e pop %esi
10bc4b: 5f pop %edi
10bc4c: c9 leave
10bc4d: c3 ret
10bc4e: 66 90 xchg %ax,%ax
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 )
10bc50: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
10bc54: 75 70 jne 10bcc6 <unlink+0x152> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
return -1;
10bc56: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
10bc5b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10bc5e: 5b pop %ebx <== NOT EXECUTED
10bc5f: 5e pop %esi <== NOT EXECUTED
10bc60: 5f pop %edi <== NOT EXECUTED
10bc61: c9 leave <== NOT EXECUTED
10bc62: c3 ret <== NOT EXECUTED
10bc63: 90 nop <== 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,
10bc64: 89 c2 mov %eax,%edx
10bc66: 83 ec 0c sub $0xc,%esp
10bc69: 6a 00 push $0x0
10bc6b: 8d 45 d0 lea -0x30(%ebp),%eax
10bc6e: 89 45 b4 mov %eax,-0x4c(%ebp)
10bc71: 50 push %eax
10bc72: 6a 02 push $0x2
10bc74: 52 push %edx
10bc75: 53 push %ebx
10bc76: 89 55 ac mov %edx,-0x54(%ebp)
10bc79: e8 02 d2 ff ff call 108e80 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
10bc7e: 83 c4 20 add $0x20,%esp
10bc81: 85 c0 test %eax,%eax
10bc83: 8b 55 ac mov -0x54(%ebp),%edx
10bc86: 75 ce jne 10bc56 <unlink+0xe2> <== NEVER TAKEN
return -1;
free_parentloc = true;
10bc88: c6 45 b3 01 movb $0x1,-0x4d(%ebp)
10bc8c: e9 1b ff ff ff jmp 10bbac <unlink+0x38>
10bc91: 8d 76 00 lea 0x0(%esi),%esi
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
10bc94: 83 ec 0c sub $0xc,%esp
10bc97: 56 push %esi
10bc98: e8 bb d2 ff ff call 108f58 <rtems_filesystem_freenode>
if ( free_parentloc )
10bc9d: 83 c4 10 add $0x10,%esp
10bca0: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
10bca4: 74 0e je 10bcb4 <unlink+0x140>
rtems_filesystem_freenode( &parentloc );
10bca6: 83 ec 0c sub $0xc,%esp
10bca9: ff 75 b4 pushl -0x4c(%ebp)
10bcac: e8 a7 d2 ff ff call 108f58 <rtems_filesystem_freenode>
10bcb1: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EISDIR );
10bcb4: e8 27 b4 00 00 call 1170e0 <__errno>
10bcb9: c7 00 15 00 00 00 movl $0x15,(%eax)
10bcbf: b8 ff ff ff ff mov $0xffffffff,%eax
10bcc4: eb 80 jmp 10bc46 <unlink+0xd2>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
10bcc6: 83 ec 0c sub $0xc,%esp
10bcc9: ff 75 b4 pushl -0x4c(%ebp)
10bccc: e8 87 d2 ff ff call 108f58 <rtems_filesystem_freenode>
10bcd1: 83 c4 10 add $0x10,%esp
return -1;
10bcd4: b8 ff ff ff ff mov $0xffffffff,%eax
10bcd9: e9 68 ff ff ff jmp 10bc46 <unlink+0xd2>
0010bd44 <unmount>:
*/
int unmount(
const char *path
)
{
10bd44: 55 push %ebp
10bd45: 89 e5 mov %esp,%ebp
10bd47: 57 push %edi
10bd48: 56 push %esi
10bd49: 53 push %ebx
10bd4a: 83 ec 38 sub $0x38,%esp
10bd4d: 8b 55 08 mov 0x8(%ebp),%edx
* 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 ) )
10bd50: 31 c0 xor %eax,%eax
10bd52: b9 ff ff ff ff mov $0xffffffff,%ecx
10bd57: 89 d7 mov %edx,%edi
10bd59: f2 ae repnz scas %es:(%edi),%al
10bd5b: f7 d1 not %ecx
10bd5d: 49 dec %ecx
10bd5e: 6a 01 push $0x1
10bd60: 8d 75 d4 lea -0x2c(%ebp),%esi
10bd63: 56 push %esi
10bd64: 6a 00 push $0x0
10bd66: 51 push %ecx
10bd67: 52 push %edx
10bd68: e8 77 cf ff ff call 108ce4 <rtems_filesystem_evaluate_path>
10bd6d: 83 c4 20 add $0x20,%esp
10bd70: 85 c0 test %eax,%eax
10bd72: 75 68 jne 10bddc <unmount+0x98>
return -1;
mt_entry = loc.mt_entry;
10bd74: 8b 5d e4 mov -0x1c(%ebp),%ebx
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
10bd77: 8b 45 d4 mov -0x2c(%ebp),%eax
10bd7a: 39 43 1c cmp %eax,0x1c(%ebx)
10bd7d: 0f 85 c5 00 00 00 jne 10be48 <unmount+0x104>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
10bd83: 83 ec 0c sub $0xc,%esp
10bd86: 56 push %esi
10bd87: e8 30 d0 ff ff call 108dbc <rtems_filesystem_freenode>
* 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 )
10bd8c: 83 c4 10 add $0x10,%esp
10bd8f: a1 50 7d 12 00 mov 0x127d50,%eax
10bd94: 39 58 14 cmp %ebx,0x14(%eax)
10bd97: 0f 84 cf 00 00 00 je 10be6c <unmount+0x128>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
10bd9d: 83 ec 08 sub $0x8,%esp
10bda0: ff 73 2c pushl 0x2c(%ebx)
10bda3: 68 30 bd 10 00 push $0x10bd30
10bda8: e8 ab d7 ff ff call 109558 <rtems_filesystem_mount_iterate>
10bdad: 83 c4 10 add $0x10,%esp
10bdb0: 84 c0 test %al,%al
10bdb2: 0f 85 b4 00 00 00 jne 10be6c <unmount+0x128>
* 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 )
10bdb8: 83 ec 0c sub $0xc,%esp
10bdbb: 53 push %ebx
10bdbc: e8 2b d3 ff ff call 1090ec <rtems_libio_is_open_files_in_fs>
10bdc1: 83 c4 10 add $0x10,%esp
10bdc4: 48 dec %eax
10bdc5: 0f 84 a1 00 00 00 je 10be6c <unmount+0x128>
* 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 )
10bdcb: 83 ec 0c sub $0xc,%esp
10bdce: 8b 43 14 mov 0x14(%ebx),%eax
10bdd1: 53 push %ebx
10bdd2: ff 50 28 call *0x28(%eax)
10bdd5: 83 c4 10 add $0x10,%esp
10bdd8: 85 c0 test %eax,%eax
10bdda: 74 10 je 10bdec <unmount+0xa8> <== ALWAYS TAKEN
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
rtems_fatal_error_occurred( 0 );
return -1;
10bddc: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10bde1: 8d 65 f4 lea -0xc(%ebp),%esp
10bde4: 5b pop %ebx
10bde5: 5e pop %esi
10bde6: 5f pop %edi
10bde7: c9 leave
10bde8: c3 ret
10bde9: 8d 76 00 lea 0x0(%esi),%esi
* 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){
10bdec: 83 ec 0c sub $0xc,%esp
10bdef: 8b 43 28 mov 0x28(%ebx),%eax
10bdf2: 53 push %ebx
10bdf3: ff 50 2c call *0x2c(%eax)
10bdf6: 83 c4 10 add $0x10,%esp
10bdf9: 85 c0 test %eax,%eax
10bdfb: 0f 85 83 00 00 00 jne 10be84 <unmount+0x140> <== NEVER TAKEN
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 );
10be01: 52 push %edx
10be02: 6a 00 push $0x0
10be04: 6a 00 push $0x0
10be06: ff 35 28 a0 12 00 pushl 0x12a028
10be0c: e8 77 0b 00 00 call 10c988 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10be11: 89 1c 24 mov %ebx,(%esp)
10be14: e8 77 14 00 00 call 10d290 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10be19: 58 pop %eax
10be1a: ff 35 28 a0 12 00 pushl 0x12a028
10be20: e8 5f 0c 00 00 call 10ca84 <rtems_semaphore_release>
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;
10be25: 8d 43 08 lea 0x8(%ebx),%eax
/*
* 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 );
10be28: 89 04 24 mov %eax,(%esp)
10be2b: e8 8c cf ff ff call 108dbc <rtems_filesystem_freenode>
free( mt_entry );
10be30: 89 1c 24 mov %ebx,(%esp)
10be33: e8 98 cf ff ff call 108dd0 <free>
return 0;
10be38: 83 c4 10 add $0x10,%esp
10be3b: 31 c0 xor %eax,%eax
}
10be3d: 8d 65 f4 lea -0xc(%ebp),%esp
10be40: 5b pop %ebx
10be41: 5e pop %esi
10be42: 5f pop %edi
10be43: c9 leave
10be44: c3 ret
10be45: 8d 76 00 lea 0x0(%esi),%esi
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
10be48: 83 ec 0c sub $0xc,%esp
10be4b: 56 push %esi
10be4c: e8 6b cf ff ff call 108dbc <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
10be51: e8 0e 85 00 00 call 114364 <__errno>
10be56: c7 00 0d 00 00 00 movl $0xd,(%eax)
10be5c: 83 c4 10 add $0x10,%esp
10be5f: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10be64: 8d 65 f4 lea -0xc(%ebp),%esp
10be67: 5b pop %ebx
10be68: 5e pop %esi
10be69: 5f pop %edi
10be6a: c9 leave
10be6b: c3 ret
* 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 );
10be6c: e8 f3 84 00 00 call 114364 <__errno>
10be71: c7 00 10 00 00 00 movl $0x10,(%eax)
10be77: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10be7c: 8d 65 f4 lea -0xc(%ebp),%esp
10be7f: 5b pop %ebx
10be80: 5e pop %esi
10be81: 5f pop %edi
10be82: c9 leave
10be83: c3 ret
* 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 )
10be84: 83 ec 0c sub $0xc,%esp
10be87: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10be8a: 53 push %ebx <== NOT EXECUTED
10be8b: ff 50 20 call *0x20(%eax) <== NOT EXECUTED
10be8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10be91: 85 c0 test %eax,%eax <== NOT EXECUTED
10be93: 0f 84 43 ff ff ff je 10bddc <unmount+0x98> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
10be99: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10be9c: 6a 00 push $0x0 <== NOT EXECUTED
10be9e: e8 ed 10 00 00 call 10cf90 <rtems_fatal_error_occurred><== NOT EXECUTED
0010bf10 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
10bf10: 55 push %ebp
10bf11: 89 e5 mov %esp,%ebp
10bf13: 57 push %edi
10bf14: 56 push %esi
10bf15: 53 push %ebx
10bf16: 83 ec 48 sub $0x48,%esp
10bf19: 8b 55 08 mov 0x8(%ebp),%edx
10bf1c: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
10bf1f: 31 c0 xor %eax,%eax
10bf21: b9 ff ff ff ff mov $0xffffffff,%ecx
10bf26: 89 d7 mov %edx,%edi
10bf28: f2 ae repnz scas %es:(%edi),%al
10bf2a: f7 d1 not %ecx
10bf2c: 49 dec %ecx
10bf2d: 6a 01 push $0x1
10bf2f: 8d 75 d4 lea -0x2c(%ebp),%esi
10bf32: 56 push %esi
10bf33: 6a 00 push $0x0
10bf35: 51 push %ecx
10bf36: 52 push %edx
10bf37: e8 cc ca ff ff call 108a08 <rtems_filesystem_evaluate_path>
10bf3c: 83 c4 20 add $0x20,%esp
10bf3f: 85 c0 test %eax,%eax
10bf41: 75 2d jne 10bf70 <utime+0x60>
return -1;
if ( times == NULL ) {
10bf43: 85 db test %ebx,%ebx
10bf45: 74 39 je 10bf80 <utime+0x70>
10bf47: 8b 43 04 mov 0x4(%ebx),%eax
10bf4a: 8b 13 mov (%ebx),%edx
now.actime = now.modtime = time( NULL );
times = &now;
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
10bf4c: 51 push %ecx
10bf4d: 50 push %eax
10bf4e: 52 push %edx
10bf4f: 56 push %esi
10bf50: 8b 45 e0 mov -0x20(%ebp),%eax
10bf53: ff 50 30 call *0x30(%eax)
rtems_filesystem_freenode( &temp_loc );
10bf56: 89 34 24 mov %esi,(%esp)
10bf59: 89 45 c4 mov %eax,-0x3c(%ebp)
10bf5c: e8 97 ce ff ff call 108df8 <rtems_filesystem_freenode>
return result;
10bf61: 83 c4 10 add $0x10,%esp
10bf64: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10bf67: 8d 65 f4 lea -0xc(%ebp),%esp
10bf6a: 5b pop %ebx
10bf6b: 5e pop %esi
10bf6c: 5f pop %edi
10bf6d: c9 leave
10bf6e: c3 ret
10bf6f: 90 nop
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
10bf70: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
10bf75: 8d 65 f4 lea -0xc(%ebp),%esp
10bf78: 5b pop %ebx
10bf79: 5e pop %esi
10bf7a: 5f pop %edi
10bf7b: c9 leave
10bf7c: c3 ret
10bf7d: 8d 76 00 lea 0x0(%esi),%esi
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( times == NULL ) {
now.actime = now.modtime = time( NULL );
10bf80: 83 ec 0c sub $0xc,%esp
10bf83: 6a 00 push $0x0
10bf85: e8 a2 c9 00 00 call 11892c <time>
10bf8a: 83 c4 10 add $0x10,%esp
10bf8d: 89 c2 mov %eax,%edx
10bf8f: eb bb jmp 10bf4c <utime+0x3c>
0010bf94 <utimes>:
int utimes(
const char *path,
const struct timeval times[2]
)
{
10bf94: 55 push %ebp
10bf95: 89 e5 mov %esp,%ebp
10bf97: 83 ec 18 sub $0x18,%esp
10bf9a: 8b 55 08 mov 0x8(%ebp),%edx
10bf9d: 8b 45 0c mov 0xc(%ebp),%eax
struct utimbuf timeinsecs;
if ( times == NULL )
10bfa0: 85 c0 test %eax,%eax
10bfa2: 74 20 je 10bfc4 <utimes+0x30>
return utime( path, NULL );
timeinsecs.actime = (time_t) times[0].tv_sec;
10bfa4: 8b 08 mov (%eax),%ecx
10bfa6: 89 4d f0 mov %ecx,-0x10(%ebp)
timeinsecs.modtime = (time_t) times[1].tv_sec;
10bfa9: 8b 40 08 mov 0x8(%eax),%eax
10bfac: 89 45 f4 mov %eax,-0xc(%ebp)
return utime( path, &timeinsecs );
10bfaf: 83 ec 08 sub $0x8,%esp
10bfb2: 8d 45 f0 lea -0x10(%ebp),%eax
10bfb5: 50 push %eax
10bfb6: 52 push %edx
10bfb7: e8 54 ff ff ff call 10bf10 <utime>
10bfbc: 83 c4 10 add $0x10,%esp
}
10bfbf: c9 leave
10bfc0: c3 ret
10bfc1: 8d 76 00 lea 0x0(%esi),%esi
)
{
struct utimbuf timeinsecs;
if ( times == NULL )
return utime( path, NULL );
10bfc4: 83 ec 08 sub $0x8,%esp
10bfc7: 6a 00 push $0x0
10bfc9: 52 push %edx
10bfca: e8 41 ff ff ff call 10bf10 <utime>
10bfcf: 83 c4 10 add $0x10,%esp
timeinsecs.actime = (time_t) times[0].tv_sec;
timeinsecs.modtime = (time_t) times[1].tv_sec;
return utime( path, &timeinsecs );
}
10bfd2: c9 leave
10bfd3: c3 ret
0010abcc <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
10abcc: 55 push %ebp
10abcd: 89 e5 mov %esp,%ebp
10abcf: 57 push %edi
10abd0: 56 push %esi
10abd1: 53 push %ebx
10abd2: 83 ec 4c sub $0x4c,%esp
10abd5: 8b 75 08 mov 0x8(%ebp),%esi
for (; *fmt != '\0'; fmt++) {
10abd8: 8a 06 mov (%esi),%al
10abda: 84 c0 test %al,%al
10abdc: 75 21 jne 10abff <vprintk+0x33>
10abde: e9 c4 01 00 00 jmp 10ada7 <vprintk+0x1db>
10abe3: 90 nop
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
10abe4: 83 ec 0c sub $0xc,%esp
10abe7: 0f be c0 movsbl %al,%eax
10abea: 50 push %eax
10abeb: ff 15 08 33 12 00 call *0x123308
continue;
10abf1: 83 c4 10 add $0x10,%esp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
10abf4: 46 inc %esi
10abf5: 8a 06 mov (%esi),%al
10abf7: 84 c0 test %al,%al
10abf9: 0f 84 a8 01 00 00 je 10ada7 <vprintk+0x1db>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
10abff: 3c 25 cmp $0x25,%al
10ac01: 75 e1 jne 10abe4 <vprintk+0x18>
BSP_output_char(*fmt);
continue;
}
fmt++;
10ac03: 46 inc %esi
if (*fmt == '0' ) {
10ac04: 8a 16 mov (%esi),%dl
10ac06: 80 fa 30 cmp $0x30,%dl
10ac09: 0f 84 fd 01 00 00 je 10ae0c <vprintk+0x240>
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
10ac0f: b1 20 mov $0x20,%cl
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
10ac11: 80 fa 2d cmp $0x2d,%dl
10ac14: 0f 84 d6 01 00 00 je 10adf0 <vprintk+0x224>
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
10ac1a: 31 ff xor %edi,%edi
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10ac1c: 8d 42 d0 lea -0x30(%edx),%eax
10ac1f: 3c 09 cmp $0x9,%al
10ac21: 0f 87 dc 01 00 00 ja 10ae03 <vprintk+0x237>
10ac27: 31 db xor %ebx,%ebx
10ac29: 8d 76 00 lea 0x0(%esi),%esi
width *= 10;
10ac2c: 8d 04 9b lea (%ebx,%ebx,4),%eax
width += ((unsigned) *fmt - '0');
10ac2f: 0f be d2 movsbl %dl,%edx
10ac32: 8d 5c 42 d0 lea -0x30(%edx,%eax,2),%ebx
fmt++;
10ac36: 46 inc %esi
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10ac37: 8a 16 mov (%esi),%dl
10ac39: 8d 42 d0 lea -0x30(%edx),%eax
10ac3c: 3c 09 cmp $0x9,%al
10ac3e: 76 ec jbe 10ac2c <vprintk+0x60>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
10ac40: 80 fa 6c cmp $0x6c,%dl
10ac43: 0f 84 77 01 00 00 je 10adc0 <vprintk+0x1f4>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
10ac49: 80 fa 63 cmp $0x63,%dl
10ac4c: 0f 84 7a 01 00 00 je 10adcc <vprintk+0x200>
/* 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' ) {
10ac52: 80 fa 73 cmp $0x73,%dl
10ac55: 0f 84 bd 01 00 00 je 10ae18 <vprintk+0x24c>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
10ac5b: 80 fa 6f cmp $0x6f,%dl
10ac5e: 0f 84 4c 01 00 00 je 10adb0 <vprintk+0x1e4>
10ac64: 80 fa 4f cmp $0x4f,%dl
10ac67: 0f 84 43 01 00 00 je 10adb0 <vprintk+0x1e4>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
10ac6d: 80 fa 69 cmp $0x69,%dl
10ac70: 74 52 je 10acc4 <vprintk+0xf8>
10ac72: 80 fa 49 cmp $0x49,%dl
10ac75: 74 4d je 10acc4 <vprintk+0xf8>
10ac77: 80 fa 64 cmp $0x64,%dl
10ac7a: 74 48 je 10acc4 <vprintk+0xf8>
c == 'd' || c == 'D' ) {
10ac7c: 80 fa 44 cmp $0x44,%dl
10ac7f: 74 43 je 10acc4 <vprintk+0xf8>
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
10ac81: 80 fa 75 cmp $0x75,%dl
10ac84: 0f 84 83 02 00 00 je 10af0d <vprintk+0x341>
10ac8a: 80 fa 55 cmp $0x55,%dl
10ac8d: 0f 84 7a 02 00 00 je 10af0d <vprintk+0x341> <== NEVER TAKEN
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
10ac93: 80 fa 78 cmp $0x78,%dl
10ac96: 0f 84 bb 02 00 00 je 10af57 <vprintk+0x38b>
10ac9c: 80 fa 58 cmp $0x58,%dl
10ac9f: 0f 84 b2 02 00 00 je 10af57 <vprintk+0x38b> <== NEVER TAKEN
base = 16; sign = false;
} else if ( c == 'p' ) {
10aca5: 80 fa 70 cmp $0x70,%dl
10aca8: 0f 84 d1 02 00 00 je 10af7f <vprintk+0x3b3>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
10acae: 83 ec 0c sub $0xc,%esp
10acb1: 0f be d2 movsbl %dl,%edx
10acb4: 52 push %edx
10acb5: ff 15 08 33 12 00 call *0x123308
continue;
10acbb: 83 c4 10 add $0x10,%esp
10acbe: e9 31 ff ff ff jmp 10abf4 <vprintk+0x28>
10acc3: 90 nop
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
10acc4: b2 01 mov $0x1,%dl
10acc6: c7 45 c0 0a 00 00 00 movl $0xa,-0x40(%ebp)
} else {
BSP_output_char(c);
continue;
}
printNum(
10accd: 0f be c9 movsbl %cl,%ecx
10acd0: 89 4d b4 mov %ecx,-0x4c(%ebp)
10acd3: 8b 45 0c mov 0xc(%ebp),%eax
10acd6: 8b 38 mov (%eax),%edi
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
10acd8: 83 c0 04 add $0x4,%eax
10acdb: 89 45 0c mov %eax,0xc(%ebp)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
10acde: 84 d2 test %dl,%dl
10ace0: 74 08 je 10acea <vprintk+0x11e>
10ace2: 85 ff test %edi,%edi
10ace4: 0f 88 31 02 00 00 js 10af1b <vprintk+0x34f> <== NEVER TAKEN
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
10acea: 89 7d b8 mov %edi,-0x48(%ebp)
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10aced: 8b 45 b8 mov -0x48(%ebp),%eax
10acf0: 31 d2 xor %edx,%edx
10acf2: f7 75 c0 divl -0x40(%ebp)
10acf5: 89 c1 mov %eax,%ecx
10acf7: 85 c0 test %eax,%eax
10acf9: 0f 84 47 02 00 00 je 10af46 <vprintk+0x37a>
10acff: 8a 55 c0 mov -0x40(%ebp),%dl
10ad02: 88 55 c4 mov %dl,-0x3c(%ebp)
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
10ad05: 31 ff xor %edi,%edi
10ad07: 89 5d b0 mov %ebx,-0x50(%ebp)
10ad0a: 8b 5d c0 mov -0x40(%ebp),%ebx
10ad0d: 8b 55 b8 mov -0x48(%ebp),%edx
10ad10: eb 06 jmp 10ad18 <vprintk+0x14c>
10ad12: 66 90 xchg %ax,%ax
while ((n = unsigned_num / base) > 0) {
10ad14: 89 ca mov %ecx,%edx
10ad16: 89 c1 mov %eax,%ecx
toPrint[count++] = (char) (unsigned_num - (n * base));
10ad18: 8a 45 c4 mov -0x3c(%ebp),%al
10ad1b: f6 e1 mul %cl
10ad1d: 28 c2 sub %al,%dl
10ad1f: 88 54 3d d4 mov %dl,-0x2c(%ebp,%edi,1)
10ad23: 47 inc %edi
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10ad24: 89 c8 mov %ecx,%eax
10ad26: 31 d2 xor %edx,%edx
10ad28: f7 f3 div %ebx
10ad2a: 85 c0 test %eax,%eax
10ad2c: 75 e6 jne 10ad14 <vprintk+0x148>
10ad2e: 8b 5d b0 mov -0x50(%ebp),%ebx
10ad31: 8d 47 01 lea 0x1(%edi),%eax
10ad34: 89 45 c4 mov %eax,-0x3c(%ebp)
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
10ad37: 88 4c 3d d4 mov %cl,-0x2c(%ebp,%edi,1)
for (n=maxwidth ; n > count; n-- )
10ad3b: 3b 5d c4 cmp -0x3c(%ebp),%ebx
10ad3e: 76 21 jbe 10ad61 <vprintk+0x195>
10ad40: 8b 7d b4 mov -0x4c(%ebp),%edi
10ad43: 89 75 c0 mov %esi,-0x40(%ebp)
10ad46: 8b 75 c4 mov -0x3c(%ebp),%esi
10ad49: 8d 76 00 lea 0x0(%esi),%esi
BSP_output_char(lead);
10ad4c: 83 ec 0c sub $0xc,%esp
10ad4f: 57 push %edi
10ad50: ff 15 08 33 12 00 call *0x123308
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
10ad56: 4b dec %ebx
10ad57: 83 c4 10 add $0x10,%esp
10ad5a: 39 f3 cmp %esi,%ebx
10ad5c: 77 ee ja 10ad4c <vprintk+0x180>
10ad5e: 8b 75 c0 mov -0x40(%ebp),%esi
BSP_output_char(lead);
for (n = 0; n < count; n++) {
10ad61: 8b 45 c4 mov -0x3c(%ebp),%eax
10ad64: 85 c0 test %eax,%eax
10ad66: 0f 84 88 fe ff ff je 10abf4 <vprintk+0x28> <== NEVER TAKEN
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
10ad6c: 8b 55 c4 mov -0x3c(%ebp),%edx
10ad6f: 8d 7c 15 d3 lea -0x2d(%ebp,%edx,1),%edi
10ad73: 31 db xor %ebx,%ebx
10ad75: 89 75 c0 mov %esi,-0x40(%ebp)
10ad78: 89 d6 mov %edx,%esi
10ad7a: 66 90 xchg %ax,%ax
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
10ad7c: 83 ec 0c sub $0xc,%esp
10ad7f: 0f be 07 movsbl (%edi),%eax
10ad82: 0f be 80 0a 0c 12 00 movsbl 0x120c0a(%eax),%eax
10ad89: 50 push %eax
10ad8a: ff 15 08 33 12 00 call *0x123308
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
10ad90: 43 inc %ebx
10ad91: 4f dec %edi
10ad92: 83 c4 10 add $0x10,%esp
10ad95: 39 f3 cmp %esi,%ebx
10ad97: 72 e3 jb 10ad7c <vprintk+0x1b0>
10ad99: 8b 75 c0 mov -0x40(%ebp),%esi
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
10ad9c: 46 inc %esi
10ad9d: 8a 06 mov (%esi),%al
10ad9f: 84 c0 test %al,%al
10ada1: 0f 85 58 fe ff ff jne 10abff <vprintk+0x33> <== ALWAYS TAKEN
sign,
width,
lead
);
}
}
10ada7: 8d 65 f4 lea -0xc(%ebp),%esp
10adaa: 5b pop %ebx
10adab: 5e pop %esi
10adac: 5f pop %edi
10adad: c9 leave
10adae: c3 ret
10adaf: 90 nop
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
10adb0: 31 d2 xor %edx,%edx
10adb2: c7 45 c0 08 00 00 00 movl $0x8,-0x40(%ebp)
10adb9: e9 0f ff ff ff jmp 10accd <vprintk+0x101>
10adbe: 66 90 xchg %ax,%ax
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
10adc0: 46 inc %esi
10adc1: 8a 16 mov (%esi),%dl
}
if ( c == 'c' ) {
10adc3: 80 fa 63 cmp $0x63,%dl
10adc6: 0f 85 86 fe ff ff jne 10ac52 <vprintk+0x86> <== ALWAYS TAKEN
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
10adcc: 8b 5d 0c mov 0xc(%ebp),%ebx
10adcf: 83 c3 04 add $0x4,%ebx
BSP_output_char(chr);
10add2: 83 ec 0c sub $0xc,%esp
10add5: 8b 55 0c mov 0xc(%ebp),%edx
10add8: 0f be 02 movsbl (%edx),%eax
10addb: 50 push %eax
10addc: ff 15 08 33 12 00 call *0x123308
continue;
10ade2: 83 c4 10 add $0x10,%esp
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);
10ade5: 89 5d 0c mov %ebx,0xc(%ebp)
BSP_output_char(chr);
continue;
10ade8: e9 07 fe ff ff jmp 10abf4 <vprintk+0x28>
10aded: 8d 76 00 lea 0x0(%esi),%esi
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
10adf0: 46 inc %esi
10adf1: 8a 16 mov (%esi),%dl
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
10adf3: bf 01 00 00 00 mov $0x1,%edi
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10adf8: 8d 42 d0 lea -0x30(%edx),%eax
10adfb: 3c 09 cmp $0x9,%al
10adfd: 0f 86 24 fe ff ff jbe 10ac27 <vprintk+0x5b> <== ALWAYS TAKEN
10ae03: 31 db xor %ebx,%ebx
10ae05: e9 36 fe ff ff jmp 10ac40 <vprintk+0x74>
10ae0a: 66 90 xchg %ax,%ax
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
10ae0c: 46 inc %esi
10ae0d: 8a 16 mov (%esi),%dl
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
10ae0f: b1 30 mov $0x30,%cl
10ae11: e9 fb fd ff ff jmp 10ac11 <vprintk+0x45>
10ae16: 66 90 xchg %ax,%ax
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
10ae18: 8b 45 0c mov 0xc(%ebp),%eax
10ae1b: 83 c0 04 add $0x4,%eax
10ae1e: 89 45 c0 mov %eax,-0x40(%ebp)
10ae21: 8b 55 0c mov 0xc(%ebp),%edx
10ae24: 8b 02 mov (%edx),%eax
if ( str == NULL ) {
10ae26: 85 c0 test %eax,%eax
10ae28: 0f 84 37 01 00 00 je 10af65 <vprintk+0x399>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
10ae2e: 80 38 00 cmpb $0x0,(%eax)
10ae31: 0f 84 3c 01 00 00 je 10af73 <vprintk+0x3a7>
10ae37: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10ae3e: 31 d2 xor %edx,%edx
10ae40: 42 inc %edx
10ae41: 80 3c 10 00 cmpb $0x0,(%eax,%edx,1)
10ae45: 75 f9 jne 10ae40 <vprintk+0x274>
10ae47: 89 55 c4 mov %edx,-0x3c(%ebp)
;
/* leading spaces */
if ( !minus )
10ae4a: 89 fa mov %edi,%edx
10ae4c: 84 d2 test %dl,%dl
10ae4e: 75 32 jne 10ae82 <vprintk+0x2b6>
for ( i=len ; i<width ; i++ )
10ae50: 39 5d c4 cmp %ebx,-0x3c(%ebp)
10ae53: 73 2d jae 10ae82 <vprintk+0x2b6>
10ae55: 8b 4d c4 mov -0x3c(%ebp),%ecx
10ae58: 88 55 bc mov %dl,-0x44(%ebp)
10ae5b: 89 c7 mov %eax,%edi
10ae5d: 89 75 b8 mov %esi,-0x48(%ebp)
10ae60: 89 de mov %ebx,%esi
10ae62: 89 cb mov %ecx,%ebx
BSP_output_char(' ');
10ae64: 83 ec 0c sub $0xc,%esp
10ae67: 6a 20 push $0x20
10ae69: ff 15 08 33 12 00 call *0x123308
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
10ae6f: 43 inc %ebx
10ae70: 83 c4 10 add $0x10,%esp
10ae73: 39 f3 cmp %esi,%ebx
10ae75: 72 ed jb 10ae64 <vprintk+0x298>
10ae77: 89 f8 mov %edi,%eax
10ae79: 89 f3 mov %esi,%ebx
10ae7b: 0f b6 7d bc movzbl -0x44(%ebp),%edi
10ae7f: 8b 75 b8 mov -0x48(%ebp),%esi
BSP_output_char(' ');
/* no width option */
if (width == 0) {
10ae82: 85 db test %ebx,%ebx
10ae84: 75 0a jne 10ae90 <vprintk+0x2c4>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10ae86: 8b 55 c4 mov -0x3c(%ebp),%edx
10ae89: 85 d2 test %edx,%edx
10ae8b: 74 47 je 10aed4 <vprintk+0x308>
10ae8d: 8b 5d c4 mov -0x3c(%ebp),%ebx
10ae90: 8a 10 mov (%eax),%dl
10ae92: 84 d2 test %dl,%dl
10ae94: 74 3e je 10aed4 <vprintk+0x308> <== NEVER TAKEN
BSP_output_char(*str);
10ae96: 83 ec 0c sub $0xc,%esp
10ae99: 0f be d2 movsbl %dl,%edx
10ae9c: 52 push %edx
10ae9d: 89 45 ac mov %eax,-0x54(%ebp)
10aea0: ff 15 08 33 12 00 call *0x123308
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10aea6: 8b 45 ac mov -0x54(%ebp),%eax
10aea9: 40 inc %eax
10aeaa: 83 c4 10 add $0x10,%esp
10aead: 89 75 bc mov %esi,-0x44(%ebp)
10aeb0: 89 de mov %ebx,%esi
10aeb2: 89 c3 mov %eax,%ebx
10aeb4: eb 13 jmp 10aec9 <vprintk+0x2fd>
10aeb6: 66 90 xchg %ax,%ax
BSP_output_char(*str);
10aeb8: 83 ec 0c sub $0xc,%esp
10aebb: 0f be d2 movsbl %dl,%edx
10aebe: 52 push %edx
10aebf: ff 15 08 33 12 00 call *0x123308
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10aec5: 43 inc %ebx
10aec6: 83 c4 10 add $0x10,%esp
10aec9: 8a 13 mov (%ebx),%dl
10aecb: 84 d2 test %dl,%dl
10aecd: 75 e9 jne 10aeb8 <vprintk+0x2ec>
10aecf: 89 f3 mov %esi,%ebx
10aed1: 8b 75 bc mov -0x44(%ebp),%esi
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
10aed4: 89 f8 mov %edi,%eax
10aed6: 84 c0 test %al,%al
10aed8: 74 28 je 10af02 <vprintk+0x336>
for ( i=len ; i<width ; i++ )
10aeda: 39 5d c4 cmp %ebx,-0x3c(%ebp)
10aedd: 73 18 jae 10aef7 <vprintk+0x32b>
10aedf: 8b 7d c4 mov -0x3c(%ebp),%edi
10aee2: 66 90 xchg %ax,%ax
BSP_output_char(' ');
10aee4: 83 ec 0c sub $0xc,%esp
10aee7: 6a 20 push $0x20
10aee9: ff 15 08 33 12 00 call *0x123308
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
10aeef: 47 inc %edi
10aef0: 83 c4 10 add $0x10,%esp
10aef3: 39 df cmp %ebx,%edi
10aef5: 72 ed jb 10aee4 <vprintk+0x318>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
10aef7: 8b 55 c0 mov -0x40(%ebp),%edx
10aefa: 89 55 0c mov %edx,0xc(%ebp)
10aefd: e9 f2 fc ff ff jmp 10abf4 <vprintk+0x28>
10af02: 8b 45 c0 mov -0x40(%ebp),%eax
10af05: 89 45 0c mov %eax,0xc(%ebp)
10af08: e9 e7 fc ff ff jmp 10abf4 <vprintk+0x28>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
10af0d: 31 d2 xor %edx,%edx
10af0f: c7 45 c0 0a 00 00 00 movl $0xa,-0x40(%ebp)
10af16: e9 b2 fd ff ff jmp 10accd <vprintk+0x101>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
10af1b: 83 ec 0c sub $0xc,%esp
10af1e: 6a 2d push $0x2d
10af20: ff 15 08 33 12 00 call *0x123308
unsigned_num = (unsigned long) -num;
10af26: f7 df neg %edi
10af28: 89 7d b8 mov %edi,-0x48(%ebp)
if (maxwidth) maxwidth--;
10af2b: 83 c4 10 add $0x10,%esp
10af2e: 83 fb 01 cmp $0x1,%ebx
10af31: 83 d3 ff adc $0xffffffff,%ebx
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10af34: 8b 45 b8 mov -0x48(%ebp),%eax
10af37: 31 d2 xor %edx,%edx
10af39: f7 75 c0 divl -0x40(%ebp)
10af3c: 89 c1 mov %eax,%ecx
10af3e: 85 c0 test %eax,%eax
10af40: 0f 85 b9 fd ff ff jne 10acff <vprintk+0x133>
10af46: 8b 4d b8 mov -0x48(%ebp),%ecx
10af49: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
10af50: 31 ff xor %edi,%edi
10af52: e9 e0 fd ff ff jmp 10ad37 <vprintk+0x16b>
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
10af57: 31 d2 xor %edx,%edx
10af59: c7 45 c0 10 00 00 00 movl $0x10,-0x40(%ebp)
10af60: e9 68 fd ff ff jmp 10accd <vprintk+0x101>
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
10af65: b8 09 0c 12 00 mov $0x120c09,%eax
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
10af6a: 80 38 00 cmpb $0x0,(%eax)
10af6d: 0f 85 c4 fe ff ff jne 10ae37 <vprintk+0x26b> <== NEVER TAKEN
10af73: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10af7a: e9 cb fe ff ff jmp 10ae4a <vprintk+0x27e>
} else {
BSP_output_char(c);
continue;
}
printNum(
10af7f: 0f be c9 movsbl %cl,%ecx
10af82: 89 4d b4 mov %ecx,-0x4c(%ebp)
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
10af85: 31 d2 xor %edx,%edx
10af87: c7 45 c0 10 00 00 00 movl $0x10,-0x40(%ebp)
10af8e: e9 40 fd ff ff jmp 10acd3 <vprintk+0x107>
0011ec14 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
11ec14: 55 push %ebp
11ec15: 89 e5 mov %esp,%ebp
11ec17: 53 push %ebx
11ec18: 83 ec 04 sub $0x4,%esp
11ec1b: 8b 4d 08 mov 0x8(%ebp),%ecx
11ec1e: 8b 45 0c mov 0xc(%ebp),%eax
11ec21: 8b 55 10 mov 0x10(%ebp),%edx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11ec24: 3b 0d ac 31 12 00 cmp 0x1231ac,%ecx
11ec2a: 73 50 jae 11ec7c <write+0x68>
iop = rtems_libio_iop( fd );
11ec2c: c1 e1 03 shl $0x3,%ecx
11ec2f: 8d 1c cd 00 00 00 00 lea 0x0(,%ecx,8),%ebx
11ec36: 29 cb sub %ecx,%ebx
11ec38: 03 1d e0 73 12 00 add 0x1273e0,%ebx
rtems_libio_check_is_open( iop );
11ec3e: 8b 4b 14 mov 0x14(%ebx),%ecx
11ec41: f6 c5 01 test $0x1,%ch
11ec44: 74 36 je 11ec7c <write+0x68>
rtems_libio_check_buffer( buffer );
11ec46: 85 c0 test %eax,%eax
11ec48: 74 46 je 11ec90 <write+0x7c> <== NEVER TAKEN
rtems_libio_check_count( count );
11ec4a: 85 d2 test %edx,%edx
11ec4c: 74 26 je 11ec74 <write+0x60>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
11ec4e: 83 e1 04 and $0x4,%ecx
11ec51: 74 3d je 11ec90 <write+0x7c>
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
11ec53: 51 push %ecx
11ec54: 8b 4b 20 mov 0x20(%ebx),%ecx
11ec57: 52 push %edx
11ec58: 50 push %eax
11ec59: 53 push %ebx
11ec5a: ff 51 0c call *0xc(%ecx)
if ( rc > 0 )
11ec5d: 83 c4 10 add $0x10,%esp
11ec60: 85 c0 test %eax,%eax
11ec62: 7e 0b jle 11ec6f <write+0x5b>
iop->offset += rc;
11ec64: 89 c1 mov %eax,%ecx
11ec66: c1 f9 1f sar $0x1f,%ecx
11ec69: 01 43 0c add %eax,0xc(%ebx)
11ec6c: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11ec6f: 8b 5d fc mov -0x4(%ebp),%ebx
11ec72: c9 leave
11ec73: c3 ret
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 );
11ec74: 31 c0 xor %eax,%eax
if ( rc > 0 )
iop->offset += rc;
return rc;
}
11ec76: 8b 5d fc mov -0x4(%ebp),%ebx
11ec79: c9 leave
11ec7a: c3 ret
11ec7b: 90 nop
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
11ec7c: e8 b3 46 ff ff call 113334 <__errno>
11ec81: c7 00 09 00 00 00 movl $0x9,(%eax)
11ec87: b8 ff ff ff ff mov $0xffffffff,%eax
11ec8c: eb e1 jmp 11ec6f <write+0x5b>
11ec8e: 66 90 xchg %ax,%ax
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
11ec90: e8 9f 46 ff ff call 113334 <__errno>
11ec95: c7 00 16 00 00 00 movl $0x16,(%eax)
11ec9b: b8 ff ff ff ff mov $0xffffffff,%eax
11eca0: eb cd jmp 11ec6f <write+0x5b>
0010bfac <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
10bfac: 55 push %ebp
10bfad: 89 e5 mov %esp,%ebp
10bfaf: 57 push %edi
10bfb0: 56 push %esi
10bfb1: 53 push %ebx
10bfb2: 83 ec 3c sub $0x3c,%esp
10bfb5: 8b 45 08 mov 0x8(%ebp),%eax
10bfb8: 8b 5d 0c mov 0xc(%ebp),%ebx
10bfbb: 8b 7d 10 mov 0x10(%ebp),%edi
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
10bfbe: 3b 05 cc 47 12 00 cmp 0x1247cc,%eax
10bfc4: 0f 83 ea 00 00 00 jae 10c0b4 <writev+0x108> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
10bfca: c1 e0 03 shl $0x3,%eax
10bfcd: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
10bfd4: 29 c2 sub %eax,%edx
10bfd6: 8b 0d 00 8a 12 00 mov 0x128a00,%ecx
10bfdc: 01 ca add %ecx,%edx
10bfde: 89 55 e4 mov %edx,-0x1c(%ebp)
rtems_libio_check_is_open( iop );
10bfe1: 8b 42 14 mov 0x14(%edx),%eax
10bfe4: f6 c4 01 test $0x1,%ah
10bfe7: 0f 84 c7 00 00 00 je 10c0b4 <writev+0x108>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
10bfed: a8 04 test $0x4,%al
10bfef: 74 6b je 10c05c <writev+0xb0> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
10bff1: 85 db test %ebx,%ebx
10bff3: 74 67 je 10c05c <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
10bff5: 85 ff test %edi,%edi
10bff7: 7e 63 jle 10c05c <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10bff9: 81 ff 00 04 00 00 cmp $0x400,%edi
10bfff: 7f 5b jg 10c05c <writev+0xb0> <== NEVER TAKEN
10c001: be 01 00 00 00 mov $0x1,%esi
10c006: 31 c0 xor %eax,%eax
10c008: 31 c9 xor %ecx,%ecx
10c00a: eb 02 jmp 10c00e <writev+0x62>
* 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++ ) {
10c00c: 89 d1 mov %edx,%ecx
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
10c00e: 8b 14 c3 mov (%ebx,%eax,8),%edx
10c011: 85 d2 test %edx,%edx
10c013: 74 47 je 10c05c <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
10c015: 8b 54 c3 04 mov 0x4(%ebx,%eax,8),%edx
10c019: 85 d2 test %edx,%edx
10c01b: 74 02 je 10c01f <writev+0x73>
all_zeros = false;
10c01d: 31 f6 xor %esi,%esi
/* check for wrap */
old = total;
total += iov[v].iov_len;
10c01f: 8d 14 11 lea (%ecx,%edx,1),%edx
if ( total < old || total > SSIZE_MAX )
10c022: 39 ca cmp %ecx,%edx
10c024: 7c 36 jl 10c05c <writev+0xb0>
10c026: 81 fa ff 7f 00 00 cmp $0x7fff,%edx
10c02c: 7f 2e jg 10c05c <writev+0xb0> <== NEVER TAKEN
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
10c02e: 40 inc %eax
10c02f: 39 c7 cmp %eax,%edi
10c031: 7f d9 jg 10c00c <writev+0x60>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10c033: 89 f0 mov %esi,%eax
10c035: 84 c0 test %al,%al
10c037: 75 3d jne 10c076 <writev+0xca>
10c039: 31 f6 xor %esi,%esi
10c03b: 31 d2 xor %edx,%edx
10c03d: 89 55 c0 mov %edx,-0x40(%ebp)
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
10c040: 8b 44 f3 04 mov 0x4(%ebx,%esi,8),%eax
10c044: 85 c0 test %eax,%eax
10c046: 75 32 jne 10c07a <writev+0xce> <== ALWAYS TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
10c048: 46 inc %esi
10c049: 39 f7 cmp %esi,%edi
10c04b: 7f f3 jg 10c040 <writev+0x94>
10c04d: 8b 55 c0 mov -0x40(%ebp),%edx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10c050: 89 d0 mov %edx,%eax
10c052: 8d 65 f4 lea -0xc(%ebp),%esp
10c055: 5b pop %ebx
10c056: 5e pop %esi
10c057: 5f pop %edi
10c058: c9 leave
10c059: c3 ret
10c05a: 66 90 xchg %ax,%ax
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
10c05c: e8 53 80 00 00 call 1140b4 <__errno>
10c061: c7 00 16 00 00 00 movl $0x16,(%eax)
10c067: ba ff ff ff ff mov $0xffffffff,%edx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10c06c: 89 d0 mov %edx,%eax
10c06e: 8d 65 f4 lea -0xc(%ebp),%esp
10c071: 5b pop %ebx
10c072: 5e pop %esi
10c073: 5f pop %edi
10c074: c9 leave
10c075: c3 ret
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
10c076: 31 d2 xor %edx,%edx
10c078: eb f2 jmp 10c06c <writev+0xc0>
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
10c07a: 52 push %edx
10c07b: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c07e: 8b 51 20 mov 0x20(%ecx),%edx
10c081: 50 push %eax
10c082: ff 34 f3 pushl (%ebx,%esi,8)
10c085: 51 push %ecx
10c086: ff 52 0c call *0xc(%edx)
10c089: 89 45 c4 mov %eax,-0x3c(%ebp)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
10c08c: 83 c4 10 add $0x10,%esp
10c08f: 83 f8 00 cmp $0x0,%eax
10c092: 7c 32 jl 10c0c6 <writev+0x11a> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
10c094: 74 10 je 10c0a6 <writev+0xfa> <== NEVER TAKEN
iop->offset += bytes;
10c096: 99 cltd
10c097: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c09a: 01 41 0c add %eax,0xc(%ecx)
10c09d: 11 51 10 adc %edx,0x10(%ecx)
total += bytes;
10c0a0: 8b 45 c4 mov -0x3c(%ebp),%eax
10c0a3: 01 45 c0 add %eax,-0x40(%ebp)
}
if (bytes != iov[ v ].iov_len)
10c0a6: 8b 55 c4 mov -0x3c(%ebp),%edx
10c0a9: 3b 54 f3 04 cmp 0x4(%ebx,%esi,8),%edx
10c0ad: 74 99 je 10c048 <writev+0x9c> <== ALWAYS TAKEN
10c0af: eb 9c jmp 10c04d <writev+0xa1> <== NOT EXECUTED
10c0b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
10c0b4: e8 fb 7f 00 00 call 1140b4 <__errno>
10c0b9: c7 00 09 00 00 00 movl $0x9,(%eax)
10c0bf: ba ff ff ff ff mov $0xffffffff,%edx
10c0c4: eb a6 jmp 10c06c <writev+0xc0>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
10c0c6: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
10c0c9: eb a1 jmp 10c06c <writev+0xc0> <== NOT EXECUTED