RTEMS 4.11Annotated Report
Sat Mar 19 18:41:23 2011
0010cd44 <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
10cd44: 55 push %ebp
10cd45: 89 e5 mov %esp,%ebp
10cd47: 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;
10cd4a: 8b 50 10 mov 0x10(%eax),%edx
10cd4d: 8b 52 34 mov 0x34(%edx),%edx
switch( node->type ) {
10cd50: 8b 08 mov (%eax),%ecx
10cd52: 8b 49 4c mov 0x4c(%ecx),%ecx
10cd55: 49 dec %ecx
10cd56: 83 f9 06 cmp $0x6,%ecx
10cd59: 77 29 ja 10cd84 <IMFS_Set_handlers+0x40><== NEVER TAKEN
10cd5b: ff 24 8d 2c ee 11 00 jmp *0x11ee2c(,%ecx,4)
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
10cd62: 8b 52 0c mov 0xc(%edx),%edx
10cd65: eb 1a jmp 10cd81 <IMFS_Set_handlers+0x3d>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
10cd67: c7 40 08 50 ee 11 00 movl $0x11ee50,0x8(%eax)
break;
10cd6e: eb 14 jmp 10cd84 <IMFS_Set_handlers+0x40>
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
10cd70: c7 40 08 c0 ee 11 00 movl $0x11eec0,0x8(%eax)
break;
10cd77: eb 0b jmp 10cd84 <IMFS_Set_handlers+0x40>
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
10cd79: 8b 52 08 mov 0x8(%edx),%edx
10cd7c: eb 03 jmp 10cd81 <IMFS_Set_handlers+0x3d>
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
10cd7e: 8b 52 10 mov 0x10(%edx),%edx
10cd81: 89 50 08 mov %edx,0x8(%eax)
break;
}
return 0;
}
10cd84: 31 c0 xor %eax,%eax
10cd86: c9 leave
10cd87: c3 ret
0010cbf7 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
10cbf7: 55 push %ebp
10cbf8: 89 e5 mov %esp,%ebp
10cbfa: 57 push %edi
10cbfb: 56 push %esi
10cbfc: 53 push %ebx
10cbfd: 83 ec 1c sub $0x1c,%esp
10cc00: 8b 4d 08 mov 0x8(%ebp),%ecx
10cc03: 8b 5d 0c mov 0xc(%ebp),%ebx
10cc06: 8b 75 18 mov 0x18(%ebp),%esi
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
10cc09: 31 c0 xor %eax,%eax
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
10cc0b: 85 c9 test %ecx,%ecx
10cc0d: 0f 84 f4 00 00 00 je 10cd07 <IMFS_create_node+0x110><== NEVER TAKEN
return NULL;
parent = parent_loc->node_access;
10cc13: 8b 11 mov (%ecx),%edx
fs_info = parent_loc->mt_entry->fs_info;
10cc15: 8b 49 10 mov 0x10(%ecx),%ecx
10cc18: 8b 79 34 mov 0x34(%ecx),%edi
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
10cc1b: 83 fb 07 cmp $0x7,%ebx
10cc1e: 75 0d jne 10cc2d <IMFS_create_node+0x36>
10cc20: 81 7f 10 c4 ed 11 00 cmpl $0x11edc4,0x10(%edi)
10cc27: 0f 84 da 00 00 00 je 10cd07 <IMFS_create_node+0x110>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
10cc2d: 50 push %eax
10cc2e: a1 44 20 12 00 mov 0x122044,%eax
10cc33: 8b 40 2c mov 0x2c(%eax),%eax
10cc36: f7 d0 not %eax
10cc38: 23 45 14 and 0x14(%ebp),%eax
10cc3b: 50 push %eax
10cc3c: ff 75 10 pushl 0x10(%ebp)
10cc3f: 53 push %ebx
10cc40: 89 55 e4 mov %edx,-0x1c(%ebp)
10cc43: e8 40 ff ff ff call 10cb88 <IMFS_allocate_node>
if ( !node )
10cc48: 83 c4 10 add $0x10,%esp
10cc4b: 85 c0 test %eax,%eax
10cc4d: 8b 55 e4 mov -0x1c(%ebp),%edx
10cc50: 0f 84 b1 00 00 00 je 10cd07 <IMFS_create_node+0x110>
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
10cc56: 83 fb 01 cmp $0x1,%ebx
10cc59: 75 15 jne 10cc70 <IMFS_create_node+0x79>
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 );
10cc5b: 8d 48 54 lea 0x54(%eax),%ecx
10cc5e: 89 48 50 mov %ecx,0x50(%eax)
head->next = tail;
head->previous = NULL;
10cc61: 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 );
10cc68: 8d 48 50 lea 0x50(%eax),%ecx
10cc6b: 89 48 58 mov %ecx,0x58(%eax)
10cc6e: eb 75 jmp 10cce5 <IMFS_create_node+0xee>
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
10cc70: 83 fb 03 cmp $0x3,%ebx
10cc73: 74 05 je 10cc7a <IMFS_create_node+0x83>
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
10cc75: 83 fb 04 cmp $0x4,%ebx
10cc78: 75 07 jne 10cc81 <IMFS_create_node+0x8a>
node->info.sym_link.name = info->sym_link.name;
10cc7a: 8b 0e mov (%esi),%ecx
10cc7c: 89 48 50 mov %ecx,0x50(%eax)
10cc7f: eb 64 jmp 10cce5 <IMFS_create_node+0xee>
} else if ( type == IMFS_DEVICE ) {
10cc81: 83 fb 02 cmp $0x2,%ebx
10cc84: 75 0d jne 10cc93 <IMFS_create_node+0x9c>
node->info.device.major = info->device.major;
10cc86: 8b 0e mov (%esi),%ecx
10cc88: 89 48 50 mov %ecx,0x50(%eax)
node->info.device.minor = info->device.minor;
10cc8b: 8b 4e 04 mov 0x4(%esi),%ecx
10cc8e: 89 48 54 mov %ecx,0x54(%eax)
10cc91: eb 52 jmp 10cce5 <IMFS_create_node+0xee>
} else if ( type == IMFS_LINEAR_FILE ) {
10cc93: 83 fb 06 cmp $0x6,%ebx
10cc96: 75 17 jne 10ccaf <IMFS_create_node+0xb8>
node->info.linearfile.size = 0;
10cc98: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10cc9f: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = 0;
10cca6: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
10ccad: eb 36 jmp 10cce5 <IMFS_create_node+0xee>
} else if ( type == IMFS_MEMORY_FILE ) {
10ccaf: 83 fb 05 cmp $0x5,%ebx
10ccb2: 75 25 jne 10ccd9 <IMFS_create_node+0xe2>
node->info.file.size = 0;
10ccb4: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10ccbb: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.file.indirect = 0;
10ccc2: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
node->info.file.doubly_indirect = 0;
10ccc9: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
node->info.file.triply_indirect = 0;
10ccd0: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
10ccd7: eb 0c jmp 10cce5 <IMFS_create_node+0xee>
} else if ( type == IMFS_FIFO ) {
10ccd9: 83 fb 07 cmp $0x7,%ebx
10ccdc: 75 07 jne 10cce5 <IMFS_create_node+0xee> <== NEVER TAKEN
node->info.fifo.pipe = NULL;
10ccde: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
10cce5: 89 50 08 mov %edx,0x8(%eax)
node->st_ino = ++fs_info->ino_count;
10cce8: 8b 4f 04 mov 0x4(%edi),%ecx
10cceb: 41 inc %ecx
10ccec: 89 4f 04 mov %ecx,0x4(%edi)
10ccef: 89 48 38 mov %ecx,0x38(%eax)
10ccf2: 53 push %ebx
10ccf3: 53 push %ebx
10ccf4: 50 push %eax
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
10ccf5: 83 c2 50 add $0x50,%edx
10ccf8: 52 push %edx
10ccf9: 89 45 e4 mov %eax,-0x1c(%ebp)
10ccfc: e8 af d2 ff ff call 109fb0 <_Chain_Append>
return node;
10cd01: 83 c4 10 add $0x10,%esp
10cd04: 8b 45 e4 mov -0x1c(%ebp),%eax
}
10cd07: 8d 65 f4 lea -0xc(%ebp),%esp
10cd0a: 5b pop %ebx
10cd0b: 5e pop %esi
10cd0c: 5f pop %edi
10cd0d: c9 leave
10cd0e: c3 ret
0010ce25 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
10ce25: 55 push %ebp
10ce26: 89 e5 mov %esp,%ebp
10ce28: 57 push %edi
10ce29: 56 push %esi
10ce2a: 53 push %ebx
10ce2b: 83 ec 5c sub $0x5c,%esp
10ce2e: 8b 5d 14 mov 0x14(%ebp),%ebx
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 ) ) {
10ce31: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp)
10ce38: 74 0d je 10ce47 <IMFS_eval_path+0x22> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO );
10ce3a: e8 a5 3e 00 00 call 110ce4 <__errno> <== NOT EXECUTED
10ce3f: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
10ce45: eb 42 jmp 10ce89 <IMFS_eval_path+0x64> <== NOT EXECUTED
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10ce47: 8b 3b mov (%ebx),%edi
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
int len;
IMFS_token_types type = IMFS_CURRENT_DIR;
10ce49: be 01 00 00 00 mov $0x1,%esi
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
10ce4e: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
10ce55: e9 29 01 00 00 jmp 10cf83 <IMFS_eval_path+0x15e>
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
10ce5a: 8d 45 e4 lea -0x1c(%ebp),%eax
10ce5d: 50 push %eax
10ce5e: 8d 4d af lea -0x51(%ebp),%ecx
10ce61: 51 push %ecx
10ce62: ff 75 0c pushl 0xc(%ebp)
10ce65: 8b 45 08 mov 0x8(%ebp),%eax
10ce68: 03 45 a4 add -0x5c(%ebp),%eax
10ce6b: 50 push %eax
10ce6c: e8 b3 05 00 00 call 10d424 <IMFS_get_token>
10ce71: 89 c6 mov %eax,%esi
pathnamelen -= len;
10ce73: 8b 55 e4 mov -0x1c(%ebp),%edx
i += len;
if ( !pathloc->node_access )
10ce76: 83 c4 10 add $0x10,%esp
10ce79: 83 3b 00 cmpl $0x0,(%ebx)
10ce7c: 75 13 jne 10ce91 <IMFS_eval_path+0x6c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOENT );
10ce7e: e8 61 3e 00 00 call 110ce4 <__errno>
10ce83: c7 00 02 00 00 00 movl $0x2,(%eax)
10ce89: 83 cf ff or $0xffffffff,%edi
10ce8c: e9 75 01 00 00 jmp 10d006 <IMFS_eval_path+0x1e1>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10ce91: 85 c0 test %eax,%eax
10ce93: 74 21 je 10ceb6 <IMFS_eval_path+0x91>
if ( node->type == IMFS_DIRECTORY )
10ce95: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10ce99: 75 1b jne 10ceb6 <IMFS_eval_path+0x91>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
10ce9b: 57 push %edi
10ce9c: 57 push %edi
10ce9d: 6a 01 push $0x1
10ce9f: 53 push %ebx
10cea0: 89 55 a0 mov %edx,-0x60(%ebp)
10cea3: e8 e0 fe ff ff call 10cd88 <IMFS_evaluate_permission>
10cea8: 83 c4 10 add $0x10,%esp
10ceab: 85 c0 test %eax,%eax
10cead: 8b 55 a0 mov -0x60(%ebp),%edx
10ceb0: 0f 84 3e 01 00 00 je 10cff4 <IMFS_eval_path+0x1cf>
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
10ceb6: 29 55 0c sub %edx,0xc(%ebp)
i += len;
10ceb9: 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;
10cebc: 8b 3b mov (%ebx),%edi
switch( type ) {
10cebe: 83 fe 03 cmp $0x3,%esi
10cec1: 74 38 je 10cefb <IMFS_eval_path+0xd6>
10cec3: 83 fe 04 cmp $0x4,%esi
10cec6: 0f 84 a7 00 00 00 je 10cf73 <IMFS_eval_path+0x14e>
10cecc: 83 fe 02 cmp $0x2,%esi
10cecf: 0f 85 ae 00 00 00 jne 10cf83 <IMFS_eval_path+0x15e>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10ced5: a1 44 20 12 00 mov 0x122044,%eax
10ceda: 3b 78 18 cmp 0x18(%eax),%edi
10cedd: 0f 84 a0 00 00 00 je 10cf83 <IMFS_eval_path+0x15e>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
10cee3: 8b 43 10 mov 0x10(%ebx),%eax
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
10cee6: 3b 78 1c cmp 0x1c(%eax),%edi
10cee9: 75 0b jne 10cef6 <IMFS_eval_path+0xd1>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
10ceeb: 8d 7d d0 lea -0x30(%ebp),%edi
10ceee: 8d 70 08 lea 0x8(%eax),%esi
10cef1: e9 ad 00 00 00 jmp 10cfa3 <IMFS_eval_path+0x17e>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
10cef6: 8b 7f 08 mov 0x8(%edi),%edi
10cef9: eb 6c jmp 10cf67 <IMFS_eval_path+0x142>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
10cefb: 8b 47 4c mov 0x4c(%edi),%eax
10cefe: 83 f8 03 cmp $0x3,%eax
10cf01: 75 11 jne 10cf14 <IMFS_eval_path+0xef>
IMFS_evaluate_hard_link( pathloc, 0 );
10cf03: 51 push %ecx
10cf04: 51 push %ecx
10cf05: 6a 00 push $0x0
10cf07: 53 push %ebx
10cf08: e8 d9 fe ff ff call 10cde6 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
10cf0d: 8b 3b mov (%ebx),%edi
10cf0f: 83 c4 10 add $0x10,%esp
10cf12: eb 1d jmp 10cf31 <IMFS_eval_path+0x10c>
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
10cf14: 83 f8 04 cmp $0x4,%eax
10cf17: 75 18 jne 10cf31 <IMFS_eval_path+0x10c>
result = IMFS_evaluate_sym_link( pathloc, 0 );
10cf19: 52 push %edx
10cf1a: 52 push %edx
10cf1b: 6a 00 push $0x0
10cf1d: 53 push %ebx
10cf1e: e8 ed 00 00 00 call 10d010 <IMFS_evaluate_sym_link>
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
10cf23: 8b 3b mov (%ebx),%edi
if ( result == -1 )
10cf25: 83 c4 10 add $0x10,%esp
10cf28: 83 f8 ff cmp $0xffffffff,%eax
10cf2b: 0f 84 d3 00 00 00 je 10d004 <IMFS_eval_path+0x1df> <== NEVER TAKEN
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10cf31: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10cf35: 74 10 je 10cf47 <IMFS_eval_path+0x122>
rtems_set_errno_and_return_minus_one( ENOTDIR );
10cf37: e8 a8 3d 00 00 call 110ce4 <__errno>
10cf3c: c7 00 14 00 00 00 movl $0x14,(%eax)
10cf42: e9 42 ff ff ff jmp 10ce89 <IMFS_eval_path+0x64>
/*
* 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 ) {
10cf47: 8b 47 5c mov 0x5c(%edi),%eax
10cf4a: 85 c0 test %eax,%eax
10cf4c: 74 08 je 10cf56 <IMFS_eval_path+0x131>
newloc = node->info.directory.mt_fs->mt_fs_root;
10cf4e: 8d 7d d0 lea -0x30(%ebp),%edi
10cf51: 8d 70 1c lea 0x1c(%eax),%esi
10cf54: eb 4d jmp 10cfa3 <IMFS_eval_path+0x17e>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10cf56: 50 push %eax
10cf57: 50 push %eax
10cf58: 8d 45 af lea -0x51(%ebp),%eax
10cf5b: 50 push %eax
10cf5c: 57 push %edi
10cf5d: e8 56 04 00 00 call 10d3b8 <IMFS_find_match_in_dir>
10cf62: 89 c7 mov %eax,%edi
if ( !node )
10cf64: 83 c4 10 add $0x10,%esp
10cf67: 85 ff test %edi,%edi
10cf69: 0f 84 0f ff ff ff je 10ce7e <IMFS_eval_path+0x59>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
10cf6f: 89 3b mov %edi,(%ebx)
10cf71: eb 10 jmp 10cf83 <IMFS_eval_path+0x15e>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10cf73: e8 6c 3d 00 00 call 110ce4 <__errno>
10cf78: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10cf7e: e9 06 ff ff ff jmp 10ce89 <IMFS_eval_path+0x64>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
10cf83: 83 fe 04 cmp $0x4,%esi
10cf86: 74 08 je 10cf90 <IMFS_eval_path+0x16b> <== NEVER TAKEN
10cf88: 85 f6 test %esi,%esi
10cf8a: 0f 85 ca fe ff ff jne 10ce5a <IMFS_eval_path+0x35>
* 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 ) {
10cf90: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10cf94: 75 41 jne 10cfd7 <IMFS_eval_path+0x1b2>
if ( node->info.directory.mt_fs != NULL ) {
10cf96: 8b 77 5c mov 0x5c(%edi),%esi
10cf99: 85 f6 test %esi,%esi
10cf9b: 74 3a je 10cfd7 <IMFS_eval_path+0x1b2>
newloc = node->info.directory.mt_fs->mt_fs_root;
10cf9d: 8d 7d d0 lea -0x30(%ebp),%edi
10cfa0: 83 c6 1c add $0x1c,%esi
10cfa3: b9 05 00 00 00 mov $0x5,%ecx
10cfa8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10cfaa: 8d 75 d0 lea -0x30(%ebp),%esi
10cfad: b1 05 mov $0x5,%cl
10cfaf: 89 df mov %ebx,%edi
10cfb1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
10cfb3: 8b 45 e4 mov -0x1c(%ebp),%eax
10cfb6: 8b 53 0c mov 0xc(%ebx),%edx
10cfb9: 53 push %ebx
10cfba: ff 75 10 pushl 0x10(%ebp)
10cfbd: 8b 4d 0c mov 0xc(%ebp),%ecx
10cfc0: 01 c1 add %eax,%ecx
10cfc2: 51 push %ecx
10cfc3: 8b 4d a4 mov -0x5c(%ebp),%ecx
10cfc6: 29 c1 sub %eax,%ecx
10cfc8: 8b 45 08 mov 0x8(%ebp),%eax
10cfcb: 01 c8 add %ecx,%eax
10cfcd: 50 push %eax
10cfce: ff 12 call *(%edx)
10cfd0: 89 c7 mov %eax,%edi
10cfd2: 83 c4 10 add $0x10,%esp
10cfd5: eb 2f jmp 10d006 <IMFS_eval_path+0x1e1>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
10cfd7: 83 ec 0c sub $0xc,%esp
10cfda: 53 push %ebx
10cfdb: e8 64 fd ff ff call 10cd44 <IMFS_Set_handlers>
10cfe0: 89 c7 mov %eax,%edi
10cfe2: 5a pop %edx
10cfe3: 59 pop %ecx
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
10cfe4: ff 75 10 pushl 0x10(%ebp)
10cfe7: 53 push %ebx
10cfe8: e8 9b fd ff ff call 10cd88 <IMFS_evaluate_permission>
10cfed: 83 c4 10 add $0x10,%esp
10cff0: 85 c0 test %eax,%eax
10cff2: 75 12 jne 10d006 <IMFS_eval_path+0x1e1>
rtems_set_errno_and_return_minus_one( EACCES );
10cff4: e8 eb 3c 00 00 call 110ce4 <__errno>
10cff9: c7 00 0d 00 00 00 movl $0xd,(%eax)
10cfff: e9 85 fe ff ff jmp 10ce89 <IMFS_eval_path+0x64>
10d004: 89 c7 mov %eax,%edi <== NOT EXECUTED
return result;
}
10d006: 89 f8 mov %edi,%eax
10d008: 8d 65 f4 lea -0xc(%ebp),%esp
10d00b: 5b pop %ebx
10d00c: 5e pop %esi
10d00d: 5f pop %edi
10d00e: c9 leave
10d00f: c3 ret
0010d104 <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 */
)
{
10d104: 55 push %ebp
10d105: 89 e5 mov %esp,%ebp
10d107: 57 push %edi
10d108: 56 push %esi
10d109: 53 push %ebx
10d10a: 83 ec 5c sub $0x5c,%esp
10d10d: 8b 55 0c mov 0xc(%ebp),%edx
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10d110: 8b 1a mov (%edx),%ebx
/*
* Get the path length.
*/
pathlen = strlen( path );
10d112: 31 c0 xor %eax,%eax
10d114: 83 c9 ff or $0xffffffff,%ecx
10d117: 8b 7d 08 mov 0x8(%ebp),%edi
10d11a: f2 ae repnz scas %es:(%edi),%al
10d11c: f7 d1 not %ecx
10d11e: 49 dec %ecx
10d11f: 89 4d a0 mov %ecx,-0x60(%ebp)
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
10d122: 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 );
10d129: 8d 7d af lea -0x51(%ebp),%edi
10d12c: 89 d6 mov %edx,%esi
10d12e: 8d 45 e4 lea -0x1c(%ebp),%eax
10d131: 50 push %eax
10d132: 57 push %edi
10d133: ff 75 a0 pushl -0x60(%ebp)
10d136: 8b 45 08 mov 0x8(%ebp),%eax
10d139: 03 45 a4 add -0x5c(%ebp),%eax
10d13c: 50 push %eax
10d13d: e8 e2 02 00 00 call 10d424 <IMFS_get_token>
10d142: 89 c2 mov %eax,%edx
pathlen -= len;
10d144: 8b 4d e4 mov -0x1c(%ebp),%ecx
10d147: 29 4d a0 sub %ecx,-0x60(%ebp)
i += len;
if ( !pathloc->node_access )
10d14a: 83 c4 10 add $0x10,%esp
10d14d: 83 3e 00 cmpl $0x0,(%esi)
10d150: 0f 84 79 01 00 00 je 10d2cf <IMFS_evaluate_for_make+0x1cb><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10d156: 85 c0 test %eax,%eax
10d158: 74 36 je 10d190 <IMFS_evaluate_for_make+0x8c>
if ( node->type == IMFS_DIRECTORY )
10d15a: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10d15e: 75 30 jne 10d190 <IMFS_evaluate_for_make+0x8c>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
10d160: 53 push %ebx
10d161: 53 push %ebx
10d162: 6a 01 push $0x1
10d164: 56 push %esi
10d165: 89 45 9c mov %eax,-0x64(%ebp)
10d168: 89 4d 98 mov %ecx,-0x68(%ebp)
10d16b: e8 18 fc ff ff call 10cd88 <IMFS_evaluate_permission>
10d170: 83 c4 10 add $0x10,%esp
10d173: 85 c0 test %eax,%eax
10d175: 8b 55 9c mov -0x64(%ebp),%edx
10d178: 8b 4d 98 mov -0x68(%ebp),%ecx
10d17b: 75 13 jne 10d190 <IMFS_evaluate_for_make+0x8c>
rtems_set_errno_and_return_minus_one( EACCES );
10d17d: e8 62 3b 00 00 call 110ce4 <__errno>
10d182: c7 00 0d 00 00 00 movl $0xd,(%eax)
10d188: 83 cb ff or $0xffffffff,%ebx
10d18b: e9 99 01 00 00 jmp 10d329 <IMFS_evaluate_for_make+0x225>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
10d190: 01 4d a4 add %ecx,-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;
10d193: 8b 1e mov (%esi),%ebx
switch( type ) {
10d195: 83 fa 02 cmp $0x2,%edx
10d198: 74 1f je 10d1b9 <IMFS_evaluate_for_make+0xb5>
10d19a: 77 0a ja 10d1a6 <IMFS_evaluate_for_make+0xa2>
10d19c: 85 d2 test %edx,%edx
10d19e: 0f 84 d9 00 00 00 je 10d27d <IMFS_evaluate_for_make+0x179>
10d1a4: eb 88 jmp 10d12e <IMFS_evaluate_for_make+0x2a>
10d1a6: 83 fa 03 cmp $0x3,%edx
10d1a9: 74 40 je 10d1eb <IMFS_evaluate_for_make+0xe7>
10d1ab: 83 fa 04 cmp $0x4,%edx
10d1ae: 0f 85 7a ff ff ff jne 10d12e <IMFS_evaluate_for_make+0x2a><== NEVER TAKEN
10d1b4: e9 d4 00 00 00 jmp 10d28d <IMFS_evaluate_for_make+0x189>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10d1b9: a1 44 20 12 00 mov 0x122044,%eax
10d1be: 3b 58 18 cmp 0x18(%eax),%ebx
10d1c1: 0f 84 67 ff ff ff je 10d12e <IMFS_evaluate_for_make+0x2a>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
10d1c7: 8b 46 10 mov 0x10(%esi),%eax
10d1ca: 3b 58 1c cmp 0x1c(%eax),%ebx
10d1cd: 75 0c jne 10d1db <IMFS_evaluate_for_make+0xd7>
10d1cf: 89 f2 mov %esi,%edx
10d1d1: 89 c6 mov %eax,%esi
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
10d1d3: 8d 7d d0 lea -0x30(%ebp),%edi
10d1d6: 83 c6 08 add $0x8,%esi
10d1d9: eb 5a jmp 10d235 <IMFS_evaluate_for_make+0x131>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
10d1db: 8b 5b 08 mov 0x8(%ebx),%ebx
10d1de: 85 db test %ebx,%ebx
10d1e0: 0f 85 90 00 00 00 jne 10d276 <IMFS_evaluate_for_make+0x172>
10d1e6: e9 e4 00 00 00 jmp 10d2cf <IMFS_evaluate_for_make+0x1cb>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
10d1eb: 8b 43 4c mov 0x4c(%ebx),%eax
10d1ee: 83 f8 03 cmp $0x3,%eax
10d1f1: 74 05 je 10d1f8 <IMFS_evaluate_for_make+0xf4>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
10d1f3: 83 f8 04 cmp $0x4,%eax
10d1f6: 75 16 jne 10d20e <IMFS_evaluate_for_make+0x10a>
result = IMFS_evaluate_link( pathloc, 0 );
10d1f8: 50 push %eax
10d1f9: 50 push %eax
10d1fa: 6a 00 push $0x0
10d1fc: 56 push %esi
10d1fd: e8 7f fe ff ff call 10d081 <IMFS_evaluate_link>
if ( result == -1 )
10d202: 83 c4 10 add $0x10,%esp
10d205: 83 f8 ff cmp $0xffffffff,%eax
10d208: 0f 84 19 01 00 00 je 10d327 <IMFS_evaluate_for_make+0x223><== NEVER TAKEN
return -1;
}
node = pathloc->node_access;
10d20e: 8b 06 mov (%esi),%eax
if ( !node )
10d210: 85 c0 test %eax,%eax
10d212: 0f 84 e9 00 00 00 je 10d301 <IMFS_evaluate_for_make+0x1fd><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10d218: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10d21c: 0f 85 df 00 00 00 jne 10d301 <IMFS_evaluate_for_make+0x1fd>
/*
* 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 ) {
10d222: 8b 50 5c mov 0x5c(%eax),%edx
10d225: 85 d2 test %edx,%edx
10d227: 74 3b je 10d264 <IMFS_evaluate_for_make+0x160>
10d229: 89 f0 mov %esi,%eax
10d22b: 89 d6 mov %edx,%esi
10d22d: 89 c2 mov %eax,%edx
newloc = node->info.directory.mt_fs->mt_fs_root;
10d22f: 8d 7d d0 lea -0x30(%ebp),%edi
10d232: 83 c6 1c add $0x1c,%esi
10d235: b9 05 00 00 00 mov $0x5,%ecx
10d23a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10d23c: 8d 75 d0 lea -0x30(%ebp),%esi
10d23f: b1 05 mov $0x5,%cl
10d241: 89 d7 mov %edx,%edi
10d243: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10d245: 56 push %esi
10d246: 8b 42 0c mov 0xc(%edx),%eax
10d249: ff 75 10 pushl 0x10(%ebp)
10d24c: 52 push %edx
10d24d: 8b 55 a4 mov -0x5c(%ebp),%edx
10d250: 2b 55 e4 sub -0x1c(%ebp),%edx
10d253: 03 55 08 add 0x8(%ebp),%edx
10d256: 52 push %edx
10d257: ff 50 04 call *0x4(%eax)
10d25a: 89 c3 mov %eax,%ebx
10d25c: 83 c4 10 add $0x10,%esp
10d25f: e9 c5 00 00 00 jmp 10d329 <IMFS_evaluate_for_make+0x225>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10d264: 53 push %ebx
10d265: 53 push %ebx
10d266: 57 push %edi
10d267: 50 push %eax
10d268: e8 4b 01 00 00 call 10d3b8 <IMFS_find_match_in_dir>
10d26d: 89 c3 mov %eax,%ebx
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
10d26f: 83 c4 10 add $0x10,%esp
10d272: 85 c0 test %eax,%eax
10d274: 74 27 je 10d29d <IMFS_evaluate_for_make+0x199>
done = true;
else
pathloc->node_access = node;
10d276: 89 1e mov %ebx,(%esi)
10d278: e9 b1 fe ff ff jmp 10d12e <IMFS_evaluate_for_make+0x2a>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
10d27d: e8 62 3a 00 00 call 110ce4 <__errno>
10d282: c7 00 11 00 00 00 movl $0x11,(%eax)
10d288: e9 fb fe ff ff jmp 10d188 <IMFS_evaluate_for_make+0x84>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10d28d: e8 52 3a 00 00 call 110ce4 <__errno>
10d292: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10d298: e9 eb fe ff ff jmp 10d188 <IMFS_evaluate_for_make+0x84>
10d29d: 89 f2 mov %esi,%edx
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
10d29f: 8b 45 a4 mov -0x5c(%ebp),%eax
10d2a2: 2b 45 e4 sub -0x1c(%ebp),%eax
10d2a5: 03 45 08 add 0x8(%ebp),%eax
10d2a8: 8b 4d 10 mov 0x10(%ebp),%ecx
10d2ab: 89 01 mov %eax,(%ecx)
* pathloc is returned with a pointer to the parent of the new node.
* name is returned with a pointer to the first character in the
* new node name. The parent node is verified to be a directory.
*/
int IMFS_evaluate_for_make(
10d2ad: 8b 5d 08 mov 0x8(%ebp),%ebx
10d2b0: 03 5d a4 add -0x5c(%ebp),%ebx
/*
* 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++) {
10d2b3: eb 2a jmp 10d2df <IMFS_evaluate_for_make+0x1db>
if ( !IMFS_is_separator( path[ i ] ) )
10d2b5: 83 ec 0c sub $0xc,%esp
10d2b8: 0f be c0 movsbl %al,%eax
10d2bb: 50 push %eax
10d2bc: 89 55 9c mov %edx,-0x64(%ebp)
10d2bf: e8 b0 a3 ff ff call 107674 <rtems_filesystem_is_separator>
10d2c4: 43 inc %ebx
10d2c5: 83 c4 10 add $0x10,%esp
10d2c8: 85 c0 test %eax,%eax
10d2ca: 8b 55 9c mov -0x64(%ebp),%edx
10d2cd: 75 10 jne 10d2df <IMFS_evaluate_for_make+0x1db>
rtems_set_errno_and_return_minus_one( ENOENT );
10d2cf: e8 10 3a 00 00 call 110ce4 <__errno>
10d2d4: c7 00 02 00 00 00 movl $0x2,(%eax)
10d2da: e9 a9 fe ff ff jmp 10d188 <IMFS_evaluate_for_make+0x84>
/*
* 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++) {
10d2df: 8a 03 mov (%ebx),%al
10d2e1: 84 c0 test %al,%al
10d2e3: 75 d0 jne 10d2b5 <IMFS_evaluate_for_make+0x1b1>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
10d2e5: 83 ec 0c sub $0xc,%esp
10d2e8: 52 push %edx
10d2e9: 89 55 9c mov %edx,-0x64(%ebp)
10d2ec: e8 53 fa ff ff call 10cd44 <IMFS_Set_handlers>
10d2f1: 89 c3 mov %eax,%ebx
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
10d2f3: 8b 55 9c mov -0x64(%ebp),%edx
10d2f6: 8b 02 mov (%edx),%eax
10d2f8: 83 c4 10 add $0x10,%esp
10d2fb: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10d2ff: 74 10 je 10d311 <IMFS_evaluate_for_make+0x20d><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
10d301: e8 de 39 00 00 call 110ce4 <__errno>
10d306: c7 00 14 00 00 00 movl $0x14,(%eax)
10d30c: e9 77 fe ff ff jmp 10d188 <IMFS_evaluate_for_make+0x84>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
10d311: 51 push %ecx
10d312: 51 push %ecx
10d313: 6a 03 push $0x3
10d315: 52 push %edx
10d316: e8 6d fa ff ff call 10cd88 <IMFS_evaluate_permission>
10d31b: 83 c4 10 add $0x10,%esp
10d31e: 85 c0 test %eax,%eax
10d320: 75 07 jne 10d329 <IMFS_evaluate_for_make+0x225>
10d322: e9 56 fe ff ff jmp 10d17d <IMFS_evaluate_for_make+0x79>
10d327: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10d329: 89 d8 mov %ebx,%eax
10d32b: 8d 65 f4 lea -0xc(%ebp),%esp
10d32e: 5b pop %ebx
10d32f: 5e pop %esi
10d330: 5f pop %edi
10d331: c9 leave
10d332: c3 ret
0010cd88 <IMFS_evaluate_permission>:
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
10cd88: 55 push %ebp
10cd89: 89 e5 mov %esp,%ebp
10cd8b: 57 push %edi
10cd8c: 56 push %esi
10cd8d: 53 push %ebx
10cd8e: 83 ec 0c sub $0xc,%esp
10cd91: 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 ) )
10cd94: f7 c6 f8 ff ff ff test $0xfffffff8,%esi
10cd9a: 74 10 je 10cdac <IMFS_evaluate_permission+0x24><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
10cd9c: e8 43 3f 00 00 call 110ce4 <__errno> <== NOT EXECUTED
10cda1: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10cda7: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10cdaa: eb 32 jmp 10cdde <IMFS_evaluate_permission+0x56><== NOT EXECUTED
jnode = node->node_access;
10cdac: 8b 45 08 mov 0x8(%ebp),%eax
10cdaf: 8b 18 mov (%eax),%ebx
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10cdb1: e8 2e 0a 00 00 call 10d7e4 <geteuid>
10cdb6: 89 c7 mov %eax,%edi
st_gid = getegid();
10cdb8: e8 17 0a 00 00 call 10d7d4 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
10cdbd: 66 3b 7b 3c cmp 0x3c(%ebx),%di
10cdc1: 75 05 jne 10cdc8 <IMFS_evaluate_permission+0x40>
flags_to_test <<= 6;
10cdc3: c1 e6 06 shl $0x6,%esi
10cdc6: eb 09 jmp 10cdd1 <IMFS_evaluate_permission+0x49>
else if ( st_gid == jnode->st_gid )
10cdc8: 66 3b 43 3e cmp 0x3e(%ebx),%ax
10cdcc: 75 03 jne 10cdd1 <IMFS_evaluate_permission+0x49><== NEVER TAKEN
flags_to_test <<= 3;
10cdce: c1 e6 03 shl $0x3,%esi
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
10cdd1: 8b 43 30 mov 0x30(%ebx),%eax
10cdd4: 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 );
10cdd6: 39 f0 cmp %esi,%eax
10cdd8: 0f 94 c0 sete %al
10cddb: 0f b6 c0 movzbl %al,%eax
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
10cdde: 83 c4 0c add $0xc,%esp
10cde1: 5b pop %ebx
10cde2: 5e pop %esi
10cde3: 5f pop %edi
10cde4: c9 leave
10cde5: c3 ret
001071b8 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
1071b8: 55 push %ebp
1071b9: 89 e5 mov %esp,%ebp
1071bb: 53 push %ebx
1071bc: 83 ec 10 sub $0x10,%esp
1071bf: 8b 45 08 mov 0x8(%ebp),%eax
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
1071c2: 50 push %eax
1071c3: ff 75 14 pushl 0x14(%ebp)
1071c6: ff 75 10 pushl 0x10(%ebp)
1071c9: ff 75 0c pushl 0xc(%ebp)
1071cc: 8b 40 18 mov 0x18(%eax),%eax
1071cf: ff 70 50 pushl 0x50(%eax)
1071d2: e8 76 86 00 00 call 10f84d <pipe_lseek>
1071d7: 89 c3 mov %eax,%ebx
IMFS_FIFO_RETURN(err);
1071d9: 83 c4 20 add $0x20,%esp
1071dc: 99 cltd
1071dd: 85 d2 test %edx,%edx
1071df: 79 0e jns 1071ef <IMFS_fifo_lseek+0x37> <== NEVER TAKEN
1071e1: e8 aa b8 00 00 call 112a90 <__errno>
1071e6: f7 db neg %ebx
1071e8: 89 18 mov %ebx,(%eax)
1071ea: 83 c8 ff or $0xffffffff,%eax
1071ed: 89 c2 mov %eax,%edx
}
1071ef: 8b 5d fc mov -0x4(%ebp),%ebx
1071f2: c9 leave
1071f3: c3 ret
00107254 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
107254: 55 push %ebp
107255: 89 e5 mov %esp,%ebp
107257: 56 push %esi
107258: 53 push %ebx
107259: 83 ec 10 sub $0x10,%esp
10725c: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
10725f: 8b 70 18 mov 0x18(%eax),%esi
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
107262: 50 push %eax
107263: ff 75 10 pushl 0x10(%ebp)
107266: ff 75 0c pushl 0xc(%ebp)
107269: ff 76 50 pushl 0x50(%esi)
10726c: e8 d8 83 00 00 call 10f649 <pipe_write>
107271: 89 c3 mov %eax,%ebx
if (err > 0) {
107273: 83 c4 10 add $0x10,%esp
107276: 83 f8 00 cmp $0x0,%eax
107279: 7e 1d jle 107298 <IMFS_fifo_write+0x44>
IMFS_mtime_ctime_update(jnode);
10727b: 50 push %eax
10727c: 50 push %eax
10727d: 6a 00 push $0x0
10727f: 8d 45 f0 lea -0x10(%ebp),%eax
107282: 50 push %eax
107283: e8 ec 0d 00 00 call 108074 <gettimeofday>
107288: 8b 45 f0 mov -0x10(%ebp),%eax
10728b: 89 46 44 mov %eax,0x44(%esi)
10728e: 89 46 48 mov %eax,0x48(%esi)
107291: 83 c4 10 add $0x10,%esp
107294: 89 d8 mov %ebx,%eax
107296: eb 13 jmp 1072ab <IMFS_fifo_write+0x57>
}
IMFS_FIFO_RETURN(err);
107298: b8 00 00 00 00 mov $0x0,%eax
10729d: 74 0c je 1072ab <IMFS_fifo_write+0x57> <== NEVER TAKEN
10729f: e8 ec b7 00 00 call 112a90 <__errno>
1072a4: f7 db neg %ebx
1072a6: 89 18 mov %ebx,(%eax)
1072a8: 83 c8 ff or $0xffffffff,%eax
}
1072ab: 8d 65 f8 lea -0x8(%ebp),%esp
1072ae: 5b pop %ebx
1072af: 5e pop %esi
1072b0: c9 leave
1072b1: c3 ret
0010d3b8 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
10d3b8: 55 push %ebp
10d3b9: 89 e5 mov %esp,%ebp
10d3bb: 57 push %edi
10d3bc: 56 push %esi
10d3bd: 53 push %ebx
10d3be: 83 ec 14 sub $0x14,%esp
10d3c1: 8b 5d 08 mov 0x8(%ebp),%ebx
10d3c4: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
10d3c7: 68 48 ee 11 00 push $0x11ee48
10d3cc: 57 push %edi
10d3cd: e8 da 45 00 00 call 1119ac <strcmp>
10d3d2: 83 c4 10 add $0x10,%esp
10d3d5: 85 c0 test %eax,%eax
10d3d7: 74 40 je 10d419 <IMFS_find_match_in_dir+0x61><== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
10d3d9: 51 push %ecx
10d3da: 51 push %ecx
10d3db: 68 4a ee 11 00 push $0x11ee4a
10d3e0: 57 push %edi
10d3e1: e8 c6 45 00 00 call 1119ac <strcmp>
10d3e6: 83 c4 10 add $0x10,%esp
10d3e9: 85 c0 test %eax,%eax
10d3eb: 75 05 jne 10d3f2 <IMFS_find_match_in_dir+0x3a><== ALWAYS TAKEN
return directory->Parent;
10d3ed: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED
10d3f0: eb 27 jmp 10d419 <IMFS_find_match_in_dir+0x61><== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
10d3f2: 8b 73 50 mov 0x50(%ebx),%esi
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
10d3f5: 83 c3 54 add $0x54,%ebx
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
10d3f8: eb 15 jmp 10d40f <IMFS_find_match_in_dir+0x57>
!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 ) )
10d3fa: 8d 46 0c lea 0xc(%esi),%eax
10d3fd: 52 push %edx
10d3fe: 52 push %edx
10d3ff: 50 push %eax
10d400: 57 push %edi
10d401: e8 a6 45 00 00 call 1119ac <strcmp>
10d406: 83 c4 10 add $0x10,%esp
10d409: 85 c0 test %eax,%eax
10d40b: 74 0a je 10d417 <IMFS_find_match_in_dir+0x5f>
the_chain = &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 ) {
10d40d: 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 );
10d40f: 39 de cmp %ebx,%esi
10d411: 75 e7 jne 10d3fa <IMFS_find_match_in_dir+0x42>
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
10d413: 31 db xor %ebx,%ebx
10d415: eb 02 jmp 10d419 <IMFS_find_match_in_dir+0x61>
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;
10d417: 89 f3 mov %esi,%ebx
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
10d419: 89 d8 mov %ebx,%eax
10d41b: 8d 65 f4 lea -0xc(%ebp),%esp
10d41e: 5b pop %ebx
10d41f: 5e pop %esi
10d420: 5f pop %edi
10d421: c9 leave
10d422: c3 ret
0010d334 <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
)
{
10d334: 55 push %ebp
10d335: 89 e5 mov %esp,%ebp
10d337: 57 push %edi
10d338: 56 push %esi
10d339: 53 push %ebx
10d33a: 83 ec 2c sub $0x2c,%esp
10d33d: 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;
10d340: 8b 58 1c mov 0x1c(%eax),%ebx
loc = temp_mt_entry->mt_fs_root;
10d343: 8d 7d d4 lea -0x2c(%ebp),%edi
10d346: 8d 70 1c lea 0x1c(%eax),%esi
10d349: b9 05 00 00 00 mov $0x5,%ecx
10d34e: 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;
10d350: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
10d357: 8d 75 d4 lea -0x2c(%ebp),%esi
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
10d35a: 8b 7b 08 mov 0x8(%ebx),%edi
loc.node_access = (void *)jnode;
10d35d: 89 5d d4 mov %ebx,-0x2c(%ebp)
IMFS_Set_handlers( &loc );
10d360: 83 ec 0c sub $0xc,%esp
10d363: 56 push %esi
10d364: e8 db f9 ff ff call 10cd44 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
10d369: 83 c4 10 add $0x10,%esp
10d36c: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10d370: 75 08 jne 10d37a <IMFS_fsunmount+0x46>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d372: 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 ) ) {
10d375: 39 43 50 cmp %eax,0x50(%ebx)
10d378: 75 13 jne 10d38d <IMFS_fsunmount+0x59>
result = IMFS_unlink( NULL, &loc );
10d37a: 50 push %eax
10d37b: 50 push %eax
10d37c: 56 push %esi
10d37d: 6a 00 push $0x0
10d37f: e8 b0 91 ff ff call 106534 <IMFS_unlink>
if (result != 0)
10d384: 83 c4 10 add $0x10,%esp
10d387: 85 c0 test %eax,%eax
10d389: 75 1e jne 10d3a9 <IMFS_fsunmount+0x75> <== NEVER TAKEN
return -1;
jnode = next;
10d38b: 89 fb mov %edi,%ebx
}
if ( jnode != NULL ) {
10d38d: 85 db test %ebx,%ebx
10d38f: 74 1d je 10d3ae <IMFS_fsunmount+0x7a>
if ( jnode->type == IMFS_DIRECTORY ) {
10d391: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10d395: 75 c3 jne 10d35a <IMFS_fsunmount+0x26> <== NEVER TAKEN
}
}
} while (jnode != NULL);
return 0;
}
10d397: 8b 43 50 mov 0x50(%ebx),%eax
10d39a: 8d 53 54 lea 0x54(%ebx),%edx
return -1;
jnode = next;
}
if ( jnode != NULL ) {
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
10d39d: 39 d0 cmp %edx,%eax
10d39f: 74 b9 je 10d35a <IMFS_fsunmount+0x26>
jnode = jnode_get_first_child( jnode );
10d3a1: 89 c3 mov %eax,%ebx
}
}
} while (jnode != NULL);
10d3a3: 85 c0 test %eax,%eax
10d3a5: 75 b3 jne 10d35a <IMFS_fsunmount+0x26> <== ALWAYS TAKEN
10d3a7: eb 05 jmp 10d3ae <IMFS_fsunmount+0x7a> <== NOT EXECUTED
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
10d3a9: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10d3ac: eb 02 jmp 10d3b0 <IMFS_fsunmount+0x7c> <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
10d3ae: 31 c0 xor %eax,%eax
}
10d3b0: 8d 65 f4 lea -0xc(%ebp),%esp
10d3b3: 5b pop %ebx
10d3b4: 5e pop %esi
10d3b5: 5f pop %edi
10d3b6: c9 leave
10d3b7: c3 ret
0010d424 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
10d424: 55 push %ebp
10d425: 89 e5 mov %esp,%ebp
10d427: 57 push %edi
10d428: 56 push %esi
10d429: 53 push %ebx
10d42a: 83 ec 1c sub $0x1c,%esp
10d42d: 8b 7d 08 mov 0x8(%ebp),%edi
10d430: 8b 75 10 mov 0x10(%ebp),%esi
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
10d433: 8a 17 mov (%edi),%dl
int pathlen,
char *token,
int *token_len
)
{
register int i = 0;
10d435: 31 db xor %ebx,%ebx
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
10d437: eb 10 jmp 10d449 <IMFS_get_token+0x25>
token[i] = c;
10d439: 88 14 1e mov %dl,(%esi,%ebx,1)
if ( i == IMFS_NAME_MAX )
10d43c: 83 fb 20 cmp $0x20,%ebx
10d43f: 0f 84 86 00 00 00 je 10d4cb <IMFS_get_token+0xa7>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
10d445: 43 inc %ebx
10d446: 8a 14 1f mov (%edi,%ebx,1),%dl
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
10d449: 83 ec 0c sub $0xc,%esp
10d44c: 0f be c2 movsbl %dl,%eax
10d44f: 50 push %eax
10d450: 88 55 e4 mov %dl,-0x1c(%ebp)
10d453: e8 1c a2 ff ff call 107674 <rtems_filesystem_is_separator>
10d458: 83 c4 10 add $0x10,%esp
10d45b: 85 c0 test %eax,%eax
10d45d: 8a 55 e4 mov -0x1c(%ebp),%dl
10d460: 75 05 jne 10d467 <IMFS_get_token+0x43>
10d462: 3b 5d 0c cmp 0xc(%ebp),%ebx
10d465: 7c d2 jl 10d439 <IMFS_get_token+0x15>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
10d467: 85 db test %ebx,%ebx
10d469: 75 10 jne 10d47b <IMFS_get_token+0x57>
token[i] = c;
10d46b: 88 16 mov %dl,(%esi)
if ( (token[i] != '\0') && pathlen ) {
10d46d: 84 d2 test %dl,%dl
10d46f: 74 06 je 10d477 <IMFS_get_token+0x53>
10d471: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10d475: 75 16 jne 10d48d <IMFS_get_token+0x69>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
10d477: 31 ff xor %edi,%edi
10d479: eb 1c jmp 10d497 <IMFS_get_token+0x73>
char *token,
int *token_len
)
{
register int i = 0;
IMFS_token_types type = IMFS_NAME;
10d47b: bf 03 00 00 00 mov $0x3,%edi
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
10d480: 80 7c 1e ff 00 cmpb $0x0,-0x1(%esi,%ebx,1)
10d485: 74 10 je 10d497 <IMFS_get_token+0x73> <== NEVER TAKEN
token[i] = '\0';
10d487: c6 04 1e 00 movb $0x0,(%esi,%ebx,1)
10d48b: eb 0a jmp 10d497 <IMFS_get_token+0x73>
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
10d48d: bf 01 00 00 00 mov $0x1,%edi
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
10d492: bb 01 00 00 00 mov $0x1,%ebx
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10d497: 8b 45 14 mov 0x14(%ebp),%eax
10d49a: 89 18 mov %ebx,(%eax)
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
10d49c: 83 ff 03 cmp $0x3,%edi
10d49f: 75 3d jne 10d4de <IMFS_get_token+0xba>
if ( strcmp( token, "..") == 0 )
10d4a1: 52 push %edx
10d4a2: 52 push %edx
10d4a3: 68 4d ee 11 00 push $0x11ee4d
10d4a8: 56 push %esi
10d4a9: e8 fe 44 00 00 call 1119ac <strcmp>
10d4ae: 83 c4 10 add $0x10,%esp
10d4b1: 85 c0 test %eax,%eax
10d4b3: 74 1d je 10d4d2 <IMFS_get_token+0xae>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
10d4b5: 50 push %eax
10d4b6: 50 push %eax
10d4b7: 68 4e ee 11 00 push $0x11ee4e
10d4bc: 56 push %esi
10d4bd: e8 ea 44 00 00 call 1119ac <strcmp>
10d4c2: 83 c4 10 add $0x10,%esp
10d4c5: 85 c0 test %eax,%eax
10d4c7: 74 10 je 10d4d9 <IMFS_get_token+0xb5>
10d4c9: eb 13 jmp 10d4de <IMFS_get_token+0xba>
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
return IMFS_INVALID_TOKEN;
10d4cb: bf 04 00 00 00 mov $0x4,%edi
10d4d0: eb 0c jmp 10d4de <IMFS_get_token+0xba>
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
10d4d2: bf 02 00 00 00 mov $0x2,%edi
10d4d7: eb 05 jmp 10d4de <IMFS_get_token+0xba>
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
10d4d9: bf 01 00 00 00 mov $0x1,%edi
}
return type;
}
10d4de: 89 f8 mov %edi,%eax
10d4e0: 8d 65 f4 lea -0xc(%ebp),%esp
10d4e3: 5b pop %ebx
10d4e4: 5e pop %esi
10d4e5: 5f pop %edi
10d4e6: c9 leave
10d4e7: c3 ret
001061cc <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
)
{
1061cc: 55 push %ebp
1061cd: 89 e5 mov %esp,%ebp
1061cf: 57 push %edi
1061d0: 56 push %esi
1061d1: 53 push %ebx
1061d2: 83 ec 1c sub $0x1c,%esp
1061d5: 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,
1061d8: a1 48 01 12 00 mov 0x120148,%eax
1061dd: b9 06 00 00 00 mov $0x6,%ecx
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
1061e2: ba 10 00 00 00 mov $0x10,%edx
if (bit_mask == requested_bytes_per_block) {
1061e7: 39 c2 cmp %eax,%edx
1061e9: 74 0c je 1061f7 <IMFS_initialize_support+0x2b>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
1061eb: 7f 05 jg 1061f2 <IMFS_initialize_support+0x26>
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
1061ed: d1 e2 shl %edx
1061ef: 49 dec %ecx
1061f0: 75 f5 jne 1061e7 <IMFS_initialize_support+0x1b><== ALWAYS TAKEN
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
1061f2: b8 80 00 00 00 mov $0x80,%eax
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
1061f7: a3 8c 3e 12 00 mov %eax,0x123e8c
/*
* 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();
1061fc: e8 0e 6b 00 00 call 10cd0f <IMFS_create_root_node>
106201: 89 c2 mov %eax,%edx
106203: 89 43 1c mov %eax,0x1c(%ebx)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
106206: 8b 45 14 mov 0x14(%ebp),%eax
106209: 89 43 24 mov %eax,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = op_table;
10620c: 8b 45 0c mov 0xc(%ebp),%eax
10620f: 89 43 28 mov %eax,0x28(%ebx)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
106212: 8d 7b 38 lea 0x38(%ebx),%edi
106215: be fc ed 11 00 mov $0x11edfc,%esi
10621a: b9 0c 00 00 00 mov $0xc,%ecx
10621f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
106221: 50 push %eax
106222: 50 push %eax
106223: 6a 14 push $0x14
106225: 6a 01 push $0x1
106227: 89 55 e4 mov %edx,-0x1c(%ebp)
10622a: e8 fd 05 00 00 call 10682c <calloc>
if ( !fs_info ) {
10622f: 83 c4 10 add $0x10,%esp
106232: 85 c0 test %eax,%eax
106234: 8b 55 e4 mov -0x1c(%ebp),%edx
106237: 75 1c jne 106255 <IMFS_initialize_support+0x89>
free(temp_mt_entry->mt_fs_root.node_access);
106239: 83 ec 0c sub $0xc,%esp
10623c: 52 push %edx
10623d: e8 56 07 00 00 call 106998 <free>
rtems_set_errno_and_return_minus_one(ENOMEM);
106242: e8 9d aa 00 00 call 110ce4 <__errno>
106247: c7 00 0c 00 00 00 movl $0xc,(%eax)
10624d: 83 c4 10 add $0x10,%esp
106250: 83 c8 ff or $0xffffffff,%eax
106253: eb 34 jmp 106289 <IMFS_initialize_support+0xbd>
}
temp_mt_entry->fs_info = fs_info;
106255: 89 43 34 mov %eax,0x34(%ebx)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
106258: 8b 0d 90 3e 12 00 mov 0x123e90,%ecx
10625e: 89 08 mov %ecx,(%eax)
106260: 41 inc %ecx
106261: 89 0d 90 3e 12 00 mov %ecx,0x123e90
fs_info->ino_count = 1;
106267: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
fs_info->memfile_handlers = memfile_handlers;
10626e: 8b 4d 10 mov 0x10(%ebp),%ecx
106271: 89 48 08 mov %ecx,0x8(%eax)
fs_info->directory_handlers = directory_handlers;
106274: 8b 4d 14 mov 0x14(%ebp),%ecx
106277: 89 48 0c mov %ecx,0xc(%eax)
fs_info->fifo_handlers = fifo_handlers;
10627a: 8b 4d 18 mov 0x18(%ebp),%ecx
10627d: 89 48 10 mov %ecx,0x10(%eax)
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
106280: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx)
return 0;
106287: 31 c0 xor %eax,%eax
}
106289: 8d 65 f4 lea -0xc(%ebp),%esp
10628c: 5b pop %ebx
10628d: 5e pop %esi
10628e: 5f pop %edi
10628f: c9 leave
106290: c3 ret
0010fbd6 <IMFS_memfile_extend>:
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
10fbd6: 55 push %ebp
10fbd7: 89 e5 mov %esp,%ebp
10fbd9: 57 push %edi
10fbda: 56 push %esi
10fbdb: 53 push %ebx
10fbdc: 83 ec 2c sub $0x2c,%esp
10fbdf: 8b 7d 08 mov 0x8(%ebp),%edi
10fbe2: 8b 5d 0c mov 0xc(%ebp),%ebx
10fbe5: 8b 75 10 mov 0x10(%ebp),%esi
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
10fbe8: a1 8c 3e 12 00 mov 0x123e8c,%eax
10fbed: 89 c1 mov %eax,%ecx
10fbef: c1 e9 02 shr $0x2,%ecx
10fbf2: 8d 51 01 lea 0x1(%ecx),%edx
10fbf5: 0f af d1 imul %ecx,%edx
10fbf8: 42 inc %edx
10fbf9: 0f af d1 imul %ecx,%edx
10fbfc: 4a dec %edx
10fbfd: 0f af d0 imul %eax,%edx
10fc00: 83 fe 00 cmp $0x0,%esi
10fc03: 7c 16 jl 10fc1b <IMFS_memfile_extend+0x45><== NEVER TAKEN
10fc05: 7f 04 jg 10fc0b <IMFS_memfile_extend+0x35><== NEVER TAKEN
10fc07: 39 d3 cmp %edx,%ebx
10fc09: 72 10 jb 10fc1b <IMFS_memfile_extend+0x45>
rtems_set_errno_and_return_minus_one( EINVAL );
10fc0b: e8 d4 10 00 00 call 110ce4 <__errno>
10fc10: c7 00 16 00 00 00 movl $0x16,(%eax)
10fc16: e9 92 00 00 00 jmp 10fcad <IMFS_memfile_extend+0xd7>
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
10fc1b: 8b 57 50 mov 0x50(%edi),%edx
10fc1e: 8b 4f 54 mov 0x54(%edi),%ecx
10fc21: 89 55 e0 mov %edx,-0x20(%ebp)
10fc24: 89 4d e4 mov %ecx,-0x1c(%ebp)
10fc27: 39 ce cmp %ecx,%esi
10fc29: 0f 8c 8f 00 00 00 jl 10fcbe <IMFS_memfile_extend+0xe8><== NEVER TAKEN
10fc2f: 7f 08 jg 10fc39 <IMFS_memfile_extend+0x63><== NEVER TAKEN
10fc31: 39 d3 cmp %edx,%ebx
10fc33: 0f 86 85 00 00 00 jbe 10fcbe <IMFS_memfile_extend+0xe8>
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
10fc39: 89 45 d8 mov %eax,-0x28(%ebp)
10fc3c: 89 c1 mov %eax,%ecx
10fc3e: c1 f9 1f sar $0x1f,%ecx
10fc41: 89 4d dc mov %ecx,-0x24(%ebp)
10fc44: ff 75 dc pushl -0x24(%ebp)
10fc47: ff 75 d8 pushl -0x28(%ebp)
10fc4a: 56 push %esi
10fc4b: 53 push %ebx
10fc4c: e8 1f c9 00 00 call 11c570 <__divdi3>
10fc51: 83 c4 10 add $0x10,%esp
10fc54: 89 45 d4 mov %eax,-0x2c(%ebp)
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
10fc57: ff 75 dc pushl -0x24(%ebp)
10fc5a: ff 75 d8 pushl -0x28(%ebp)
10fc5d: ff 75 e4 pushl -0x1c(%ebp)
10fc60: ff 75 e0 pushl -0x20(%ebp)
10fc63: e8 08 c9 00 00 call 11c570 <__divdi3>
10fc68: 83 c4 10 add $0x10,%esp
10fc6b: 89 45 e0 mov %eax,-0x20(%ebp)
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
10fc6e: 89 c2 mov %eax,%edx
10fc70: eb 41 jmp 10fcb3 <IMFS_memfile_extend+0xdd>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
10fc72: 51 push %ecx
10fc73: 51 push %ecx
10fc74: 52 push %edx
10fc75: 57 push %edi
10fc76: 89 55 d0 mov %edx,-0x30(%ebp)
10fc79: e8 99 fd ff ff call 10fa17 <IMFS_memfile_addblock>
10fc7e: 83 c4 10 add $0x10,%esp
10fc81: 85 c0 test %eax,%eax
10fc83: 8b 55 d0 mov -0x30(%ebp),%edx
10fc86: 74 2a je 10fcb2 <IMFS_memfile_extend+0xdc>
10fc88: eb 13 jmp 10fc9d <IMFS_memfile_extend+0xc7>
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
10fc8a: 50 push %eax
10fc8b: 50 push %eax
10fc8c: 52 push %edx
10fc8d: 57 push %edi
10fc8e: 89 55 d0 mov %edx,-0x30(%ebp)
10fc91: e8 16 ff ff ff call 10fbac <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-- ) {
10fc96: 8b 55 d0 mov -0x30(%ebp),%edx
10fc99: 4a dec %edx
10fc9a: 83 c4 10 add $0x10,%esp
10fc9d: 3b 55 e0 cmp -0x20(%ebp),%edx
10fca0: 73 e8 jae 10fc8a <IMFS_memfile_extend+0xb4>
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
10fca2: e8 3d 10 00 00 call 110ce4 <__errno>
10fca7: c7 00 1c 00 00 00 movl $0x1c,(%eax)
10fcad: 83 c8 ff or $0xffffffff,%eax
10fcb0: eb 0e jmp 10fcc0 <IMFS_memfile_extend+0xea>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
10fcb2: 42 inc %edx
10fcb3: 3b 55 d4 cmp -0x2c(%ebp),%edx
10fcb6: 76 ba jbe 10fc72 <IMFS_memfile_extend+0x9c>
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
10fcb8: 89 5f 50 mov %ebx,0x50(%edi)
10fcbb: 89 77 54 mov %esi,0x54(%edi)
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
return 0;
10fcbe: 31 c0 xor %eax,%eax
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
10fcc0: 8d 65 f4 lea -0xc(%ebp),%esp
10fcc3: 5b pop %ebx
10fcc4: 5e pop %esi
10fcc5: 5f pop %edi
10fcc6: c9 leave
10fcc7: c3 ret
0010f71c <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
10f71c: 55 push %ebp
10f71d: 89 e5 mov %esp,%ebp
10f71f: 57 push %edi
10f720: 56 push %esi
10f721: 53 push %ebx
10f722: 83 ec 1c sub $0x1c,%esp
10f725: 8b 75 08 mov 0x8(%ebp),%esi
10f728: 8b 7d 0c mov 0xc(%ebp),%edi
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
10f72b: 8b 0d 8c 3e 12 00 mov 0x123e8c,%ecx
10f731: c1 e9 02 shr $0x2,%ecx
10f734: 8d 41 ff lea -0x1(%ecx),%eax
10f737: 39 c7 cmp %eax,%edi
10f739: 77 40 ja 10f77b <IMFS_memfile_get_block_pointer+0x5f>
p = info->indirect;
10f73b: 8b 46 58 mov 0x58(%esi),%eax
if ( malloc_it ) {
10f73e: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10f742: 74 25 je 10f769 <IMFS_memfile_get_block_pointer+0x4d>
if ( !p ) {
10f744: 85 c0 test %eax,%eax
10f746: 75 12 jne 10f75a <IMFS_memfile_get_block_pointer+0x3e>
p = memfile_alloc_block();
10f748: e8 ad ff ff ff call 10f6fa <memfile_alloc_block>
if ( !p )
return 0;
10f74d: 31 db xor %ebx,%ebx
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
10f74f: 85 c0 test %eax,%eax
10f751: 0f 84 f7 00 00 00 je 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
info->indirect = p;
10f757: 89 46 58 mov %eax,0x58(%esi)
}
return &info->indirect[ my_block ];
10f75a: 8d 1c bd 00 00 00 00 lea 0x0(,%edi,4),%ebx
10f761: 03 5e 58 add 0x58(%esi),%ebx
10f764: e9 e5 00 00 00 jmp 10f84e <IMFS_memfile_get_block_pointer+0x132>
}
if ( !p )
return 0;
10f769: 31 db xor %ebx,%ebx
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
10f76b: 85 c0 test %eax,%eax
10f76d: 0f 84 db 00 00 00 je 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
return &info->indirect[ my_block ];
10f773: 8d 1c b8 lea (%eax,%edi,4),%ebx
10f776: e9 d3 00 00 00 jmp 10f84e <IMFS_memfile_get_block_pointer+0x132>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
10f77b: 8d 41 01 lea 0x1(%ecx),%eax
10f77e: 0f af c1 imul %ecx,%eax
10f781: 8d 50 ff lea -0x1(%eax),%edx
10f784: 39 d7 cmp %edx,%edi
10f786: 77 40 ja 10f7c8 <IMFS_memfile_get_block_pointer+0xac>
my_block -= FIRST_DOUBLY_INDIRECT;
10f788: 29 cf sub %ecx,%edi
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
10f78a: 89 f8 mov %edi,%eax
10f78c: 31 d2 xor %edx,%edx
10f78e: f7 f1 div %ecx
10f790: 89 55 e4 mov %edx,-0x1c(%ebp)
10f793: 89 c7 mov %eax,%edi
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
10f795: 8b 46 5c mov 0x5c(%esi),%eax
if ( malloc_it ) {
10f798: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10f79c: 74 1b je 10f7b9 <IMFS_memfile_get_block_pointer+0x9d>
if ( !p ) {
10f79e: 85 c0 test %eax,%eax
10f7a0: 75 12 jne 10f7b4 <IMFS_memfile_get_block_pointer+0x98>
p = memfile_alloc_block();
10f7a2: e8 53 ff ff ff call 10f6fa <memfile_alloc_block>
if ( !p )
return 0;
10f7a7: 31 db xor %ebx,%ebx
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
10f7a9: 85 c0 test %eax,%eax
10f7ab: 0f 84 9d 00 00 00 je 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
10f7b1: 89 46 5c mov %eax,0x5c(%esi)
}
p1 = (block_p *)p[ doubly ];
10f7b4: 8d 34 b8 lea (%eax,%edi,4),%esi
10f7b7: eb 65 jmp 10f81e <IMFS_memfile_get_block_pointer+0x102>
return (block_p *)&p1[ singly ];
}
if ( !p )
return 0;
10f7b9: 31 db xor %ebx,%ebx
}
return (block_p *)&p1[ singly ];
}
if ( !p )
10f7bb: 85 c0 test %eax,%eax
10f7bd: 0f 84 8b 00 00 00 je 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
10f7c3: 8b 04 b8 mov (%eax,%edi,4),%eax
10f7c6: eb 7c jmp 10f844 <IMFS_memfile_get_block_pointer+0x128>
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
10f7c8: 8d 50 01 lea 0x1(%eax),%edx
10f7cb: 0f af d1 imul %ecx,%edx
10f7ce: 4a dec %edx
}
/*
* This means the requested block number is out of range.
*/
return 0;
10f7cf: 31 db xor %ebx,%ebx
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
10f7d1: 39 d7 cmp %edx,%edi
10f7d3: 77 79 ja 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
10f7d5: 29 c7 sub %eax,%edi
10f7d7: 89 f8 mov %edi,%eax
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
10f7d9: 31 d2 xor %edx,%edx
10f7db: f7 f1 div %ecx
10f7dd: 89 55 e4 mov %edx,-0x1c(%ebp)
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
10f7e0: 31 d2 xor %edx,%edx
10f7e2: f7 f1 div %ecx
10f7e4: 89 55 e0 mov %edx,-0x20(%ebp)
10f7e7: 89 c7 mov %eax,%edi
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
10f7e9: 8b 46 60 mov 0x60(%esi),%eax
if ( malloc_it ) {
10f7ec: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10f7f0: 74 41 je 10f833 <IMFS_memfile_get_block_pointer+0x117>
if ( !p ) {
10f7f2: 85 c0 test %eax,%eax
10f7f4: 75 0c jne 10f802 <IMFS_memfile_get_block_pointer+0xe6>
p = memfile_alloc_block();
10f7f6: e8 ff fe ff ff call 10f6fa <memfile_alloc_block>
if ( !p )
10f7fb: 85 c0 test %eax,%eax
10f7fd: 74 4f je 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
info->triply_indirect = p;
10f7ff: 89 46 60 mov %eax,0x60(%esi)
}
p1 = (block_p *) p[ triply ];
10f802: 8d 34 b8 lea (%eax,%edi,4),%esi
10f805: 8b 06 mov (%esi),%eax
if ( !p1 ) {
10f807: 85 c0 test %eax,%eax
10f809: 75 0d jne 10f818 <IMFS_memfile_get_block_pointer+0xfc>
p1 = memfile_alloc_block();
10f80b: e8 ea fe ff ff call 10f6fa <memfile_alloc_block>
if ( !p1 )
return 0;
10f810: 31 db xor %ebx,%ebx
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
10f812: 85 c0 test %eax,%eax
10f814: 74 38 je 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
p[ triply ] = (block_p) p1;
10f816: 89 06 mov %eax,(%esi)
}
p2 = (block_p *)p1[ doubly ];
10f818: 8b 55 e0 mov -0x20(%ebp),%edx
10f81b: 8d 34 90 lea (%eax,%edx,4),%esi
10f81e: 8b 06 mov (%esi),%eax
if ( !p2 ) {
10f820: 85 c0 test %eax,%eax
10f822: 75 24 jne 10f848 <IMFS_memfile_get_block_pointer+0x12c>
p2 = memfile_alloc_block();
10f824: e8 d1 fe ff ff call 10f6fa <memfile_alloc_block>
if ( !p2 )
return 0;
10f829: 31 db xor %ebx,%ebx
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
10f82b: 85 c0 test %eax,%eax
10f82d: 74 1f je 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
10f82f: 89 06 mov %eax,(%esi)
10f831: eb 15 jmp 10f848 <IMFS_memfile_get_block_pointer+0x12c>
}
return (block_p *)&p2[ singly ];
}
if ( !p )
10f833: 85 c0 test %eax,%eax
10f835: 74 17 je 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
p1 = (block_p *) p[ triply ];
10f837: 8b 04 b8 mov (%eax,%edi,4),%eax
if ( !p1 )
10f83a: 85 c0 test %eax,%eax
10f83c: 74 10 je 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
p2 = (block_p *)p1[ doubly ];
10f83e: 8b 55 e0 mov -0x20(%ebp),%edx
10f841: 8b 04 90 mov (%eax,%edx,4),%eax
if ( !p2 )
10f844: 85 c0 test %eax,%eax
10f846: 74 06 je 10f84e <IMFS_memfile_get_block_pointer+0x132><== NEVER TAKEN
return 0;
return (block_p *)&p2[ singly ];
10f848: 8b 55 e4 mov -0x1c(%ebp),%edx
10f84b: 8d 1c 90 lea (%eax,%edx,4),%ebx
/*
* This means the requested block number is out of range.
*/
return 0;
}
10f84e: 89 d8 mov %ebx,%eax
10f850: 83 c4 1c add $0x1c,%esp
10f853: 5b pop %ebx
10f854: 5e pop %esi
10f855: 5f pop %edi
10f856: c9 leave
10f857: c3 ret
0010f858 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
10f858: 55 push %ebp
10f859: 89 e5 mov %esp,%ebp
10f85b: 57 push %edi
10f85c: 56 push %esi
10f85d: 53 push %ebx
10f85e: 83 ec 4c sub $0x4c,%esp
10f861: 8b 75 0c mov 0xc(%ebp),%esi
10f864: 8b 7d 10 mov 0x10(%ebp),%edi
10f867: 8b 5d 18 mov 0x18(%ebp),%ebx
* 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) {
10f86a: 8b 45 08 mov 0x8(%ebp),%eax
10f86d: 83 78 4c 06 cmpl $0x6,0x4c(%eax)
10f871: 75 3f jne 10f8b2 <IMFS_memfile_read+0x5a>
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
10f873: 8b 48 58 mov 0x58(%eax),%ecx
if (my_length > (the_jnode->info.linearfile.size - start))
10f876: 89 c2 mov %eax,%edx
10f878: 8b 40 50 mov 0x50(%eax),%eax
10f87b: 8b 52 54 mov 0x54(%edx),%edx
10f87e: 89 45 b0 mov %eax,-0x50(%ebp)
10f881: 89 55 b4 mov %edx,-0x4c(%ebp)
10f884: 29 f0 sub %esi,%eax
10f886: 19 fa sbb %edi,%edx
10f888: 89 45 d0 mov %eax,-0x30(%ebp)
10f88b: 89 55 d4 mov %edx,-0x2c(%ebp)
10f88e: 31 c0 xor %eax,%eax
10f890: 39 d0 cmp %edx,%eax
10f892: 7c 0e jl 10f8a2 <IMFS_memfile_read+0x4a><== NEVER TAKEN
10f894: 7f 05 jg 10f89b <IMFS_memfile_read+0x43><== NEVER TAKEN
10f896: 3b 5d d0 cmp -0x30(%ebp),%ebx
10f899: 76 07 jbe 10f8a2 <IMFS_memfile_read+0x4a><== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
10f89b: 8b 55 b0 mov -0x50(%ebp),%edx
10f89e: 29 f2 sub %esi,%edx
10f8a0: eb 02 jmp 10f8a4 <IMFS_memfile_read+0x4c>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
10f8a2: 89 da mov %ebx,%edx <== 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);
10f8a4: 01 ce add %ecx,%esi
10f8a6: 8b 7d 14 mov 0x14(%ebp),%edi
10f8a9: 89 d1 mov %edx,%ecx
10f8ab: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10f8ad: e9 1d 01 00 00 jmp 10f9cf <IMFS_memfile_read+0x177>
/*
* 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;
10f8b2: 89 f0 mov %esi,%eax
if ( last_byte > the_jnode->info.file.size )
10f8b4: 8b 55 08 mov 0x8(%ebp),%edx
10f8b7: 8b 52 50 mov 0x50(%edx),%edx
10f8ba: 89 55 cc mov %edx,-0x34(%ebp)
/*
* 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;
10f8bd: 8d 0c 33 lea (%ebx,%esi,1),%ecx
10f8c0: 89 4d d0 mov %ecx,-0x30(%ebp)
if ( last_byte > the_jnode->info.file.size )
10f8c3: 31 c9 xor %ecx,%ecx
10f8c5: 8b 55 08 mov 0x8(%ebp),%edx
10f8c8: 3b 4a 54 cmp 0x54(%edx),%ecx
10f8cb: 7c 14 jl 10f8e1 <IMFS_memfile_read+0x89><== NEVER TAKEN
10f8cd: 7f 08 jg 10f8d7 <IMFS_memfile_read+0x7f><== NEVER TAKEN
10f8cf: 8b 4d cc mov -0x34(%ebp),%ecx
10f8d2: 39 4d d0 cmp %ecx,-0x30(%ebp)
10f8d5: 76 0a jbe 10f8e1 <IMFS_memfile_read+0x89>
my_length = the_jnode->info.file.size - start;
10f8d7: 8b 55 cc mov -0x34(%ebp),%edx
10f8da: 29 c2 sub %eax,%edx
10f8dc: 89 55 d0 mov %edx,-0x30(%ebp)
10f8df: eb 03 jmp 10f8e4 <IMFS_memfile_read+0x8c>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
10f8e1: 89 5d d0 mov %ebx,-0x30(%ebp)
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
10f8e4: 8b 0d 8c 3e 12 00 mov 0x123e8c,%ecx
10f8ea: 89 4d c4 mov %ecx,-0x3c(%ebp)
10f8ed: 89 c8 mov %ecx,%eax
10f8ef: 99 cltd
10f8f0: 89 d3 mov %edx,%ebx
10f8f2: 52 push %edx
10f8f3: 51 push %ecx
10f8f4: 57 push %edi
10f8f5: 56 push %esi
10f8f6: 89 4d c0 mov %ecx,-0x40(%ebp)
10f8f9: e8 be cd 00 00 call 11c6bc <__moddi3>
10f8fe: 83 c4 10 add $0x10,%esp
10f901: 89 45 cc mov %eax,-0x34(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
10f904: 8b 4d c0 mov -0x40(%ebp),%ecx
10f907: 53 push %ebx
10f908: 51 push %ecx
10f909: 57 push %edi
10f90a: 56 push %esi
10f90b: e8 60 cc 00 00 call 11c570 <__divdi3>
10f910: 83 c4 10 add $0x10,%esp
10f913: 89 c3 mov %eax,%ebx
if ( start_offset ) {
10f915: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10f919: 74 3d je 10f958 <IMFS_memfile_read+0x100>
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 );
10f91b: 57 push %edi
10f91c: 6a 00 push $0x0
10f91e: 50 push %eax
10f91f: ff 75 08 pushl 0x8(%ebp)
10f922: e8 f5 fd ff ff call 10f71c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10f927: 83 c4 10 add $0x10,%esp
return copied;
10f92a: 31 d2 xor %edx,%edx
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 );
if ( !block_ptr )
10f92c: 85 c0 test %eax,%eax
10f92e: 0f 84 ba 00 00 00 je 10f9ee <IMFS_memfile_read+0x196><== 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;
10f934: 8b 4d c4 mov -0x3c(%ebp),%ecx
10f937: 2b 4d cc sub -0x34(%ebp),%ecx
10f93a: 8b 55 d0 mov -0x30(%ebp),%edx
10f93d: 39 ca cmp %ecx,%edx
10f93f: 76 02 jbe 10f943 <IMFS_memfile_read+0xeb>
10f941: 89 ca mov %ecx,%edx
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 );
10f943: 8b 75 cc mov -0x34(%ebp),%esi
10f946: 03 30 add (%eax),%esi
dest += to_copy;
10f948: 8b 7d 14 mov 0x14(%ebp),%edi
10f94b: 89 d1 mov %edx,%ecx
10f94d: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10f94f: 89 7d cc mov %edi,-0x34(%ebp)
block++;
10f952: 43 inc %ebx
my_length -= to_copy;
10f953: 29 55 d0 sub %edx,-0x30(%ebp)
10f956: eb 08 jmp 10f960 <IMFS_memfile_read+0x108>
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
10f958: 8b 45 14 mov 0x14(%ebp),%eax
10f95b: 89 45 cc mov %eax,-0x34(%ebp)
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
10f95e: 31 d2 xor %edx,%edx
}
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
10f960: 8b 0d 8c 3e 12 00 mov 0x123e8c,%ecx
10f966: 89 4d c8 mov %ecx,-0x38(%ebp)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10f969: eb 2f jmp 10f99a <IMFS_memfile_read+0x142>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10f96b: 56 push %esi
10f96c: 6a 00 push $0x0
10f96e: 53 push %ebx
10f96f: ff 75 08 pushl 0x8(%ebp)
10f972: 89 55 c0 mov %edx,-0x40(%ebp)
10f975: e8 a2 fd ff ff call 10f71c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10f97a: 83 c4 10 add $0x10,%esp
10f97d: 85 c0 test %eax,%eax
10f97f: 8b 55 c0 mov -0x40(%ebp),%edx
10f982: 74 6a je 10f9ee <IMFS_memfile_read+0x196><== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
10f984: 8b 30 mov (%eax),%esi
10f986: 8b 7d cc mov -0x34(%ebp),%edi
10f989: 8b 4d c8 mov -0x38(%ebp),%ecx
10f98c: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
dest += to_copy;
10f98e: 89 7d cc mov %edi,-0x34(%ebp)
block++;
10f991: 43 inc %ebx
my_length -= to_copy;
10f992: 8b 7d c8 mov -0x38(%ebp),%edi
10f995: 29 7d d0 sub %edi,-0x30(%ebp)
copied += to_copy;
10f998: 01 fa add %edi,%edx
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10f99a: 8b 45 d0 mov -0x30(%ebp),%eax
10f99d: 3b 05 8c 3e 12 00 cmp 0x123e8c,%eax
10f9a3: 73 c6 jae 10f96b <IMFS_memfile_read+0x113>
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
10f9a5: 85 c0 test %eax,%eax
10f9a7: 74 26 je 10f9cf <IMFS_memfile_read+0x177>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10f9a9: 51 push %ecx
10f9aa: 6a 00 push $0x0
10f9ac: 53 push %ebx
10f9ad: ff 75 08 pushl 0x8(%ebp)
10f9b0: 89 55 c0 mov %edx,-0x40(%ebp)
10f9b3: e8 64 fd ff ff call 10f71c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10f9b8: 83 c4 10 add $0x10,%esp
10f9bb: 85 c0 test %eax,%eax
10f9bd: 8b 55 c0 mov -0x40(%ebp),%edx
10f9c0: 74 2c je 10f9ee <IMFS_memfile_read+0x196><== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
10f9c2: 8b 30 mov (%eax),%esi
10f9c4: 8b 7d cc mov -0x34(%ebp),%edi
10f9c7: 8b 4d d0 mov -0x30(%ebp),%ecx
10f9ca: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
copied += my_length;
10f9cc: 03 55 d0 add -0x30(%ebp),%edx
}
IMFS_update_atime( the_jnode );
10f9cf: 50 push %eax
10f9d0: 50 push %eax
10f9d1: 6a 00 push $0x0
10f9d3: 8d 45 e0 lea -0x20(%ebp),%eax
10f9d6: 50 push %eax
10f9d7: 89 55 c0 mov %edx,-0x40(%ebp)
10f9da: e8 31 70 ff ff call 106a10 <gettimeofday>
10f9df: 8b 45 e0 mov -0x20(%ebp),%eax
10f9e2: 8b 4d 08 mov 0x8(%ebp),%ecx
10f9e5: 89 41 40 mov %eax,0x40(%ecx)
return copied;
10f9e8: 8b 55 c0 mov -0x40(%ebp),%edx
10f9eb: 83 c4 10 add $0x10,%esp
}
10f9ee: 89 d0 mov %edx,%eax
10f9f0: 8d 65 f4 lea -0xc(%ebp),%esp
10f9f3: 5b pop %ebx
10f9f4: 5e pop %esi
10f9f5: 5f pop %edi
10f9f6: c9 leave
10f9f7: c3 ret
0010fab6 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
10fab6: 55 push %ebp
10fab7: 89 e5 mov %esp,%ebp
10fab9: 57 push %edi
10faba: 56 push %esi
10fabb: 53 push %ebx
10fabc: 83 ec 1c sub $0x1c,%esp
10fabf: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* 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;
10fac2: 8b 35 8c 3e 12 00 mov 0x123e8c,%esi
10fac8: c1 ee 02 shr $0x2,%esi
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
10facb: 83 7b 58 00 cmpl $0x0,0x58(%ebx)
10facf: 74 0f je 10fae0 <IMFS_memfile_remove+0x2a>
memfile_free_blocks_in_table( &info->indirect, to_free );
10fad1: 57 push %edi
10fad2: 57 push %edi
10fad3: 56 push %esi
10fad4: 8d 43 58 lea 0x58(%ebx),%eax
10fad7: 50 push %eax
10fad8: e8 8c ff ff ff call 10fa69 <memfile_free_blocks_in_table>
10fadd: 83 c4 10 add $0x10,%esp
}
if ( info->doubly_indirect ) {
10fae0: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx)
10fae4: 74 3e je 10fb24 <IMFS_memfile_remove+0x6e>
10fae6: 31 ff xor %edi,%edi
10fae8: eb 1f jmp 10fb09 <IMFS_memfile_remove+0x53>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
10faea: 8b 43 5c mov 0x5c(%ebx),%eax
10faed: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx
10faf4: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4)
10faf8: 74 0e je 10fb08 <IMFS_memfile_remove+0x52><== NEVER TAKEN
memfile_free_blocks_in_table(
10fafa: 51 push %ecx
10fafb: 51 push %ecx
10fafc: 56 push %esi
10fafd: 01 d0 add %edx,%eax
10faff: 50 push %eax
10fb00: e8 64 ff ff ff call 10fa69 <memfile_free_blocks_in_table>
10fb05: 83 c4 10 add $0x10,%esp
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++ ) {
10fb08: 47 inc %edi
10fb09: a1 8c 3e 12 00 mov 0x123e8c,%eax
10fb0e: c1 e8 02 shr $0x2,%eax
10fb11: 39 c7 cmp %eax,%edi
10fb13: 72 d5 jb 10faea <IMFS_memfile_remove+0x34>
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 );
10fb15: 57 push %edi
10fb16: 57 push %edi
10fb17: 56 push %esi
10fb18: 8d 43 5c lea 0x5c(%ebx),%eax
10fb1b: 50 push %eax
10fb1c: e8 48 ff ff ff call 10fa69 <memfile_free_blocks_in_table>
10fb21: 83 c4 10 add $0x10,%esp
}
if ( info->triply_indirect ) {
10fb24: 83 7b 60 00 cmpl $0x0,0x60(%ebx)
10fb28: 74 78 je 10fba2 <IMFS_memfile_remove+0xec>
10fb2a: 31 ff xor %edi,%edi
10fb2c: eb 59 jmp 10fb87 <IMFS_memfile_remove+0xd1>
10fb2e: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax
10fb35: 89 45 e4 mov %eax,-0x1c(%ebp)
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
10fb38: 8b 43 60 mov 0x60(%ebx),%eax
10fb3b: 8b 04 b8 mov (%eax,%edi,4),%eax
if ( !p ) /* ensure we have a valid pointer */
10fb3e: 85 c0 test %eax,%eax
10fb40: 74 51 je 10fb93 <IMFS_memfile_remove+0xdd><== NEVER TAKEN
10fb42: 31 d2 xor %edx,%edx
10fb44: eb 21 jmp 10fb67 <IMFS_memfile_remove+0xb1>
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
10fb46: 83 38 00 cmpl $0x0,(%eax)
10fb49: 74 18 je 10fb63 <IMFS_memfile_remove+0xad><== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
10fb4b: 51 push %ecx
10fb4c: 51 push %ecx
10fb4d: 56 push %esi
10fb4e: 50 push %eax
10fb4f: 89 45 dc mov %eax,-0x24(%ebp)
10fb52: 89 55 e0 mov %edx,-0x20(%ebp)
10fb55: e8 0f ff ff ff call 10fa69 <memfile_free_blocks_in_table>
10fb5a: 83 c4 10 add $0x10,%esp
10fb5d: 8b 55 e0 mov -0x20(%ebp),%edx
10fb60: 8b 45 dc mov -0x24(%ebp),%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++ ) {
10fb63: 42 inc %edx
10fb64: 83 c0 04 add $0x4,%eax
10fb67: 8b 0d 8c 3e 12 00 mov 0x123e8c,%ecx
10fb6d: c1 e9 02 shr $0x2,%ecx
10fb70: 39 ca cmp %ecx,%edx
10fb72: 72 d2 jb 10fb46 <IMFS_memfile_remove+0x90>
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
10fb74: 52 push %edx
10fb75: 52 push %edx
10fb76: 56 push %esi
10fb77: 8b 45 e4 mov -0x1c(%ebp),%eax
10fb7a: 03 43 60 add 0x60(%ebx),%eax
10fb7d: 50 push %eax
10fb7e: e8 e6 fe ff ff call 10fa69 <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++ ) {
10fb83: 47 inc %edi
10fb84: 83 c4 10 add $0x10,%esp
10fb87: a1 8c 3e 12 00 mov 0x123e8c,%eax
10fb8c: c1 e8 02 shr $0x2,%eax
10fb8f: 39 c7 cmp %eax,%edi
10fb91: 72 9b jb 10fb2e <IMFS_memfile_remove+0x78>
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
10fb93: 50 push %eax
10fb94: 50 push %eax
10fb95: 56 push %esi
(block_p **)&info->triply_indirect, to_free );
10fb96: 83 c3 60 add $0x60,%ebx
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
10fb99: 53 push %ebx
10fb9a: e8 ca fe ff ff call 10fa69 <memfile_free_blocks_in_table>
10fb9f: 83 c4 10 add $0x10,%esp
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
10fba2: 31 c0 xor %eax,%eax
10fba4: 8d 65 f4 lea -0xc(%ebp),%esp
10fba7: 5b pop %ebx
10fba8: 5e pop %esi
10fba9: 5f pop %edi
10fbaa: c9 leave
10fbab: c3 ret
0010fcc8 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
10fcc8: 55 push %ebp
10fcc9: 89 e5 mov %esp,%ebp
10fccb: 57 push %edi
10fccc: 56 push %esi
10fccd: 53 push %ebx
10fcce: 83 ec 2c sub $0x2c,%esp
10fcd1: 8b 75 0c mov 0xc(%ebp),%esi
10fcd4: 8b 7d 10 mov 0x10(%ebp),%edi
/*
* 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;
10fcd7: 8b 4d 18 mov 0x18(%ebp),%ecx
10fcda: 01 f1 add %esi,%ecx
if ( last_byte > the_jnode->info.file.size ) {
10fcdc: 89 c8 mov %ecx,%eax
10fcde: 31 d2 xor %edx,%edx
10fce0: 8b 5d 08 mov 0x8(%ebp),%ebx
10fce3: 3b 53 54 cmp 0x54(%ebx),%edx
10fce6: 7c 2c jl 10fd14 <IMFS_memfile_write+0x4c><== NEVER TAKEN
10fce8: 7f 05 jg 10fcef <IMFS_memfile_write+0x27><== NEVER TAKEN
10fcea: 3b 4b 50 cmp 0x50(%ebx),%ecx
10fced: 76 25 jbe 10fd14 <IMFS_memfile_write+0x4c><== NEVER TAKEN
status = IMFS_memfile_extend( the_jnode, last_byte );
10fcef: 51 push %ecx
10fcf0: 52 push %edx
10fcf1: 50 push %eax
10fcf2: ff 75 08 pushl 0x8(%ebp)
10fcf5: e8 dc fe ff ff call 10fbd6 <IMFS_memfile_extend>
if ( status )
10fcfa: 83 c4 10 add $0x10,%esp
10fcfd: 85 c0 test %eax,%eax
10fcff: 74 13 je 10fd14 <IMFS_memfile_write+0x4c>
rtems_set_errno_and_return_minus_one( ENOSPC );
10fd01: e8 de 0f 00 00 call 110ce4 <__errno>
10fd06: c7 00 1c 00 00 00 movl $0x1c,(%eax)
10fd0c: 83 c9 ff or $0xffffffff,%ecx
10fd0f: e9 0f 01 00 00 jmp 10fe23 <IMFS_memfile_write+0x15b>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
10fd14: a1 8c 3e 12 00 mov 0x123e8c,%eax
10fd19: 89 45 cc mov %eax,-0x34(%ebp)
10fd1c: 99 cltd
10fd1d: 89 d3 mov %edx,%ebx
10fd1f: 52 push %edx
10fd20: 50 push %eax
10fd21: 57 push %edi
10fd22: 56 push %esi
10fd23: 89 45 c8 mov %eax,-0x38(%ebp)
10fd26: e8 91 c9 00 00 call 11c6bc <__moddi3>
10fd2b: 83 c4 10 add $0x10,%esp
10fd2e: 89 45 d0 mov %eax,-0x30(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
10fd31: 8b 4d c8 mov -0x38(%ebp),%ecx
10fd34: 53 push %ebx
10fd35: 51 push %ecx
10fd36: 57 push %edi
10fd37: 56 push %esi
10fd38: e8 33 c8 00 00 call 11c570 <__divdi3>
10fd3d: 83 c4 10 add $0x10,%esp
10fd40: 89 c3 mov %eax,%ebx
if ( start_offset ) {
10fd42: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10fd46: 74 40 je 10fd88 <IMFS_memfile_write+0xc0>
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 );
10fd48: 52 push %edx
10fd49: 6a 00 push $0x0
10fd4b: 53 push %ebx
10fd4c: ff 75 08 pushl 0x8(%ebp)
10fd4f: e8 c8 f9 ff ff call 10f71c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10fd54: 83 c4 10 add $0x10,%esp
return copied;
10fd57: 31 c9 xor %ecx,%ecx
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 );
if ( !block_ptr )
10fd59: 85 c0 test %eax,%eax
10fd5b: 0f 84 c2 00 00 00 je 10fe23 <IMFS_memfile_write+0x15b><== 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;
10fd61: 8b 55 cc mov -0x34(%ebp),%edx
10fd64: 2b 55 d0 sub -0x30(%ebp),%edx
10fd67: 3b 55 18 cmp 0x18(%ebp),%edx
10fd6a: 76 03 jbe 10fd6f <IMFS_memfile_write+0xa7>
10fd6c: 8b 55 18 mov 0x18(%ebp),%edx
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
10fd6f: 8b 00 mov (%eax),%eax
10fd71: 03 45 d0 add -0x30(%ebp),%eax
src += to_copy;
10fd74: 89 c7 mov %eax,%edi
10fd76: 8b 75 14 mov 0x14(%ebp),%esi
10fd79: 89 d1 mov %edx,%ecx
10fd7b: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
10fd7d: 43 inc %ebx
my_length -= to_copy;
10fd7e: 8b 4d 18 mov 0x18(%ebp),%ecx
10fd81: 29 d1 sub %edx,%ecx
10fd83: 89 4d d4 mov %ecx,-0x2c(%ebp)
10fd86: eb 0b jmp 10fd93 <IMFS_memfile_write+0xcb>
unsigned int last_byte;
unsigned int start_offset;
int copied;
const unsigned char *src;
src = source;
10fd88: 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 ) {
10fd8b: 8b 45 18 mov 0x18(%ebp),%eax
10fd8e: 89 45 d4 mov %eax,-0x2c(%ebp)
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
10fd91: 31 d2 xor %edx,%edx
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
10fd93: 8b 0d 8c 3e 12 00 mov 0x123e8c,%ecx
10fd99: 89 4d d0 mov %ecx,-0x30(%ebp)
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10fd9c: eb 2b jmp 10fdc9 <IMFS_memfile_write+0x101>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10fd9e: 50 push %eax
10fd9f: 6a 00 push $0x0
10fda1: 53 push %ebx
10fda2: ff 75 08 pushl 0x8(%ebp)
10fda5: 89 55 c8 mov %edx,-0x38(%ebp)
10fda8: e8 6f f9 ff ff call 10f71c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10fdad: 83 c4 10 add $0x10,%esp
10fdb0: 85 c0 test %eax,%eax
10fdb2: 8b 55 c8 mov -0x38(%ebp),%edx
10fdb5: 74 6a je 10fe21 <IMFS_memfile_write+0x159><== 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, to_copy );
10fdb7: 8b 00 mov (%eax),%eax
src += to_copy;
10fdb9: 89 c7 mov %eax,%edi
10fdbb: 8b 4d d0 mov -0x30(%ebp),%ecx
10fdbe: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
10fdc0: 43 inc %ebx
my_length -= to_copy;
10fdc1: 8b 45 d0 mov -0x30(%ebp),%eax
10fdc4: 29 45 d4 sub %eax,-0x2c(%ebp)
* 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(
10fdc7: 01 c2 add %eax,%edx
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10fdc9: 8b 4d d4 mov -0x2c(%ebp),%ecx
10fdcc: 3b 0d 8c 3e 12 00 cmp 0x123e8c,%ecx
10fdd2: 73 ca jae 10fd9e <IMFS_memfile_write+0xd6>
* 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 ) {
10fdd4: 85 c9 test %ecx,%ecx
10fdd6: 74 27 je 10fdff <IMFS_memfile_write+0x137>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10fdd8: 57 push %edi
10fdd9: 6a 00 push $0x0
10fddb: 53 push %ebx
10fddc: ff 75 08 pushl 0x8(%ebp)
10fddf: 89 55 c8 mov %edx,-0x38(%ebp)
10fde2: e8 35 f9 ff ff call 10f71c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
10fde7: 83 c4 10 add $0x10,%esp
10fdea: 8b 55 c8 mov -0x38(%ebp),%edx
10fded: 89 d1 mov %edx,%ecx
10fdef: 85 c0 test %eax,%eax
10fdf1: 74 30 je 10fe23 <IMFS_memfile_write+0x15b><== 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 );
10fdf3: 8b 00 mov (%eax),%eax
10fdf5: 89 c7 mov %eax,%edi
10fdf7: 8b 4d d4 mov -0x2c(%ebp),%ecx
10fdfa: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
my_length = 0;
copied += to_copy;
10fdfc: 03 55 d4 add -0x2c(%ebp),%edx
}
IMFS_mtime_ctime_update( the_jnode );
10fdff: 53 push %ebx
10fe00: 53 push %ebx
10fe01: 6a 00 push $0x0
10fe03: 8d 45 e0 lea -0x20(%ebp),%eax
10fe06: 50 push %eax
10fe07: 89 55 c8 mov %edx,-0x38(%ebp)
10fe0a: e8 01 6c ff ff call 106a10 <gettimeofday>
10fe0f: 8b 45 e0 mov -0x20(%ebp),%eax
10fe12: 8b 5d 08 mov 0x8(%ebp),%ebx
10fe15: 89 43 44 mov %eax,0x44(%ebx)
10fe18: 89 43 48 mov %eax,0x48(%ebx)
return copied;
10fe1b: 83 c4 10 add $0x10,%esp
10fe1e: 8b 55 c8 mov -0x38(%ebp),%edx
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
10fe21: 89 d1 mov %edx,%ecx
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
10fe23: 89 c8 mov %ecx,%eax
10fe25: 8d 65 f4 lea -0xc(%ebp),%esp
10fe28: 5b pop %ebx
10fe29: 5e pop %esi
10fe2a: 5f pop %edi
10fe2b: c9 leave
10fe2c: c3 ret
001063e0 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
1063e0: 55 push %ebp
1063e1: 89 e5 mov %esp,%ebp
1063e3: 83 ec 08 sub $0x8,%esp
1063e6: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
1063e9: 8b 42 08 mov 0x8(%edx),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1063ec: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
1063f0: 74 10 je 106402 <IMFS_mount+0x22> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
1063f2: e8 ed a8 00 00 call 110ce4 <__errno> <== NOT EXECUTED
1063f7: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
1063fd: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
106400: eb 05 jmp 106407 <IMFS_mount+0x27> <== NOT EXECUTED
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
106402: 89 50 5c mov %edx,0x5c(%eax)
return 0;
106405: 31 c0 xor %eax,%eax
}
106407: c9 leave
106408: c3 ret
00108b88 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
108b88: 55 push %ebp
108b89: 89 e5 mov %esp,%ebp
108b8b: 53 push %ebx
108b8c: 83 ec 0c sub $0xc,%esp
108b8f: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
108b92: a1 80 92 12 00 mov 0x129280,%eax
108b97: ff 70 08 pushl 0x8(%eax)
108b9a: 8d 43 0c lea 0xc(%ebx),%eax
108b9d: 50 push %eax
108b9e: e8 11 c3 00 00 call 114eb4 <fputs>
switch( the_jnode->type ) {
108ba3: 8b 43 4c mov 0x4c(%ebx),%eax
108ba6: 83 c4 10 add $0x10,%esp
108ba9: 8d 50 ff lea -0x1(%eax),%edx
108bac: 83 fa 06 cmp $0x6,%edx
108baf: 77 75 ja 108c26 <IMFS_print_jnode+0x9e> <== NEVER TAKEN
108bb1: a1 80 92 12 00 mov 0x129280,%eax
108bb6: ff 24 95 d0 42 12 00 jmp *0x1242d0(,%edx,4)
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
108bbd: 51 push %ecx
108bbe: 51 push %ecx
108bbf: ff 70 08 pushl 0x8(%eax)
108bc2: 6a 2f push $0x2f
108bc4: e8 3f c2 00 00 call 114e08 <fputc>
108bc9: eb 2b jmp 108bf6 <IMFS_print_jnode+0x6e>
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
108bcb: ff 73 54 pushl 0x54(%ebx)
108bce: ff 73 50 pushl 0x50(%ebx)
108bd1: 68 f5 41 12 00 push $0x1241f5
108bd6: eb 16 jmp 108bee <IMFS_print_jnode+0x66>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
108bd8: ff 73 58 pushl 0x58(%ebx)
108bdb: ff 73 50 pushl 0x50(%ebx)
108bde: 68 08 42 12 00 push $0x124208
108be3: eb 09 jmp 108bee <IMFS_print_jnode+0x66>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
108be5: 52 push %edx
108be6: ff 73 50 pushl 0x50(%ebx)
108be9: 68 17 42 12 00 push $0x124217
108bee: ff 70 08 pushl 0x8(%eax)
108bf1: e8 b2 c1 00 00 call 114da8 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
108bf6: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
108bf9: c7 45 08 01 45 12 00 movl $0x124501,0x8(%ebp)
}
108c00: 8b 5d fc mov -0x4(%ebp),%ebx
108c03: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
108c04: e9 6f da 00 00 jmp 116678 <puts>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
108c09: 53 push %ebx
108c0a: 53 push %ebx
108c0b: ff 70 08 pushl 0x8(%eax)
108c0e: 68 23 42 12 00 push $0x124223
108c13: eb 0a jmp 108c1f <IMFS_print_jnode+0x97>
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
108c15: 51 push %ecx
108c16: 51 push %ecx
108c17: ff 70 08 pushl 0x8(%eax)
108c1a: 68 37 42 12 00 push $0x124237
108c1f: e8 90 c2 00 00 call 114eb4 <fputs>
108c24: eb 14 jmp 108c3a <IMFS_print_jnode+0xb2>
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
108c26: 52 push %edx <== NOT EXECUTED
108c27: 50 push %eax <== NOT EXECUTED
108c28: 68 4a 42 12 00 push $0x12424a <== NOT EXECUTED
108c2d: a1 80 92 12 00 mov 0x129280,%eax <== NOT EXECUTED
108c32: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
108c35: e8 6e c1 00 00 call 114da8 <fprintf> <== NOT EXECUTED
return;
108c3a: 83 c4 10 add $0x10,%esp
}
puts("");
}
108c3d: 8b 5d fc mov -0x4(%ebp),%ebx
108c40: c9 leave
108c41: c3 ret
00106448 <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 */
)
{
106448: 55 push %ebp
106449: 89 e5 mov %esp,%ebp
10644b: 53 push %ebx
10644c: 83 ec 18 sub $0x18,%esp
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
10644f: 8b 45 0c mov 0xc(%ebp),%eax
106452: 8b 18 mov (%eax),%ebx
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
106454: 6a 20 push $0x20
106456: ff 75 14 pushl 0x14(%ebp)
106459: 8d 43 0c lea 0xc(%ebx),%eax
10645c: 50 push %eax
10645d: e8 5a b7 00 00 call 111bbc <strncpy>
if ( the_jnode->Parent != NULL )
106462: 83 c4 10 add $0x10,%esp
106465: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
106469: 74 0c je 106477 <IMFS_rename+0x2f> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10646b: 83 ec 0c sub $0xc,%esp
10646e: 53 push %ebx
10646f: e8 60 3b 00 00 call 109fd4 <_Chain_Extract>
106474: 83 c4 10 add $0x10,%esp
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
106477: 8b 45 10 mov 0x10(%ebp),%eax
10647a: 8b 00 mov (%eax),%eax
the_jnode->Parent = new_parent;
10647c: 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 );
10647f: 51 push %ecx
106480: 51 push %ecx
106481: 53 push %ebx
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
106482: 83 c0 50 add $0x50,%eax
106485: 50 push %eax
106486: e8 25 3b 00 00 call 109fb0 <_Chain_Append>
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
10648b: 58 pop %eax
10648c: 5a pop %edx
10648d: 6a 00 push $0x0
10648f: 8d 45 f0 lea -0x10(%ebp),%eax
106492: 50 push %eax
106493: e8 78 05 00 00 call 106a10 <gettimeofday>
106498: 8b 45 f0 mov -0x10(%ebp),%eax
10649b: 89 43 48 mov %eax,0x48(%ebx)
return 0;
}
10649e: 31 c0 xor %eax,%eax
1064a0: 8b 5d fc mov -0x4(%ebp),%ebx
1064a3: c9 leave
1064a4: c3 ret
0010d5b4 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
10d5b4: 55 push %ebp
10d5b5: 89 e5 mov %esp,%ebp
10d5b7: 56 push %esi
10d5b8: 53 push %ebx
10d5b9: 8b 4d 08 mov 0x8(%ebp),%ecx
10d5bc: 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;
10d5bf: 8b 11 mov (%ecx),%edx
switch ( the_jnode->type ) {
10d5c1: 8b 5a 4c mov 0x4c(%edx),%ebx
10d5c4: 83 eb 02 sub $0x2,%ebx
10d5c7: 83 fb 05 cmp $0x5,%ebx
10d5ca: 77 33 ja 10d5ff <IMFS_stat+0x4b> <== NEVER TAKEN
10d5cc: ff 24 9d 30 ef 11 00 jmp *0x11ef30(,%ebx,4)
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
10d5d3: 8b 5a 54 mov 0x54(%edx),%ebx
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
10d5d6: 8b 72 50 mov 0x50(%edx),%esi
10d5d9: 89 70 18 mov %esi,0x18(%eax)
10d5dc: 89 58 1c mov %ebx,0x1c(%eax)
break;
10d5df: eb 2e jmp 10d60f <IMFS_stat+0x5b>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
10d5e1: 8b 5a 50 mov 0x50(%edx),%ebx
10d5e4: 8b 72 54 mov 0x54(%edx),%esi
10d5e7: 89 58 20 mov %ebx,0x20(%eax)
10d5ea: 89 70 24 mov %esi,0x24(%eax)
break;
10d5ed: eb 20 jmp 10d60f <IMFS_stat+0x5b>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
10d5ef: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
10d5f6: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
break;
10d5fd: eb 10 jmp 10d60f <IMFS_stat+0x5b>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10d5ff: e8 e0 36 00 00 call 110ce4 <__errno>
10d604: c7 00 86 00 00 00 movl $0x86,(%eax)
10d60a: 83 c8 ff or $0xffffffff,%eax
10d60d: eb 47 jmp 10d656 <IMFS_stat+0xa2>
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
10d60f: 8b 49 10 mov 0x10(%ecx),%ecx
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
10d612: 8b 49 34 mov 0x34(%ecx),%ecx
10d615: 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 =
10d617: c7 00 fe ff 00 00 movl $0xfffe,(%eax)
10d61d: 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;
10d620: 8b 4a 30 mov 0x30(%edx),%ecx
10d623: 89 48 0c mov %ecx,0xc(%eax)
buf->st_nlink = the_jnode->st_nlink;
10d626: 8b 4a 34 mov 0x34(%edx),%ecx
10d629: 66 89 48 10 mov %cx,0x10(%eax)
buf->st_ino = the_jnode->st_ino;
10d62d: 8b 4a 38 mov 0x38(%edx),%ecx
10d630: 89 48 08 mov %ecx,0x8(%eax)
buf->st_uid = the_jnode->st_uid;
10d633: 8b 4a 3c mov 0x3c(%edx),%ecx
10d636: 66 89 48 12 mov %cx,0x12(%eax)
buf->st_gid = the_jnode->st_gid;
10d63a: 66 8b 4a 3e mov 0x3e(%edx),%cx
10d63e: 66 89 48 14 mov %cx,0x14(%eax)
buf->st_atime = the_jnode->stat_atime;
10d642: 8b 4a 40 mov 0x40(%edx),%ecx
10d645: 89 48 28 mov %ecx,0x28(%eax)
buf->st_mtime = the_jnode->stat_mtime;
10d648: 8b 4a 44 mov 0x44(%edx),%ecx
10d64b: 89 48 30 mov %ecx,0x30(%eax)
buf->st_ctime = the_jnode->stat_ctime;
10d64e: 8b 52 48 mov 0x48(%edx),%edx
10d651: 89 50 38 mov %edx,0x38(%eax)
return 0;
10d654: 31 c0 xor %eax,%eax
}
10d656: 5b pop %ebx
10d657: 5e pop %esi
10d658: c9 leave
10d659: c3 ret
00106534 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
106534: 55 push %ebp
106535: 89 e5 mov %esp,%ebp
106537: 57 push %edi
106538: 56 push %esi
106539: 53 push %ebx
10653a: 83 ec 2c sub $0x2c,%esp
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
10653d: 8b 45 0c mov 0xc(%ebp),%eax
106540: 8b 18 mov (%eax),%ebx
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
106542: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx)
106546: 75 7a jne 1065c2 <IMFS_unlink+0x8e>
if ( !node->info.hard_link.link_node )
106548: 8b 43 50 mov 0x50(%ebx),%eax
10654b: 85 c0 test %eax,%eax
10654d: 75 10 jne 10655f <IMFS_unlink+0x2b> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
10654f: e8 90 a7 00 00 call 110ce4 <__errno> <== NOT EXECUTED
106554: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10655a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10655d: eb 75 jmp 1065d4 <IMFS_unlink+0xa0> <== NOT EXECUTED
the_link = *loc;
10655f: 8d 7d cc lea -0x34(%ebp),%edi
106562: b9 05 00 00 00 mov $0x5,%ecx
106567: 8b 75 0c mov 0xc(%ebp),%esi
10656a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_link.node_access = node->info.hard_link.link_node;
10656c: 89 45 cc mov %eax,-0x34(%ebp)
IMFS_Set_handlers( &the_link );
10656f: 83 ec 0c sub $0xc,%esp
106572: 8d 75 cc lea -0x34(%ebp),%esi
106575: 56 push %esi
106576: e8 c9 67 00 00 call 10cd44 <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)
10657b: 8b 43 50 mov 0x50(%ebx),%eax
10657e: 8b 50 34 mov 0x34(%eax),%edx
106581: 83 c4 10 add $0x10,%esp
106584: 66 83 fa 01 cmp $0x1,%dx
106588: 75 1a jne 1065a4 <IMFS_unlink+0x70>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
10658a: 51 push %ecx
10658b: 51 push %ecx
10658c: 56 push %esi
10658d: ff 75 08 pushl 0x8(%ebp)
106590: 8b 45 d4 mov -0x2c(%ebp),%eax
106593: ff 50 34 call *0x34(%eax)
106596: 89 c2 mov %eax,%edx
if ( result != 0 )
106598: 83 c4 10 add $0x10,%esp
return -1;
10659b: 83 c8 ff or $0xffffffff,%eax
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
if ( result != 0 )
10659e: 85 d2 test %edx,%edx
1065a0: 74 20 je 1065c2 <IMFS_unlink+0x8e>
1065a2: eb 30 jmp 1065d4 <IMFS_unlink+0xa0>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
1065a4: 4a dec %edx
1065a5: 66 89 50 34 mov %dx,0x34(%eax)
IMFS_update_ctime( node->info.hard_link.link_node );
1065a9: 52 push %edx
1065aa: 52 push %edx
1065ab: 6a 00 push $0x0
1065ad: 8d 45 e0 lea -0x20(%ebp),%eax
1065b0: 50 push %eax
1065b1: e8 5a 04 00 00 call 106a10 <gettimeofday>
1065b6: 8b 43 50 mov 0x50(%ebx),%eax
1065b9: 8b 55 e0 mov -0x20(%ebp),%edx
1065bc: 89 50 48 mov %edx,0x48(%eax)
1065bf: 83 c4 10 add $0x10,%esp
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
1065c2: 50 push %eax
1065c3: 50 push %eax
1065c4: 8b 55 0c mov 0xc(%ebp),%edx
1065c7: 8b 42 08 mov 0x8(%edx),%eax
1065ca: 52 push %edx
1065cb: ff 75 08 pushl 0x8(%ebp)
1065ce: ff 50 34 call *0x34(%eax)
return result;
1065d1: 83 c4 10 add $0x10,%esp
}
1065d4: 8d 65 f4 lea -0xc(%ebp),%esp
1065d7: 5b pop %ebx
1065d8: 5e pop %esi
1065d9: 5f pop %edi
1065da: c9 leave
1065db: c3 ret
001065dc <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
1065dc: 55 push %ebp
1065dd: 89 e5 mov %esp,%ebp
1065df: 83 ec 08 sub $0x8,%esp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
1065e2: 8b 45 08 mov 0x8(%ebp),%eax
1065e5: 8b 40 08 mov 0x8(%eax),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1065e8: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
1065ec: 74 0d je 1065fb <IMFS_unmount+0x1f> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
1065ee: e8 f1 a6 00 00 call 110ce4 <__errno> <== NOT EXECUTED
1065f3: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
1065f9: eb 11 jmp 10660c <IMFS_unmount+0x30> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
1065fb: 83 78 5c 00 cmpl $0x0,0x5c(%eax)
1065ff: 75 10 jne 106611 <IMFS_unmount+0x35> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
106601: e8 de a6 00 00 call 110ce4 <__errno> <== NOT EXECUTED
106606: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10660c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10660f: eb 09 jmp 10661a <IMFS_unmount+0x3e> <== NOT EXECUTED
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
106611: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
return 0;
106618: 31 c0 xor %eax,%eax
}
10661a: c9 leave
10661b: c3 ret
00106768 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
106768: 55 push %ebp <== NOT EXECUTED
106769: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10676b: 57 push %edi <== NOT EXECUTED
10676c: 56 push %esi <== NOT EXECUTED
10676d: 53 push %ebx <== NOT EXECUTED
10676e: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
106771: 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) {
106774: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
106777: 75 1d jne 106796 <Stack_check_Dump_threads_usage+0x2e><== NOT EXECUTED
if (!Stack_check_Interrupt_stack.area)
106779: 83 3d c4 71 12 00 00 cmpl $0x0,0x1271c4 <== NOT EXECUTED
106780: 0f 84 f5 00 00 00 je 10687b <Stack_check_Dump_threads_usage+0x113><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
106786: ba c0 71 12 00 mov $0x1271c0,%edx <== NOT EXECUTED
the_thread = 0;
current = 0;
10678b: 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;
106792: 31 db xor %ebx,%ebx <== NOT EXECUTED
106794: eb 0f jmp 1067a5 <Stack_check_Dump_threads_usage+0x3d><== NOT EXECUTED
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
106796: 8d 93 b8 00 00 00 lea 0xb8(%ebx),%edx <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
10679c: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
1067a2: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
1067a5: 8b 42 04 mov 0x4(%edx),%eax <== NOT EXECUTED
1067a8: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
1067ab: 8b 32 mov (%edx),%esi <== NOT EXECUTED
1067ad: 83 ee 10 sub $0x10,%esi <== NOT EXECUTED
1067b0: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
1067b3: 83 c0 20 add $0x20,%eax <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
1067b6: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED
1067b9: 8d 34 30 lea (%eax,%esi,1),%esi <== NOT EXECUTED
1067bc: eb 0b jmp 1067c9 <Stack_check_Dump_threads_usage+0x61><== NOT EXECUTED
if (*base != U32_PATTERN)
1067be: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED
1067c4: 75 0b jne 1067d1 <Stack_check_Dump_threads_usage+0x69><== 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++)
1067c6: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
1067c9: 39 f0 cmp %esi,%eax <== NOT EXECUTED
1067cb: 72 f1 jb 1067be <Stack_check_Dump_threads_usage+0x56><== 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;
1067cd: 31 ff xor %edi,%edi <== NOT EXECUTED
1067cf: eb 0e jmp 1067df <Stack_check_Dump_threads_usage+0x77><== NOT EXECUTED
1067d1: 31 ff xor %edi,%edi <== 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 )
1067d3: 85 c0 test %eax,%eax <== NOT EXECUTED
1067d5: 74 08 je 1067df <Stack_check_Dump_threads_usage+0x77><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
1067d7: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED
1067da: 8d 3c 39 lea (%ecx,%edi,1),%edi <== NOT EXECUTED
1067dd: 29 c7 sub %eax,%edi <== NOT EXECUTED
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
1067df: 85 db test %ebx,%ebx <== NOT EXECUTED
1067e1: 8b 35 94 6e 12 00 mov 0x126e94,%esi <== NOT EXECUTED
1067e7: 74 28 je 106811 <Stack_check_Dump_threads_usage+0xa9><== NOT EXECUTED
#endif
{
(*print_handler)(
1067e9: 50 push %eax <== NOT EXECUTED
1067ea: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED
1067ed: 50 push %eax <== NOT EXECUTED
1067ee: 6a 05 push $0x5 <== NOT EXECUTED
1067f0: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1067f3: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
1067f6: e8 29 53 00 00 call 10bb24 <rtems_object_get_name> <== NOT EXECUTED
1067fb: 50 push %eax <== NOT EXECUTED
1067fc: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1067ff: 68 2b 10 12 00 push $0x12102b <== NOT EXECUTED
106804: ff 35 90 6e 12 00 pushl 0x126e90 <== NOT EXECUTED
10680a: ff d6 call *%esi <== NOT EXECUTED
10680c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10680f: eb 16 jmp 106827 <Stack_check_Dump_threads_usage+0xbf><== 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 );
106811: 53 push %ebx <== NOT EXECUTED
106812: 6a ff push $0xffffffff <== NOT EXECUTED
106814: 68 38 10 12 00 push $0x121038 <== NOT EXECUTED
106819: ff 35 90 6e 12 00 pushl 0x126e90 <== NOT EXECUTED
10681f: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED
106822: ff d6 call *%esi <== NOT EXECUTED
106824: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106827: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
10682a: 8b 42 04 mov 0x4(%edx),%eax <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
10682d: 51 push %ecx <== NOT EXECUTED
10682e: 51 push %ecx <== NOT EXECUTED
10682f: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
106832: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
106835: 8b 12 mov (%edx),%edx <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
106837: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
10683b: 52 push %edx <== NOT EXECUTED
10683c: 50 push %eax <== NOT EXECUTED
10683d: 68 46 10 12 00 push $0x121046 <== NOT EXECUTED
106842: ff 35 90 6e 12 00 pushl 0x126e90 <== NOT EXECUTED
106848: ff 15 94 6e 12 00 call *0x126e94 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
10684e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
106851: 83 3d 98 6e 12 00 00 cmpl $0x0,0x126e98 <== NOT EXECUTED
106858: 8b 35 94 6e 12 00 mov 0x126e94,%esi <== NOT EXECUTED
10685e: 75 09 jne 106869 <Stack_check_Dump_threads_usage+0x101><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
106860: 52 push %edx <== NOT EXECUTED
106861: 52 push %edx <== NOT EXECUTED
106862: 68 64 10 12 00 push $0x121064 <== NOT EXECUTED
106867: eb 07 jmp 106870 <Stack_check_Dump_threads_usage+0x108><== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
106869: 50 push %eax <== NOT EXECUTED
10686a: 57 push %edi <== NOT EXECUTED
10686b: 68 71 10 12 00 push $0x121071 <== NOT EXECUTED
106870: ff 35 90 6e 12 00 pushl 0x126e90 <== NOT EXECUTED
106876: ff d6 call *%esi <== NOT EXECUTED
106878: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
10687b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10687e: 5b pop %ebx <== NOT EXECUTED
10687f: 5e pop %esi <== NOT EXECUTED
106880: 5f pop %edi <== NOT EXECUTED
106881: c9 leave <== NOT EXECUTED
106882: c3 ret <== NOT EXECUTED
00106883 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
106883: 55 push %ebp
106884: 89 e5 mov %esp,%ebp
106886: 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 )
106887: 83 3d 98 6e 12 00 00 cmpl $0x0,0x126e98
10688e: 75 5a jne 1068ea <Stack_check_Initialize+0x67>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
106890: c7 05 b0 71 12 00 0d movl $0xfeedf00d,0x1271b0
106897: f0 ed fe
10689a: c7 05 b4 71 12 00 06 movl $0xbad0d06,0x1271b4
1068a1: 0d ad 0b
1068a4: c7 05 b8 71 12 00 0d movl $0xdeadf00d,0x1271b8
1068ab: f0 ad de
1068ae: c7 05 bc 71 12 00 06 movl $0x600d0d06,0x1271bc
1068b5: 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) {
1068b8: 8b 15 90 78 12 00 mov 0x127890,%edx
1068be: 85 d2 test %edx,%edx
1068c0: 74 1e je 1068e0 <Stack_check_Initialize+0x5d><== NEVER TAKEN
1068c2: 8b 0d 94 78 12 00 mov 0x127894,%ecx
1068c8: 85 c9 test %ecx,%ecx
1068ca: 74 14 je 1068e0 <Stack_check_Initialize+0x5d><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
1068cc: 89 15 c4 71 12 00 mov %edx,0x1271c4
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
1068d2: 29 d1 sub %edx,%ecx
1068d4: 89 0d c0 71 12 00 mov %ecx,0x1271c0
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
1068da: b0 a5 mov $0xa5,%al
1068dc: 89 d7 mov %edx,%edi
1068de: f3 aa rep stos %al,%es:(%edi)
}
#endif
Stack_check_Initialized = 1;
1068e0: c7 05 98 6e 12 00 01 movl $0x1,0x126e98
1068e7: 00 00 00
}
1068ea: 5f pop %edi
1068eb: c9 leave
1068ec: c3 ret
0010693b <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)
{
10693b: 55 push %ebp <== NOT EXECUTED
10693c: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10693e: 56 push %esi <== NOT EXECUTED
10693f: 53 push %ebx <== NOT EXECUTED
106940: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
106943: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
106946: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
106949: 8b b3 bc 00 00 00 mov 0xbc(%ebx),%esi <== NOT EXECUTED
char name[32];
printk("BLOWN STACK!!!\n");
10694f: 68 77 10 12 00 push $0x121077 <== NOT EXECUTED
106954: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
106957: e8 2c 19 00 00 call 108288 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
10695c: 5a pop %edx <== NOT EXECUTED
10695d: 59 pop %ecx <== NOT EXECUTED
10695e: 53 push %ebx <== NOT EXECUTED
10695f: 68 87 10 12 00 push $0x121087 <== NOT EXECUTED
106964: e8 1f 19 00 00 call 108288 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
106969: 59 pop %ecx <== NOT EXECUTED
10696a: 58 pop %eax <== NOT EXECUTED
10696b: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10696e: 68 a4 10 12 00 push $0x1210a4 <== NOT EXECUTED
106973: e8 10 19 00 00 call 108288 <printk> <== NOT EXECUTED
printk(
106978: 58 pop %eax <== NOT EXECUTED
106979: 5a pop %edx <== NOT EXECUTED
10697a: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
10697d: 68 b6 10 12 00 push $0x1210b6 <== NOT EXECUTED
106982: e8 01 19 00 00 call 108288 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
106987: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10698a: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
10698d: 50 push %eax <== NOT EXECUTED
10698e: 6a 20 push $0x20 <== NOT EXECUTED
106990: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
106993: e8 8c 51 00 00 call 10bb24 <rtems_object_get_name> <== NOT EXECUTED
106998: 5a pop %edx <== NOT EXECUTED
106999: 59 pop %ecx <== NOT EXECUTED
10699a: 50 push %eax <== NOT EXECUTED
10699b: 68 ca 10 12 00 push $0x1210ca <== NOT EXECUTED
1069a0: e8 e3 18 00 00 call 108288 <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)
1069a5: 8b 8b bc 00 00 00 mov 0xbc(%ebx),%ecx <== NOT EXECUTED
1069ab: 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(
1069b1: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED
1069b4: 53 push %ebx <== NOT EXECUTED
1069b5: 51 push %ecx <== NOT EXECUTED
1069b6: 50 push %eax <== NOT EXECUTED
1069b7: 68 e0 10 12 00 push $0x1210e0 <== NOT EXECUTED
1069bc: e8 c7 18 00 00 call 108288 <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) {
1069c1: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1069c4: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED
1069c7: 84 d2 test %dl,%dl <== NOT EXECUTED
1069c9: 75 17 jne 1069e2 <Stack_check_report_blown_task+0xa7><== 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);
1069cb: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
1069ce: 83 c6 18 add $0x18,%esi <== NOT EXECUTED
1069d1: 56 push %esi <== NOT EXECUTED
1069d2: 50 push %eax <== NOT EXECUTED
1069d3: 6a 10 push $0x10 <== NOT EXECUTED
1069d5: 68 11 11 12 00 push $0x121111 <== NOT EXECUTED
1069da: e8 a9 18 00 00 call 108288 <printk> <== NOT EXECUTED
1069df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
1069e2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1069e5: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
1069ea: e8 7d 58 00 00 call 10c26c <rtems_fatal_error_occurred><== NOT EXECUTED
0010c2e4 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10c2e4: 55 push %ebp
10c2e5: 89 e5 mov %esp,%ebp
10c2e7: 53 push %ebx
10c2e8: 83 ec 04 sub $0x4,%esp
10c2eb: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10c2ee: 8b 15 18 88 12 00 mov 0x128818,%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 );
10c2f4: 9c pushf
10c2f5: fa cli
10c2f6: 58 pop %eax
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10c2f7: 8b 4b 44 mov 0x44(%ebx),%ecx
10c2fa: 85 c9 test %ecx,%ecx
10c2fc: 75 0b jne 10c309 <_CORE_RWLock_Release+0x25>
_ISR_Enable( level );
10c2fe: 50 push %eax
10c2ff: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10c300: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
return CORE_RWLOCK_SUCCESSFUL;
10c307: eb 72 jmp 10c37b <_CORE_RWLock_Release+0x97>
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10c309: 49 dec %ecx
10c30a: 75 0f jne 10c31b <_CORE_RWLock_Release+0x37>
the_rwlock->number_of_readers -= 1;
10c30c: 8b 4b 48 mov 0x48(%ebx),%ecx
10c30f: 49 dec %ecx
10c310: 89 4b 48 mov %ecx,0x48(%ebx)
if ( the_rwlock->number_of_readers != 0 ) {
10c313: 85 c9 test %ecx,%ecx
10c315: 74 04 je 10c31b <_CORE_RWLock_Release+0x37>
/* must be unlocked again */
_ISR_Enable( level );
10c317: 50 push %eax
10c318: 9d popf
return CORE_RWLOCK_SUCCESSFUL;
10c319: eb 60 jmp 10c37b <_CORE_RWLock_Release+0x97>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10c31b: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
10c322: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10c329: 50 push %eax
10c32a: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10c32b: 83 ec 0c sub $0xc,%esp
10c32e: 53 push %ebx
10c32f: e8 84 17 00 00 call 10dab8 <_Thread_queue_Dequeue>
if ( next ) {
10c334: 83 c4 10 add $0x10,%esp
10c337: 85 c0 test %eax,%eax
10c339: 74 40 je 10c37b <_CORE_RWLock_Release+0x97>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10c33b: 83 78 30 01 cmpl $0x1,0x30(%eax)
10c33f: 75 09 jne 10c34a <_CORE_RWLock_Release+0x66>
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10c341: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10c348: eb 31 jmp 10c37b <_CORE_RWLock_Release+0x97>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10c34a: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10c34d: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
10c354: 83 ec 0c sub $0xc,%esp
10c357: 53 push %ebx
10c358: e8 53 1b 00 00 call 10deb0 <_Thread_queue_First>
if ( !next ||
10c35d: 83 c4 10 add $0x10,%esp
10c360: 85 c0 test %eax,%eax
10c362: 74 17 je 10c37b <_CORE_RWLock_Release+0x97>
10c364: 83 78 30 01 cmpl $0x1,0x30(%eax)
10c368: 74 11 je 10c37b <_CORE_RWLock_Release+0x97><== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
10c36a: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10c36d: 52 push %edx
10c36e: 52 push %edx
10c36f: 50 push %eax
10c370: 53 push %ebx
10c371: e8 2a 1a 00 00 call 10dda0 <_Thread_queue_Extract>
}
10c376: 83 c4 10 add $0x10,%esp
10c379: eb d9 jmp 10c354 <_CORE_RWLock_Release+0x70>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10c37b: 31 c0 xor %eax,%eax
10c37d: 8b 5d fc mov -0x4(%ebp),%ebx
10c380: c9 leave
10c381: c3 ret
0010c384 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10c384: 55 push %ebp
10c385: 89 e5 mov %esp,%ebp
10c387: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c38a: 8d 45 f4 lea -0xc(%ebp),%eax
10c38d: 50 push %eax
10c38e: ff 75 08 pushl 0x8(%ebp)
10c391: e8 06 14 00 00 call 10d79c <_Thread_Get>
switch ( location ) {
10c396: 83 c4 10 add $0x10,%esp
10c399: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10c39d: 75 17 jne 10c3b6 <_CORE_RWLock_Timeout+0x32><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10c39f: 83 ec 0c sub $0xc,%esp
10c3a2: 50 push %eax
10c3a3: e8 d4 1b 00 00 call 10df7c <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c3a8: a1 f4 82 12 00 mov 0x1282f4,%eax
10c3ad: 48 dec %eax
10c3ae: a3 f4 82 12 00 mov %eax,0x1282f4
10c3b3: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10c3b6: c9 leave
10c3b7: c3 ret
0010ecd4 <_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
)
{
10ecd4: 55 push %ebp
10ecd5: 89 e5 mov %esp,%ebp
10ecd7: 57 push %edi
10ecd8: 56 push %esi
10ecd9: 53 push %ebx
10ecda: 83 ec 1c sub $0x1c,%esp
10ecdd: 8b 5d 08 mov 0x8(%ebp),%ebx
10ece0: 8b 7d 10 mov 0x10(%ebp),%edi
10ece3: 8b 55 14 mov 0x14(%ebp),%edx
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
10ece6: 89 7b 44 mov %edi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
10ece9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
10ecf0: 89 53 4c mov %edx,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;
10ecf3: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
the_message_queue->notify_argument = the_argument;
10ecfa: 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)) {
10ed01: 89 d0 mov %edx,%eax
10ed03: f6 c2 03 test $0x3,%dl
10ed06: 74 0c je 10ed14 <_CORE_message_queue_Initialize+0x40>
allocated_message_size += sizeof(uint32_t);
10ed08: 83 c0 04 add $0x4,%eax
allocated_message_size &= ~(sizeof(uint32_t) - 1);
10ed0b: 83 e0 fc and $0xfffffffc,%eax
}
if (allocated_message_size < maximum_message_size)
return false;
10ed0e: 31 f6 xor %esi,%esi
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
allocated_message_size += sizeof(uint32_t);
allocated_message_size &= ~(sizeof(uint32_t) - 1);
}
if (allocated_message_size < maximum_message_size)
10ed10: 39 d0 cmp %edx,%eax
10ed12: 72 68 jb 10ed7c <_CORE_message_queue_Initialize+0xa8><== NEVER TAKEN
/*
* 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));
10ed14: 8d 50 14 lea 0x14(%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 *
10ed17: 89 d1 mov %edx,%ecx
10ed19: 0f af cf imul %edi,%ecx
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
return false;
10ed1c: 31 f6 xor %esi,%esi
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
10ed1e: 39 c1 cmp %eax,%ecx
10ed20: 72 5a jb 10ed7c <_CORE_message_queue_Initialize+0xa8><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
10ed22: 83 ec 0c sub $0xc,%esp
10ed25: 51 push %ecx
10ed26: 89 55 e4 mov %edx,-0x1c(%ebp)
10ed29: e8 a0 d7 ff ff call 10c4ce <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
10ed2e: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
10ed31: 83 c4 10 add $0x10,%esp
10ed34: 85 c0 test %eax,%eax
10ed36: 8b 55 e4 mov -0x1c(%ebp),%edx
10ed39: 74 41 je 10ed7c <_CORE_message_queue_Initialize+0xa8>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
10ed3b: 52 push %edx
10ed3c: 57 push %edi
10ed3d: 50 push %eax
10ed3e: 8d 43 68 lea 0x68(%ebx),%eax
10ed41: 50 push %eax
10ed42: e8 d1 fe ff ff call 10ec18 <_Chain_Initialize>
Chain_Node *tail = _Chain_Tail( the_chain );
10ed47: 8d 43 54 lea 0x54(%ebx),%eax
10ed4a: 89 43 50 mov %eax,0x50(%ebx)
head->next = tail;
head->previous = NULL;
10ed4d: 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 );
10ed54: 8d 43 50 lea 0x50(%ebx),%eax
10ed57: 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(
10ed5a: 6a 06 push $0x6
10ed5c: 68 80 00 00 00 push $0x80
10ed61: 8b 45 0c mov 0xc(%ebp),%eax
10ed64: 83 38 01 cmpl $0x1,(%eax)
10ed67: 0f 94 c0 sete %al
10ed6a: 0f b6 c0 movzbl %al,%eax
10ed6d: 50 push %eax
10ed6e: 53 push %ebx
10ed6f: e8 80 cf ff ff call 10bcf4 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
10ed74: 83 c4 20 add $0x20,%esp
10ed77: be 01 00 00 00 mov $0x1,%esi
}
10ed7c: 89 f0 mov %esi,%eax
10ed7e: 8d 65 f4 lea -0xc(%ebp),%esp
10ed81: 5b pop %ebx
10ed82: 5e pop %esi
10ed83: 5f pop %edi
10ed84: c9 leave
10ed85: c3 ret
0010ed88 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
10ed88: 55 push %ebp
10ed89: 89 e5 mov %esp,%ebp
10ed8b: 57 push %edi
10ed8c: 56 push %esi
10ed8d: 53 push %ebx
10ed8e: 83 ec 2c sub $0x2c,%esp
10ed91: 8b 55 08 mov 0x8(%ebp),%edx
10ed94: 8b 45 0c mov 0xc(%ebp),%eax
10ed97: 89 45 dc mov %eax,-0x24(%ebp)
10ed9a: 8b 5d 10 mov 0x10(%ebp),%ebx
10ed9d: 89 5d e0 mov %ebx,-0x20(%ebp)
10eda0: 8b 4d 14 mov 0x14(%ebp),%ecx
10eda3: 8b 75 1c mov 0x1c(%ebp),%esi
10eda6: 89 75 d4 mov %esi,-0x2c(%ebp)
10eda9: 8a 45 18 mov 0x18(%ebp),%al
10edac: 88 45 db mov %al,-0x25(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
10edaf: a1 08 48 12 00 mov 0x124808,%eax
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10edb4: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_ISR_Disable( level );
10edbb: 9c pushf
10edbc: fa cli
10edbd: 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 );
}
10edc0: 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 );
10edc3: 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))
10edc6: 39 f3 cmp %esi,%ebx
10edc8: 0f 84 8a 00 00 00 je 10ee58 <_CORE_message_queue_Seize+0xd0>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
10edce: 8b 33 mov (%ebx),%esi
head->next = new_first;
10edd0: 89 72 50 mov %esi,0x50(%edx)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10edd3: 8d 7a 50 lea 0x50(%edx),%edi
10edd6: 89 7e 04 mov %edi,0x4(%esi)
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 ) {
10edd9: 85 db test %ebx,%ebx
10eddb: 74 7b je 10ee58 <_CORE_message_queue_Seize+0xd0><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
10eddd: ff 4a 48 decl 0x48(%edx)
_ISR_Enable( level );
10ede0: ff 75 e4 pushl -0x1c(%ebp)
10ede3: 9d popf
*size_p = the_message->Contents.size;
10ede4: 8b 43 0c mov 0xc(%ebx),%eax
10ede7: 89 01 mov %eax,(%ecx)
_Thread_Executing->Wait.count =
10ede9: 8b 73 08 mov 0x8(%ebx),%esi
10edec: a1 08 48 12 00 mov 0x124808,%eax
10edf1: 89 70 24 mov %esi,0x24(%eax)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
10edf4: 8d 73 10 lea 0x10(%ebx),%esi
10edf7: 89 75 e4 mov %esi,-0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10edfa: 8b 09 mov (%ecx),%ecx
10edfc: 8b 7d e0 mov -0x20(%ebp),%edi
10edff: 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 );
10ee01: 83 ec 0c sub $0xc,%esp
10ee04: 52 push %edx
10ee05: 89 55 d0 mov %edx,-0x30(%ebp)
10ee08: e8 af cb ff ff call 10b9bc <_Thread_queue_Dequeue>
if ( !the_thread ) {
10ee0d: 83 c4 10 add $0x10,%esp
10ee10: 85 c0 test %eax,%eax
10ee12: 8b 55 d0 mov -0x30(%ebp),%edx
10ee15: 75 15 jne 10ee2c <_CORE_message_queue_Seize+0xa4>
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 );
10ee17: 89 5d 0c mov %ebx,0xc(%ebp)
10ee1a: 83 c2 68 add $0x68,%edx
10ee1d: 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 );
}
10ee20: 8d 65 f4 lea -0xc(%ebp),%esp
10ee23: 5b pop %ebx
10ee24: 5e pop %esi
10ee25: 5f pop %edi
10ee26: c9 leave
10ee27: e9 84 b1 ff ff jmp 109fb0 <_Chain_Append>
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
10ee2c: 8b 48 24 mov 0x24(%eax),%ecx
10ee2f: 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;
10ee32: 8b 48 30 mov 0x30(%eax),%ecx
10ee35: 89 4b 0c mov %ecx,0xc(%ebx)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10ee38: 8b 70 2c mov 0x2c(%eax),%esi
10ee3b: 8b 7d e4 mov -0x1c(%ebp),%edi
10ee3e: 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(
10ee40: 8b 43 08 mov 0x8(%ebx),%eax
10ee43: 89 45 10 mov %eax,0x10(%ebp)
10ee46: 89 5d 0c mov %ebx,0xc(%ebp)
10ee49: 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 );
}
10ee4c: 8d 65 f4 lea -0xc(%ebp),%esp
10ee4f: 5b pop %ebx
10ee50: 5e pop %esi
10ee51: 5f pop %edi
10ee52: c9 leave
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
10ee53: e9 18 1c 00 00 jmp 110a70 <_CORE_message_queue_Insert_message>
return;
}
#endif
}
if ( !wait ) {
10ee58: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
10ee5c: 75 13 jne 10ee71 <_CORE_message_queue_Seize+0xe9>
_ISR_Enable( level );
10ee5e: ff 75 e4 pushl -0x1c(%ebp)
10ee61: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
10ee62: c7 40 34 04 00 00 00 movl $0x4,0x34(%eax)
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 );
}
10ee69: 8d 65 f4 lea -0xc(%ebp),%esp
10ee6c: 5b pop %ebx
10ee6d: 5e pop %esi
10ee6e: 5f pop %edi
10ee6f: c9 leave
10ee70: c3 ret
10ee71: 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;
10ee78: 89 50 44 mov %edx,0x44(%eax)
executing->Wait.id = id;
10ee7b: 8b 5d dc mov -0x24(%ebp),%ebx
10ee7e: 89 58 20 mov %ebx,0x20(%eax)
executing->Wait.return_argument_second.mutable_object = buffer;
10ee81: 8b 75 e0 mov -0x20(%ebp),%esi
10ee84: 89 70 2c mov %esi,0x2c(%eax)
executing->Wait.return_argument = size_p;
10ee87: 89 48 28 mov %ecx,0x28(%eax)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
10ee8a: ff 75 e4 pushl -0x1c(%ebp)
10ee8d: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
10ee8e: c7 45 10 a4 bd 10 00 movl $0x10bda4,0x10(%ebp)
10ee95: 8b 45 d4 mov -0x2c(%ebp),%eax
10ee98: 89 45 0c mov %eax,0xc(%ebp)
10ee9b: 89 55 08 mov %edx,0x8(%ebp)
}
10ee9e: 8d 65 f4 lea -0xc(%ebp),%esp
10eea1: 5b pop %ebx
10eea2: 5e pop %esi
10eea3: 5f pop %edi
10eea4: 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 );
10eea5: e9 1e cc ff ff jmp 10bac8 <_Thread_queue_Enqueue_with_handler>
0010a105 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10a105: 55 push %ebp
10a106: 89 e5 mov %esp,%ebp
10a108: 53 push %ebx
10a109: 83 ec 14 sub $0x14,%esp
10a10c: 8b 5d 08 mov 0x8(%ebp),%ebx
10a10f: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10a112: a1 e4 42 12 00 mov 0x1242e4,%eax
10a117: 85 c0 test %eax,%eax
10a119: 74 19 je 10a134 <_CORE_mutex_Seize+0x2f>
10a11b: 84 d2 test %dl,%dl
10a11d: 74 15 je 10a134 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN
10a11f: 83 3d 3c 44 12 00 01 cmpl $0x1,0x12443c
10a126: 76 0c jbe 10a134 <_CORE_mutex_Seize+0x2f>
10a128: 53 push %ebx
10a129: 6a 12 push $0x12
10a12b: 6a 00 push $0x0
10a12d: 6a 00 push $0x0
10a12f: e8 dc 05 00 00 call 10a710 <_Internal_error_Occurred>
10a134: 51 push %ecx
10a135: 51 push %ecx
10a136: 8d 45 18 lea 0x18(%ebp),%eax
10a139: 50 push %eax
10a13a: 53 push %ebx
10a13b: 88 55 f4 mov %dl,-0xc(%ebp)
10a13e: e8 61 4e 00 00 call 10efa4 <_CORE_mutex_Seize_interrupt_trylock>
10a143: 83 c4 10 add $0x10,%esp
10a146: 85 c0 test %eax,%eax
10a148: 8a 55 f4 mov -0xc(%ebp),%dl
10a14b: 74 48 je 10a195 <_CORE_mutex_Seize+0x90>
10a14d: 84 d2 test %dl,%dl
10a14f: 75 12 jne 10a163 <_CORE_mutex_Seize+0x5e>
10a151: ff 75 18 pushl 0x18(%ebp)
10a154: 9d popf
10a155: a1 08 48 12 00 mov 0x124808,%eax
10a15a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
10a161: eb 32 jmp 10a195 <_CORE_mutex_Seize+0x90>
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;
10a163: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10a16a: a1 08 48 12 00 mov 0x124808,%eax
10a16f: 89 58 44 mov %ebx,0x44(%eax)
10a172: 8b 55 0c mov 0xc(%ebp),%edx
10a175: 89 50 20 mov %edx,0x20(%eax)
10a178: a1 e4 42 12 00 mov 0x1242e4,%eax
10a17d: 40 inc %eax
10a17e: a3 e4 42 12 00 mov %eax,0x1242e4
10a183: ff 75 18 pushl 0x18(%ebp)
10a186: 9d popf
10a187: 50 push %eax
10a188: 50 push %eax
10a189: ff 75 14 pushl 0x14(%ebp)
10a18c: 53 push %ebx
10a18d: e8 26 ff ff ff call 10a0b8 <_CORE_mutex_Seize_interrupt_blocking>
10a192: 83 c4 10 add $0x10,%esp
}
10a195: 8b 5d fc mov -0x4(%ebp),%ebx
10a198: c9 leave
10a199: c3 ret
0010a2c0 <_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
)
{
10a2c0: 55 push %ebp
10a2c1: 89 e5 mov %esp,%ebp
10a2c3: 53 push %ebx
10a2c4: 83 ec 10 sub $0x10,%esp
10a2c7: 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)) ) {
10a2ca: 53 push %ebx
10a2cb: e8 ec 16 00 00 call 10b9bc <_Thread_queue_Dequeue>
10a2d0: 89 c2 mov %eax,%edx
10a2d2: 83 c4 10 add $0x10,%esp
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10a2d5: 31 c0 xor %eax,%eax
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10a2d7: 85 d2 test %edx,%edx
10a2d9: 75 15 jne 10a2f0 <_CORE_semaphore_Surrender+0x30>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10a2db: 9c pushf
10a2dc: fa cli
10a2dd: 59 pop %ecx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10a2de: 8b 53 48 mov 0x48(%ebx),%edx
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10a2e1: b0 04 mov $0x4,%al
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10a2e3: 3b 53 40 cmp 0x40(%ebx),%edx
10a2e6: 73 06 jae 10a2ee <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN
the_semaphore->count += 1;
10a2e8: 42 inc %edx
10a2e9: 89 53 48 mov %edx,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10a2ec: 30 c0 xor %al,%al
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10a2ee: 51 push %ecx
10a2ef: 9d popf
}
return status;
}
10a2f0: 8b 5d fc mov -0x4(%ebp),%ebx
10a2f3: c9 leave
10a2f4: c3 ret
001093c0 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
1093c0: 55 push %ebp
1093c1: 89 e5 mov %esp,%ebp
1093c3: 57 push %edi
1093c4: 56 push %esi
1093c5: 53 push %ebx
1093c6: 83 ec 2c sub $0x2c,%esp
1093c9: 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 ];
1093cc: 8b bb e8 00 00 00 mov 0xe8(%ebx),%edi
option_set = (rtems_option) the_thread->Wait.option;
1093d2: 8b 43 30 mov 0x30(%ebx),%eax
1093d5: 89 45 e0 mov %eax,-0x20(%ebp)
_ISR_Disable( level );
1093d8: 9c pushf
1093d9: fa cli
1093da: 58 pop %eax
pending_events = api->pending_events;
1093db: 8b 17 mov (%edi),%edx
1093dd: 89 55 d4 mov %edx,-0x2c(%ebp)
event_condition = (rtems_event_set) the_thread->Wait.count;
1093e0: 8b 73 24 mov 0x24(%ebx),%esi
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
1093e3: 21 f2 and %esi,%edx
1093e5: 75 07 jne 1093ee <_Event_Surrender+0x2e>
_ISR_Enable( level );
1093e7: 50 push %eax
1093e8: 9d popf
return;
1093e9: e9 af 00 00 00 jmp 10949d <_Event_Surrender+0xdd>
/*
* 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() &&
1093ee: 83 3d 04 48 12 00 00 cmpl $0x0,0x124804
1093f5: 74 49 je 109440 <_Event_Surrender+0x80>
1093f7: 3b 1d 08 48 12 00 cmp 0x124808,%ebx
1093fd: 75 41 jne 109440 <_Event_Surrender+0x80>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
1093ff: 8b 0d dc 4b 12 00 mov 0x124bdc,%ecx
/*
* 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 ) &&
109405: 83 f9 02 cmp $0x2,%ecx
109408: 74 09 je 109413 <_Event_Surrender+0x53> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10940a: 8b 0d dc 4b 12 00 mov 0x124bdc,%ecx
* 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) ||
109410: 49 dec %ecx
109411: 75 2d jne 109440 <_Event_Surrender+0x80>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
109413: 39 f2 cmp %esi,%edx
109415: 74 06 je 10941d <_Event_Surrender+0x5d>
109417: f6 45 e0 02 testb $0x2,-0x20(%ebp)
10941b: 74 1f je 10943c <_Event_Surrender+0x7c> <== 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) );
10941d: 89 d6 mov %edx,%esi
10941f: f7 d6 not %esi
109421: 23 75 d4 and -0x2c(%ebp),%esi
109424: 89 37 mov %esi,(%edi)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
109426: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10942d: 8b 4b 28 mov 0x28(%ebx),%ecx
109430: 89 11 mov %edx,(%ecx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
109432: c7 05 dc 4b 12 00 03 movl $0x3,0x124bdc
109439: 00 00 00
}
_ISR_Enable( level );
10943c: 50 push %eax
10943d: 9d popf
return;
10943e: eb 5d jmp 10949d <_Event_Surrender+0xdd>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109440: f6 43 11 01 testb $0x1,0x11(%ebx)
109444: 74 55 je 10949b <_Event_Surrender+0xdb>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
109446: 39 f2 cmp %esi,%edx
109448: 74 06 je 109450 <_Event_Surrender+0x90>
10944a: f6 45 e0 02 testb $0x2,-0x20(%ebp)
10944e: 74 4b je 10949b <_Event_Surrender+0xdb> <== NEVER TAKEN
109450: 89 d6 mov %edx,%esi
109452: f7 d6 not %esi
109454: 23 75 d4 and -0x2c(%ebp),%esi
109457: 89 37 mov %esi,(%edi)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
109459: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109460: 8b 4b 28 mov 0x28(%ebx),%ecx
109463: 89 11 mov %edx,(%ecx)
_ISR_Flash( level );
109465: 50 push %eax
109466: 9d popf
109467: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109468: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10946c: 74 06 je 109474 <_Event_Surrender+0xb4>
_ISR_Enable( level );
10946e: 50 push %eax
10946f: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
109470: 51 push %ecx
109471: 51 push %ecx
109472: eb 17 jmp 10948b <_Event_Surrender+0xcb>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
109474: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10947b: 50 push %eax
10947c: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10947d: 83 ec 0c sub $0xc,%esp
109480: 8d 43 48 lea 0x48(%ebx),%eax
109483: 50 push %eax
109484: e8 2b 2f 00 00 call 10c3b4 <_Watchdog_Remove>
109489: 58 pop %eax
10948a: 5a pop %edx
10948b: 68 f8 ff 03 10 push $0x1003fff8
109490: 53 push %ebx
109491: e8 d2 1e 00 00 call 10b368 <_Thread_Clear_state>
109496: 83 c4 10 add $0x10,%esp
109499: eb 02 jmp 10949d <_Event_Surrender+0xdd>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10949b: 50 push %eax
10949c: 9d popf
}
10949d: 8d 65 f4 lea -0xc(%ebp),%esp
1094a0: 5b pop %ebx
1094a1: 5e pop %esi
1094a2: 5f pop %edi
1094a3: c9 leave
1094a4: c3 ret
001094a8 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
1094a8: 55 push %ebp
1094a9: 89 e5 mov %esp,%ebp
1094ab: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
1094ae: 8d 45 f4 lea -0xc(%ebp),%eax
1094b1: 50 push %eax
1094b2: ff 75 08 pushl 0x8(%ebp)
1094b5: e8 e6 21 00 00 call 10b6a0 <_Thread_Get>
switch ( location ) {
1094ba: 83 c4 10 add $0x10,%esp
1094bd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1094c1: 75 49 jne 10950c <_Event_Timeout+0x64> <== 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 );
1094c3: 9c pushf
1094c4: fa cli
1094c5: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
1094c6: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
1094cd: 3b 05 08 48 12 00 cmp 0x124808,%eax
1094d3: 75 13 jne 1094e8 <_Event_Timeout+0x40>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
1094d5: 8b 0d dc 4b 12 00 mov 0x124bdc,%ecx
1094db: 49 dec %ecx
1094dc: 75 0a jne 1094e8 <_Event_Timeout+0x40>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
1094de: c7 05 dc 4b 12 00 02 movl $0x2,0x124bdc
1094e5: 00 00 00
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
1094e8: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
1094ef: 52 push %edx
1094f0: 9d popf
1094f1: 52 push %edx
1094f2: 52 push %edx
1094f3: 68 f8 ff 03 10 push $0x1003fff8
1094f8: 50 push %eax
1094f9: e8 6a 1e 00 00 call 10b368 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
1094fe: a1 e4 42 12 00 mov 0x1242e4,%eax
109503: 48 dec %eax
109504: a3 e4 42 12 00 mov %eax,0x1242e4
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
109509: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10950c: c9 leave
10950d: c3 ret
0010f58b <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
10f58b: 55 push %ebp
10f58c: 89 e5 mov %esp,%ebp
10f58e: 57 push %edi
10f58f: 56 push %esi
10f590: 53 push %ebx
10f591: 83 ec 4c sub $0x4c,%esp
10f594: 8b 5d 08 mov 0x8(%ebp),%ebx
10f597: 8b 4d 10 mov 0x10(%ebp),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
10f59a: 8b 43 20 mov 0x20(%ebx),%eax
10f59d: 89 45 c0 mov %eax,-0x40(%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;
10f5a0: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
Heap_Block *extend_last_block = NULL;
10f5a7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uintptr_t const page_size = heap->page_size;
10f5ae: 8b 53 10 mov 0x10(%ebx),%edx
10f5b1: 89 55 c4 mov %edx,-0x3c(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10f5b4: 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;
10f5b7: 8b 7b 30 mov 0x30(%ebx),%edi
10f5ba: 89 7d bc mov %edi,-0x44(%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 ) {
return false;
10f5bd: 31 f6 xor %esi,%esi
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
10f5bf: 8b 7d 0c mov 0xc(%ebp),%edi
10f5c2: 01 cf add %ecx,%edi
10f5c4: 0f 82 d4 01 00 00 jb 10f79e <_Heap_Extend+0x213>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
10f5ca: 52 push %edx
10f5cb: 52 push %edx
10f5cc: 8d 55 e0 lea -0x20(%ebp),%edx
10f5cf: 52 push %edx
10f5d0: 8d 55 e4 lea -0x1c(%ebp),%edx
10f5d3: 52 push %edx
10f5d4: 50 push %eax
10f5d5: ff 75 c4 pushl -0x3c(%ebp)
10f5d8: 51 push %ecx
10f5d9: ff 75 0c pushl 0xc(%ebp)
10f5dc: e8 52 b2 ff ff call 10a833 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
10f5e1: 83 c4 20 add $0x20,%esp
10f5e4: 84 c0 test %al,%al
10f5e6: 0f 84 b2 01 00 00 je 10f79e <_Heap_Extend+0x213>
10f5ec: 8b 4d c0 mov -0x40(%ebp),%ecx
10f5ef: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10f5f6: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
10f5fd: 31 f6 xor %esi,%esi
10f5ff: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
10f606: 8b 43 18 mov 0x18(%ebx),%eax
10f609: 89 5d b8 mov %ebx,-0x48(%ebp)
10f60c: eb 02 jmp 10f610 <_Heap_Extend+0x85>
10f60e: 89 c8 mov %ecx,%eax
uintptr_t const sub_area_end = start_block->prev_size;
10f610: 8b 19 mov (%ecx),%ebx
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
10f612: 39 c7 cmp %eax,%edi
10f614: 76 09 jbe 10f61f <_Heap_Extend+0x94>
10f616: 39 5d 0c cmp %ebx,0xc(%ebp)
10f619: 0f 82 7d 01 00 00 jb 10f79c <_Heap_Extend+0x211>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10f61f: 39 c7 cmp %eax,%edi
10f621: 74 06 je 10f629 <_Heap_Extend+0x9e>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10f623: 39 df cmp %ebx,%edi
10f625: 72 07 jb 10f62e <_Heap_Extend+0xa3>
10f627: eb 08 jmp 10f631 <_Heap_Extend+0xa6>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10f629: 89 4d d0 mov %ecx,-0x30(%ebp)
10f62c: eb 03 jmp 10f631 <_Heap_Extend+0xa6>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10f62e: 89 4d c8 mov %ecx,-0x38(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10f631: 8d 43 f8 lea -0x8(%ebx),%eax
10f634: 89 45 d4 mov %eax,-0x2c(%ebp)
10f637: 89 d8 mov %ebx,%eax
10f639: 31 d2 xor %edx,%edx
10f63b: f7 75 c4 divl -0x3c(%ebp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10f63e: 29 55 d4 sub %edx,-0x2c(%ebp)
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
10f641: 3b 5d 0c cmp 0xc(%ebp),%ebx
10f644: 75 07 jne 10f64d <_Heap_Extend+0xc2>
start_block->prev_size = extend_area_end;
10f646: 89 39 mov %edi,(%ecx)
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 )
10f648: 8b 75 d4 mov -0x2c(%ebp),%esi
10f64b: eb 08 jmp 10f655 <_Heap_Extend+0xca>
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
10f64d: 73 06 jae 10f655 <_Heap_Extend+0xca>
10f64f: 8b 55 d4 mov -0x2c(%ebp),%edx
10f652: 89 55 cc mov %edx,-0x34(%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;
10f655: 8b 45 d4 mov -0x2c(%ebp),%eax
10f658: 8b 48 04 mov 0x4(%eax),%ecx
10f65b: 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);
10f65e: 01 c1 add %eax,%ecx
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
10f660: 3b 4d c0 cmp -0x40(%ebp),%ecx
10f663: 75 a9 jne 10f60e <_Heap_Extend+0x83>
10f665: 8b 5d b8 mov -0x48(%ebp),%ebx
if ( extend_area_begin < heap->area_begin ) {
10f668: 8b 55 0c mov 0xc(%ebp),%edx
10f66b: 3b 53 18 cmp 0x18(%ebx),%edx
10f66e: 73 05 jae 10f675 <_Heap_Extend+0xea>
heap->area_begin = extend_area_begin;
10f670: 89 53 18 mov %edx,0x18(%ebx)
10f673: eb 08 jmp 10f67d <_Heap_Extend+0xf2>
} else if ( heap->area_end < extend_area_end ) {
10f675: 39 7b 1c cmp %edi,0x1c(%ebx)
10f678: 73 03 jae 10f67d <_Heap_Extend+0xf2>
heap->area_end = extend_area_end;
10f67a: 89 7b 1c mov %edi,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
10f67d: 8b 45 e0 mov -0x20(%ebp),%eax
10f680: 8b 55 e4 mov -0x1c(%ebp),%edx
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
10f683: 89 c1 mov %eax,%ecx
10f685: 29 d1 sub %edx,%ecx
10f687: 89 4d d4 mov %ecx,-0x2c(%ebp)
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
10f68a: 89 3a mov %edi,(%edx)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
10f68c: 83 c9 01 or $0x1,%ecx
10f68f: 89 4a 04 mov %ecx,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
10f692: 8b 4d d4 mov -0x2c(%ebp),%ecx
10f695: 89 08 mov %ecx,(%eax)
extend_last_block->size_and_flag = 0;
10f697: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
10f69e: 39 53 20 cmp %edx,0x20(%ebx)
10f6a1: 76 05 jbe 10f6a8 <_Heap_Extend+0x11d>
heap->first_block = extend_first_block;
10f6a3: 89 53 20 mov %edx,0x20(%ebx)
10f6a6: eb 08 jmp 10f6b0 <_Heap_Extend+0x125>
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
10f6a8: 39 43 24 cmp %eax,0x24(%ebx)
10f6ab: 73 03 jae 10f6b0 <_Heap_Extend+0x125>
heap->last_block = extend_last_block;
10f6ad: 89 43 24 mov %eax,0x24(%ebx)
}
if ( merge_below_block != NULL ) {
10f6b0: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10f6b4: 74 3b je 10f6f1 <_Heap_Extend+0x166>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
10f6b6: 8b 43 10 mov 0x10(%ebx),%eax
10f6b9: 89 45 d4 mov %eax,-0x2c(%ebp)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
10f6bc: 8b 4d 0c mov 0xc(%ebp),%ecx
10f6bf: 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;
10f6c2: 89 c8 mov %ecx,%eax
10f6c4: 31 d2 xor %edx,%edx
10f6c6: f7 75 d4 divl -0x2c(%ebp)
if ( remainder != 0 ) {
10f6c9: 85 d2 test %edx,%edx
10f6cb: 74 05 je 10f6d2 <_Heap_Extend+0x147>
return value - remainder + alignment;
10f6cd: 03 4d d4 add -0x2c(%ebp),%ecx
10f6d0: 29 d1 sub %edx,%ecx
uintptr_t const new_first_block_begin =
10f6d2: 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;
10f6d5: 8b 45 d0 mov -0x30(%ebp),%eax
10f6d8: 8b 00 mov (%eax),%eax
10f6da: 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 =
10f6dd: 8b 45 d0 mov -0x30(%ebp),%eax
10f6e0: 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;
10f6e2: 83 c8 01 or $0x1,%eax
10f6e5: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
10f6e8: 89 d8 mov %ebx,%eax
10f6ea: e8 81 fe ff ff call 10f570 <_Heap_Free_block>
10f6ef: eb 14 jmp 10f705 <_Heap_Extend+0x17a>
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 ) {
10f6f1: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10f6f5: 74 0e je 10f705 <_Heap_Extend+0x17a>
_Heap_Link_below(
10f6f7: 8b 55 e0 mov -0x20(%ebp),%edx
{
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;
10f6fa: 8b 45 c8 mov -0x38(%ebp),%eax
10f6fd: 29 d0 sub %edx,%eax
10f6ff: 83 c8 01 or $0x1,%eax
10f702: 89 42 04 mov %eax,0x4(%edx)
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
10f705: 85 f6 test %esi,%esi
10f707: 74 30 je 10f739 <_Heap_Extend+0x1ae>
)
{
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,
10f709: 83 ef 08 sub $0x8,%edi
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(
10f70c: 29 f7 sub %esi,%edi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10f70e: 89 f8 mov %edi,%eax
10f710: 31 d2 xor %edx,%edx
10f712: f7 73 10 divl 0x10(%ebx)
10f715: 29 d7 sub %edx,%edi
);
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)
10f717: 8b 46 04 mov 0x4(%esi),%eax
10f71a: 29 f8 sub %edi,%eax
| HEAP_PREV_BLOCK_USED;
10f71c: 83 c8 01 or $0x1,%eax
10f71f: 89 44 37 04 mov %eax,0x4(%edi,%esi,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;
10f723: 8b 46 04 mov 0x4(%esi),%eax
10f726: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
10f729: 09 f8 or %edi,%eax
10f72b: 89 46 04 mov %eax,0x4(%esi)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
10f72e: 89 f2 mov %esi,%edx
10f730: 89 d8 mov %ebx,%eax
10f732: e8 39 fe ff ff call 10f570 <_Heap_Free_block>
10f737: eb 21 jmp 10f75a <_Heap_Extend+0x1cf>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
10f739: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10f73d: 74 1b je 10f75a <_Heap_Extend+0x1cf>
_Heap_Link_above(
10f73f: 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 );
10f742: 8b 45 e4 mov -0x1c(%ebp),%eax
10f745: 2b 45 cc sub -0x34(%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;
10f748: 8b 7d cc mov -0x34(%ebp),%edi
10f74b: 8b 57 04 mov 0x4(%edi),%edx
10f74e: 83 e2 01 and $0x1,%edx
block->size_and_flag = size | flag;
10f751: 09 d0 or %edx,%eax
10f753: 89 47 04 mov %eax,0x4(%edi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
10f756: 83 49 04 01 orl $0x1,0x4(%ecx)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
10f75a: 85 f6 test %esi,%esi
10f75c: 75 10 jne 10f76e <_Heap_Extend+0x1e3>
10f75e: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10f762: 75 0a jne 10f76e <_Heap_Extend+0x1e3>
_Heap_Free_block( heap, extend_first_block );
10f764: 8b 55 e4 mov -0x1c(%ebp),%edx
10f767: 89 d8 mov %ebx,%eax
10f769: e8 02 fe ff ff call 10f570 <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
10f76e: 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(
10f771: 8b 43 20 mov 0x20(%ebx),%eax
10f774: 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;
10f776: 8b 4a 04 mov 0x4(%edx),%ecx
10f779: 83 e1 01 and $0x1,%ecx
block->size_and_flag = size | flag;
10f77c: 09 c8 or %ecx,%eax
10f77e: 89 42 04 mov %eax,0x4(%edx)
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
10f781: 8b 43 30 mov 0x30(%ebx),%eax
10f784: 2b 45 bc sub -0x44(%ebp),%eax
/* Statistics */
stats->size += extended_size;
10f787: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
10f78a: be 01 00 00 00 mov $0x1,%esi
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
10f78f: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10f793: 74 09 je 10f79e <_Heap_Extend+0x213> <== NEVER TAKEN
*extended_size_ptr = extended_size;
10f795: 8b 55 14 mov 0x14(%ebp),%edx
10f798: 89 02 mov %eax,(%edx)
10f79a: eb 02 jmp 10f79e <_Heap_Extend+0x213>
_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;
10f79c: 31 f6 xor %esi,%esi
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
10f79e: 89 f0 mov %esi,%eax
10f7a0: 8d 65 f4 lea -0xc(%ebp),%esp
10f7a3: 5b pop %ebx
10f7a4: 5e pop %esi
10f7a5: 5f pop %edi
10f7a6: c9 leave
10f7a7: c3 ret
0010f240 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
10f240: 55 push %ebp
10f241: 89 e5 mov %esp,%ebp
10f243: 57 push %edi
10f244: 56 push %esi
10f245: 53 push %ebx
10f246: 83 ec 14 sub $0x14,%esp
10f249: 8b 4d 08 mov 0x8(%ebp),%ecx
10f24c: 8b 55 0c mov 0xc(%ebp),%edx
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
10f24f: b0 01 mov $0x1,%al
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
10f251: 85 d2 test %edx,%edx
10f253: 0f 84 4b 01 00 00 je 10f3a4 <_Heap_Free+0x164>
10f259: 8d 5a f8 lea -0x8(%edx),%ebx
10f25c: 89 d0 mov %edx,%eax
10f25e: 31 d2 xor %edx,%edx
10f260: f7 71 10 divl 0x10(%ecx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10f263: 29 d3 sub %edx,%ebx
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
10f265: 8b 41 20 mov 0x20(%ecx),%eax
10f268: 89 45 ec mov %eax,-0x14(%ebp)
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10f26b: 31 d2 xor %edx,%edx
10f26d: 39 c3 cmp %eax,%ebx
10f26f: 72 08 jb 10f279 <_Heap_Free+0x39>
10f271: 31 d2 xor %edx,%edx
10f273: 39 59 24 cmp %ebx,0x24(%ecx)
10f276: 0f 93 c2 setae %dl
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10f279: 31 c0 xor %eax,%eax
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
10f27b: 85 d2 test %edx,%edx
10f27d: 0f 84 21 01 00 00 je 10f3a4 <_Heap_Free+0x164>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10f283: 8b 43 04 mov 0x4(%ebx),%eax
10f286: 89 45 f0 mov %eax,-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;
10f289: 89 c6 mov %eax,%esi
10f28b: 83 e6 fe and $0xfffffffe,%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10f28e: 8d 14 33 lea (%ebx,%esi,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;
10f291: 31 ff xor %edi,%edi
10f293: 3b 55 ec cmp -0x14(%ebp),%edx
10f296: 72 0a jb 10f2a2 <_Heap_Free+0x62> <== NEVER TAKEN
10f298: 31 c0 xor %eax,%eax
10f29a: 39 51 24 cmp %edx,0x24(%ecx)
10f29d: 0f 93 c0 setae %al
10f2a0: 89 c7 mov %eax,%edi
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
return false;
10f2a2: 31 c0 xor %eax,%eax
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10f2a4: 85 ff test %edi,%edi
10f2a6: 0f 84 f8 00 00 00 je 10f3a4 <_Heap_Free+0x164> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10f2ac: 8b 7a 04 mov 0x4(%edx),%edi
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
10f2af: f7 c7 01 00 00 00 test $0x1,%edi
10f2b5: 0f 84 e9 00 00 00 je 10f3a4 <_Heap_Free+0x164> <== 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;
10f2bb: 83 e7 fe and $0xfffffffe,%edi
10f2be: 89 7d e8 mov %edi,-0x18(%ebp)
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10f2c1: 8b 41 24 mov 0x24(%ecx),%eax
10f2c4: 89 45 e4 mov %eax,-0x1c(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
10f2c7: 31 c0 xor %eax,%eax
10f2c9: 3b 55 e4 cmp -0x1c(%ebp),%edx
10f2cc: 74 0a je 10f2d8 <_Heap_Free+0x98>
10f2ce: 31 c0 xor %eax,%eax
10f2d0: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1)
10f2d5: 0f 94 c0 sete %al
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10f2d8: 88 45 e3 mov %al,-0x1d(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
10f2db: f6 45 f0 01 testb $0x1,-0x10(%ebp)
10f2df: 75 62 jne 10f343 <_Heap_Free+0x103>
uintptr_t const prev_size = block->prev_size;
10f2e1: 8b 03 mov (%ebx),%eax
10f2e3: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10f2e6: 29 c3 sub %eax,%ebx
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;
10f2e8: 31 ff xor %edi,%edi
10f2ea: 3b 5d ec cmp -0x14(%ebp),%ebx
10f2ed: 72 0a jb 10f2f9 <_Heap_Free+0xb9> <== NEVER TAKEN
10f2ef: 31 c0 xor %eax,%eax
10f2f1: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10f2f4: 0f 93 c0 setae %al
10f2f7: 89 c7 mov %eax,%edi
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
_HAssert( false );
return( false );
10f2f9: 31 c0 xor %eax,%eax
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
10f2fb: 85 ff test %edi,%edi
10f2fd: 0f 84 a1 00 00 00 je 10f3a4 <_Heap_Free+0x164> <== 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) ) {
10f303: f6 43 04 01 testb $0x1,0x4(%ebx)
10f307: 0f 84 97 00 00 00 je 10f3a4 <_Heap_Free+0x164> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
10f30d: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
10f311: 74 1a je 10f32d <_Heap_Free+0xed>
uintptr_t const size = block_size + prev_size + next_block_size;
10f313: 8b 45 e8 mov -0x18(%ebp),%eax
10f316: 8d 04 06 lea (%esi,%eax,1),%eax
10f319: 03 45 f0 add -0x10(%ebp),%eax
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
10f31c: 8b 7a 08 mov 0x8(%edx),%edi
Heap_Block *prev = block->prev;
10f31f: 8b 52 0c mov 0xc(%edx),%edx
prev->next = next;
10f322: 89 7a 08 mov %edi,0x8(%edx)
next->prev = prev;
10f325: 89 57 0c mov %edx,0xc(%edi)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
10f328: ff 49 38 decl 0x38(%ecx)
10f32b: eb 33 jmp 10f360 <_Heap_Free+0x120>
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;
10f32d: 8b 45 f0 mov -0x10(%ebp),%eax
10f330: 8d 04 06 lea (%esi,%eax,1),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10f333: 89 c7 mov %eax,%edi
10f335: 83 cf 01 or $0x1,%edi
10f338: 89 7b 04 mov %edi,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10f33b: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
10f33f: 89 02 mov %eax,(%edx)
10f341: eb 56 jmp 10f399 <_Heap_Free+0x159>
}
} else if ( next_is_free ) { /* coalesce next */
10f343: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
10f347: 74 24 je 10f36d <_Heap_Free+0x12d>
uintptr_t const size = block_size + next_block_size;
10f349: 8b 45 e8 mov -0x18(%ebp),%eax
10f34c: 01 f0 add %esi,%eax
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
10f34e: 8b 7a 08 mov 0x8(%edx),%edi
Heap_Block *prev = old_block->prev;
10f351: 8b 52 0c mov 0xc(%edx),%edx
new_block->next = next;
10f354: 89 7b 08 mov %edi,0x8(%ebx)
new_block->prev = prev;
10f357: 89 53 0c mov %edx,0xc(%ebx)
next->prev = new_block;
10f35a: 89 5f 0c mov %ebx,0xc(%edi)
prev->next = new_block;
10f35d: 89 5a 08 mov %ebx,0x8(%edx)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10f360: 89 c2 mov %eax,%edx
10f362: 83 ca 01 or $0x1,%edx
10f365: 89 53 04 mov %edx,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
10f368: 89 04 03 mov %eax,(%ebx,%eax,1)
10f36b: eb 2c jmp 10f399 <_Heap_Free+0x159>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10f36d: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
10f370: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
10f373: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10f376: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10f379: 89 58 0c mov %ebx,0xc(%eax)
} 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;
10f37c: 89 f0 mov %esi,%eax
10f37e: 83 c8 01 or $0x1,%eax
10f381: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10f384: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
10f388: 89 32 mov %esi,(%edx)
/* Statistics */
++stats->free_blocks;
10f38a: 8b 41 38 mov 0x38(%ecx),%eax
10f38d: 40 inc %eax
10f38e: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
10f391: 39 41 3c cmp %eax,0x3c(%ecx)
10f394: 73 03 jae 10f399 <_Heap_Free+0x159>
stats->max_free_blocks = stats->free_blocks;
10f396: 89 41 3c mov %eax,0x3c(%ecx)
}
}
/* Statistics */
--stats->used_blocks;
10f399: ff 49 40 decl 0x40(%ecx)
++stats->frees;
10f39c: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
10f39f: 01 71 30 add %esi,0x30(%ecx)
return( true );
10f3a2: b0 01 mov $0x1,%al
}
10f3a4: 83 c4 14 add $0x14,%esp
10f3a7: 5b pop %ebx
10f3a8: 5e pop %esi
10f3a9: 5f pop %edi
10f3aa: c9 leave
10f3ab: c3 ret
0011d090 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11d090: 55 push %ebp
11d091: 89 e5 mov %esp,%ebp
11d093: 57 push %edi
11d094: 56 push %esi
11d095: 53 push %ebx
11d096: 8b 5d 08 mov 0x8(%ebp),%ebx
11d099: 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);
11d09c: 8d 4e f8 lea -0x8(%esi),%ecx
11d09f: 89 f0 mov %esi,%eax
11d0a1: 31 d2 xor %edx,%edx
11d0a3: 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);
11d0a6: 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
11d0a8: 8b 53 20 mov 0x20(%ebx),%edx
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11d0ab: 31 ff xor %edi,%edi
11d0ad: 39 d1 cmp %edx,%ecx
11d0af: 72 0a jb 11d0bb <_Heap_Size_of_alloc_area+0x2b>
11d0b1: 31 c0 xor %eax,%eax
11d0b3: 39 4b 24 cmp %ecx,0x24(%ebx)
11d0b6: 0f 93 c0 setae %al
11d0b9: 89 c7 mov %eax,%edi
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
11d0bb: 31 c0 xor %eax,%eax
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
11d0bd: 85 ff test %edi,%edi
11d0bf: 74 30 je 11d0f1 <_Heap_Size_of_alloc_area+0x61>
- 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;
11d0c1: 8b 41 04 mov 0x4(%ecx),%eax
11d0c4: 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);
11d0c7: 01 c1 add %eax,%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;
11d0c9: 31 ff xor %edi,%edi
11d0cb: 39 d1 cmp %edx,%ecx
11d0cd: 72 0a jb 11d0d9 <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN
11d0cf: 31 c0 xor %eax,%eax
11d0d1: 39 4b 24 cmp %ecx,0x24(%ebx)
11d0d4: 0f 93 c0 setae %al
11d0d7: 89 c7 mov %eax,%edi
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
11d0d9: 31 c0 xor %eax,%eax
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
11d0db: 85 ff test %edi,%edi
11d0dd: 74 12 je 11d0f1 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
11d0df: f6 41 04 01 testb $0x1,0x4(%ecx)
11d0e3: 74 0c je 11d0f1 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
11d0e5: 29 f1 sub %esi,%ecx
11d0e7: 8d 51 04 lea 0x4(%ecx),%edx
11d0ea: 8b 45 10 mov 0x10(%ebp),%eax
11d0ed: 89 10 mov %edx,(%eax)
return true;
11d0ef: b0 01 mov $0x1,%al
}
11d0f1: 5b pop %ebx
11d0f2: 5e pop %esi
11d0f3: 5f pop %edi
11d0f4: c9 leave
11d0f5: c3 ret
0010b12a <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10b12a: 55 push %ebp
10b12b: 89 e5 mov %esp,%ebp
10b12d: 57 push %edi
10b12e: 56 push %esi
10b12f: 53 push %ebx
10b130: 83 ec 4c sub $0x4c,%esp
10b133: 8b 75 08 mov 0x8(%ebp),%esi
10b136: 8b 5d 0c mov 0xc(%ebp),%ebx
uintptr_t const page_size = heap->page_size;
10b139: 8b 46 10 mov 0x10(%esi),%eax
10b13c: 89 45 d8 mov %eax,-0x28(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10b13f: 8b 4e 14 mov 0x14(%esi),%ecx
10b142: 89 4d d4 mov %ecx,-0x2c(%ebp)
Heap_Block *const first_block = heap->first_block;
10b145: 8b 46 20 mov 0x20(%esi),%eax
10b148: 89 45 d0 mov %eax,-0x30(%ebp)
Heap_Block *const last_block = heap->last_block;
10b14b: 8b 4e 24 mov 0x24(%esi),%ecx
10b14e: 89 4d c8 mov %ecx,-0x38(%ebp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10b151: c7 45 e4 ec b0 10 00 movl $0x10b0ec,-0x1c(%ebp)
10b158: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10b15c: 74 07 je 10b165 <_Heap_Walk+0x3b>
10b15e: c7 45 e4 f1 b0 10 00 movl $0x10b0f1,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
10b165: b0 01 mov $0x1,%al
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;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10b167: 83 3d 04 76 12 00 03 cmpl $0x3,0x127604
10b16e: 0f 85 e8 02 00 00 jne 10b45c <_Heap_Walk+0x332>
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)(
10b174: 52 push %edx
10b175: ff 76 0c pushl 0xc(%esi)
10b178: ff 76 08 pushl 0x8(%esi)
10b17b: ff 75 c8 pushl -0x38(%ebp)
10b17e: ff 75 d0 pushl -0x30(%ebp)
10b181: ff 76 1c pushl 0x1c(%esi)
10b184: ff 76 18 pushl 0x18(%esi)
10b187: ff 75 d4 pushl -0x2c(%ebp)
10b18a: ff 75 d8 pushl -0x28(%ebp)
10b18d: 68 b1 fa 11 00 push $0x11fab1
10b192: 6a 00 push $0x0
10b194: 53 push %ebx
10b195: ff 55 e4 call *-0x1c(%ebp)
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10b198: 83 c4 30 add $0x30,%esp
10b19b: 83 7d d8 00 cmpl $0x0,-0x28(%ebp)
10b19f: 75 0b jne 10b1ac <_Heap_Walk+0x82>
(*printer)( source, true, "page size is zero\n" );
10b1a1: 50 push %eax
10b1a2: 68 42 fb 11 00 push $0x11fb42
10b1a7: e9 6b 02 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10b1ac: f6 45 d8 03 testb $0x3,-0x28(%ebp)
10b1b0: 74 0d je 10b1bf <_Heap_Walk+0x95>
(*printer)(
10b1b2: ff 75 d8 pushl -0x28(%ebp)
10b1b5: 68 55 fb 11 00 push $0x11fb55
10b1ba: e9 58 02 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b1bf: 8b 45 d4 mov -0x2c(%ebp),%eax
10b1c2: 31 d2 xor %edx,%edx
10b1c4: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10b1c7: 85 d2 test %edx,%edx
10b1c9: 74 0d je 10b1d8 <_Heap_Walk+0xae>
(*printer)(
10b1cb: ff 75 d4 pushl -0x2c(%ebp)
10b1ce: 68 73 fb 11 00 push $0x11fb73
10b1d3: e9 3f 02 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10b1d8: 8b 45 d0 mov -0x30(%ebp),%eax
10b1db: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b1de: 31 d2 xor %edx,%edx
10b1e0: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if (
10b1e3: 85 d2 test %edx,%edx
10b1e5: 74 0d je 10b1f4 <_Heap_Walk+0xca>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10b1e7: ff 75 d0 pushl -0x30(%ebp)
10b1ea: 68 97 fb 11 00 push $0x11fb97
10b1ef: e9 23 02 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10b1f4: 8b 45 d0 mov -0x30(%ebp),%eax
10b1f7: f6 40 04 01 testb $0x1,0x4(%eax)
10b1fb: 75 0b jne 10b208 <_Heap_Walk+0xde>
(*printer)(
10b1fd: 57 push %edi
10b1fe: 68 c8 fb 11 00 push $0x11fbc8
10b203: e9 0f 02 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
- 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;
10b208: 8b 4d c8 mov -0x38(%ebp),%ecx
10b20b: 8b 79 04 mov 0x4(%ecx),%edi
10b20e: 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);
10b211: 01 cf add %ecx,%edi
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10b213: f6 47 04 01 testb $0x1,0x4(%edi)
10b217: 75 0b jne 10b224 <_Heap_Walk+0xfa>
(*printer)(
10b219: 56 push %esi
10b21a: 68 f6 fb 11 00 push $0x11fbf6
10b21f: e9 f3 01 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
);
return false;
}
if (
10b224: 3b 7d d0 cmp -0x30(%ebp),%edi
10b227: 74 0b je 10b234 <_Heap_Walk+0x10a>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10b229: 51 push %ecx
10b22a: 68 0b fc 11 00 push $0x11fc0b
10b22f: e9 e3 01 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10b234: 8b 46 10 mov 0x10(%esi),%eax
10b237: 89 45 e0 mov %eax,-0x20(%ebp)
block = next_block;
} while ( block != first_block );
return true;
}
10b23a: 8b 4e 08 mov 0x8(%esi),%ecx
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
10b23d: 89 75 dc mov %esi,-0x24(%ebp)
10b240: eb 75 jmp 10b2b7 <_Heap_Walk+0x18d>
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;
10b242: 31 c0 xor %eax,%eax
10b244: 39 4e 20 cmp %ecx,0x20(%esi)
10b247: 77 08 ja 10b251 <_Heap_Walk+0x127>
10b249: 31 c0 xor %eax,%eax
10b24b: 39 4e 24 cmp %ecx,0x24(%esi)
10b24e: 0f 93 c0 setae %al
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 ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
10b251: 85 c0 test %eax,%eax
10b253: 75 0b jne 10b260 <_Heap_Walk+0x136>
(*printer)(
10b255: 51 push %ecx
10b256: 68 3a fc 11 00 push $0x11fc3a
10b25b: e9 b7 01 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10b260: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b263: 31 d2 xor %edx,%edx
10b265: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if (
10b268: 85 d2 test %edx,%edx
10b26a: 74 0b je 10b277 <_Heap_Walk+0x14d>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10b26c: 51 push %ecx
10b26d: 68 5a fc 11 00 push $0x11fc5a
10b272: e9 a0 01 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
- 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;
10b277: 8b 41 04 mov 0x4(%ecx),%eax
10b27a: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10b27d: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10b282: 74 0b je 10b28f <_Heap_Walk+0x165>
(*printer)(
10b284: 51 push %ecx
10b285: 68 8a fc 11 00 push $0x11fc8a
10b28a: e9 88 01 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
);
return false;
}
if ( free_block->prev != prev_block ) {
10b28f: 8b 41 0c mov 0xc(%ecx),%eax
10b292: 3b 45 dc cmp -0x24(%ebp),%eax
10b295: 74 1a je 10b2b1 <_Heap_Walk+0x187>
(*printer)(
10b297: 83 ec 0c sub $0xc,%esp
10b29a: 50 push %eax
10b29b: 51 push %ecx
10b29c: 68 a6 fc 11 00 push $0x11fca6
10b2a1: 6a 01 push $0x1
10b2a3: 53 push %ebx
10b2a4: ff 55 e4 call *-0x1c(%ebp)
10b2a7: 83 c4 20 add $0x20,%esp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
10b2aa: 31 c0 xor %eax,%eax
10b2ac: e9 ab 01 00 00 jmp 10b45c <_Heap_Walk+0x332>
return false;
}
prev_block = free_block;
free_block = free_block->next;
10b2b1: 89 4d dc mov %ecx,-0x24(%ebp)
10b2b4: 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 ) {
10b2b7: 39 f1 cmp %esi,%ecx
10b2b9: 75 87 jne 10b242 <_Heap_Walk+0x118>
10b2bb: 89 5d dc mov %ebx,-0x24(%ebp)
10b2be: eb 02 jmp 10b2c2 <_Heap_Walk+0x198>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10b2c0: 89 df mov %ebx,%edi
return true;
}
10b2c2: 8b 4f 04 mov 0x4(%edi),%ecx
10b2c5: 89 4d cc mov %ecx,-0x34(%ebp)
10b2c8: 83 e1 fe and $0xfffffffe,%ecx
10b2cb: 89 4d e0 mov %ecx,-0x20(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10b2ce: 8d 1c 0f lea (%edi,%ecx,1),%ebx
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;
10b2d1: 31 c0 xor %eax,%eax
10b2d3: 39 5e 20 cmp %ebx,0x20(%esi)
10b2d6: 77 08 ja 10b2e0 <_Heap_Walk+0x1b6> <== NEVER TAKEN
10b2d8: 31 c0 xor %eax,%eax
10b2da: 39 5e 24 cmp %ebx,0x24(%esi)
10b2dd: 0f 93 c0 setae %al
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;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10b2e0: 85 c0 test %eax,%eax
10b2e2: 75 11 jne 10b2f5 <_Heap_Walk+0x1cb>
10b2e4: 89 d9 mov %ebx,%ecx
10b2e6: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b2e9: 83 ec 0c sub $0xc,%esp
10b2ec: 51 push %ecx
10b2ed: 57 push %edi
10b2ee: 68 d8 fc 11 00 push $0x11fcd8
10b2f3: eb ac jmp 10b2a1 <_Heap_Walk+0x177>
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;
10b2f5: 3b 7d c8 cmp -0x38(%ebp),%edi
10b2f8: 0f 95 c1 setne %cl
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b2fb: 8b 45 e0 mov -0x20(%ebp),%eax
10b2fe: 31 d2 xor %edx,%edx
10b300: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10b303: 85 d2 test %edx,%edx
10b305: 74 15 je 10b31c <_Heap_Walk+0x1f2>
10b307: 84 c9 test %cl,%cl
10b309: 74 11 je 10b31c <_Heap_Walk+0x1f2>
10b30b: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b30e: 83 ec 0c sub $0xc,%esp
10b311: ff 75 e0 pushl -0x20(%ebp)
10b314: 57 push %edi
10b315: 68 05 fd 11 00 push $0x11fd05
10b31a: eb 85 jmp 10b2a1 <_Heap_Walk+0x177>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10b31c: 8b 45 d4 mov -0x2c(%ebp),%eax
10b31f: 39 45 e0 cmp %eax,-0x20(%ebp)
10b322: 73 18 jae 10b33c <_Heap_Walk+0x212>
10b324: 84 c9 test %cl,%cl
10b326: 74 14 je 10b33c <_Heap_Walk+0x212> <== NEVER TAKEN
10b328: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b32b: 52 push %edx
10b32c: 52 push %edx
10b32d: 50 push %eax
10b32e: ff 75 e0 pushl -0x20(%ebp)
10b331: 57 push %edi
10b332: 68 33 fd 11 00 push $0x11fd33
10b337: e9 65 ff ff ff jmp 10b2a1 <_Heap_Walk+0x177>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10b33c: 39 fb cmp %edi,%ebx
10b33e: 77 18 ja 10b358 <_Heap_Walk+0x22e>
10b340: 84 c9 test %cl,%cl
10b342: 74 14 je 10b358 <_Heap_Walk+0x22e>
10b344: 89 d9 mov %ebx,%ecx
10b346: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b349: 83 ec 0c sub $0xc,%esp
10b34c: 51 push %ecx
10b34d: 57 push %edi
10b34e: 68 5e fd 11 00 push $0x11fd5e
10b353: e9 49 ff ff ff jmp 10b2a1 <_Heap_Walk+0x177>
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;
10b358: 8b 4d cc mov -0x34(%ebp),%ecx
10b35b: 83 e1 01 and $0x1,%ecx
10b35e: 89 4d c4 mov %ecx,-0x3c(%ebp)
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10b361: f6 43 04 01 testb $0x1,0x4(%ebx)
10b365: 0f 85 ba 00 00 00 jne 10b425 <_Heap_Walk+0x2fb>
block = next_block;
} while ( block != first_block );
return true;
}
10b36b: 8b 46 08 mov 0x8(%esi),%eax
10b36e: 89 45 c0 mov %eax,-0x40(%ebp)
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10b371: 8b 4f 08 mov 0x8(%edi),%ecx
10b374: 89 4d b4 mov %ecx,-0x4c(%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)(
10b377: ba 7e fa 11 00 mov $0x11fa7e,%edx
10b37c: 3b 4e 0c cmp 0xc(%esi),%ecx
10b37f: 74 0e je 10b38f <_Heap_Walk+0x265>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10b381: ba c5 f9 11 00 mov $0x11f9c5,%edx
10b386: 39 f1 cmp %esi,%ecx
10b388: 75 05 jne 10b38f <_Heap_Walk+0x265>
10b38a: ba 8d fa 11 00 mov $0x11fa8d,%edx
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 ?
10b38f: 8b 47 0c mov 0xc(%edi),%eax
10b392: 89 45 cc mov %eax,-0x34(%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)(
10b395: b8 97 fa 11 00 mov $0x11fa97,%eax
10b39a: 8b 4d c0 mov -0x40(%ebp),%ecx
10b39d: 39 4d cc cmp %ecx,-0x34(%ebp)
10b3a0: 74 0f je 10b3b1 <_Heap_Walk+0x287>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10b3a2: b8 c5 f9 11 00 mov $0x11f9c5,%eax
10b3a7: 39 75 cc cmp %esi,-0x34(%ebp)
10b3aa: 75 05 jne 10b3b1 <_Heap_Walk+0x287>
10b3ac: b8 a7 fa 11 00 mov $0x11faa7,%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)(
10b3b1: 83 ec 0c sub $0xc,%esp
10b3b4: 52 push %edx
10b3b5: ff 75 b4 pushl -0x4c(%ebp)
10b3b8: 50 push %eax
10b3b9: ff 75 cc pushl -0x34(%ebp)
10b3bc: ff 75 e0 pushl -0x20(%ebp)
10b3bf: 57 push %edi
10b3c0: 68 92 fd 11 00 push $0x11fd92
10b3c5: 6a 00 push $0x0
10b3c7: ff 75 dc pushl -0x24(%ebp)
10b3ca: ff 55 e4 call *-0x1c(%ebp)
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10b3cd: 8b 03 mov (%ebx),%eax
10b3cf: 83 c4 30 add $0x30,%esp
10b3d2: 39 45 e0 cmp %eax,-0x20(%ebp)
10b3d5: 74 16 je 10b3ed <_Heap_Walk+0x2c3>
10b3d7: 89 d9 mov %ebx,%ecx
10b3d9: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b3dc: 56 push %esi
10b3dd: 51 push %ecx
10b3de: 50 push %eax
10b3df: ff 75 e0 pushl -0x20(%ebp)
10b3e2: 57 push %edi
10b3e3: 68 c7 fd 11 00 push $0x11fdc7
10b3e8: e9 b4 fe ff ff jmp 10b2a1 <_Heap_Walk+0x177>
);
return false;
}
if ( !prev_used ) {
10b3ed: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10b3f1: 75 0b jne 10b3fe <_Heap_Walk+0x2d4>
10b3f3: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b3f6: 57 push %edi
10b3f7: 68 00 fe 11 00 push $0x11fe00
10b3fc: eb 19 jmp 10b417 <_Heap_Walk+0x2ed>
block = next_block;
} while ( block != first_block );
return true;
}
10b3fe: 8b 46 08 mov 0x8(%esi),%eax
10b401: eb 07 jmp 10b40a <_Heap_Walk+0x2e0>
{
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 ) {
if ( free_block == block ) {
10b403: 39 f8 cmp %edi,%eax
10b405: 74 4a je 10b451 <_Heap_Walk+0x327>
return true;
}
free_block = free_block->next;
10b407: 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 ) {
10b40a: 39 f0 cmp %esi,%eax
10b40c: 75 f5 jne 10b403 <_Heap_Walk+0x2d9>
10b40e: 8b 5d dc mov -0x24(%ebp),%ebx
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10b411: 57 push %edi
10b412: 68 6b fe 11 00 push $0x11fe6b
10b417: 6a 01 push $0x1
10b419: 53 push %ebx
10b41a: ff 55 e4 call *-0x1c(%ebp)
10b41d: 83 c4 10 add $0x10,%esp
10b420: e9 85 fe ff ff jmp 10b2aa <_Heap_Walk+0x180>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10b425: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10b429: 74 0e je 10b439 <_Heap_Walk+0x30f>
(*printer)(
10b42b: 83 ec 0c sub $0xc,%esp
10b42e: ff 75 e0 pushl -0x20(%ebp)
10b431: 57 push %edi
10b432: 68 2f fe 11 00 push $0x11fe2f
10b437: eb 0d jmp 10b446 <_Heap_Walk+0x31c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10b439: 51 push %ecx
10b43a: 51 push %ecx
10b43b: ff 37 pushl (%edi)
10b43d: ff 75 e0 pushl -0x20(%ebp)
10b440: 57 push %edi
10b441: 68 46 fe 11 00 push $0x11fe46
10b446: 6a 00 push $0x0
10b448: ff 75 dc pushl -0x24(%ebp)
10b44b: ff 55 e4 call *-0x1c(%ebp)
10b44e: 83 c4 20 add $0x20,%esp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10b451: 3b 5d d0 cmp -0x30(%ebp),%ebx
10b454: 0f 85 66 fe ff ff jne 10b2c0 <_Heap_Walk+0x196>
return true;
10b45a: b0 01 mov $0x1,%al
}
10b45c: 8d 65 f4 lea -0xc(%ebp),%esp
10b45f: 5b pop %ebx
10b460: 5e pop %esi
10b461: 5f pop %edi
10b462: c9 leave
10b463: c3 ret
0010a710 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10a710: 55 push %ebp
10a711: 89 e5 mov %esp,%ebp
10a713: 53 push %ebx
10a714: 83 ec 08 sub $0x8,%esp
10a717: 8b 45 08 mov 0x8(%ebp),%eax
10a71a: 8b 55 0c mov 0xc(%ebp),%edx
10a71d: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10a720: a3 78 43 12 00 mov %eax,0x124378
_Internal_errors_What_happened.is_internal = is_internal;
10a725: 88 15 7c 43 12 00 mov %dl,0x12437c
_Internal_errors_What_happened.the_error = the_error;
10a72b: 89 1d 80 43 12 00 mov %ebx,0x124380
_User_extensions_Fatal( the_source, is_internal, the_error );
10a731: 53 push %ebx
10a732: 0f b6 d2 movzbl %dl,%edx
10a735: 52 push %edx
10a736: 50 push %eax
10a737: e8 37 1a 00 00 call 10c173 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10a73c: c7 05 3c 44 12 00 05 movl $0x5,0x12443c <== NOT EXECUTED
10a743: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10a746: fa cli <== NOT EXECUTED
10a747: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10a749: f4 hlt <== NOT EXECUTED
10a74a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a74d: eb fe jmp 10a74d <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010a7a0 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10a7a0: 55 push %ebp
10a7a1: 89 e5 mov %esp,%ebp
10a7a3: 56 push %esi
10a7a4: 53 push %ebx
10a7a5: 8b 5d 08 mov 0x8(%ebp),%ebx
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
return NULL;
10a7a8: 31 c9 xor %ecx,%ecx
* 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 )
10a7aa: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10a7ae: 74 53 je 10a803 <_Objects_Allocate+0x63><== NEVER TAKEN
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10a7b0: 8d 73 20 lea 0x20(%ebx),%esi
10a7b3: 83 ec 0c sub $0xc,%esp
10a7b6: 56 push %esi
10a7b7: e8 30 f8 ff ff call 109fec <_Chain_Get>
10a7bc: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10a7be: 83 c4 10 add $0x10,%esp
10a7c1: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10a7c5: 74 3c je 10a803 <_Objects_Allocate+0x63>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10a7c7: 85 c0 test %eax,%eax
10a7c9: 75 1a jne 10a7e5 <_Objects_Allocate+0x45>
_Objects_Extend_information( information );
10a7cb: 83 ec 0c sub $0xc,%esp
10a7ce: 53 push %ebx
10a7cf: e8 60 00 00 00 call 10a834 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10a7d4: 89 34 24 mov %esi,(%esp)
10a7d7: e8 10 f8 ff ff call 109fec <_Chain_Get>
10a7dc: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10a7de: 83 c4 10 add $0x10,%esp
10a7e1: 85 c0 test %eax,%eax
10a7e3: 74 1e je 10a803 <_Objects_Allocate+0x63>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10a7e5: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10a7e9: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10a7ed: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10a7ef: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10a7f3: 31 d2 xor %edx,%edx
10a7f5: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10a7f7: c1 e0 02 shl $0x2,%eax
10a7fa: 03 43 30 add 0x30(%ebx),%eax
10a7fd: ff 08 decl (%eax)
information->inactive--;
10a7ff: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10a803: 89 c8 mov %ecx,%eax
10a805: 8d 65 f8 lea -0x8(%ebp),%esp
10a808: 5b pop %ebx
10a809: 5e pop %esi
10a80a: c9 leave
10a80b: c3 ret
0010ab24 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10ab24: 55 push %ebp
10ab25: 89 e5 mov %esp,%ebp
10ab27: 57 push %edi
10ab28: 56 push %esi
10ab29: 53 push %ebx
10ab2a: 83 ec 0c sub $0xc,%esp
10ab2d: 8b 75 08 mov 0x8(%ebp),%esi
10ab30: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
10ab33: 31 db xor %ebx,%ebx
)
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10ab35: 66 85 ff test %di,%di
10ab38: 74 37 je 10ab71 <_Objects_Get_information+0x4d>
/*
* 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 );
10ab3a: 83 ec 0c sub $0xc,%esp
10ab3d: 56 push %esi
10ab3e: e8 69 48 00 00 call 10f3ac <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10ab43: 83 c4 10 add $0x10,%esp
10ab46: 85 c0 test %eax,%eax
10ab48: 74 27 je 10ab71 <_Objects_Get_information+0x4d>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10ab4a: 0f b7 ff movzwl %di,%edi
10ab4d: 39 c7 cmp %eax,%edi
10ab4f: 77 20 ja 10ab71 <_Objects_Get_information+0x4d>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10ab51: 8b 04 b5 bc 42 12 00 mov 0x1242bc(,%esi,4),%eax
10ab58: 85 c0 test %eax,%eax
10ab5a: 74 15 je 10ab71 <_Objects_Get_information+0x4d><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10ab5c: 8b 1c b8 mov (%eax,%edi,4),%ebx
if ( !info )
10ab5f: 85 db test %ebx,%ebx
10ab61: 74 0e je 10ab71 <_Objects_Get_information+0x4d><== 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;
10ab63: 31 c0 xor %eax,%eax
10ab65: 66 83 7b 10 00 cmpw $0x0,0x10(%ebx)
10ab6a: 0f 95 c0 setne %al
10ab6d: f7 d8 neg %eax
10ab6f: 21 c3 and %eax,%ebx
#endif
return info;
}
10ab71: 89 d8 mov %ebx,%eax
10ab73: 8d 65 f4 lea -0xc(%ebp),%esp
10ab76: 5b pop %ebx
10ab77: 5e pop %esi
10ab78: 5f pop %edi
10ab79: c9 leave
10ab7a: c3 ret
001181d0 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
1181d0: 55 push %ebp
1181d1: 89 e5 mov %esp,%ebp
1181d3: 53 push %ebx
1181d4: 8b 55 08 mov 0x8(%ebp),%edx
1181d7: 8b 4d 10 mov 0x10(%ebp),%ecx
/*
* 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;
1181da: b8 01 00 00 00 mov $0x1,%eax
1181df: 2b 42 08 sub 0x8(%edx),%eax
1181e2: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
1181e5: 0f b7 5a 10 movzwl 0x10(%edx),%ebx
1181e9: 39 c3 cmp %eax,%ebx
1181eb: 72 12 jb 1181ff <_Objects_Get_no_protection+0x2f>
if ( (the_object = information->local_table[ index ]) != NULL ) {
1181ed: 8b 52 1c mov 0x1c(%edx),%edx
1181f0: 8b 04 82 mov (%edx,%eax,4),%eax
1181f3: 85 c0 test %eax,%eax
1181f5: 74 08 je 1181ff <_Objects_Get_no_protection+0x2f><== NEVER TAKEN
*location = OBJECTS_LOCAL;
1181f7: c7 01 00 00 00 00 movl $0x0,(%ecx)
return the_object;
1181fd: eb 08 jmp 118207 <_Objects_Get_no_protection+0x37>
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
1181ff: c7 01 01 00 00 00 movl $0x1,(%ecx)
return NULL;
118205: 31 c0 xor %eax,%eax
}
118207: 5b pop %ebx
118208: c9 leave
118209: c3 ret
0010bd40 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10bd40: 55 push %ebp
10bd41: 89 e5 mov %esp,%ebp
10bd43: 53 push %ebx
10bd44: 83 ec 14 sub $0x14,%esp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10bd47: 8b 45 08 mov 0x8(%ebp),%eax
10bd4a: 85 c0 test %eax,%eax
10bd4c: 75 08 jne 10bd56 <_Objects_Id_to_name+0x16>
10bd4e: a1 54 78 12 00 mov 0x127854,%eax
10bd53: 8b 40 08 mov 0x8(%eax),%eax
10bd56: 89 c2 mov %eax,%edx
10bd58: c1 ea 18 shr $0x18,%edx
10bd5b: 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 )
10bd5e: 8d 4a ff lea -0x1(%edx),%ecx
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
10bd61: bb 03 00 00 00 mov $0x3,%ebx
10bd66: 83 f9 02 cmp $0x2,%ecx
10bd69: 77 36 ja 10bda1 <_Objects_Id_to_name+0x61>
10bd6b: eb 3b jmp 10bda8 <_Objects_Id_to_name+0x68>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10bd6d: 89 c1 mov %eax,%ecx
10bd6f: c1 e9 1b shr $0x1b,%ecx
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10bd72: 8b 14 8a mov (%edx,%ecx,4),%edx
if ( !information )
10bd75: 85 d2 test %edx,%edx
10bd77: 74 28 je 10bda1 <_Objects_Id_to_name+0x61><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
10bd79: 80 7a 38 00 cmpb $0x0,0x38(%edx)
10bd7d: 75 22 jne 10bda1 <_Objects_Id_to_name+0x61><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
10bd7f: 51 push %ecx
10bd80: 8d 4d f4 lea -0xc(%ebp),%ecx
10bd83: 51 push %ecx
10bd84: 50 push %eax
10bd85: 52 push %edx
10bd86: e8 5d ff ff ff call 10bce8 <_Objects_Get>
if ( !the_object )
10bd8b: 83 c4 10 add $0x10,%esp
10bd8e: 85 c0 test %eax,%eax
10bd90: 74 0f je 10bda1 <_Objects_Id_to_name+0x61>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10bd92: 8b 50 0c mov 0xc(%eax),%edx
10bd95: 8b 45 0c mov 0xc(%ebp),%eax
10bd98: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10bd9a: e8 73 0a 00 00 call 10c812 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10bd9f: 31 db xor %ebx,%ebx
}
10bda1: 89 d8 mov %ebx,%eax
10bda3: 8b 5d fc mov -0x4(%ebp),%ebx
10bda6: c9 leave
10bda7: c3 ret
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10bda8: 8b 14 95 08 73 12 00 mov 0x127308(,%edx,4),%edx
10bdaf: 85 d2 test %edx,%edx
10bdb1: 75 ba jne 10bd6d <_Objects_Id_to_name+0x2d>
10bdb3: eb ec jmp 10bda1 <_Objects_Id_to_name+0x61>
0010d930 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10d930: 55 push %ebp
10d931: 89 e5 mov %esp,%ebp
10d933: 57 push %edi
10d934: 56 push %esi
10d935: 53 push %ebx
10d936: 83 ec 30 sub $0x30,%esp
10d939: 8b 75 08 mov 0x8(%ebp),%esi
10d93c: 8b 5d 14 mov 0x14(%ebp),%ebx
10d93f: 8a 55 18 mov 0x18(%ebp),%dl
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 );
10d942: 8d 45 e4 lea -0x1c(%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(
10d945: 50 push %eax
10d946: 56 push %esi
10d947: 68 d0 cc 12 00 push $0x12ccd0
10d94c: 88 55 d4 mov %dl,-0x2c(%ebp)
10d94f: e8 4c 2a 00 00 call 1103a0 <_Objects_Get>
switch ( location ) {
10d954: 83 c4 10 add $0x10,%esp
10d957: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10d95b: 8a 55 d4 mov -0x2c(%ebp),%dl
10d95e: 0f 85 aa 00 00 00 jne 10da0e <_POSIX_Message_queue_Receive_support+0xde>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
10d964: 8b 78 14 mov 0x14(%eax),%edi
10d967: 89 f9 mov %edi,%ecx
10d969: 83 e1 03 and $0x3,%ecx
10d96c: 49 dec %ecx
10d96d: 75 0a jne 10d979 <_POSIX_Message_queue_Receive_support+0x49>
_Thread_Enable_dispatch();
10d96f: e8 e6 34 00 00 call 110e5a <_Thread_Enable_dispatch>
10d974: e9 95 00 00 00 jmp 10da0e <_POSIX_Message_queue_Receive_support+0xde>
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10d979: 8b 40 10 mov 0x10(%eax),%eax
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
10d97c: 8b 48 68 mov 0x68(%eax),%ecx
10d97f: 39 4d 10 cmp %ecx,0x10(%ebp)
10d982: 73 15 jae 10d999 <_POSIX_Message_queue_Receive_support+0x69>
_Thread_Enable_dispatch();
10d984: e8 d1 34 00 00 call 110e5a <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
10d989: e8 b6 8d 00 00 call 116744 <__errno>
10d98e: c7 00 7a 00 00 00 movl $0x7a,(%eax)
10d994: e9 80 00 00 00 jmp 10da19 <_POSIX_Message_queue_Receive_support+0xe9>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
10d999: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10d9a0: 31 c9 xor %ecx,%ecx
10d9a2: 84 d2 test %dl,%dl
10d9a4: 74 09 je 10d9af <_POSIX_Message_queue_Receive_support+0x7f><== NEVER TAKEN
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
10d9a6: 81 e7 00 40 00 00 and $0x4000,%edi
10d9ac: 0f 94 c1 sete %cl
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
10d9af: 52 push %edx
10d9b0: 52 push %edx
10d9b1: ff 75 1c pushl 0x1c(%ebp)
10d9b4: 0f b6 c9 movzbl %cl,%ecx
10d9b7: 51 push %ecx
10d9b8: 8d 55 e0 lea -0x20(%ebp),%edx
10d9bb: 52 push %edx
10d9bc: ff 75 0c pushl 0xc(%ebp)
10d9bf: 56 push %esi
10d9c0: 83 c0 1c add $0x1c,%eax
10d9c3: 50 push %eax
10d9c4: e8 db 1b 00 00 call 10f5a4 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
10d9c9: 83 c4 20 add $0x20,%esp
10d9cc: e8 89 34 00 00 call 110e5a <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
10d9d1: a1 48 cd 12 00 mov 0x12cd48,%eax
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);
10d9d6: 8b 50 24 mov 0x24(%eax),%edx
10d9d9: c1 fa 1f sar $0x1f,%edx
10d9dc: 8b 48 24 mov 0x24(%eax),%ecx
10d9df: 31 d1 xor %edx,%ecx
10d9e1: 89 0b mov %ecx,(%ebx)
10d9e3: 29 13 sub %edx,(%ebx)
if ( !_Thread_Executing->Wait.return_code )
10d9e5: 83 78 34 00 cmpl $0x0,0x34(%eax)
10d9e9: 75 05 jne 10d9f0 <_POSIX_Message_queue_Receive_support+0xc0>
return length_out;
10d9eb: 8b 45 e0 mov -0x20(%ebp),%eax
10d9ee: eb 2c jmp 10da1c <_POSIX_Message_queue_Receive_support+0xec>
rtems_set_errno_and_return_minus_one(
10d9f0: e8 4f 8d 00 00 call 116744 <__errno>
10d9f5: 89 c3 mov %eax,%ebx
10d9f7: 83 ec 0c sub $0xc,%esp
10d9fa: a1 48 cd 12 00 mov 0x12cd48,%eax
10d9ff: ff 70 34 pushl 0x34(%eax)
10da02: e8 ed 01 00 00 call 10dbf4 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10da07: 89 03 mov %eax,(%ebx)
10da09: 83 c4 10 add $0x10,%esp
10da0c: eb 0b jmp 10da19 <_POSIX_Message_queue_Receive_support+0xe9>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10da0e: e8 31 8d 00 00 call 116744 <__errno>
10da13: c7 00 09 00 00 00 movl $0x9,(%eax)
10da19: 83 c8 ff or $0xffffffff,%eax
}
10da1c: 8d 65 f4 lea -0xc(%ebp),%esp
10da1f: 5b pop %ebx
10da20: 5e pop %esi
10da21: 5f pop %edi
10da22: c9 leave
10da23: c3 ret
0010dfcc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
10dfcc: 55 push %ebp
10dfcd: 89 e5 mov %esp,%ebp
10dfcf: 83 ec 08 sub $0x8,%esp
10dfd2: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
10dfd5: 8b 82 ec 00 00 00 mov 0xec(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10dfdb: 83 b8 d8 00 00 00 00 cmpl $0x0,0xd8(%eax)
10dfe2: 75 2c jne 10e010 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44><== NEVER TAKEN
10dfe4: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax)
10dfeb: 75 23 jne 10e010 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
10dfed: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax)
10dff4: 74 1a je 10e010 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10dff6: a1 d4 52 12 00 mov 0x1252d4,%eax
10dffb: 48 dec %eax
10dffc: a3 d4 52 12 00 mov %eax,0x1252d4
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
10e001: 50 push %eax
10e002: 50 push %eax
10e003: 6a ff push $0xffffffff
10e005: 52 push %edx
10e006: e8 51 08 00 00 call 10e85c <_POSIX_Thread_Exit>
10e00b: 83 c4 10 add $0x10,%esp
} else
_Thread_Enable_dispatch();
}
10e00e: c9 leave
10e00f: c3 ret
10e010: 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();
10e011: e9 a0 d9 ff ff jmp 10b9b6 <_Thread_Enable_dispatch>
0010f254 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
10f254: 55 push %ebp
10f255: 89 e5 mov %esp,%ebp
10f257: 57 push %edi
10f258: 56 push %esi
10f259: 53 push %ebx
10f25a: 83 ec 28 sub $0x28,%esp
10f25d: 8b 55 08 mov 0x8(%ebp),%edx
10f260: 8b 5d 0c mov 0xc(%ebp),%ebx
10f263: 8b 7d 10 mov 0x10(%ebp),%edi
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
10f266: ff 33 pushl (%ebx)
10f268: 89 55 e0 mov %edx,-0x20(%ebp)
10f26b: e8 c4 ff ff ff call 10f234 <_POSIX_Priority_Is_valid>
10f270: 83 c4 10 add $0x10,%esp
return EINVAL;
10f273: be 16 00 00 00 mov $0x16,%esi
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
10f278: 84 c0 test %al,%al
10f27a: 8b 55 e0 mov -0x20(%ebp),%edx
10f27d: 0f 84 a4 00 00 00 je 10f327 <_POSIX_Thread_Translate_sched_param+0xd3><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
10f283: c7 07 00 00 00 00 movl $0x0,(%edi)
*budget_callout = NULL;
10f289: 8b 45 14 mov 0x14(%ebp),%eax
10f28c: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
10f292: 85 d2 test %edx,%edx
10f294: 75 0b jne 10f2a1 <_POSIX_Thread_Translate_sched_param+0x4d>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
10f296: c7 07 01 00 00 00 movl $0x1,(%edi)
10f29c: e9 83 00 00 00 jmp 10f324 <_POSIX_Thread_Translate_sched_param+0xd0>
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
10f2a1: 31 f6 xor %esi,%esi
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
10f2a3: 83 fa 01 cmp $0x1,%edx
10f2a6: 74 7f je 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
10f2a8: 83 fa 02 cmp $0x2,%edx
10f2ab: 75 08 jne 10f2b5 <_POSIX_Thread_Translate_sched_param+0x61>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
10f2ad: c7 07 02 00 00 00 movl $0x2,(%edi)
return 0;
10f2b3: eb 72 jmp 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
10f2b5: be 16 00 00 00 mov $0x16,%esi
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
10f2ba: 83 fa 04 cmp $0x4,%edx
10f2bd: 75 68 jne 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
10f2bf: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10f2c3: 75 06 jne 10f2cb <_POSIX_Thread_Translate_sched_param+0x77>
10f2c5: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
10f2c9: 74 5c je 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
10f2cb: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f2cf: 75 0b jne 10f2dc <_POSIX_Thread_Translate_sched_param+0x88>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
10f2d1: be 16 00 00 00 mov $0x16,%esi
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
10f2d6: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f2da: 74 4b je 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
10f2dc: 83 ec 0c sub $0xc,%esp
10f2df: 8d 43 08 lea 0x8(%ebx),%eax
10f2e2: 50 push %eax
10f2e3: e8 38 dc ff ff call 10cf20 <_Timespec_To_ticks>
10f2e8: 89 45 e4 mov %eax,-0x1c(%ebp)
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
10f2eb: 8d 43 10 lea 0x10(%ebx),%eax
10f2ee: 89 04 24 mov %eax,(%esp)
10f2f1: e8 2a dc ff ff call 10cf20 <_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 ) <
10f2f6: 83 c4 10 add $0x10,%esp
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
10f2f9: be 16 00 00 00 mov $0x16,%esi
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 ) <
10f2fe: 39 45 e4 cmp %eax,-0x1c(%ebp)
10f301: 72 24 jb 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
10f303: 83 ec 0c sub $0xc,%esp
10f306: ff 73 04 pushl 0x4(%ebx)
10f309: e8 26 ff ff ff call 10f234 <_POSIX_Priority_Is_valid>
10f30e: 83 c4 10 add $0x10,%esp
10f311: 84 c0 test %al,%al
10f313: 74 12 je 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
10f315: c7 07 03 00 00 00 movl $0x3,(%edi)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
10f31b: 8b 45 14 mov 0x14(%ebp),%eax
10f31e: c7 00 61 9e 10 00 movl $0x109e61,(%eax)
return 0;
10f324: 66 31 f6 xor %si,%si
}
return EINVAL;
}
10f327: 89 f0 mov %esi,%eax
10f329: 8d 65 f4 lea -0xc(%ebp),%esp
10f32c: 5b pop %ebx
10f32d: 5e pop %esi
10f32e: 5f pop %edi
10f32f: c9 leave
10f330: c3 ret
00109b64 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
109b64: 55 push %ebp
109b65: 89 e5 mov %esp,%ebp
109b67: 57 push %edi
109b68: 56 push %esi
109b69: 53 push %ebx
109b6a: 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;
109b6d: 8b 3d 40 12 12 00 mov 0x121240,%edi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
109b73: 8b 15 3c 12 12 00 mov 0x12123c,%edx
if ( !user_threads || maximum == 0 )
109b79: 85 d2 test %edx,%edx
109b7b: 74 54 je 109bd1 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN
109b7d: 85 ff test %edi,%edi
109b7f: 74 50 je 109bd1 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN
109b81: 31 db xor %ebx,%ebx
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
109b83: 8d 75 a4 lea -0x5c(%ebp),%esi
109b86: 83 ec 0c sub $0xc,%esp
109b89: 56 push %esi
109b8a: 89 55 94 mov %edx,-0x6c(%ebp)
109b8d: e8 a2 57 00 00 call 10f334 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
109b92: 5a pop %edx
109b93: 59 pop %ecx
109b94: 6a 02 push $0x2
109b96: 56 push %esi
109b97: e8 c0 57 00 00 call 10f35c <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
109b9c: 59 pop %ecx
109b9d: 58 pop %eax
109b9e: ff 74 df 04 pushl 0x4(%edi,%ebx,8)
109ba2: 56 push %esi
109ba3: e8 e0 57 00 00 call 10f388 <pthread_attr_setstacksize>
status = pthread_create(
109ba8: 6a 00 push $0x0
109baa: ff 34 df pushl (%edi,%ebx,8)
109bad: 56 push %esi
109bae: 8d 45 e4 lea -0x1c(%ebp),%eax
109bb1: 50 push %eax
109bb2: e8 e5 fc ff ff call 10989c <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
109bb7: 83 c4 20 add $0x20,%esp
109bba: 85 c0 test %eax,%eax
109bbc: 8b 55 94 mov -0x6c(%ebp),%edx
109bbf: 74 0b je 109bcc <_POSIX_Threads_Initialize_user_threads_body+0x68>
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
109bc1: 52 push %edx
109bc2: 50 push %eax
109bc3: 6a 01 push $0x1
109bc5: 6a 02 push $0x2
109bc7: e8 4c 1a 00 00 call 10b618 <_Internal_error_Occurred>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
109bcc: 43 inc %ebx
109bcd: 39 d3 cmp %edx,%ebx
109bcf: 72 b5 jb 109b86 <_POSIX_Threads_Initialize_user_threads_body+0x22><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
109bd1: 8d 65 f4 lea -0xc(%ebp),%esp
109bd4: 5b pop %ebx
109bd5: 5e pop %esi
109bd6: 5f pop %edi
109bd7: c9 leave
109bd8: c3 ret
0010e41f <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
10e41f: 55 push %ebp
10e420: 89 e5 mov %esp,%ebp
10e422: 56 push %esi
10e423: 53 push %ebx
10e424: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e427: 8b b3 ec 00 00 00 mov 0xec(%ebx),%esi
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
10e42d: 83 ec 0c sub $0xc,%esp
10e430: 8d 86 98 00 00 00 lea 0x98(%esi),%eax
10e436: 50 push %eax
10e437: e8 0c 12 00 00 call 10f648 <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
10e43c: 89 43 78 mov %eax,0x78(%ebx)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10e43f: 0f b6 05 24 02 12 00 movzbl 0x120224,%eax
10e446: 2b 86 88 00 00 00 sub 0x88(%esi),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
10e44c: 89 43 18 mov %eax,0x18(%ebx)
*/
#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 ) {
10e44f: 83 c4 10 add $0x10,%esp
10e452: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx)
10e456: 75 12 jne 10e46a <_POSIX_Threads_Sporadic_budget_TSR+0x4b><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
10e458: 39 43 14 cmp %eax,0x14(%ebx)
10e45b: 76 0d jbe 10e46a <_POSIX_Threads_Sporadic_budget_TSR+0x4b>
_Thread_Change_priority( the_thread, new_priority, true );
10e45d: 52 push %edx
10e45e: 6a 01 push $0x1
10e460: 50 push %eax
10e461: 53 push %ebx
10e462: e8 41 ce ff ff call 10b2a8 <_Thread_Change_priority>
10e467: 83 c4 10 add $0x10,%esp
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
10e46a: 83 ec 0c sub $0xc,%esp
10e46d: 8d 86 90 00 00 00 lea 0x90(%esi),%eax
10e473: 50 push %eax
10e474: e8 cf 11 00 00 call 10f648 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10e479: 89 86 b4 00 00 00 mov %eax,0xb4(%esi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10e47f: 83 c4 10 add $0x10,%esp
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
10e482: 81 c6 a8 00 00 00 add $0xa8,%esi
10e488: 89 75 0c mov %esi,0xc(%ebp)
10e48b: c7 45 08 a4 43 12 00 movl $0x1243a4,0x8(%ebp)
}
10e492: 8d 65 f8 lea -0x8(%ebp),%esp
10e495: 5b pop %ebx
10e496: 5e pop %esi
10e497: c9 leave
10e498: e9 f7 dd ff ff jmp 10c294 <_Watchdog_Insert>
0010e49d <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
10e49d: 55 push %ebp
10e49e: 89 e5 mov %esp,%ebp
10e4a0: 83 ec 08 sub $0x8,%esp
10e4a3: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e4a6: 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 */
10e4ac: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax)
10e4b3: 0f b6 15 24 02 12 00 movzbl 0x120224,%edx
10e4ba: 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;
10e4c0: 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 ) {
10e4c3: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10e4c7: 75 12 jne 10e4db <_POSIX_Threads_Sporadic_budget_callout+0x3e><== 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 ) {
10e4c9: 39 50 14 cmp %edx,0x14(%eax)
10e4cc: 73 0d jae 10e4db <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN
_Thread_Change_priority( the_thread, new_priority, true );
10e4ce: 51 push %ecx
10e4cf: 6a 01 push $0x1
10e4d1: 52 push %edx
10e4d2: 50 push %eax
10e4d3: e8 d0 cd ff ff call 10b2a8 <_Thread_Change_priority>
10e4d8: 83 c4 10 add $0x10,%esp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
10e4db: c9 leave
10e4dc: c3 ret
00109924 <_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)
{
109924: 55 push %ebp
109925: 89 e5 mov %esp,%ebp
109927: 53 push %ebx
109928: 83 ec 04 sub $0x4,%esp
10992b: 8b 5d 0c mov 0xc(%ebp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10992e: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
109931: 83 7b 54 00 cmpl $0x0,0x54(%ebx)
109935: 75 06 jne 10993d <_POSIX_Timer_TSR+0x19>
109937: 83 7b 58 00 cmpl $0x0,0x58(%ebx)
10993b: 74 34 je 109971 <_POSIX_Timer_TSR+0x4d> <== NEVER TAKEN
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
10993d: 83 ec 0c sub $0xc,%esp
109940: 53 push %ebx
109941: 68 24 99 10 00 push $0x109924
109946: ff 73 08 pushl 0x8(%ebx)
109949: ff 73 64 pushl 0x64(%ebx)
10994c: 8d 43 10 lea 0x10(%ebx),%eax
10994f: 50 push %eax
109950: e8 b7 56 00 00 call 10f00c <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
109955: 83 c4 20 add $0x20,%esp
109958: 84 c0 test %al,%al
10995a: 74 30 je 10998c <_POSIX_Timer_TSR+0x68> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
10995c: 83 ec 0c sub $0xc,%esp
10995f: 8d 43 6c lea 0x6c(%ebx),%eax
109962: 50 push %eax
109963: e8 c0 12 00 00 call 10ac28 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
109968: c6 43 3c 03 movb $0x3,0x3c(%ebx)
10996c: 83 c4 10 add $0x10,%esp
10996f: eb 04 jmp 109975 <_POSIX_Timer_TSR+0x51>
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
109971: 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 ) ) {
109975: 50 push %eax
109976: 50 push %eax
109977: ff 73 44 pushl 0x44(%ebx)
10997a: ff 73 38 pushl 0x38(%ebx)
10997d: e8 62 52 00 00 call 10ebe4 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
109982: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
109989: 83 c4 10 add $0x10,%esp
}
10998c: 8b 5d fc mov -0x4(%ebp),%ebx
10998f: c9 leave
109990: c3 ret
00110628 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
110628: 55 push %ebp
110629: 89 e5 mov %esp,%ebp
11062b: 57 push %edi
11062c: 56 push %esi
11062d: 53 push %ebx
11062e: 83 ec 68 sub $0x68,%esp
110631: 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,
110634: 6a 01 push $0x1
110636: 0f b6 45 10 movzbl 0x10(%ebp),%eax
11063a: 50 push %eax
11063b: 8d 45 dc lea -0x24(%ebp),%eax
11063e: 50 push %eax
11063f: 53 push %ebx
110640: ff 75 08 pushl 0x8(%ebp)
110643: e8 8c 00 00 00 call 1106d4 <_POSIX_signals_Clear_signals>
110648: 83 c4 20 add $0x20,%esp
is_global, true ) )
return false;
11064b: 31 c9 xor %ecx,%ecx
{
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,
11064d: 84 c0 test %al,%al
11064f: 74 78 je 1106c9 <_POSIX_signals_Check_signal+0xa1>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
110651: 6b d3 0c imul $0xc,%ebx,%edx
110654: 8b 82 44 48 12 00 mov 0x124844(%edx),%eax
11065a: 83 f8 01 cmp $0x1,%eax
11065d: 74 6a je 1106c9 <_POSIX_signals_Check_signal+0xa1><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
11065f: 8b 4d 08 mov 0x8(%ebp),%ecx
110662: 8b 89 d0 00 00 00 mov 0xd0(%ecx),%ecx
110668: 89 4d a4 mov %ecx,-0x5c(%ebp)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
11066b: 0b 8a 40 48 12 00 or 0x124840(%edx),%ecx
110671: 8b 75 08 mov 0x8(%ebp),%esi
110674: 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,
11067a: 8d 7d b4 lea -0x4c(%ebp),%edi
11067d: 8b 35 08 48 12 00 mov 0x124808,%esi
110683: 83 c6 20 add $0x20,%esi
110686: b9 0a 00 00 00 mov $0xa,%ecx
11068b: 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 ) {
11068d: 83 ba 3c 48 12 00 02 cmpl $0x2,0x12483c(%edx)
110694: 75 09 jne 11069f <_POSIX_signals_Check_signal+0x77>
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
110696: 52 push %edx
110697: 6a 00 push $0x0
110699: 8d 55 dc lea -0x24(%ebp),%edx
11069c: 52 push %edx
11069d: eb 03 jmp 1106a2 <_POSIX_signals_Check_signal+0x7a>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
11069f: 83 ec 0c sub $0xc,%esp
1106a2: 53 push %ebx
1106a3: ff d0 call *%eax
break;
1106a5: 83 c4 10 add $0x10,%esp
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
1106a8: 8b 3d 08 48 12 00 mov 0x124808,%edi
1106ae: 83 c7 20 add $0x20,%edi
1106b1: 8d 75 b4 lea -0x4c(%ebp),%esi
1106b4: b9 0a 00 00 00 mov $0xa,%ecx
1106b9: 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;
1106bb: 8b 75 a4 mov -0x5c(%ebp),%esi
1106be: 8b 4d 08 mov 0x8(%ebp),%ecx
1106c1: 89 b1 d0 00 00 00 mov %esi,0xd0(%ecx)
return true;
1106c7: b1 01 mov $0x1,%cl
}
1106c9: 88 c8 mov %cl,%al
1106cb: 8d 65 f4 lea -0xc(%ebp),%esp
1106ce: 5b pop %ebx
1106cf: 5e pop %esi
1106d0: 5f pop %edi
1106d1: c9 leave
1106d2: c3 ret
00110c94 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
110c94: 55 push %ebp
110c95: 89 e5 mov %esp,%ebp
110c97: 53 push %ebx
110c98: 8b 4d 08 mov 0x8(%ebp),%ecx
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
110c9b: 9c pushf
110c9c: fa cli
110c9d: 5a pop %edx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
110c9e: 6b c1 0c imul $0xc,%ecx,%eax
110ca1: 83 b8 3c 48 12 00 02 cmpl $0x2,0x12483c(%eax)
110ca8: 75 0e jne 110cb8 <_POSIX_signals_Clear_process_signals+0x24>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
110caa: 8d 98 38 4a 12 00 lea 0x124a38(%eax),%ebx
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
110cb0: 39 98 34 4a 12 00 cmp %ebx,0x124a34(%eax)
110cb6: 75 0e jne 110cc6 <_POSIX_signals_Clear_process_signals+0x32><== NEVER TAKEN
110cb8: 49 dec %ecx
110cb9: b8 fe ff ff ff mov $0xfffffffe,%eax
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
110cbe: d3 c0 rol %cl,%eax
110cc0: 21 05 30 4a 12 00 and %eax,0x124a30
}
_ISR_Enable( level );
110cc6: 52 push %edx
110cc7: 9d popf
}
110cc8: 5b pop %ebx
110cc9: c9 leave
110cca: c3 ret
0010a1d8 <_POSIX_signals_Get_lowest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
sigset_t set
)
{
10a1d8: 55 push %ebp
10a1d9: 89 e5 mov %esp,%ebp
10a1db: 56 push %esi
10a1dc: 53 push %ebx
10a1dd: 8b 55 08 mov 0x8(%ebp),%edx
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10a1e0: b8 1b 00 00 00 mov $0x1b,%eax
10a1e5: 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(
10a1ea: 8d 48 ff lea -0x1(%eax),%ecx
10a1ed: 89 de mov %ebx,%esi
10a1ef: d3 e6 shl %cl,%esi
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10a1f1: 85 d6 test %edx,%esi
10a1f3: 75 1e jne 10a213 <_POSIX_signals_Get_lowest+0x3b><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10a1f5: 40 inc %eax
10a1f6: 83 f8 20 cmp $0x20,%eax
10a1f9: 75 ef jne 10a1ea <_POSIX_signals_Get_lowest+0x12>
10a1fb: b0 01 mov $0x1,%al
10a1fd: 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(
10a202: 8d 48 ff lea -0x1(%eax),%ecx
10a205: 89 de mov %ebx,%esi
10a207: 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 ) ) {
10a209: 85 d6 test %edx,%esi
10a20b: 75 06 jne 10a213 <_POSIX_signals_Get_lowest+0x3b>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10a20d: 40 inc %eax
10a20e: 83 f8 1b cmp $0x1b,%eax
10a211: 75 ef jne 10a202 <_POSIX_signals_Get_lowest+0x2a><== ALWAYS TAKEN
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10a213: 5b pop %ebx
10a214: 5e pop %esi
10a215: c9 leave
10a216: c3 ret
00121ce0 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
121ce0: 55 push %ebp
121ce1: 89 e5 mov %esp,%ebp
121ce3: 57 push %edi
121ce4: 56 push %esi
121ce5: 53 push %ebx
121ce6: 83 ec 0c sub $0xc,%esp
121ce9: 8b 5d 08 mov 0x8(%ebp),%ebx
121cec: 8b 75 0c mov 0xc(%ebp),%esi
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
121cef: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
121cf5: 8d 4e ff lea -0x1(%esi),%ecx
121cf8: ba 01 00 00 00 mov $0x1,%edx
121cfd: d3 e2 shl %cl,%edx
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
121cff: 8b 4b 10 mov 0x10(%ebx),%ecx
121d02: 89 cf mov %ecx,%edi
121d04: 81 e7 00 80 00 10 and $0x10008000,%edi
121d0a: 81 ff 00 80 00 10 cmp $0x10008000,%edi
121d10: 75 58 jne 121d6a <_POSIX_signals_Unblock_thread+0x8a>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
121d12: 85 53 30 test %edx,0x30(%ebx)
121d15: 75 12 jne 121d29 <_POSIX_signals_Unblock_thread+0x49>
121d17: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
121d1d: f7 d0 not %eax
/*
* This should only be reached via pthread_kill().
*/
return false;
121d1f: 31 ff xor %edi,%edi
* 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) ) {
121d21: 85 c2 test %eax,%edx
121d23: 0f 84 b0 00 00 00 je 121dd9 <_POSIX_signals_Unblock_thread+0xf9>
the_thread->Wait.return_code = EINTR;
121d29: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
121d30: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
121d33: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
121d37: 75 12 jne 121d4b <_POSIX_signals_Unblock_thread+0x6b>
the_info->si_signo = signo;
121d39: 89 30 mov %esi,(%eax)
the_info->si_code = SI_USER;
121d3b: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
121d42: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
121d49: eb 0c jmp 121d57 <_POSIX_signals_Unblock_thread+0x77>
} else {
*the_info = *info;
121d4b: b9 03 00 00 00 mov $0x3,%ecx
121d50: 89 c7 mov %eax,%edi
121d52: 8b 75 10 mov 0x10(%ebp),%esi
121d55: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
121d57: 83 ec 0c sub $0xc,%esp
121d5a: 53 push %ebx
121d5b: e8 98 e6 fe ff call 1103f8 <_Thread_queue_Extract_with_proxy>
return true;
121d60: 83 c4 10 add $0x10,%esp
121d63: bf 01 00 00 00 mov $0x1,%edi
121d68: eb 6f jmp 121dd9 <_POSIX_signals_Unblock_thread+0xf9>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
121d6a: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
121d70: f7 d0 not %eax
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
121d72: 31 ff xor %edi,%edi
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
121d74: 85 c2 test %eax,%edx
121d76: 74 61 je 121dd9 <_POSIX_signals_Unblock_thread+0xf9>
* 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 ) ) {
121d78: f7 c1 00 00 00 10 test $0x10000000,%ecx
121d7e: 74 3d je 121dbd <_POSIX_signals_Unblock_thread+0xdd>
the_thread->Wait.return_code = EINTR;
121d80: 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) )
121d87: f7 c1 e0 be 03 00 test $0x3bee0,%ecx
121d8d: 74 0b je 121d9a <_POSIX_signals_Unblock_thread+0xba>
_Thread_queue_Extract_with_proxy( the_thread );
121d8f: 83 ec 0c sub $0xc,%esp
121d92: 53 push %ebx
121d93: e8 60 e6 fe ff call 1103f8 <_Thread_queue_Extract_with_proxy>
121d98: eb 1e jmp 121db8 <_POSIX_signals_Unblock_thread+0xd8>
else if ( _States_Is_delaying(the_thread->current_state) ) {
121d9a: 80 e1 08 and $0x8,%cl
121d9d: 74 3a je 121dd9 <_POSIX_signals_Unblock_thread+0xf9><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
121d9f: 83 ec 0c sub $0xc,%esp
121da2: 8d 43 48 lea 0x48(%ebx),%eax
121da5: 50 push %eax
121da6: e8 5d ed fe ff call 110b08 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
121dab: 58 pop %eax
121dac: 5a pop %edx
121dad: 68 f8 ff 03 10 push $0x1003fff8
121db2: 53 push %ebx
121db3: e8 04 dd fe ff call 10fabc <_Thread_Clear_state>
121db8: 83 c4 10 add $0x10,%esp
121dbb: eb 1c jmp 121dd9 <_POSIX_signals_Unblock_thread+0xf9>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
121dbd: 85 c9 test %ecx,%ecx
121dbf: 75 18 jne 121dd9 <_POSIX_signals_Unblock_thread+0xf9><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
121dc1: 83 3d 58 a9 12 00 00 cmpl $0x0,0x12a958
121dc8: 74 0f je 121dd9 <_POSIX_signals_Unblock_thread+0xf9>
121dca: 3b 1d 5c a9 12 00 cmp 0x12a95c,%ebx
121dd0: 75 07 jne 121dd9 <_POSIX_signals_Unblock_thread+0xf9><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
121dd2: c6 05 68 a9 12 00 01 movb $0x1,0x12a968
}
}
return false;
}
121dd9: 89 f8 mov %edi,%eax
121ddb: 8d 65 f4 lea -0xc(%ebp),%esp
121dde: 5b pop %ebx
121ddf: 5e pop %esi
121de0: 5f pop %edi
121de1: c9 leave
121de2: c3 ret
0010a978 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10a978: 55 push %ebp
10a979: 89 e5 mov %esp,%ebp
10a97b: 53 push %ebx
10a97c: 83 ec 18 sub $0x18,%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 );
10a97f: 8d 45 f4 lea -0xc(%ebp),%eax
10a982: 50 push %eax
10a983: ff 75 08 pushl 0x8(%ebp)
10a986: 68 fc 72 12 00 push $0x1272fc
10a98b: e8 d0 19 00 00 call 10c360 <_Objects_Get>
10a990: 89 c3 mov %eax,%ebx
switch ( location ) {
10a992: 83 c4 10 add $0x10,%esp
10a995: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10a999: 75 64 jne 10a9ff <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10a99b: 8b 40 40 mov 0x40(%eax),%eax
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10a99e: f6 40 11 40 testb $0x40,0x11(%eax)
10a9a2: 74 18 je 10a9bc <_Rate_monotonic_Timeout+0x44>
10a9a4: 8b 53 08 mov 0x8(%ebx),%edx
10a9a7: 39 50 20 cmp %edx,0x20(%eax)
10a9aa: 75 10 jne 10a9bc <_Rate_monotonic_Timeout+0x44>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10a9ac: 52 push %edx
10a9ad: 52 push %edx
10a9ae: 68 f8 ff 03 10 push $0x1003fff8
10a9b3: 50 push %eax
10a9b4: e8 43 21 00 00 call 10cafc <_Thread_Clear_state>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10a9b9: 59 pop %ecx
10a9ba: eb 10 jmp 10a9cc <_Rate_monotonic_Timeout+0x54>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
10a9bc: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
10a9c0: 75 2b jne 10a9ed <_Rate_monotonic_Timeout+0x75>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
10a9c2: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
_Rate_monotonic_Initiate_statistics( the_period );
10a9c9: 83 ec 0c sub $0xc,%esp
10a9cc: 53 push %ebx
10a9cd: e8 ec fa ff ff call 10a4be <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a9d2: 8b 43 3c mov 0x3c(%ebx),%eax
10a9d5: 89 43 1c mov %eax,0x1c(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a9d8: 58 pop %eax
10a9d9: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
10a9da: 83 c3 10 add $0x10,%ebx
10a9dd: 53 push %ebx
10a9de: 68 a8 74 12 00 push $0x1274a8
10a9e3: e8 00 31 00 00 call 10dae8 <_Watchdog_Insert>
10a9e8: 83 c4 10 add $0x10,%esp
10a9eb: eb 07 jmp 10a9f4 <_Rate_monotonic_Timeout+0x7c>
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10a9ed: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10a9f4: a1 e8 73 12 00 mov 0x1273e8,%eax
10a9f9: 48 dec %eax
10a9fa: a3 e8 73 12 00 mov %eax,0x1273e8
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10a9ff: 8b 5d fc mov -0x4(%ebp),%ebx
10aa02: c9 leave
10aa03: c3 ret
0010aef0 <_Scheduler_priority_Block>:
#include <rtems/score/thread.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
10aef0: 55 push %ebp
10aef1: 89 e5 mov %esp,%ebp
10aef3: 56 push %esi
10aef4: 53 push %ebx
10aef5: 8b 55 08 mov 0x8(%ebp),%edx
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
10aef8: 8b 8a 8c 00 00 00 mov 0x8c(%edx),%ecx
ready = sched_info->ready_chain;
10aefe: 8b 01 mov (%ecx),%eax
if ( _Chain_Has_only_one_node( ready ) ) {
10af00: 8b 58 08 mov 0x8(%eax),%ebx
10af03: 39 18 cmp %ebx,(%eax)
10af05: 75 32 jne 10af39 <_Scheduler_priority_Block+0x49>
Chain_Node *tail = _Chain_Tail( the_chain );
10af07: 8d 58 04 lea 0x4(%eax),%ebx
10af0a: 89 18 mov %ebx,(%eax)
head->next = tail;
head->previous = NULL;
10af0c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
tail->previous = head;
10af13: 89 40 08 mov %eax,0x8(%eax)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10af16: 8b 59 04 mov 0x4(%ecx),%ebx
10af19: 66 8b 03 mov (%ebx),%ax
10af1c: 66 23 41 0e and 0xe(%ecx),%ax
10af20: 66 89 03 mov %ax,(%ebx)
if ( *the_priority_map->minor == 0 )
10af23: 66 85 c0 test %ax,%ax
10af26: 75 1b jne 10af43 <_Scheduler_priority_Block+0x53>
_Priority_Major_bit_map &= the_priority_map->block_major;
10af28: 66 a1 18 48 12 00 mov 0x124818,%ax
10af2e: 23 41 0c and 0xc(%ecx),%eax
10af31: 66 a3 18 48 12 00 mov %ax,0x124818
10af37: eb 0a jmp 10af43 <_Scheduler_priority_Block+0x53>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10af39: 8b 0a mov (%edx),%ecx
previous = the_node->previous;
10af3b: 8b 42 04 mov 0x4(%edx),%eax
next->previous = previous;
10af3e: 89 41 04 mov %eax,0x4(%ecx)
previous->next = next;
10af41: 89 08 mov %ecx,(%eax)
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
10af43: 3b 15 0c 48 12 00 cmp 0x12480c,%edx
10af49: 75 43 jne 10af8e <_Scheduler_priority_Block+0x9e>
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 );
10af4b: 66 8b 35 18 48 12 00 mov 0x124818,%si
10af52: 31 c9 xor %ecx,%ecx
10af54: 89 cb mov %ecx,%ebx
10af56: 66 0f bc de bsf %si,%bx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10af5a: 0f b7 db movzwl %bx,%ebx
10af5d: 66 8b b4 1b 1c 48 12 mov 0x12481c(%ebx,%ebx,1),%si
10af64: 00
10af65: 66 0f bc ce bsf %si,%cx
return (_Priority_Bits_index( major ) << 4) +
10af69: c1 e3 04 shl $0x4,%ebx
10af6c: 0f b7 c9 movzwl %cx,%ecx
10af6f: 8d 04 0b lea (%ebx,%ecx,1),%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10af72: 6b c0 0c imul $0xc,%eax,%eax
10af75: 03 05 50 01 12 00 add 0x120150,%eax
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
10af7b: 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 );
10af7d: 83 c0 04 add $0x4,%eax
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10af80: 31 c9 xor %ecx,%ecx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10af82: 39 c3 cmp %eax,%ebx
10af84: 74 02 je 10af88 <_Scheduler_priority_Block+0x98><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
10af86: 89 d9 mov %ebx,%ecx
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10af88: 89 0d 0c 48 12 00 mov %ecx,0x12480c
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
10af8e: 3b 15 08 48 12 00 cmp 0x124808,%edx
10af94: 75 07 jne 10af9d <_Scheduler_priority_Block+0xad>
_Thread_Dispatch_necessary = true;
10af96: c6 05 14 48 12 00 01 movb $0x1,0x124814
}
10af9d: 5b pop %ebx
10af9e: 5e pop %esi
10af9f: c9 leave
10afa0: c3 ret
0010b0f0 <_Scheduler_priority_Schedule>:
#include <rtems/system.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Schedule(void)
{
10b0f0: 55 push %ebp
10b0f1: 89 e5 mov %esp,%ebp
10b0f3: 53 push %ebx
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 );
10b0f4: 66 8b 1d 18 48 12 00 mov 0x124818,%bx
10b0fb: 31 d2 xor %edx,%edx
10b0fd: 89 d1 mov %edx,%ecx
10b0ff: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10b103: 0f b7 c9 movzwl %cx,%ecx
10b106: 66 8b 9c 09 1c 48 12 mov 0x12481c(%ecx,%ecx,1),%bx
10b10d: 00
10b10e: 66 0f bc d3 bsf %bx,%dx
return (_Priority_Bits_index( major ) << 4) +
10b112: c1 e1 04 shl $0x4,%ecx
10b115: 0f b7 d2 movzwl %dx,%edx
10b118: 8d 04 11 lea (%ecx,%edx,1),%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10b11b: 6b c0 0c imul $0xc,%eax,%eax
10b11e: 03 05 50 01 12 00 add 0x120150,%eax
_Scheduler_priority_Schedule_body();
}
10b124: 8b 08 mov (%eax),%ecx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10b126: 83 c0 04 add $0x4,%eax
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10b129: 31 d2 xor %edx,%edx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10b12b: 39 c1 cmp %eax,%ecx
10b12d: 74 02 je 10b131 <_Scheduler_priority_Schedule+0x41><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
10b12f: 89 ca mov %ecx,%edx
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10b131: 89 15 0c 48 12 00 mov %edx,0x12480c
10b137: 5b pop %ebx
10b138: c9 leave
10b139: c3 ret
0010a364 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10a364: 55 push %ebp
10a365: 89 e5 mov %esp,%ebp
10a367: 56 push %esi
10a368: 53 push %ebx
10a369: 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();
10a36c: 8b 35 54 45 12 00 mov 0x124554,%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;
10a372: 31 db xor %ebx,%ebx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10a374: 85 c9 test %ecx,%ecx
10a376: 74 57 je 10a3cf <_TOD_Validate+0x6b> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10a378: b8 40 42 0f 00 mov $0xf4240,%eax
10a37d: 31 d2 xor %edx,%edx
10a37f: f7 f6 div %esi
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10a381: 39 41 18 cmp %eax,0x18(%ecx)
10a384: 73 49 jae 10a3cf <_TOD_Validate+0x6b>
(the_tod->ticks >= ticks_per_second) ||
10a386: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10a38a: 77 43 ja 10a3cf <_TOD_Validate+0x6b>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10a38c: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10a390: 77 3d ja 10a3cf <_TOD_Validate+0x6b>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10a392: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10a396: 77 37 ja 10a3cf <_TOD_Validate+0x6b>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10a398: 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) ||
10a39b: 85 c0 test %eax,%eax
10a39d: 74 30 je 10a3cf <_TOD_Validate+0x6b> <== NEVER TAKEN
(the_tod->month == 0) ||
10a39f: 83 f8 0c cmp $0xc,%eax
10a3a2: 77 2b ja 10a3cf <_TOD_Validate+0x6b>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10a3a4: 8b 31 mov (%ecx),%esi
(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) ||
10a3a6: 81 fe c3 07 00 00 cmp $0x7c3,%esi
10a3ac: 76 21 jbe 10a3cf <_TOD_Validate+0x6b>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10a3ae: 8b 51 08 mov 0x8(%ecx),%edx
(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) ||
10a3b1: 85 d2 test %edx,%edx
10a3b3: 74 1a je 10a3cf <_TOD_Validate+0x6b> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10a3b5: 83 e6 03 and $0x3,%esi
10a3b8: 75 09 jne 10a3c3 <_TOD_Validate+0x5f>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10a3ba: 8b 04 85 44 17 12 00 mov 0x121744(,%eax,4),%eax
10a3c1: eb 07 jmp 10a3ca <_TOD_Validate+0x66>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10a3c3: 8b 04 85 10 17 12 00 mov 0x121710(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10a3ca: 39 c2 cmp %eax,%edx
10a3cc: 0f 96 c3 setbe %bl
if ( the_tod->day > days_in_month )
return false;
return true;
}
10a3cf: 88 d8 mov %bl,%al
10a3d1: 5b pop %ebx
10a3d2: 5e pop %esi
10a3d3: c9 leave
10a3d4: c3 ret
0010b2a8 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10b2a8: 55 push %ebp
10b2a9: 89 e5 mov %esp,%ebp
10b2ab: 57 push %edi
10b2ac: 56 push %esi
10b2ad: 53 push %ebx
10b2ae: 83 ec 28 sub $0x28,%esp
10b2b1: 8b 5d 08 mov 0x8(%ebp),%ebx
10b2b4: 8b 75 0c mov 0xc(%ebp),%esi
10b2b7: 8a 45 10 mov 0x10(%ebp),%al
10b2ba: 88 45 e7 mov %al,-0x19(%ebp)
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
10b2bd: 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 );
10b2c0: 53 push %ebx
10b2c1: e8 62 0b 00 00 call 10be28 <_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 )
10b2c6: 83 c4 10 add $0x10,%esp
10b2c9: 39 73 14 cmp %esi,0x14(%ebx)
10b2cc: 74 0c je 10b2da <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10b2ce: 50 push %eax
10b2cf: 50 push %eax
10b2d0: 56 push %esi
10b2d1: 53 push %ebx
10b2d2: e8 01 0b 00 00 call 10bdd8 <_Thread_Set_priority>
10b2d7: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10b2da: 9c pushf
10b2db: fa cli
10b2dc: 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;
10b2dd: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10b2e0: 83 f8 04 cmp $0x4,%eax
10b2e3: 74 2b je 10b310 <_Thread_Change_priority+0x68>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10b2e5: 83 e7 04 and $0x4,%edi
10b2e8: 75 08 jne 10b2f2 <_Thread_Change_priority+0x4a><== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10b2ea: 89 c2 mov %eax,%edx
10b2ec: 83 e2 fb and $0xfffffffb,%edx
10b2ef: 89 53 10 mov %edx,0x10(%ebx)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10b2f2: 56 push %esi
10b2f3: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10b2f4: a9 e0 be 03 00 test $0x3bee0,%eax
10b2f9: 74 65 je 10b360 <_Thread_Change_priority+0xb8>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10b2fb: 89 5d 0c mov %ebx,0xc(%ebp)
10b2fe: 8b 43 44 mov 0x44(%ebx),%eax
10b301: 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 );
}
10b304: 8d 65 f4 lea -0xc(%ebp),%esp
10b307: 5b pop %ebx
10b308: 5e pop %esi
10b309: 5f pop %edi
10b30a: 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 );
10b30b: e9 40 0a 00 00 jmp 10bd50 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10b310: 83 e7 04 and $0x4,%edi
10b313: 75 26 jne 10b33b <_Thread_Change_priority+0x93><== NEVER TAKEN
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10b315: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( prepend_it )
10b31c: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10b320: 74 0c je 10b32e <_Thread_Change_priority+0x86>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
10b322: 83 ec 0c sub $0xc,%esp
10b325: 53 push %ebx
10b326: ff 15 78 01 12 00 call *0x120178
10b32c: eb 0a jmp 10b338 <_Thread_Change_priority+0x90>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
10b32e: 83 ec 0c sub $0xc,%esp
10b331: 53 push %ebx
10b332: ff 15 74 01 12 00 call *0x120174
10b338: 83 c4 10 add $0x10,%esp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
10b33b: 56 push %esi
10b33c: 9d popf
10b33d: fa cli
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
10b33e: ff 15 58 01 12 00 call *0x120158
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10b344: a1 08 48 12 00 mov 0x124808,%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();
if ( !_Thread_Is_executing_also_the_heir() &&
10b349: 3b 05 0c 48 12 00 cmp 0x12480c,%eax
10b34f: 74 0d je 10b35e <_Thread_Change_priority+0xb6>
10b351: 80 78 74 00 cmpb $0x0,0x74(%eax)
10b355: 74 07 je 10b35e <_Thread_Change_priority+0xb6>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10b357: c6 05 14 48 12 00 01 movb $0x1,0x124814
_ISR_Enable( level );
10b35e: 56 push %esi
10b35f: 9d popf
}
10b360: 8d 65 f4 lea -0xc(%ebp),%esp
10b363: 5b pop %ebx
10b364: 5e pop %esi
10b365: 5f pop %edi
10b366: c9 leave
10b367: c3 ret
0010b50c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10b50c: 55 push %ebp
10b50d: 89 e5 mov %esp,%ebp
10b50f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10b512: 8d 45 f4 lea -0xc(%ebp),%eax
10b515: 50 push %eax
10b516: ff 75 08 pushl 0x8(%ebp)
10b519: e8 82 01 00 00 call 10b6a0 <_Thread_Get>
switch ( location ) {
10b51e: 83 c4 10 add $0x10,%esp
10b521: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10b525: 75 1b jne 10b542 <_Thread_Delay_ended+0x36><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10b527: 52 push %edx
10b528: 52 push %edx
10b529: 68 18 00 00 10 push $0x10000018
10b52e: 50 push %eax
10b52f: e8 34 fe ff ff call 10b368 <_Thread_Clear_state>
10b534: a1 e4 42 12 00 mov 0x1242e4,%eax
10b539: 48 dec %eax
10b53a: a3 e4 42 12 00 mov %eax,0x1242e4
10b53f: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10b542: c9 leave
10b543: c3 ret
0010b544 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10b544: 55 push %ebp
10b545: 89 e5 mov %esp,%ebp
10b547: 57 push %edi
10b548: 56 push %esi
10b549: 53 push %ebx
10b54a: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10b54d: 8b 1d 08 48 12 00 mov 0x124808,%ebx
_ISR_Disable( level );
10b553: 9c pushf
10b554: fa cli
10b555: 58 pop %eax
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
10b556: 8d 7d d8 lea -0x28(%ebp),%edi
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10b559: e9 f9 00 00 00 jmp 10b657 <_Thread_Dispatch+0x113>
heir = _Thread_Heir;
10b55e: 8b 35 0c 48 12 00 mov 0x12480c,%esi
_Thread_Dispatch_disable_level = 1;
10b564: c7 05 e4 42 12 00 01 movl $0x1,0x1242e4
10b56b: 00 00 00
_Thread_Dispatch_necessary = false;
10b56e: c6 05 14 48 12 00 00 movb $0x0,0x124814
_Thread_Executing = heir;
10b575: 89 35 08 48 12 00 mov %esi,0x124808
/*
* 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 )
10b57b: 39 de cmp %ebx,%esi
10b57d: 0f 84 e2 00 00 00 je 10b665 <_Thread_Dispatch+0x121>
*/
#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 )
10b583: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10b587: 75 09 jne 10b592 <_Thread_Dispatch+0x4e>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10b589: 8b 15 b8 42 12 00 mov 0x1242b8,%edx
10b58f: 89 56 78 mov %edx,0x78(%esi)
_ISR_Enable( level );
10b592: 50 push %eax
10b593: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10b594: 83 ec 0c sub $0xc,%esp
10b597: 8d 45 e0 lea -0x20(%ebp),%eax
10b59a: 50 push %eax
10b59b: e8 e8 3a 00 00 call 10f088 <_TOD_Get_uptime>
_Timestamp_Subtract(
10b5a0: 83 c4 0c add $0xc,%esp
10b5a3: 57 push %edi
10b5a4: 8d 45 e0 lea -0x20(%ebp),%eax
10b5a7: 50 push %eax
10b5a8: 68 90 43 12 00 push $0x124390
10b5ad: e8 76 0a 00 00 call 10c028 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10b5b2: 58 pop %eax
10b5b3: 5a pop %edx
10b5b4: 57 push %edi
10b5b5: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10b5bb: 50 push %eax
10b5bc: e8 37 0a 00 00 call 10bff8 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10b5c1: 8b 45 e0 mov -0x20(%ebp),%eax
10b5c4: 8b 55 e4 mov -0x1c(%ebp),%edx
10b5c7: a3 90 43 12 00 mov %eax,0x124390
10b5cc: 89 15 94 43 12 00 mov %edx,0x124394
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10b5d2: a1 68 43 12 00 mov 0x124368,%eax
10b5d7: 83 c4 10 add $0x10,%esp
10b5da: 85 c0 test %eax,%eax
10b5dc: 74 10 je 10b5ee <_Thread_Dispatch+0xaa> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10b5de: 8b 10 mov (%eax),%edx
10b5e0: 89 93 e4 00 00 00 mov %edx,0xe4(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10b5e6: 8b 96 e4 00 00 00 mov 0xe4(%esi),%edx
10b5ec: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10b5ee: 51 push %ecx
10b5ef: 51 push %ecx
10b5f0: 56 push %esi
10b5f1: 53 push %ebx
10b5f2: e8 69 0c 00 00 call 10c260 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10b5f7: 58 pop %eax
10b5f8: 5a pop %edx
10b5f9: 81 c6 c8 00 00 00 add $0xc8,%esi
10b5ff: 56 push %esi
10b600: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax
10b606: 50 push %eax
10b607: e8 24 0f 00 00 call 10c530 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10b60c: 83 c4 10 add $0x10,%esp
10b60f: 83 bb e0 00 00 00 00 cmpl $0x0,0xe0(%ebx)
10b616: 74 36 je 10b64e <_Thread_Dispatch+0x10a>
#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 );
10b618: a1 64 43 12 00 mov 0x124364,%eax
10b61d: 39 c3 cmp %eax,%ebx
10b61f: 74 2d je 10b64e <_Thread_Dispatch+0x10a>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10b621: 85 c0 test %eax,%eax
10b623: 74 11 je 10b636 <_Thread_Dispatch+0xf2>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10b625: 83 ec 0c sub $0xc,%esp
10b628: 05 e0 00 00 00 add $0xe0,%eax
10b62d: 50 push %eax
10b62e: e8 31 0f 00 00 call 10c564 <_CPU_Context_save_fp>
10b633: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10b636: 83 ec 0c sub $0xc,%esp
10b639: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax
10b63f: 50 push %eax
10b640: e8 29 0f 00 00 call 10c56e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10b645: 89 1d 64 43 12 00 mov %ebx,0x124364
10b64b: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10b64e: 8b 1d 08 48 12 00 mov 0x124808,%ebx
_ISR_Disable( level );
10b654: 9c pushf
10b655: fa cli
10b656: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10b657: 8a 15 14 48 12 00 mov 0x124814,%dl
10b65d: 84 d2 test %dl,%dl
10b65f: 0f 85 f9 fe ff ff jne 10b55e <_Thread_Dispatch+0x1a>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
10b665: c7 05 e4 42 12 00 00 movl $0x0,0x1242e4
10b66c: 00 00 00
_ISR_Enable( level );
10b66f: 50 push %eax
10b670: 9d popf
_API_extensions_Run_postswitch();
10b671: e8 35 e8 ff ff call 109eab <_API_extensions_Run_postswitch>
}
10b676: 8d 65 f4 lea -0xc(%ebp),%esp
10b679: 5b pop %ebx
10b67a: 5e pop %esi
10b67b: 5f pop %edi
10b67c: c9 leave
10b67d: c3 ret
00110b48 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
110b48: 55 push %ebp
110b49: 89 e5 mov %esp,%ebp
110b4b: 53 push %ebx
110b4c: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
110b4f: 8b 1d 08 48 12 00 mov 0x124808,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
110b55: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
_ISR_Set_level(level);
110b5b: 85 c0 test %eax,%eax
110b5d: 74 03 je 110b62 <_Thread_Handler+0x1a>
110b5f: fa cli
110b60: eb 01 jmp 110b63 <_Thread_Handler+0x1b>
110b62: fb sti
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
110b63: a0 a8 3f 12 00 mov 0x123fa8,%al
110b68: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
110b6b: c6 05 a8 3f 12 00 01 movb $0x1,0x123fa8
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
110b72: 83 bb e0 00 00 00 00 cmpl $0x0,0xe0(%ebx)
110b79: 74 24 je 110b9f <_Thread_Handler+0x57>
#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 );
110b7b: a1 64 43 12 00 mov 0x124364,%eax
110b80: 39 c3 cmp %eax,%ebx
110b82: 74 1b je 110b9f <_Thread_Handler+0x57>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
110b84: 85 c0 test %eax,%eax
110b86: 74 11 je 110b99 <_Thread_Handler+0x51>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
110b88: 83 ec 0c sub $0xc,%esp
110b8b: 05 e0 00 00 00 add $0xe0,%eax
110b90: 50 push %eax
110b91: e8 ce b9 ff ff call 10c564 <_CPU_Context_save_fp>
110b96: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
110b99: 89 1d 64 43 12 00 mov %ebx,0x124364
/*
* 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 );
110b9f: 83 ec 0c sub $0xc,%esp
110ba2: 53 push %ebx
110ba3: e8 68 b5 ff ff call 10c110 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
110ba8: e8 d1 aa ff ff call 10b67e <_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) */ {
110bad: 83 c4 10 add $0x10,%esp
110bb0: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
110bb4: 75 05 jne 110bbb <_Thread_Handler+0x73>
INIT_NAME ();
110bb6: e8 35 c7 00 00 call 11d2f0 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
110bbb: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax
110bc1: 85 c0 test %eax,%eax
110bc3: 75 0b jne 110bd0 <_Thread_Handler+0x88>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
110bc5: 83 ec 0c sub $0xc,%esp
110bc8: ff b3 9c 00 00 00 pushl 0x9c(%ebx)
110bce: eb 0c jmp 110bdc <_Thread_Handler+0x94>
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
110bd0: 48 dec %eax
110bd1: 75 15 jne 110be8 <_Thread_Handler+0xa0> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
110bd3: 83 ec 0c sub $0xc,%esp
110bd6: ff b3 98 00 00 00 pushl 0x98(%ebx)
110bdc: 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 =
110be2: 89 43 28 mov %eax,0x28(%ebx)
110be5: 83 c4 10 add $0x10,%esp
* 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 );
110be8: 83 ec 0c sub $0xc,%esp
110beb: 53 push %ebx
110bec: e8 50 b5 ff ff call 10c141 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
110bf1: 83 c4 0c add $0xc,%esp
110bf4: 6a 05 push $0x5
110bf6: 6a 01 push $0x1
110bf8: 6a 00 push $0x0
110bfa: e8 11 9b ff ff call 10a710 <_Internal_error_Occurred>
0010b714 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10b714: 55 push %ebp
10b715: 89 e5 mov %esp,%ebp
10b717: 57 push %edi
10b718: 56 push %esi
10b719: 53 push %ebx
10b71a: 83 ec 1c sub $0x1c,%esp
10b71d: 8b 5d 0c mov 0xc(%ebp),%ebx
10b720: 8b 4d 10 mov 0x10(%ebp),%ecx
10b723: 8b 75 14 mov 0x14(%ebp),%esi
10b726: 8a 55 18 mov 0x18(%ebp),%dl
10b729: 8a 45 20 mov 0x20(%ebp),%al
10b72c: 88 45 e7 mov %al,-0x19(%ebp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10b72f: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10b736: 00 00 00
10b739: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10b740: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10b743: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10b74a: 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 ) {
10b74d: 85 c9 test %ecx,%ecx
10b74f: 75 31 jne 10b782 <_Thread_Initialize+0x6e>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10b751: 57 push %edi
10b752: 57 push %edi
10b753: 56 push %esi
10b754: 53 push %ebx
10b755: 88 55 e0 mov %dl,-0x20(%ebp)
10b758: e8 fb 06 00 00 call 10be58 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10b75d: 83 c4 10 add $0x10,%esp
10b760: 39 f0 cmp %esi,%eax
10b762: 8a 55 e0 mov -0x20(%ebp),%dl
10b765: 0f 82 bf 01 00 00 jb 10b92a <_Thread_Initialize+0x216>
10b76b: 85 c0 test %eax,%eax
10b76d: 0f 84 b7 01 00 00 je 10b92a <_Thread_Initialize+0x216><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10b773: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx
the_thread->Start.core_allocated_stack = true;
10b779: c6 83 b4 00 00 00 01 movb $0x1,0xb4(%ebx)
10b780: eb 09 jmp 10b78b <_Thread_Initialize+0x77>
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
10b782: c6 83 b4 00 00 00 00 movb $0x0,0xb4(%ebx)
10b789: 89 f0 mov %esi,%eax
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10b78b: 89 8b bc 00 00 00 mov %ecx,0xbc(%ebx)
the_stack->size = size;
10b791: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10b797: 31 ff xor %edi,%edi
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10b799: 84 d2 test %dl,%dl
10b79b: 74 17 je 10b7b4 <_Thread_Initialize+0xa0>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10b79d: 83 ec 0c sub $0xc,%esp
10b7a0: 6a 6c push $0x6c
10b7a2: e8 27 0d 00 00 call 10c4ce <_Workspace_Allocate>
10b7a7: 89 c7 mov %eax,%edi
if ( !fp_area )
10b7a9: 83 c4 10 add $0x10,%esp
10b7ac: 85 c0 test %eax,%eax
10b7ae: 0f 84 23 01 00 00 je 10b8d7 <_Thread_Initialize+0x1c3>
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10b7b4: 89 bb e0 00 00 00 mov %edi,0xe0(%ebx)
the_thread->Start.fp_context = fp_area;
10b7ba: 89 bb c0 00 00 00 mov %edi,0xc0(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b7c0: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10b7c7: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10b7ce: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10b7d5: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10b7dc: a1 74 43 12 00 mov 0x124374,%eax
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10b7e1: 31 f6 xor %esi,%esi
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10b7e3: 85 c0 test %eax,%eax
10b7e5: 74 1d je 10b804 <_Thread_Initialize+0xf0>
extensions_area = _Workspace_Allocate(
10b7e7: 83 ec 0c sub $0xc,%esp
10b7ea: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10b7f1: 50 push %eax
10b7f2: e8 d7 0c 00 00 call 10c4ce <_Workspace_Allocate>
10b7f7: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10b7f9: 83 c4 10 add $0x10,%esp
10b7fc: 85 c0 test %eax,%eax
10b7fe: 0f 84 d5 00 00 00 je 10b8d9 <_Thread_Initialize+0x1c5>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10b804: 89 b3 f0 00 00 00 mov %esi,0xf0(%ebx)
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
10b80a: 85 f6 test %esi,%esi
10b80c: 74 16 je 10b824 <_Thread_Initialize+0x110>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10b80e: 8b 15 74 43 12 00 mov 0x124374,%edx
10b814: 31 c0 xor %eax,%eax
10b816: eb 08 jmp 10b820 <_Thread_Initialize+0x10c>
the_thread->extensions[i] = NULL;
10b818: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,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++ )
10b81f: 40 inc %eax
10b820: 39 d0 cmp %edx,%eax
10b822: 76 f4 jbe 10b818 <_Thread_Initialize+0x104>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10b824: 8a 45 e7 mov -0x19(%ebp),%al
10b827: 88 83 a0 00 00 00 mov %al,0xa0(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10b82d: 8b 45 24 mov 0x24(%ebp),%eax
10b830: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.budget_callout = budget_callout;
10b836: 8b 45 28 mov 0x28(%ebp),%eax
10b839: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
switch ( budget_algorithm ) {
10b83f: 83 7d 24 02 cmpl $0x2,0x24(%ebp)
10b843: 75 08 jne 10b84d <_Thread_Initialize+0x139>
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;
10b845: a1 b8 42 12 00 mov 0x1242b8,%eax
10b84a: 89 43 78 mov %eax,0x78(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10b84d: 8b 45 2c mov 0x2c(%ebp),%eax
10b850: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
the_thread->current_state = STATES_DORMANT;
10b856: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10b85d: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10b864: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10b86b: 8b 45 1c mov 0x1c(%ebp),%eax
10b86e: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10b871: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
10b877: 83 ec 0c sub $0xc,%esp
10b87a: 53 push %ebx
10b87b: ff 15 68 01 12 00 call *0x120168
10b881: 89 c2 mov %eax,%edx
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
10b883: 83 c4 10 add $0x10,%esp
10b886: 85 c0 test %eax,%eax
10b888: 74 51 je 10b8db <_Thread_Initialize+0x1c7>
goto failed;
_Thread_Set_priority( the_thread, priority );
10b88a: 51 push %ecx
10b88b: 51 push %ecx
10b88c: ff 75 1c pushl 0x1c(%ebp)
10b88f: 53 push %ebx
10b890: 89 45 e0 mov %eax,-0x20(%ebp)
10b893: e8 40 05 00 00 call 10bdd8 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10b898: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10b89f: 00 00 00
10b8a2: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10b8a9: 00 00 00
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10b8ac: 8b 45 08 mov 0x8(%ebp),%eax
10b8af: 8b 40 1c mov 0x1c(%eax),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10b8b2: 0f b7 4b 08 movzwl 0x8(%ebx),%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b8b6: 89 1c 88 mov %ebx,(%eax,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10b8b9: 8b 45 30 mov 0x30(%ebp),%eax
10b8bc: 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 );
10b8bf: 89 1c 24 mov %ebx,(%esp)
10b8c2: e8 e9 08 00 00 call 10c1b0 <_User_extensions_Thread_create>
10b8c7: 88 c1 mov %al,%cl
if ( extension_status )
10b8c9: 83 c4 10 add $0x10,%esp
return true;
10b8cc: b0 01 mov $0x1,%al
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
10b8ce: 84 c9 test %cl,%cl
10b8d0: 8b 55 e0 mov -0x20(%ebp),%edx
10b8d3: 74 06 je 10b8db <_Thread_Initialize+0x1c7>
10b8d5: eb 55 jmp 10b92c <_Thread_Initialize+0x218>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10b8d7: 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;
10b8d9: 31 d2 xor %edx,%edx
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
10b8db: 83 ec 0c sub $0xc,%esp
10b8de: ff b3 e4 00 00 00 pushl 0xe4(%ebx)
10b8e4: 89 55 e0 mov %edx,-0x20(%ebp)
10b8e7: e8 fb 0b 00 00 call 10c4e7 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
10b8ec: 5a pop %edx
10b8ed: ff b3 e8 00 00 00 pushl 0xe8(%ebx)
10b8f3: e8 ef 0b 00 00 call 10c4e7 <_Workspace_Free>
10b8f8: 58 pop %eax
10b8f9: ff b3 ec 00 00 00 pushl 0xec(%ebx)
10b8ff: e8 e3 0b 00 00 call 10c4e7 <_Workspace_Free>
_Workspace_Free( extensions_area );
10b904: 89 34 24 mov %esi,(%esp)
10b907: e8 db 0b 00 00 call 10c4e7 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
10b90c: 89 3c 24 mov %edi,(%esp)
10b90f: e8 d3 0b 00 00 call 10c4e7 <_Workspace_Free>
#endif
_Workspace_Free( sched );
10b914: 8b 55 e0 mov -0x20(%ebp),%edx
10b917: 89 14 24 mov %edx,(%esp)
10b91a: e8 c8 0b 00 00 call 10c4e7 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
10b91f: 89 1c 24 mov %ebx,(%esp)
10b922: e8 81 05 00 00 call 10bea8 <_Thread_Stack_Free>
return false;
10b927: 83 c4 10 add $0x10,%esp
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 */
10b92a: 31 c0 xor %eax,%eax
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10b92c: 8d 65 f4 lea -0xc(%ebp),%esp
10b92f: 5b pop %ebx
10b930: 5e pop %esi
10b931: 5f pop %edi
10b932: c9 leave
10b933: c3 ret
0010bf90 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10bf90: 55 push %ebp
10bf91: 89 e5 mov %esp,%ebp
10bf93: 53 push %ebx
10bf94: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10bf97: 8b 1d 08 48 12 00 mov 0x124808,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10bf9d: 80 7b 74 00 cmpb $0x0,0x74(%ebx)
10bfa1: 74 4d je 10bff0 <_Thread_Tickle_timeslice+0x60>
return;
if ( !_States_Is_ready( executing->current_state ) )
10bfa3: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10bfa7: 75 47 jne 10bff0 <_Thread_Tickle_timeslice+0x60>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10bfa9: 8b 43 7c mov 0x7c(%ebx),%eax
10bfac: 83 f8 01 cmp $0x1,%eax
10bfaf: 72 3f jb 10bff0 <_Thread_Tickle_timeslice+0x60>
10bfb1: 83 f8 02 cmp $0x2,%eax
10bfb4: 76 07 jbe 10bfbd <_Thread_Tickle_timeslice+0x2d>
10bfb6: 83 f8 03 cmp $0x3,%eax
10bfb9: 75 35 jne 10bff0 <_Thread_Tickle_timeslice+0x60><== NEVER TAKEN
10bfbb: eb 1b jmp 10bfd8 <_Thread_Tickle_timeslice+0x48>
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 ) {
10bfbd: 8b 43 78 mov 0x78(%ebx),%eax
10bfc0: 48 dec %eax
10bfc1: 89 43 78 mov %eax,0x78(%ebx)
10bfc4: 85 c0 test %eax,%eax
10bfc6: 7f 28 jg 10bff0 <_Thread_Tickle_timeslice+0x60>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
10bfc8: ff 15 5c 01 12 00 call *0x12015c
* 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;
10bfce: a1 b8 42 12 00 mov 0x1242b8,%eax
10bfd3: 89 43 78 mov %eax,0x78(%ebx)
10bfd6: eb 18 jmp 10bff0 <_Thread_Tickle_timeslice+0x60>
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10bfd8: 8b 43 78 mov 0x78(%ebx),%eax
10bfdb: 48 dec %eax
10bfdc: 89 43 78 mov %eax,0x78(%ebx)
10bfdf: 85 c0 test %eax,%eax
10bfe1: 75 0d jne 10bff0 <_Thread_Tickle_timeslice+0x60>
(*executing->budget_callout)( executing );
10bfe3: 83 ec 0c sub $0xc,%esp
10bfe6: 53 push %ebx
10bfe7: ff 93 80 00 00 00 call *0x80(%ebx)
10bfed: 83 c4 10 add $0x10,%esp
break;
#endif
}
}
10bff0: 8b 5d fc mov -0x4(%ebp),%ebx
10bff3: c9 leave
10bff4: c3 ret
0010bd50 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10bd50: 55 push %ebp
10bd51: 89 e5 mov %esp,%ebp
10bd53: 57 push %edi
10bd54: 56 push %esi
10bd55: 53 push %ebx
10bd56: 83 ec 1c sub $0x1c,%esp
10bd59: 8b 75 08 mov 0x8(%ebp),%esi
10bd5c: 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 )
10bd5f: 85 f6 test %esi,%esi
10bd61: 74 36 je 10bd99 <_Thread_queue_Requeue+0x49><== 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 ) {
10bd63: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10bd67: 75 30 jne 10bd99 <_Thread_queue_Requeue+0x49><== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10bd69: 9c pushf
10bd6a: fa cli
10bd6b: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10bd6c: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10bd73: 74 22 je 10bd97 <_Thread_queue_Requeue+0x47><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10bd75: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
10bd7c: 50 push %eax
10bd7d: 6a 01 push $0x1
10bd7f: 57 push %edi
10bd80: 56 push %esi
10bd81: e8 9e 37 00 00 call 10f524 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10bd86: 83 c4 0c add $0xc,%esp
10bd89: 8d 45 e4 lea -0x1c(%ebp),%eax
10bd8c: 50 push %eax
10bd8d: 57 push %edi
10bd8e: 56 push %esi
10bd8f: e8 c0 fd ff ff call 10bb54 <_Thread_queue_Enqueue_priority>
10bd94: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10bd97: 53 push %ebx
10bd98: 9d popf
}
}
10bd99: 8d 65 f4 lea -0xc(%ebp),%esp
10bd9c: 5b pop %ebx
10bd9d: 5e pop %esi
10bd9e: 5f pop %edi
10bd9f: c9 leave
10bda0: c3 ret
0010bda4 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10bda4: 55 push %ebp
10bda5: 89 e5 mov %esp,%ebp
10bda7: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10bdaa: 8d 45 f4 lea -0xc(%ebp),%eax
10bdad: 50 push %eax
10bdae: ff 75 08 pushl 0x8(%ebp)
10bdb1: e8 ea f8 ff ff call 10b6a0 <_Thread_Get>
switch ( location ) {
10bdb6: 83 c4 10 add $0x10,%esp
10bdb9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10bdbd: 75 17 jne 10bdd6 <_Thread_queue_Timeout+0x32><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10bdbf: 83 ec 0c sub $0xc,%esp
10bdc2: 50 push %eax
10bdc3: e8 14 38 00 00 call 10f5dc <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10bdc8: a1 e4 42 12 00 mov 0x1242e4,%eax
10bdcd: 48 dec %eax
10bdce: a3 e4 42 12 00 mov %eax,0x1242e4
10bdd3: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10bdd6: c9 leave
10bdd7: c3 ret
00116084 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
116084: 55 push %ebp
116085: 89 e5 mov %esp,%ebp
116087: 57 push %edi
116088: 56 push %esi
116089: 53 push %ebx
11608a: 83 ec 4c sub $0x4c,%esp
11608d: 8b 5d 08 mov 0x8(%ebp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
116090: 8d 55 dc lea -0x24(%ebp),%edx
116093: 8d 45 e0 lea -0x20(%ebp),%eax
116096: 89 45 dc mov %eax,-0x24(%ebp)
head->previous = NULL;
116099: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
tail->previous = head;
1160a0: 89 55 e4 mov %edx,-0x1c(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
1160a3: 8d 7d d0 lea -0x30(%ebp),%edi
1160a6: 8d 4d d4 lea -0x2c(%ebp),%ecx
1160a9: 89 4d d0 mov %ecx,-0x30(%ebp)
head->previous = NULL;
1160ac: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
tail->previous = head;
1160b3: 89 7d d8 mov %edi,-0x28(%ebp)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160b6: 8d 53 30 lea 0x30(%ebx),%edx
1160b9: 89 55 c0 mov %edx,-0x40(%ebp)
/*
* 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 );
1160bc: 8d 73 68 lea 0x68(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
1160bf: 89 45 b4 mov %eax,-0x4c(%ebp)
{
/*
* 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;
1160c2: 8d 45 dc lea -0x24(%ebp),%eax
1160c5: 89 43 78 mov %eax,0x78(%ebx)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
1160c8: a1 c8 d7 13 00 mov 0x13d7c8,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1160cd: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
1160d0: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160d3: 51 push %ecx
1160d4: 57 push %edi
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1160d5: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160d7: 50 push %eax
1160d8: ff 75 c0 pushl -0x40(%ebp)
1160db: e8 64 39 00 00 call 119a44 <_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();
1160e0: 8b 15 40 d7 13 00 mov 0x13d740,%edx
1160e6: 89 55 c4 mov %edx,-0x3c(%ebp)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
1160e9: 8b 43 74 mov 0x74(%ebx),%eax
/*
* 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 ) {
1160ec: 83 c4 10 add $0x10,%esp
1160ef: 39 c2 cmp %eax,%edx
1160f1: 76 0d jbe 116100 <_Timer_server_Body+0x7c>
/*
* 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 );
1160f3: 51 push %ecx
1160f4: 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;
1160f5: 29 c2 sub %eax,%edx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160f7: 52 push %edx
1160f8: 56 push %esi
1160f9: e8 46 39 00 00 call 119a44 <_Watchdog_Adjust_to_chain>
1160fe: eb 0f jmp 11610f <_Timer_server_Body+0x8b>
} else if ( snapshot < last_snapshot ) {
116100: 73 10 jae 116112 <_Timer_server_Body+0x8e>
/*
* 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 );
116102: 52 push %edx
} 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;
116103: 2b 45 c4 sub -0x3c(%ebp),%eax
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
116106: 50 push %eax
116107: 6a 01 push $0x1
116109: 56 push %esi
11610a: e8 c9 38 00 00 call 1199d8 <_Watchdog_Adjust>
11610f: 83 c4 10 add $0x10,%esp
}
watchdogs->last_snapshot = snapshot;
116112: 8b 45 c4 mov -0x3c(%ebp),%eax
116115: 89 43 74 mov %eax,0x74(%ebx)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
116118: 8b 43 78 mov 0x78(%ebx),%eax
11611b: 83 ec 0c sub $0xc,%esp
11611e: 50 push %eax
11611f: e8 00 09 00 00 call 116a24 <_Chain_Get>
if ( timer == NULL ) {
116124: 83 c4 10 add $0x10,%esp
116127: 85 c0 test %eax,%eax
116129: 74 29 je 116154 <_Timer_server_Body+0xd0><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
11612b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
11612e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
116131: 75 0b jne 11613e <_Timer_server_Body+0xba><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116133: 51 push %ecx <== NOT EXECUTED
116134: 51 push %ecx <== NOT EXECUTED
116135: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116138: 50 push %eax <== NOT EXECUTED
116139: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
11613c: eb 0c jmp 11614a <_Timer_server_Body+0xc6><== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
11613e: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
116141: 75 d5 jne 116118 <_Timer_server_Body+0x94><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116143: 52 push %edx <== NOT EXECUTED
116144: 52 push %edx <== NOT EXECUTED
116145: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116148: 50 push %eax <== NOT EXECUTED
116149: 56 push %esi <== NOT EXECUTED
11614a: e8 7d 39 00 00 call 119acc <_Watchdog_Insert> <== NOT EXECUTED
11614f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
116152: eb c4 jmp 116118 <_Timer_server_Body+0x94><== 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 );
116154: 9c pushf
116155: fa cli
116156: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
116157: 8b 55 b4 mov -0x4c(%ebp),%edx
11615a: 39 55 dc cmp %edx,-0x24(%ebp)
11615d: 75 13 jne 116172 <_Timer_server_Body+0xee><== NEVER TAKEN
ts->insert_chain = NULL;
11615f: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
116166: 50 push %eax
116167: 9d popf
116168: 8d 55 d4 lea -0x2c(%ebp),%edx
_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 ) ) {
11616b: 39 55 d0 cmp %edx,-0x30(%ebp)
11616e: 75 09 jne 116179 <_Timer_server_Body+0xf5>
116170: eb 49 jmp 1161bb <_Timer_server_Body+0x137>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
116172: 50 push %eax <== NOT EXECUTED
116173: 9d popf <== NOT EXECUTED
116174: e9 4f ff ff ff jmp 1160c8 <_Timer_server_Body+0x44><== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
116179: 9c pushf
11617a: fa cli
11617b: 8f 45 c4 popl -0x3c(%ebp)
initialized = false;
}
#endif
return status;
}
11617e: 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))
116181: 39 d0 cmp %edx,%eax
116183: 74 2d je 1161b2 <_Timer_server_Body+0x12e>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
116185: 8b 08 mov (%eax),%ecx
head->next = new_first;
116187: 89 4d d0 mov %ecx,-0x30(%ebp)
new_first->previous = head;
11618a: 89 79 04 mov %edi,0x4(%ecx)
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
11618d: 85 c0 test %eax,%eax
11618f: 74 21 je 1161b2 <_Timer_server_Body+0x12e><== NEVER TAKEN
watchdog->state = WATCHDOG_INACTIVE;
116191: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
116198: ff 75 c4 pushl -0x3c(%ebp)
11619b: 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 );
11619c: 51 push %ecx
11619d: 51 push %ecx
11619e: ff 70 24 pushl 0x24(%eax)
1161a1: ff 70 20 pushl 0x20(%eax)
1161a4: 89 55 bc mov %edx,-0x44(%ebp)
1161a7: ff 50 1c call *0x1c(%eax)
}
1161aa: 83 c4 10 add $0x10,%esp
1161ad: 8b 55 bc mov -0x44(%ebp),%edx
1161b0: eb c7 jmp 116179 <_Timer_server_Body+0xf5>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
1161b2: ff 75 c4 pushl -0x3c(%ebp)
1161b5: 9d popf
1161b6: e9 07 ff ff ff jmp 1160c2 <_Timer_server_Body+0x3e>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
1161bb: c6 43 7c 00 movb $0x0,0x7c(%ebx)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
1161bf: e8 24 fe ff ff call 115fe8 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
1161c4: 51 push %ecx
1161c5: 51 push %ecx
1161c6: 6a 08 push $0x8
1161c8: ff 33 pushl (%ebx)
1161ca: e8 e5 32 00 00 call 1194b4 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
1161cf: 89 d8 mov %ebx,%eax
1161d1: e8 22 fe ff ff call 115ff8 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
1161d6: 89 d8 mov %ebx,%eax
1161d8: e8 61 fe ff ff call 11603e <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
1161dd: e8 dc 2a 00 00 call 118cbe <_Thread_Enable_dispatch>
ts->active = true;
1161e2: 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 );
1161e6: 8d 43 08 lea 0x8(%ebx),%eax
1161e9: 89 04 24 mov %eax,(%esp)
1161ec: e8 fb 39 00 00 call 119bec <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1161f1: 8d 43 40 lea 0x40(%ebx),%eax
1161f4: 89 04 24 mov %eax,(%esp)
1161f7: e8 f0 39 00 00 call 119bec <_Watchdog_Remove>
1161fc: 83 c4 10 add $0x10,%esp
1161ff: e9 be fe ff ff jmp 1160c2 <_Timer_server_Body+0x3e>
00116204 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
116204: 55 push %ebp
116205: 89 e5 mov %esp,%ebp
116207: 57 push %edi
116208: 56 push %esi
116209: 53 push %ebx
11620a: 83 ec 2c sub $0x2c,%esp
11620d: 8b 5d 08 mov 0x8(%ebp),%ebx
116210: 8b 75 0c mov 0xc(%ebp),%esi
if ( ts->insert_chain == NULL ) {
116213: 8b 43 78 mov 0x78(%ebx),%eax
116216: 85 c0 test %eax,%eax
116218: 0f 85 de 00 00 00 jne 1162fc <_Timer_server_Schedule_operation_method+0xf8><== NEVER TAKEN
* is the reference point for the delta chain. Thus if we do not update the
* reference point we have to add DT to the initial delta of the watchdog
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
11621e: e8 c5 fd ff ff call 115fe8 <_Thread_Disable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116223: 8b 46 38 mov 0x38(%esi),%eax
116226: 83 f8 01 cmp $0x1,%eax
116229: 75 5a jne 116285 <_Timer_server_Schedule_operation_method+0x81>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
11622b: 9c pushf
11622c: fa cli
11622d: 8f 45 e0 popl -0x20(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
116230: 8b 15 c8 d7 13 00 mov 0x13d7c8,%edx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
116236: 8b 4b 3c mov 0x3c(%ebx),%ecx
initialized = false;
}
#endif
return status;
}
116239: 8b 43 30 mov 0x30(%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 );
11623c: 8d 7b 34 lea 0x34(%ebx),%edi
* 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 ) ) {
11623f: 39 f8 cmp %edi,%eax
116241: 74 19 je 11625c <_Timer_server_Schedule_operation_method+0x58>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
116243: 89 d7 mov %edx,%edi
116245: 29 cf sub %ecx,%edi
116247: 89 7d e4 mov %edi,-0x1c(%ebp)
delta_interval = first_watchdog->delta_interval;
11624a: 8b 78 10 mov 0x10(%eax),%edi
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11624d: 31 c9 xor %ecx,%ecx
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
11624f: 3b 7d e4 cmp -0x1c(%ebp),%edi
116252: 76 05 jbe 116259 <_Timer_server_Schedule_operation_method+0x55>
delta_interval -= delta;
116254: 89 f9 mov %edi,%ecx
116256: 2b 4d e4 sub -0x1c(%ebp),%ecx
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
116259: 89 48 10 mov %ecx,0x10(%eax)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
11625c: 89 53 3c mov %edx,0x3c(%ebx)
_ISR_Enable( level );
11625f: ff 75 e0 pushl -0x20(%ebp)
116262: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116263: 50 push %eax
116264: 50 push %eax
116265: 83 c6 10 add $0x10,%esi
116268: 56 push %esi
116269: 8d 43 30 lea 0x30(%ebx),%eax
11626c: 50 push %eax
11626d: e8 5a 38 00 00 call 119acc <_Watchdog_Insert>
if ( !ts->active ) {
116272: 8a 43 7c mov 0x7c(%ebx),%al
116275: 83 c4 10 add $0x10,%esp
116278: 84 c0 test %al,%al
11627a: 75 74 jne 1162f0 <_Timer_server_Schedule_operation_method+0xec>
_Timer_server_Reset_interval_system_watchdog( ts );
11627c: 89 d8 mov %ebx,%eax
11627e: e8 75 fd ff ff call 115ff8 <_Timer_server_Reset_interval_system_watchdog>
116283: eb 6b jmp 1162f0 <_Timer_server_Schedule_operation_method+0xec>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116285: 83 f8 03 cmp $0x3,%eax
116288: 75 66 jne 1162f0 <_Timer_server_Schedule_operation_method+0xec>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
11628a: 9c pushf
11628b: fa cli
11628c: 8f 45 e0 popl -0x20(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
11628f: 8b 15 40 d7 13 00 mov 0x13d740,%edx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
116295: 8b 43 74 mov 0x74(%ebx),%eax
initialized = false;
}
#endif
return status;
}
116298: 8b 4b 68 mov 0x68(%ebx),%ecx
11629b: 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 ) ) {
11629e: 39 f9 cmp %edi,%ecx
1162a0: 74 27 je 1162c9 <_Timer_server_Schedule_operation_method+0xc5>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
1162a2: 8b 79 10 mov 0x10(%ecx),%edi
1162a5: 89 7d d4 mov %edi,-0x2c(%ebp)
if ( snapshot > last_snapshot ) {
1162a8: 39 c2 cmp %eax,%edx
1162aa: 76 15 jbe 1162c1 <_Timer_server_Schedule_operation_method+0xbd>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
1162ac: 89 d7 mov %edx,%edi
1162ae: 29 c7 sub %eax,%edi
1162b0: 89 7d e4 mov %edi,-0x1c(%ebp)
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
1162b3: 31 c0 xor %eax,%eax
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
1162b5: 39 7d d4 cmp %edi,-0x2c(%ebp)
1162b8: 76 0c jbe 1162c6 <_Timer_server_Schedule_operation_method+0xc2><== NEVER TAKEN
delta_interval -= delta;
1162ba: 8b 45 d4 mov -0x2c(%ebp),%eax
1162bd: 29 f8 sub %edi,%eax
1162bf: eb 05 jmp 1162c6 <_Timer_server_Schedule_operation_method+0xc2>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
1162c1: 03 45 d4 add -0x2c(%ebp),%eax
delta_interval += delta;
1162c4: 29 d0 sub %edx,%eax
}
first_watchdog->delta_interval = delta_interval;
1162c6: 89 41 10 mov %eax,0x10(%ecx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
1162c9: 89 53 74 mov %edx,0x74(%ebx)
_ISR_Enable( level );
1162cc: ff 75 e0 pushl -0x20(%ebp)
1162cf: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
1162d0: 57 push %edi
1162d1: 57 push %edi
1162d2: 83 c6 10 add $0x10,%esi
1162d5: 56 push %esi
1162d6: 8d 43 68 lea 0x68(%ebx),%eax
1162d9: 50 push %eax
1162da: e8 ed 37 00 00 call 119acc <_Watchdog_Insert>
if ( !ts->active ) {
1162df: 8a 43 7c mov 0x7c(%ebx),%al
1162e2: 83 c4 10 add $0x10,%esp
1162e5: 84 c0 test %al,%al
1162e7: 75 07 jne 1162f0 <_Timer_server_Schedule_operation_method+0xec>
_Timer_server_Reset_tod_system_watchdog( ts );
1162e9: 89 d8 mov %ebx,%eax
1162eb: e8 4e fd ff ff call 11603e <_Timer_server_Reset_tod_system_watchdog>
* 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 );
}
}
1162f0: 8d 65 f4 lea -0xc(%ebp),%esp
1162f3: 5b pop %ebx
1162f4: 5e pop %esi
1162f5: 5f pop %edi
1162f6: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
1162f7: e9 c2 29 00 00 jmp 118cbe <_Thread_Enable_dispatch>
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
1162fc: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
1162ff: 89 75 0c mov %esi,0xc(%ebp) <== NOT EXECUTED
116302: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
116305: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
116308: 5b pop %ebx <== NOT EXECUTED
116309: 5e pop %esi <== NOT EXECUTED
11630a: 5f pop %edi <== NOT EXECUTED
11630b: 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 );
11630c: e9 d7 06 00 00 jmp 1169e8 <_Chain_Append> <== NOT EXECUTED
0010c173 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10c173: 55 push %ebp
10c174: 89 e5 mov %esp,%ebp
10c176: 57 push %edi
10c177: 56 push %esi
10c178: 53 push %ebx
10c179: 83 ec 0c sub $0xc,%esp
10c17c: 8b 7d 10 mov 0x10(%ebp),%edi
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10c17f: 8b 1d b4 44 12 00 mov 0x1244b4,%ebx
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 );
10c185: 0f b6 75 0c movzbl 0xc(%ebp),%esi
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10c189: eb 15 jmp 10c1a0 <_User_extensions_Fatal+0x2d>
!_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 )
10c18b: 8b 43 30 mov 0x30(%ebx),%eax
10c18e: 85 c0 test %eax,%eax
10c190: 74 0b je 10c19d <_User_extensions_Fatal+0x2a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10c192: 52 push %edx
10c193: 57 push %edi
10c194: 56 push %esi
10c195: ff 75 08 pushl 0x8(%ebp)
10c198: ff d0 call *%eax
10c19a: 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 ) {
10c19d: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10c1a0: 81 fb ac 44 12 00 cmp $0x1244ac,%ebx
10c1a6: 75 e3 jne 10c18b <_User_extensions_Fatal+0x18><== 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 );
}
}
10c1a8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c1ab: 5b pop %ebx <== NOT EXECUTED
10c1ac: 5e pop %esi <== NOT EXECUTED
10c1ad: 5f pop %edi <== NOT EXECUTED
10c1ae: c9 leave <== NOT EXECUTED
10c1af: c3 ret <== NOT EXECUTED
0010c05c <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10c05c: 55 push %ebp
10c05d: 89 e5 mov %esp,%ebp
10c05f: 57 push %edi
10c060: 56 push %esi
10c061: 53 push %ebx
10c062: 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;
10c065: a1 60 02 12 00 mov 0x120260,%eax
10c06a: 89 45 e4 mov %eax,-0x1c(%ebp)
initial_extensions = Configuration.User_extension_table;
10c06d: 8b 35 64 02 12 00 mov 0x120264,%esi
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c073: c7 05 ac 44 12 00 b0 movl $0x1244b0,0x1244ac
10c07a: 44 12 00
head->previous = NULL;
10c07d: c7 05 b0 44 12 00 00 movl $0x0,0x1244b0
10c084: 00 00 00
tail->previous = head;
10c087: c7 05 b4 44 12 00 ac movl $0x1244ac,0x1244b4
10c08e: 44 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c091: c7 05 e8 42 12 00 ec movl $0x1242ec,0x1242e8
10c098: 42 12 00
head->previous = NULL;
10c09b: c7 05 ec 42 12 00 00 movl $0x0,0x1242ec
10c0a2: 00 00 00
tail->previous = head;
10c0a5: c7 05 f0 42 12 00 e8 movl $0x1242e8,0x1242f0
10c0ac: 42 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10c0af: 85 f6 test %esi,%esi
10c0b1: 74 53 je 10c106 <_User_extensions_Handler_initialization+0xaa><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10c0b3: 6b c8 34 imul $0x34,%eax,%ecx
10c0b6: 83 ec 0c sub $0xc,%esp
10c0b9: 51 push %ecx
10c0ba: 89 4d e0 mov %ecx,-0x20(%ebp)
10c0bd: e8 3d 04 00 00 call 10c4ff <_Workspace_Allocate_or_fatal_error>
10c0c2: 89 c3 mov %eax,%ebx
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10c0c4: 31 c0 xor %eax,%eax
10c0c6: 8b 4d e0 mov -0x20(%ebp),%ecx
10c0c9: 89 df mov %ebx,%edi
10c0cb: f3 aa rep stos %al,%es:(%edi)
10c0cd: 89 f0 mov %esi,%eax
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c0cf: 83 c4 10 add $0x10,%esp
10c0d2: 31 d2 xor %edx,%edx
10c0d4: eb 2b jmp 10c101 <_User_extensions_Handler_initialization+0xa5>
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10c0d6: 8d 7b 14 lea 0x14(%ebx),%edi
10c0d9: 89 c6 mov %eax,%esi
10c0db: b9 08 00 00 00 mov $0x8,%ecx
10c0e0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10c0e2: 83 ec 0c sub $0xc,%esp
10c0e5: 53 push %ebx
10c0e6: 89 45 dc mov %eax,-0x24(%ebp)
10c0e9: 89 55 e0 mov %edx,-0x20(%ebp)
10c0ec: e8 97 35 00 00 call 10f688 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10c0f1: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c0f4: 8b 55 e0 mov -0x20(%ebp),%edx
10c0f7: 42 inc %edx
10c0f8: 8b 45 dc mov -0x24(%ebp),%eax
10c0fb: 83 c0 20 add $0x20,%eax
10c0fe: 83 c4 10 add $0x10,%esp
10c101: 3b 55 e4 cmp -0x1c(%ebp),%edx
10c104: 72 d0 jb 10c0d6 <_User_extensions_Handler_initialization+0x7a>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10c106: 8d 65 f4 lea -0xc(%ebp),%esp
10c109: 5b pop %ebx
10c10a: 5e pop %esi
10c10b: 5f pop %edi
10c10c: c9 leave
10c10d: c3 ret
0010d910 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10d910: 55 push %ebp
10d911: 89 e5 mov %esp,%ebp
10d913: 57 push %edi
10d914: 56 push %esi
10d915: 53 push %ebx
10d916: 83 ec 1c sub $0x1c,%esp
10d919: 8b 75 08 mov 0x8(%ebp),%esi
10d91c: 8b 7d 0c mov 0xc(%ebp),%edi
10d91f: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10d922: 9c pushf
10d923: fa cli
10d924: 58 pop %eax
}
}
_ISR_Enable( level );
}
10d925: 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 );
10d927: 8d 4e 04 lea 0x4(%esi),%ecx
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
10d92a: 39 ca cmp %ecx,%edx
10d92c: 74 44 je 10d972 <_Watchdog_Adjust+0x62>
switch ( direction ) {
10d92e: 85 ff test %edi,%edi
10d930: 74 3c je 10d96e <_Watchdog_Adjust+0x5e>
10d932: 4f dec %edi
10d933: 75 3d jne 10d972 <_Watchdog_Adjust+0x62> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10d935: 01 5a 10 add %ebx,0x10(%edx)
break;
10d938: eb 38 jmp 10d972 <_Watchdog_Adjust+0x62>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
10d93a: 8b 16 mov (%esi),%edx
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
10d93c: 8b 7a 10 mov 0x10(%edx),%edi
10d93f: 39 fb cmp %edi,%ebx
10d941: 73 07 jae 10d94a <_Watchdog_Adjust+0x3a>
_Watchdog_First( header )->delta_interval -= units;
10d943: 29 df sub %ebx,%edi
10d945: 89 7a 10 mov %edi,0x10(%edx)
break;
10d948: eb 28 jmp 10d972 <_Watchdog_Adjust+0x62>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
10d94a: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
10d951: 50 push %eax
10d952: 9d popf
_Watchdog_Tickle( header );
10d953: 83 ec 0c sub $0xc,%esp
10d956: 56 push %esi
10d957: 89 4d e4 mov %ecx,-0x1c(%ebp)
10d95a: e8 a5 01 00 00 call 10db04 <_Watchdog_Tickle>
_ISR_Disable( level );
10d95f: 9c pushf
10d960: fa cli
10d961: 58 pop %eax
if ( _Chain_Is_empty( header ) )
10d962: 83 c4 10 add $0x10,%esp
10d965: 8b 4d e4 mov -0x1c(%ebp),%ecx
10d968: 39 0e cmp %ecx,(%esi)
10d96a: 74 06 je 10d972 <_Watchdog_Adjust+0x62>
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
10d96c: 29 fb sub %edi,%ebx
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10d96e: 85 db test %ebx,%ebx
10d970: 75 c8 jne 10d93a <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
10d972: 50 push %eax
10d973: 9d popf
}
10d974: 8d 65 f4 lea -0xc(%ebp),%esp
10d977: 5b pop %ebx
10d978: 5e pop %esi
10d979: 5f pop %edi
10d97a: c9 leave
10d97b: c3 ret
0010c3b4 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10c3b4: 55 push %ebp
10c3b5: 89 e5 mov %esp,%ebp
10c3b7: 56 push %esi
10c3b8: 53 push %ebx
10c3b9: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10c3bc: 9c pushf
10c3bd: fa cli
10c3be: 5e pop %esi
previous_state = the_watchdog->state;
10c3bf: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10c3c2: 83 f8 01 cmp $0x1,%eax
10c3c5: 74 09 je 10c3d0 <_Watchdog_Remove+0x1c>
10c3c7: 72 42 jb 10c40b <_Watchdog_Remove+0x57>
10c3c9: 83 f8 03 cmp $0x3,%eax
10c3cc: 77 3d ja 10c40b <_Watchdog_Remove+0x57> <== NEVER TAKEN
10c3ce: eb 09 jmp 10c3d9 <_Watchdog_Remove+0x25>
/*
* 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;
10c3d0: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10c3d7: eb 32 jmp 10c40b <_Watchdog_Remove+0x57>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10c3d9: 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 );
}
10c3e0: 8b 0a mov (%edx),%ecx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10c3e2: 83 39 00 cmpl $0x0,(%ecx)
10c3e5: 74 06 je 10c3ed <_Watchdog_Remove+0x39>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10c3e7: 8b 5a 10 mov 0x10(%edx),%ebx
10c3ea: 01 59 10 add %ebx,0x10(%ecx)
if ( _Watchdog_Sync_count )
10c3ed: 8b 1d f0 43 12 00 mov 0x1243f0,%ebx
10c3f3: 85 db test %ebx,%ebx
10c3f5: 74 0c je 10c403 <_Watchdog_Remove+0x4f>
_Watchdog_Sync_level = _ISR_Nest_level;
10c3f7: 8b 1d 04 48 12 00 mov 0x124804,%ebx
10c3fd: 89 1d 88 43 12 00 mov %ebx,0x124388
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10c403: 8b 5a 04 mov 0x4(%edx),%ebx
next->previous = previous;
10c406: 89 59 04 mov %ebx,0x4(%ecx)
previous->next = next;
10c409: 89 0b mov %ecx,(%ebx)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10c40b: 8b 0d f4 43 12 00 mov 0x1243f4,%ecx
10c411: 89 4a 18 mov %ecx,0x18(%edx)
_ISR_Enable( level );
10c414: 56 push %esi
10c415: 9d popf
return( previous_state );
}
10c416: 5b pop %ebx
10c417: 5e pop %esi
10c418: c9 leave
10c419: c3 ret
0010d4e0 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10d4e0: 55 push %ebp
10d4e1: 89 e5 mov %esp,%ebp
10d4e3: 57 push %edi
10d4e4: 56 push %esi
10d4e5: 53 push %ebx
10d4e6: 83 ec 20 sub $0x20,%esp
10d4e9: 8b 7d 08 mov 0x8(%ebp),%edi
10d4ec: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10d4ef: 9c pushf
10d4f0: fa cli
10d4f1: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10d4f4: 56 push %esi
10d4f5: 57 push %edi
10d4f6: 68 b0 12 12 00 push $0x1212b0
10d4fb: e8 5c ac ff ff call 10815c <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
10d500: 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 );
10d502: 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 ) ) {
10d505: 83 c4 10 add $0x10,%esp
10d508: 39 f3 cmp %esi,%ebx
10d50a: 74 1d je 10d529 <_Watchdog_Report_chain+0x49>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10d50c: 52 push %edx
10d50d: 52 push %edx
10d50e: 53 push %ebx
10d50f: 6a 00 push $0x0
10d511: e8 32 00 00 00 call 10d548 <_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 )
10d516: 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 ) ;
10d518: 83 c4 10 add $0x10,%esp
10d51b: 39 f3 cmp %esi,%ebx
10d51d: 75 ed jne 10d50c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10d51f: 50 push %eax
10d520: 50 push %eax
10d521: 57 push %edi
10d522: 68 c7 12 12 00 push $0x1212c7
10d527: eb 08 jmp 10d531 <_Watchdog_Report_chain+0x51>
} else {
printk( "Chain is empty\n" );
10d529: 83 ec 0c sub $0xc,%esp
10d52c: 68 d6 12 12 00 push $0x1212d6
10d531: e8 26 ac ff ff call 10815c <printk>
10d536: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10d539: ff 75 e4 pushl -0x1c(%ebp)
10d53c: 9d popf
}
10d53d: 8d 65 f4 lea -0xc(%ebp),%esp
10d540: 5b pop %ebx
10d541: 5e pop %esi
10d542: 5f pop %edi
10d543: c9 leave
10d544: c3 ret
0010c41c <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10c41c: 55 push %ebp
10c41d: 89 e5 mov %esp,%ebp
10c41f: 57 push %edi
10c420: 56 push %esi
10c421: 53 push %ebx
10c422: 83 ec 1c sub $0x1c,%esp
10c425: 8b 7d 08 mov 0x8(%ebp),%edi
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
10c428: 9c pushf
10c429: fa cli
10c42a: 5e pop %esi
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
10c42b: 8b 1f mov (%edi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10c42d: 8d 47 04 lea 0x4(%edi),%eax
10c430: 89 45 e4 mov %eax,-0x1c(%ebp)
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
10c433: 39 c3 cmp %eax,%ebx
10c435: 74 40 je 10c477 <_Watchdog_Tickle+0x5b>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
10c437: 8b 43 10 mov 0x10(%ebx),%eax
10c43a: 85 c0 test %eax,%eax
10c43c: 74 08 je 10c446 <_Watchdog_Tickle+0x2a>
the_watchdog->delta_interval--;
10c43e: 48 dec %eax
10c43f: 89 43 10 mov %eax,0x10(%ebx)
if ( the_watchdog->delta_interval != 0 )
10c442: 85 c0 test %eax,%eax
10c444: 75 31 jne 10c477 <_Watchdog_Tickle+0x5b>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10c446: 83 ec 0c sub $0xc,%esp
10c449: 53 push %ebx
10c44a: e8 65 ff ff ff call 10c3b4 <_Watchdog_Remove>
_ISR_Enable( level );
10c44f: 56 push %esi
10c450: 9d popf
switch( watchdog_state ) {
10c451: 83 c4 10 add $0x10,%esp
10c454: 83 f8 02 cmp $0x2,%eax
10c457: 75 0e jne 10c467 <_Watchdog_Tickle+0x4b> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10c459: 50 push %eax
10c45a: 50 push %eax
10c45b: ff 73 24 pushl 0x24(%ebx)
10c45e: ff 73 20 pushl 0x20(%ebx)
10c461: ff 53 1c call *0x1c(%ebx)
the_watchdog->id,
the_watchdog->user_data
);
break;
10c464: 83 c4 10 add $0x10,%esp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10c467: 9c pushf
10c468: fa cli
10c469: 5e pop %esi
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
10c46a: 8b 1f mov (%edi),%ebx
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10c46c: 3b 5d e4 cmp -0x1c(%ebp),%ebx
10c46f: 74 06 je 10c477 <_Watchdog_Tickle+0x5b>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
10c471: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10c475: eb cd jmp 10c444 <_Watchdog_Tickle+0x28>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10c477: 56 push %esi
10c478: 9d popf
}
10c479: 8d 65 f4 lea -0xc(%ebp),%esp
10c47c: 5b pop %ebx
10c47d: 5e pop %esi
10c47e: 5f pop %edi
10c47f: c9 leave
10c480: c3 ret
0010a84c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
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 78 sub $0x78,%esp
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
10a855: ff 75 0c pushl 0xc(%ebp)
10a858: e8 3a ed ff ff call 109597 <rtems_filesystem_dirname>
10a85d: 89 45 94 mov %eax,-0x6c(%ebp)
if ( old_parent_pathlen == 0 )
10a860: 83 c4 10 add $0x10,%esp
10a863: 85 c0 test %eax,%eax
10a865: 8d 45 b8 lea -0x48(%ebp),%eax
10a868: 75 15 jne 10a87f <_rename_r+0x33>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
10a86a: 51 push %ecx
10a86b: 50 push %eax
10a86c: 8d 45 e4 lea -0x1c(%ebp),%eax
10a86f: 50 push %eax
10a870: ff 75 0c pushl 0xc(%ebp)
10a873: e8 48 03 00 00 call 10abc0 <rtems_filesystem_get_start_loc>
10a878: 83 c4 10 add $0x10,%esp
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;
10a87b: 31 db xor %ebx,%ebx
10a87d: eb 23 jmp 10a8a2 <_rename_r+0x56>
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,
10a87f: 83 ec 0c sub $0xc,%esp
10a882: 6a 00 push $0x0
10a884: 50 push %eax
10a885: 6a 02 push $0x2
10a887: ff 75 94 pushl -0x6c(%ebp)
10a88a: ff 75 0c pushl 0xc(%ebp)
10a88d: e8 c4 ec ff ff call 109556 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
10a892: 83 c4 20 add $0x20,%esp
return -1;
10a895: 83 cf ff or $0xffffffff,%edi
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
10a898: 85 c0 test %eax,%eax
10a89a: 0f 85 50 01 00 00 jne 10a9f0 <_rename_r+0x1a4> <== NEVER TAKEN
return -1;
free_old_parentloc = true;
10a8a0: b3 01 mov $0x1,%bl
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
10a8a2: 8d 7d cc lea -0x34(%ebp),%edi
10a8a5: 8d 75 b8 lea -0x48(%ebp),%esi
10a8a8: b9 05 00 00 00 mov $0x5,%ecx
10a8ad: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = old + old_parent_pathlen;
10a8af: 8b 75 0c mov 0xc(%ebp),%esi
10a8b2: 03 75 94 add -0x6c(%ebp),%esi
10a8b5: 89 75 e0 mov %esi,-0x20(%ebp)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10a8b8: 83 c9 ff or $0xffffffff,%ecx
10a8bb: 89 f7 mov %esi,%edi
10a8bd: 31 c0 xor %eax,%eax
10a8bf: f2 ae repnz scas %es:(%edi),%al
10a8c1: f7 d1 not %ecx
10a8c3: 49 dec %ecx
10a8c4: 52 push %edx
10a8c5: 52 push %edx
10a8c6: 51 push %ecx
10a8c7: 56 push %esi
10a8c8: e8 09 ed ff ff call 1095d6 <rtems_filesystem_prefix_separators>
10a8cd: 01 c6 add %eax,%esi
10a8cf: 89 75 e0 mov %esi,-0x20(%ebp)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10a8d2: 83 c9 ff or $0xffffffff,%ecx
10a8d5: 89 f7 mov %esi,%edi
10a8d7: 31 c0 xor %eax,%eax
10a8d9: f2 ae repnz scas %es:(%edi),%al
10a8db: f7 d1 not %ecx
10a8dd: 49 dec %ecx
10a8de: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10a8e5: 8d 7d cc lea -0x34(%ebp),%edi
10a8e8: 57 push %edi
10a8e9: 6a 00 push $0x0
10a8eb: 51 push %ecx
10a8ec: 56 push %esi
10a8ed: e8 06 ec ff ff call 1094f8 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
10a8f2: 83 c4 20 add $0x20,%esp
10a8f5: 85 c0 test %eax,%eax
10a8f7: 74 16 je 10a90f <_rename_r+0xc3>
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
return -1;
10a8f9: 83 cf ff or $0xffffffff,%edi
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 )
10a8fc: 84 db test %bl,%bl
10a8fe: 0f 84 ec 00 00 00 je 10a9f0 <_rename_r+0x1a4> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
10a904: 83 ec 0c sub $0xc,%esp
10a907: 8d 45 b8 lea -0x48(%ebp),%eax
10a90a: e9 d8 00 00 00 jmp 10a9e7 <_rename_r+0x19b>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
10a90f: 50 push %eax
10a910: 8d 75 a4 lea -0x5c(%ebp),%esi
10a913: 56 push %esi
10a914: 8d 45 e4 lea -0x1c(%ebp),%eax
10a917: 50 push %eax
10a918: ff 75 10 pushl 0x10(%ebp)
10a91b: e8 a0 02 00 00 call 10abc0 <rtems_filesystem_get_start_loc>
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
10a920: 83 c4 0c add $0xc,%esp
10a923: 8d 45 e0 lea -0x20(%ebp),%eax
10a926: 50 push %eax
10a927: 56 push %esi
10a928: 8b 45 10 mov 0x10(%ebp),%eax
10a92b: 03 45 e4 add -0x1c(%ebp),%eax
10a92e: 50 push %eax
10a92f: 8b 45 b0 mov -0x50(%ebp),%eax
10a932: ff 50 04 call *0x4(%eax)
if ( result != 0 ) {
10a935: 83 c4 10 add $0x10,%esp
10a938: 85 c0 test %eax,%eax
10a93a: 74 2d je 10a969 <_rename_r+0x11d>
rtems_filesystem_freenode( &new_parent_loc );
10a93c: 83 ec 0c sub $0xc,%esp
10a93f: 56 push %esi
10a940: e8 1f ee ff ff call 109764 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10a945: 83 c4 10 add $0x10,%esp
10a948: 84 db test %bl,%bl
10a94a: 74 0f je 10a95b <_rename_r+0x10f> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
10a94c: 83 ec 0c sub $0xc,%esp
10a94f: 8d 45 b8 lea -0x48(%ebp),%eax
10a952: 50 push %eax
10a953: e8 0c ee ff ff call 109764 <rtems_filesystem_freenode>
10a958: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10a95b: 83 ec 0c sub $0xc,%esp
10a95e: 8d 45 cc lea -0x34(%ebp),%eax
10a961: 50 push %eax
10a962: e8 fd ed ff ff call 109764 <rtems_filesystem_freenode>
10a967: eb 3e jmp 10a9a7 <_rename_r+0x15b>
/*
* 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 ) {
10a969: 8b 45 b4 mov -0x4c(%ebp),%eax
10a96c: 39 45 c8 cmp %eax,-0x38(%ebp)
10a96f: 74 3e je 10a9af <_rename_r+0x163>
rtems_filesystem_freenode( &new_parent_loc );
10a971: 83 ec 0c sub $0xc,%esp
10a974: 56 push %esi
10a975: e8 ea ed ff ff call 109764 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10a97a: 83 c4 10 add $0x10,%esp
10a97d: 84 db test %bl,%bl
10a97f: 74 0f je 10a990 <_rename_r+0x144>
rtems_filesystem_freenode( &old_parent_loc );
10a981: 83 ec 0c sub $0xc,%esp
10a984: 8d 45 b8 lea -0x48(%ebp),%eax
10a987: 50 push %eax
10a988: e8 d7 ed ff ff call 109764 <rtems_filesystem_freenode>
10a98d: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10a990: 83 ec 0c sub $0xc,%esp
10a993: 8d 45 cc lea -0x34(%ebp),%eax
10a996: 50 push %eax
10a997: e8 c8 ed ff ff call 109764 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
10a99c: e8 37 9a 00 00 call 1143d8 <__errno>
10a9a1: c7 00 12 00 00 00 movl $0x12,(%eax)
10a9a7: 83 c4 10 add $0x10,%esp
10a9aa: 83 cf ff or $0xffffffff,%edi
10a9ad: eb 41 jmp 10a9f0 <_rename_r+0x1a4>
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
10a9af: ff 75 e0 pushl -0x20(%ebp)
10a9b2: 56 push %esi
10a9b3: 57 push %edi
10a9b4: 8d 55 b8 lea -0x48(%ebp),%edx
10a9b7: 52 push %edx
10a9b8: 8b 45 b0 mov -0x50(%ebp),%eax
10a9bb: 89 55 90 mov %edx,-0x70(%ebp)
10a9be: ff 50 40 call *0x40(%eax)
10a9c1: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &new_parent_loc );
10a9c3: 89 34 24 mov %esi,(%esp)
10a9c6: e8 99 ed ff ff call 109764 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10a9cb: 83 c4 10 add $0x10,%esp
10a9ce: 84 db test %bl,%bl
10a9d0: 8b 55 90 mov -0x70(%ebp),%edx
10a9d3: 74 0c je 10a9e1 <_rename_r+0x195>
rtems_filesystem_freenode( &old_parent_loc );
10a9d5: 83 ec 0c sub $0xc,%esp
10a9d8: 52 push %edx
10a9d9: e8 86 ed ff ff call 109764 <rtems_filesystem_freenode>
10a9de: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10a9e1: 83 ec 0c sub $0xc,%esp
10a9e4: 8d 45 cc lea -0x34(%ebp),%eax
10a9e7: 50 push %eax
10a9e8: e8 77 ed ff ff call 109764 <rtems_filesystem_freenode>
return result;
10a9ed: 83 c4 10 add $0x10,%esp
}
10a9f0: 89 f8 mov %edi,%eax
10a9f2: 8d 65 f4 lea -0xc(%ebp),%esp
10a9f5: 5b pop %ebx
10a9f6: 5e pop %esi
10a9f7: 5f pop %edi
10a9f8: c9 leave
10a9f9: c3 ret
00109e38 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
109e38: 55 push %ebp
109e39: 89 e5 mov %esp,%ebp
109e3b: 57 push %edi
109e3c: 56 push %esi
109e3d: 53 push %ebx
109e3e: 83 ec 18 sub $0x18,%esp
109e41: 8b 75 08 mov 0x8(%ebp),%esi
109e44: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
109e47: 68 60 72 12 00 push $0x127260
109e4c: e8 2f 10 00 00 call 10ae80 <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
109e51: 5f pop %edi
109e52: 58 pop %eax
109e53: 6a 01 push $0x1
109e55: 56 push %esi
109e56: e8 6d 60 00 00 call 10fec8 <fcntl>
109e5b: 83 c4 10 add $0x10,%esp
109e5e: 85 c0 test %eax,%eax
109e60: 79 1d jns 109e7f <aio_cancel+0x47>
pthread_mutex_unlock(&aio_request_queue.mutex);
109e62: 83 ec 0c sub $0xc,%esp
109e65: 68 60 72 12 00 push $0x127260
109e6a: e8 91 10 00 00 call 10af00 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
109e6f: e8 b0 93 00 00 call 113224 <__errno>
109e74: c7 00 09 00 00 00 movl $0x9,(%eax)
109e7a: e9 e3 00 00 00 jmp 109f62 <aio_cancel+0x12a>
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
109e7f: 85 db test %ebx,%ebx
109e81: 0f 85 bd 00 00 00 jne 109f44 <aio_cancel+0x10c>
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
109e87: 51 push %ecx
109e88: 6a 00 push $0x0
109e8a: 56 push %esi
109e8b: 68 a8 72 12 00 push $0x1272a8
109e90: e8 27 03 00 00 call 10a1bc <rtems_aio_search_fd>
109e95: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
109e97: 83 c4 10 add $0x10,%esp
109e9a: 85 c0 test %eax,%eax
109e9c: 75 6c jne 109f0a <aio_cancel+0xd2>
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
109e9e: 81 3d b4 72 12 00 b8 cmpl $0x1272b8,0x1272b4
109ea5: 72 12 00
109ea8: 0f 84 07 01 00 00 je 109fb5 <aio_cancel+0x17d> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
109eae: 52 push %edx
109eaf: 6a 00 push $0x0
109eb1: 56 push %esi
109eb2: 68 b4 72 12 00 push $0x1272b4
109eb7: e8 00 03 00 00 call 10a1bc <rtems_aio_search_fd>
109ebc: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
109ebe: 83 c4 10 add $0x10,%esp
109ec1: 85 c0 test %eax,%eax
109ec3: 75 17 jne 109edc <aio_cancel+0xa4>
pthread_mutex_unlock(&aio_request_queue.mutex);
109ec5: 83 ec 0c sub $0xc,%esp
109ec8: 68 60 72 12 00 push $0x127260
109ecd: e8 2e 10 00 00 call 10af00 <pthread_mutex_unlock>
return AIO_ALLDONE;
109ed2: 83 c4 10 add $0x10,%esp
109ed5: b3 02 mov $0x2,%bl
109ed7: e9 21 01 00 00 jmp 109ffd <aio_cancel+0x1c5>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
109edc: 83 ec 0c sub $0xc,%esp
109edf: 50 push %eax
109ee0: e8 57 26 00 00 call 10c53c <_Chain_Extract>
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
109ee5: 89 1c 24 mov %ebx,(%esp)
109ee8: e8 12 06 00 00 call 10a4ff <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
109eed: 8d 73 1c lea 0x1c(%ebx),%esi
109ef0: 89 34 24 mov %esi,(%esp)
109ef3: e8 68 0d 00 00 call 10ac60 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->mutex);
109ef8: 89 34 24 mov %esi,(%esp)
109efb: e8 6c 0a 00 00 call 10a96c <pthread_cond_destroy>
free (r_chain);
109f00: 89 1c 24 mov %ebx,(%esp)
109f03: e8 88 d4 ff ff call 107390 <free>
109f08: eb 24 jmp 109f2e <aio_cancel+0xf6>
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
109f0a: 8d 70 1c lea 0x1c(%eax),%esi
109f0d: 83 ec 0c sub $0xc,%esp
109f10: 56 push %esi
109f11: e8 6a 0f 00 00 call 10ae80 <pthread_mutex_lock>
109f16: 89 1c 24 mov %ebx,(%esp)
109f19: e8 1e 26 00 00 call 10c53c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
109f1e: 89 1c 24 mov %ebx,(%esp)
109f21: e8 d9 05 00 00 call 10a4ff <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
109f26: 89 34 24 mov %esi,(%esp)
109f29: e8 d2 0f 00 00 call 10af00 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
109f2e: c7 04 24 60 72 12 00 movl $0x127260,(%esp)
109f35: e8 c6 0f 00 00 call 10af00 <pthread_mutex_unlock>
return AIO_CANCELED;
109f3a: 83 c4 10 add $0x10,%esp
109f3d: 31 db xor %ebx,%ebx
109f3f: e9 b9 00 00 00 jmp 109ffd <aio_cancel+0x1c5>
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
109f44: 8b 3b mov (%ebx),%edi
109f46: 39 f7 cmp %esi,%edi
109f48: 74 23 je 109f6d <aio_cancel+0x135> <== NEVER TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
109f4a: 83 ec 0c sub $0xc,%esp
109f4d: 68 60 72 12 00 push $0x127260
109f52: e8 a9 0f 00 00 call 10af00 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
109f57: e8 c8 92 00 00 call 113224 <__errno>
109f5c: c7 00 16 00 00 00 movl $0x16,(%eax)
109f62: 83 c4 10 add $0x10,%esp
109f65: 83 cb ff or $0xffffffff,%ebx
109f68: e9 90 00 00 00 jmp 109ffd <aio_cancel+0x1c5>
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
109f6d: 50 push %eax
109f6e: 6a 00 push $0x0
109f70: 57 push %edi
109f71: 68 a8 72 12 00 push $0x1272a8
109f76: e8 41 02 00 00 call 10a1bc <rtems_aio_search_fd>
109f7b: 89 c6 mov %eax,%esi
if (r_chain == NULL) {
109f7d: 83 c4 10 add $0x10,%esp
109f80: 85 c0 test %eax,%eax
109f82: 75 48 jne 109fcc <aio_cancel+0x194>
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
109f84: 81 3d b4 72 12 00 b8 cmpl $0x1272b8,0x1272b4
109f8b: 72 12 00
109f8e: 74 25 je 109fb5 <aio_cancel+0x17d> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
109f90: 56 push %esi
109f91: 6a 00 push $0x0
109f93: 57 push %edi
109f94: 68 b4 72 12 00 push $0x1272b4
109f99: e8 1e 02 00 00 call 10a1bc <rtems_aio_search_fd>
if (r_chain == NULL) {
109f9e: 83 c4 10 add $0x10,%esp
109fa1: 85 c0 test %eax,%eax
109fa3: 74 a5 je 109f4a <aio_cancel+0x112> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
109fa5: 51 push %ecx
109fa6: 51 push %ecx
109fa7: 53 push %ebx
109fa8: 83 c0 08 add $0x8,%eax
109fab: 50 push %eax
109fac: e8 97 05 00 00 call 10a548 <rtems_aio_remove_req>
109fb1: 89 c3 mov %eax,%ebx
109fb3: eb 39 jmp 109fee <aio_cancel+0x1b6>
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
} else {
pthread_mutex_unlock (&aio_request_queue.mutex);
109fb5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109fb8: 68 60 72 12 00 push $0x127260 <== NOT EXECUTED
109fbd: e8 3e 0f 00 00 call 10af00 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_ALLDONE;
109fc2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109fc5: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED
109fca: eb 31 jmp 109ffd <aio_cancel+0x1c5> <== NOT EXECUTED
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
109fcc: 8d 78 1c lea 0x1c(%eax),%edi
109fcf: 83 ec 0c sub $0xc,%esp
109fd2: 57 push %edi
109fd3: e8 a8 0e 00 00 call 10ae80 <pthread_mutex_lock>
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
109fd8: 58 pop %eax
109fd9: 5a pop %edx
109fda: 53 push %ebx
109fdb: 83 c6 08 add $0x8,%esi
109fde: 56 push %esi
109fdf: e8 64 05 00 00 call 10a548 <rtems_aio_remove_req>
109fe4: 89 c3 mov %eax,%ebx
pthread_mutex_unlock (&r_chain->mutex);
109fe6: 89 3c 24 mov %edi,(%esp)
109fe9: e8 12 0f 00 00 call 10af00 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
109fee: c7 04 24 60 72 12 00 movl $0x127260,(%esp)
109ff5: e8 06 0f 00 00 call 10af00 <pthread_mutex_unlock>
return result;
109ffa: 83 c4 10 add $0x10,%esp
}
return AIO_ALLDONE;
}
109ffd: 89 d8 mov %ebx,%eax
109fff: 8d 65 f4 lea -0xc(%ebp),%esp
10a002: 5b pop %ebx
10a003: 5e pop %esi
10a004: 5f pop %edi
10a005: c9 leave
10a006: c3 ret
0010a014 <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
10a014: 55 push %ebp
10a015: 89 e5 mov %esp,%ebp
10a017: 53 push %ebx
10a018: 83 ec 04 sub $0x4,%esp
10a01b: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
10a01e: 81 7d 08 00 20 00 00 cmpl $0x2000,0x8(%ebp)
10a025: 74 1b je 10a042 <aio_fsync+0x2e>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10a027: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10a02e: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a035: e8 ea 91 00 00 call 113224 <__errno>
10a03a: c7 00 16 00 00 00 movl $0x16,(%eax)
10a040: eb 74 jmp 10a0b6 <aio_fsync+0xa2>
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10a042: 50 push %eax
10a043: 50 push %eax
10a044: 6a 03 push $0x3
10a046: ff 33 pushl (%ebx)
10a048: e8 7b 5e 00 00 call 10fec8 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10a04d: 83 e0 03 and $0x3,%eax
10a050: 48 dec %eax
10a051: 83 c4 10 add $0x10,%esp
10a054: 83 f8 01 cmp $0x1,%eax
10a057: 76 1b jbe 10a074 <aio_fsync+0x60>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10a059: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10a060: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a067: e8 b8 91 00 00 call 113224 <__errno>
10a06c: c7 00 09 00 00 00 movl $0x9,(%eax)
10a072: eb 42 jmp 10a0b6 <aio_fsync+0xa2>
req = malloc (sizeof (rtems_aio_request));
10a074: 83 ec 0c sub $0xc,%esp
10a077: 6a 18 push $0x18
10a079: e8 96 d7 ff ff call 107814 <malloc>
if (req == NULL)
10a07e: 83 c4 10 add $0x10,%esp
10a081: 85 c0 test %eax,%eax
10a083: 75 1b jne 10a0a0 <aio_fsync+0x8c> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10a085: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10a08c: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10a093: e8 8c 91 00 00 call 113224 <__errno> <== NOT EXECUTED
10a098: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10a09e: eb 16 jmp 10a0b6 <aio_fsync+0xa2> <== NOT EXECUTED
req->aiocbp = aiocbp;
10a0a0: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_SYNC;
10a0a3: c7 43 2c 03 00 00 00 movl $0x3,0x2c(%ebx)
return rtems_aio_enqueue (req);
10a0aa: 89 45 08 mov %eax,0x8(%ebp)
}
10a0ad: 8b 5d fc mov -0x4(%ebp),%ebx
10a0b0: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
10a0b1: e9 ef 04 00 00 jmp 10a5a5 <rtems_aio_enqueue>
}
10a0b6: 83 c8 ff or $0xffffffff,%eax
10a0b9: 8b 5d fc mov -0x4(%ebp),%ebx
10a0bc: c9 leave
10a0bd: c3 ret
0010a7a8 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
10a7a8: 55 push %ebp
10a7a9: 89 e5 mov %esp,%ebp
10a7ab: 53 push %ebx
10a7ac: 83 ec 0c sub $0xc,%esp
10a7af: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10a7b2: 6a 03 push $0x3
10a7b4: ff 33 pushl (%ebx)
10a7b6: e8 0d 57 00 00 call 10fec8 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10a7bb: 83 e0 03 and $0x3,%eax
10a7be: 83 c4 10 add $0x10,%esp
10a7c1: 83 f8 02 cmp $0x2,%eax
10a7c4: 74 1f je 10a7e5 <aio_read+0x3d>
10a7c6: 85 c0 test %eax,%eax
10a7c8: 74 1b je 10a7e5 <aio_read+0x3d> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10a7ca: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10a7d1: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a7d8: e8 47 8a 00 00 call 113224 <__errno>
10a7dd: c7 00 09 00 00 00 movl $0x9,(%eax)
10a7e3: eb 69 jmp 10a84e <aio_read+0xa6>
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10a7e5: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10a7e9: 75 06 jne 10a7f1 <aio_read+0x49>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10a7eb: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10a7ef: 79 1b jns 10a80c <aio_read+0x64>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10a7f1: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10a7f8: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a7ff: e8 20 8a 00 00 call 113224 <__errno>
10a804: c7 00 16 00 00 00 movl $0x16,(%eax)
10a80a: eb 42 jmp 10a84e <aio_read+0xa6>
req = malloc (sizeof (rtems_aio_request));
10a80c: 83 ec 0c sub $0xc,%esp
10a80f: 6a 18 push $0x18
10a811: e8 fe cf ff ff call 107814 <malloc>
if (req == NULL)
10a816: 83 c4 10 add $0x10,%esp
10a819: 85 c0 test %eax,%eax
10a81b: 75 1b jne 10a838 <aio_read+0x90> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10a81d: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10a824: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10a82b: e8 f4 89 00 00 call 113224 <__errno> <== NOT EXECUTED
10a830: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10a836: eb 16 jmp 10a84e <aio_read+0xa6> <== NOT EXECUTED
req->aiocbp = aiocbp;
10a838: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_READ;
10a83b: c7 43 2c 01 00 00 00 movl $0x1,0x2c(%ebx)
return rtems_aio_enqueue (req);
10a842: 89 45 08 mov %eax,0x8(%ebp)
}
10a845: 8b 5d fc mov -0x4(%ebp),%ebx
10a848: 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);
10a849: e9 57 fd ff ff jmp 10a5a5 <rtems_aio_enqueue>
}
10a84e: 83 c8 ff or $0xffffffff,%eax
10a851: 8b 5d fc mov -0x4(%ebp),%ebx
10a854: c9 leave
10a855: c3 ret
0010a864 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
10a864: 55 push %ebp
10a865: 89 e5 mov %esp,%ebp
10a867: 53 push %ebx
10a868: 83 ec 0c sub $0xc,%esp
10a86b: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10a86e: 6a 03 push $0x3
10a870: ff 33 pushl (%ebx)
10a872: e8 51 56 00 00 call 10fec8 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10a877: 83 e0 03 and $0x3,%eax
10a87a: 48 dec %eax
10a87b: 83 c4 10 add $0x10,%esp
10a87e: 83 f8 01 cmp $0x1,%eax
10a881: 76 1b jbe 10a89e <aio_write+0x3a>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10a883: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10a88a: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a891: e8 8e 89 00 00 call 113224 <__errno>
10a896: c7 00 09 00 00 00 movl $0x9,(%eax)
10a89c: eb 69 jmp 10a907 <aio_write+0xa3>
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10a89e: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10a8a2: 75 06 jne 10a8aa <aio_write+0x46>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10a8a4: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10a8a8: 79 1b jns 10a8c5 <aio_write+0x61>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10a8aa: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10a8b1: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a8b8: e8 67 89 00 00 call 113224 <__errno>
10a8bd: c7 00 16 00 00 00 movl $0x16,(%eax)
10a8c3: eb 42 jmp 10a907 <aio_write+0xa3>
req = malloc (sizeof (rtems_aio_request));
10a8c5: 83 ec 0c sub $0xc,%esp
10a8c8: 6a 18 push $0x18
10a8ca: e8 45 cf ff ff call 107814 <malloc>
if (req == NULL)
10a8cf: 83 c4 10 add $0x10,%esp
10a8d2: 85 c0 test %eax,%eax
10a8d4: 75 1b jne 10a8f1 <aio_write+0x8d> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10a8d6: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10a8dd: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10a8e4: e8 3b 89 00 00 call 113224 <__errno> <== NOT EXECUTED
10a8e9: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10a8ef: eb 16 jmp 10a907 <aio_write+0xa3> <== NOT EXECUTED
req->aiocbp = aiocbp;
10a8f1: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
10a8f4: c7 43 2c 02 00 00 00 movl $0x2,0x2c(%ebx)
return rtems_aio_enqueue (req);
10a8fb: 89 45 08 mov %eax,0x8(%ebp)
}
10a8fe: 8b 5d fc mov -0x4(%ebp),%ebx
10a901: 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);
10a902: e9 9e fc ff ff jmp 10a5a5 <rtems_aio_enqueue>
}
10a907: 83 c8 ff or $0xffffffff,%eax
10a90a: 8b 5d fc mov -0x4(%ebp),%ebx
10a90d: c9 leave
10a90e: c3 ret
00106b78 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
106b78: 55 push %ebp
106b79: 89 e5 mov %esp,%ebp
106b7b: 57 push %edi
106b7c: 56 push %esi
106b7d: 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) {
106b80: 81 3d 30 30 12 00 d0 cmpl $0x1251d0,0x123030
106b87: 51 12 00
106b8a: 75 1e jne 106baa <chroot+0x32>
rtems_libio_set_private_env(); /* try to set a new private env*/
106b8c: e8 f0 10 00 00 call 107c81 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
106b91: 81 3d 30 30 12 00 d0 cmpl $0x1251d0,0x123030
106b98: 51 12 00
106b9b: 75 0d jne 106baa <chroot+0x32>
rtems_set_errno_and_return_minus_one( ENOTSUP );
106b9d: e8 aa a8 00 00 call 11144c <__errno>
106ba2: c7 00 86 00 00 00 movl $0x86,(%eax)
106ba8: eb 22 jmp 106bcc <chroot+0x54>
}
result = chdir(pathname);
106baa: 83 ec 0c sub $0xc,%esp
106bad: ff 75 08 pushl 0x8(%ebp)
106bb0: e8 33 74 00 00 call 10dfe8 <chdir>
if (result) {
106bb5: 83 c4 10 add $0x10,%esp
106bb8: 85 c0 test %eax,%eax
106bba: 74 15 je 106bd1 <chroot+0x59>
rtems_set_errno_and_return_minus_one( errno );
106bbc: e8 8b a8 00 00 call 11144c <__errno>
106bc1: 89 c6 mov %eax,%esi
106bc3: e8 84 a8 00 00 call 11144c <__errno>
106bc8: 8b 00 mov (%eax),%eax
106bca: 89 06 mov %eax,(%esi)
106bcc: 83 c8 ff or $0xffffffff,%eax
106bcf: eb 44 jmp 106c15 <chroot+0x9d>
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
106bd1: 83 ec 0c sub $0xc,%esp
106bd4: 6a 00 push $0x0
106bd6: 8d 75 e4 lea -0x1c(%ebp),%esi
106bd9: 56 push %esi
106bda: 6a 00 push $0x0
106bdc: 6a 01 push $0x1
106bde: 68 be f6 11 00 push $0x11f6be
106be3: e8 02 01 00 00 call 106cea <rtems_filesystem_evaluate_path>
106be8: 83 c4 20 add $0x20,%esp
106beb: 85 c0 test %eax,%eax
106bed: 75 cd jne 106bbc <chroot+0x44> <== 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);
106bef: 83 ec 0c sub $0xc,%esp
106bf2: a1 30 30 12 00 mov 0x123030,%eax
106bf7: 83 c0 18 add $0x18,%eax
106bfa: 50 push %eax
106bfb: e8 a8 01 00 00 call 106da8 <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
106c00: 8b 3d 30 30 12 00 mov 0x123030,%edi
106c06: 83 c7 18 add $0x18,%edi
106c09: b9 05 00 00 00 mov $0x5,%ecx
106c0e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
106c10: 83 c4 10 add $0x10,%esp
106c13: 31 c0 xor %eax,%eax
}
106c15: 8d 65 f8 lea -0x8(%ebp),%esp
106c18: 5e pop %esi
106c19: 5f pop %edi
106c1a: c9 leave
106c1b: c3 ret
0010961c <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
10961c: 55 push %ebp
10961d: 89 e5 mov %esp,%ebp
10961f: 83 ec 08 sub $0x8,%esp
109622: 8b 45 08 mov 0x8(%ebp),%eax
109625: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
109628: 85 d2 test %edx,%edx
10962a: 74 3c je 109668 <clock_gettime+0x4c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10962c: 83 f8 01 cmp $0x1,%eax
10962f: 75 0b jne 10963c <clock_gettime+0x20>
_TOD_Get(tp);
109631: 83 ec 0c sub $0xc,%esp
109634: 52 push %edx
109635: e8 0a 1a 00 00 call 10b044 <_TOD_Get>
10963a: eb 13 jmp 10964f <clock_gettime+0x33>
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
10963c: 83 f8 04 cmp $0x4,%eax
10963f: 74 05 je 109646 <clock_gettime+0x2a> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
109641: 83 f8 02 cmp $0x2,%eax
109644: 75 10 jne 109656 <clock_gettime+0x3a>
_TOD_Get_uptime_as_timespec( tp );
109646: 83 ec 0c sub $0xc,%esp
109649: 52 push %edx
10964a: e8 49 1a 00 00 call 10b098 <_TOD_Get_uptime_as_timespec>
return 0;
10964f: 83 c4 10 add $0x10,%esp
109652: 31 c0 xor %eax,%eax
109654: eb 20 jmp 109676 <clock_gettime+0x5a>
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
109656: 83 f8 03 cmp $0x3,%eax
109659: 75 0d jne 109668 <clock_gettime+0x4c>
rtems_set_errno_and_return_minus_one( ENOSYS );
10965b: e8 b8 84 00 00 call 111b18 <__errno>
109660: c7 00 58 00 00 00 movl $0x58,(%eax)
109666: eb 0b jmp 109673 <clock_gettime+0x57>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
109668: e8 ab 84 00 00 call 111b18 <__errno>
10966d: c7 00 16 00 00 00 movl $0x16,(%eax)
109673: 83 c8 ff or $0xffffffff,%eax
return 0;
}
109676: c9 leave
109677: c3 ret
00109678 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
109678: 55 push %ebp
109679: 89 e5 mov %esp,%ebp
10967b: 83 ec 08 sub $0x8,%esp
10967e: 8b 45 08 mov 0x8(%ebp),%eax
109681: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
109684: 85 d2 test %edx,%edx
109686: 74 44 je 1096cc <clock_settime+0x54> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
109688: 83 f8 01 cmp $0x1,%eax
10968b: 75 28 jne 1096b5 <clock_settime+0x3d>
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
10968d: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
109693: 76 37 jbe 1096cc <clock_settime+0x54>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
109695: a1 24 63 12 00 mov 0x126324,%eax
10969a: 40 inc %eax
10969b: a3 24 63 12 00 mov %eax,0x126324
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
1096a0: 83 ec 0c sub $0xc,%esp
1096a3: 52 push %edx
1096a4: e8 47 1a 00 00 call 10b0f0 <_TOD_Set>
_Thread_Enable_dispatch();
1096a9: e8 30 2d 00 00 call 10c3de <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
1096ae: 83 c4 10 add $0x10,%esp
1096b1: 31 c0 xor %eax,%eax
1096b3: eb 25 jmp 1096da <clock_settime+0x62>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
1096b5: 83 f8 02 cmp $0x2,%eax
1096b8: 74 05 je 1096bf <clock_settime+0x47>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
1096ba: 83 f8 03 cmp $0x3,%eax
1096bd: 75 0d jne 1096cc <clock_settime+0x54>
rtems_set_errno_and_return_minus_one( ENOSYS );
1096bf: e8 54 84 00 00 call 111b18 <__errno>
1096c4: c7 00 58 00 00 00 movl $0x58,(%eax)
1096ca: eb 0b jmp 1096d7 <clock_settime+0x5f>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
1096cc: e8 47 84 00 00 call 111b18 <__errno>
1096d1: c7 00 16 00 00 00 movl $0x16,(%eax)
1096d7: 83 c8 ff or $0xffffffff,%eax
return 0;
}
1096da: c9 leave
1096db: c3 ret
0010d76c <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
10d76c: 55 push %ebp
10d76d: 89 e5 mov %esp,%ebp
10d76f: 57 push %edi
10d770: 56 push %esi
10d771: 53 push %ebx
10d772: 83 ec 1c sub $0x1c,%esp
10d775: 8b 4d 0c mov 0xc(%ebp),%ecx
10d778: 8b 5d 14 mov 0x14(%ebp),%ebx
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
10d77b: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp)
10d782: 74 0d je 10d791 <devFS_evaluate_path+0x25><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
10d784: e8 f3 27 00 00 call 10ff7c <__errno> <== NOT EXECUTED
10d789: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10d78f: eb 77 jmp 10d808 <devFS_evaluate_path+0x9c><== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
10d791: 8b 33 mov (%ebx),%esi
if (!device_name_table)
10d793: 85 f6 test %esi,%esi
10d795: 74 04 je 10d79b <devFS_evaluate_path+0x2f>
10d797: 31 ff xor %edi,%edi
10d799: eb 5a jmp 10d7f5 <devFS_evaluate_path+0x89>
rtems_set_errno_and_return_minus_one( EFAULT );
10d79b: e8 dc 27 00 00 call 10ff7c <__errno>
10d7a0: c7 00 0e 00 00 00 movl $0xe,(%eax)
10d7a6: eb 60 jmp 10d808 <devFS_evaluate_path+0x9c>
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
10d7a8: 8b 16 mov (%esi),%edx
10d7aa: 85 d2 test %edx,%edx
10d7ac: 74 43 je 10d7f1 <devFS_evaluate_path+0x85>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
10d7ae: 50 push %eax
10d7af: 51 push %ecx
10d7b0: 52 push %edx
10d7b1: ff 75 08 pushl 0x8(%ebp)
10d7b4: 89 55 e4 mov %edx,-0x1c(%ebp)
10d7b7: 89 4d e0 mov %ecx,-0x20(%ebp)
10d7ba: e8 7d 3b 00 00 call 11133c <strncmp>
10d7bf: 83 c4 10 add $0x10,%esp
10d7c2: 85 c0 test %eax,%eax
10d7c4: 8b 55 e4 mov -0x1c(%ebp),%edx
10d7c7: 8b 4d e0 mov -0x20(%ebp),%ecx
10d7ca: 75 25 jne 10d7f1 <devFS_evaluate_path+0x85>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
10d7cc: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1)
10d7d0: 75 1f jne 10d7f1 <devFS_evaluate_path+0x85><== NEVER TAKEN
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
10d7d2: 89 33 mov %esi,(%ebx)
pathloc->handlers = &devFS_file_handlers;
10d7d4: c7 43 08 5c 0f 12 00 movl $0x120f5c,0x8(%ebx)
pathloc->ops = &devFS_ops;
10d7db: c7 43 0c 14 0f 12 00 movl $0x120f14,0xc(%ebx)
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
10d7e2: a1 b0 10 12 00 mov 0x1210b0,%eax
10d7e7: 8b 40 28 mov 0x28(%eax),%eax
10d7ea: 89 43 10 mov %eax,0x10(%ebx)
return 0;
10d7ed: 31 c0 xor %eax,%eax
10d7ef: eb 1a jmp 10d80b <devFS_evaluate_path+0x9f>
/* 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++) {
10d7f1: 47 inc %edi
10d7f2: 83 c6 14 add $0x14,%esi
10d7f5: 3b 3d 48 f1 11 00 cmp 0x11f148,%edi
10d7fb: 72 ab jb 10d7a8 <devFS_evaluate_path+0x3c>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
10d7fd: e8 7a 27 00 00 call 10ff7c <__errno>
10d802: c7 00 02 00 00 00 movl $0x2,(%eax)
10d808: 83 c8 ff or $0xffffffff,%eax
}
10d80b: 8d 65 f4 lea -0xc(%ebp),%esp
10d80e: 5b pop %ebx
10d80f: 5e pop %esi
10d810: 5f pop %edi
10d811: c9 leave
10d812: c3 ret
00106fe0 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
106fe0: 55 push %ebp
106fe1: 89 e5 mov %esp,%ebp
106fe3: 57 push %edi
106fe4: 56 push %esi
106fe5: 53 push %ebx
106fe6: 83 ec 1c sub $0x1c,%esp
106fe9: 8b 7d 08 mov 0x8(%ebp),%edi
106fec: 8b 4d 10 mov 0x10(%ebp),%ecx
106fef: 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') &&
106ff2: 80 3f 64 cmpb $0x64,(%edi)
106ff5: 75 18 jne 10700f <devFS_mknod+0x2f>
106ff7: 80 7f 01 65 cmpb $0x65,0x1(%edi)
106ffb: 75 12 jne 10700f <devFS_mknod+0x2f> <== NEVER TAKEN
106ffd: 80 7f 02 76 cmpb $0x76,0x2(%edi)
107001: 75 0c jne 10700f <devFS_mknod+0x2f> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
return 0;
107003: 31 c0 xor %eax,%eax
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
(path[2] == 'v') && (path[3] == '\0'))
107005: 80 7f 03 00 cmpb $0x0,0x3(%edi)
107009: 0f 84 c9 00 00 00 je 1070d8 <devFS_mknod+0xf8>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
10700f: 8b 45 0c mov 0xc(%ebp),%eax
107012: 25 00 f0 00 00 and $0xf000,%eax
107017: 3d 00 20 00 00 cmp $0x2000,%eax
10701c: 74 14 je 107032 <devFS_mknod+0x52>
10701e: 3d 00 60 00 00 cmp $0x6000,%eax
107023: 74 0d je 107032 <devFS_mknod+0x52>
rtems_set_errno_and_return_minus_one( EINVAL );
107025: e8 52 8f 00 00 call 10ff7c <__errno>
10702a: c7 00 16 00 00 00 movl $0x16,(%eax)
107030: eb 23 jmp 107055 <devFS_mknod+0x75>
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
107032: 89 4d e4 mov %ecx,-0x1c(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
107035: 89 55 e0 mov %edx,-0x20(%ebp)
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;
107038: 8b 45 18 mov 0x18(%ebp),%eax
10703b: 8b 08 mov (%eax),%ecx
if (!device_name_table)
10703d: 85 c9 test %ecx,%ecx
10703f: 74 09 je 10704a <devFS_mknod+0x6a>
107041: 89 ca mov %ecx,%edx
107043: 83 ce ff or $0xffffffff,%esi
107046: 31 db xor %ebx,%ebx
107048: eb 46 jmp 107090 <devFS_mknod+0xb0>
rtems_set_errno_and_return_minus_one( EFAULT );
10704a: e8 2d 8f 00 00 call 10ff7c <__errno>
10704f: c7 00 0e 00 00 00 movl $0xe,(%eax)
107055: 83 c8 ff or $0xffffffff,%eax
107058: eb 7e jmp 1070d8 <devFS_mknod+0xf8>
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
10705a: 8b 02 mov (%edx),%eax
10705c: 85 c0 test %eax,%eax
10705e: 74 2a je 10708a <devFS_mknod+0xaa>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
107060: 83 ec 08 sub $0x8,%esp
107063: 50 push %eax
107064: 57 push %edi
107065: 89 55 d8 mov %edx,-0x28(%ebp)
107068: 89 4d dc mov %ecx,-0x24(%ebp)
10706b: e8 9c a1 00 00 call 11120c <strcmp>
107070: 83 c4 10 add $0x10,%esp
107073: 85 c0 test %eax,%eax
107075: 8b 55 d8 mov -0x28(%ebp),%edx
107078: 8b 4d dc mov -0x24(%ebp),%ecx
10707b: 75 0f jne 10708c <devFS_mknod+0xac>
rtems_set_errno_and_return_minus_one( EEXIST );
10707d: e8 fa 8e 00 00 call 10ff7c <__errno>
107082: c7 00 11 00 00 00 movl $0x11,(%eax)
107088: eb cb jmp 107055 <devFS_mknod+0x75>
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
10708a: 89 de mov %ebx,%esi
/* 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++){
10708c: 43 inc %ebx
10708d: 83 c2 14 add $0x14,%edx
107090: 3b 1d 48 f1 11 00 cmp 0x11f148,%ebx
107096: 72 c2 jb 10705a <devFS_mknod+0x7a>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
107098: 83 fe ff cmp $0xffffffff,%esi
10709b: 75 0d jne 1070aa <devFS_mknod+0xca>
rtems_set_errno_and_return_minus_one( ENOMEM );
10709d: e8 da 8e 00 00 call 10ff7c <__errno>
1070a2: c7 00 0c 00 00 00 movl $0xc,(%eax)
1070a8: eb ab jmp 107055 <devFS_mknod+0x75>
_ISR_Disable(level);
1070aa: 9c pushf
1070ab: fa cli
1070ac: 5b pop %ebx
device_name_table[slot].device_name = (char *)path;
1070ad: 6b d6 14 imul $0x14,%esi,%edx
1070b0: 8d 14 11 lea (%ecx,%edx,1),%edx
1070b3: 89 3a mov %edi,(%edx)
device_name_table[slot].device_name_length = strlen(path);
1070b5: 31 c0 xor %eax,%eax
1070b7: 83 c9 ff or $0xffffffff,%ecx
1070ba: f2 ae repnz scas %es:(%edi),%al
1070bc: f7 d1 not %ecx
1070be: 49 dec %ecx
1070bf: 89 4a 04 mov %ecx,0x4(%edx)
device_name_table[slot].major = major;
1070c2: 8b 45 e4 mov -0x1c(%ebp),%eax
1070c5: 89 42 08 mov %eax,0x8(%edx)
device_name_table[slot].minor = minor;
1070c8: 8b 45 e0 mov -0x20(%ebp),%eax
1070cb: 89 42 0c mov %eax,0xc(%edx)
device_name_table[slot].mode = mode;
1070ce: 8b 45 0c mov 0xc(%ebp),%eax
1070d1: 89 42 10 mov %eax,0x10(%edx)
_ISR_Enable(level);
1070d4: 53 push %ebx
1070d5: 9d popf
return 0;
1070d6: 31 c0 xor %eax,%eax
}
1070d8: 8d 65 f4 lea -0xc(%ebp),%esp
1070db: 5b pop %ebx
1070dc: 5e pop %esi
1070dd: 5f pop %edi
1070de: c9 leave
1070df: c3 ret
001076f8 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
1076f8: 55 push %ebp
1076f9: 89 e5 mov %esp,%ebp
1076fb: 53 push %ebx
1076fc: 83 ec 04 sub $0x4,%esp
1076ff: 89 c3 mov %eax,%ebx
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
107701: 83 b8 b4 00 00 00 00 cmpl $0x0,0xb4(%eax)
107708: 74 46 je 107750 <drainOutput+0x58>
rtems_interrupt_disable (level);
10770a: 9c pushf
10770b: fa cli
10770c: 58 pop %eax
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
10770d: eb 2f jmp 10773e <drainOutput+0x46>
tty->rawOutBufState = rob_wait;
10770f: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
107716: 00 00 00
rtems_interrupt_enable (level);
107719: 50 push %eax
10771a: 9d popf
sc = rtems_semaphore_obtain(
10771b: 50 push %eax
10771c: 6a 00 push $0x0
10771e: 6a 00 push $0x0
107720: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
107726: e8 0d 20 00 00 call 109738 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
10772b: 83 c4 10 add $0x10,%esp
10772e: 85 c0 test %eax,%eax
107730: 74 09 je 10773b <drainOutput+0x43> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
107732: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107735: 50 push %eax <== NOT EXECUTED
107736: e8 c9 25 00 00 call 109d04 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interrupt_disable (level);
10773b: 9c pushf
10773c: fa cli
10773d: 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) {
10773e: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
107744: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
10774a: 39 d1 cmp %edx,%ecx
10774c: 75 c1 jne 10770f <drainOutput+0x17>
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);
10774e: 50 push %eax
10774f: 9d popf
}
}
107750: 8b 5d fc mov -0x4(%ebp),%ebx
107753: c9 leave
107754: c3 ret
001082af <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
1082af: 55 push %ebp
1082b0: 89 e5 mov %esp,%ebp
1082b2: 53 push %ebx
1082b3: 83 ec 24 sub $0x24,%esp
if ((tty->termios.c_lflag & ECHOCTL) &&
1082b6: f6 42 3d 02 testb $0x2,0x3d(%edx)
1082ba: 74 3e je 1082fa <echo+0x4b> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
1082bc: 0f b6 c8 movzbl %al,%ecx
1082bf: 8b 1d 00 21 12 00 mov 0x122100,%ebx
1082c5: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1)
1082ca: 74 2e je 1082fa <echo+0x4b>
1082cc: 3c 09 cmp $0x9,%al
1082ce: 74 2a je 1082fa <echo+0x4b>
1082d0: 3c 0a cmp $0xa,%al
1082d2: 74 26 je 1082fa <echo+0x4b>
char echobuf[2];
echobuf[0] = '^';
1082d4: c6 45 f6 5e movb $0x5e,-0xa(%ebp)
echobuf[1] = c ^ 0x40;
1082d8: 83 f0 40 xor $0x40,%eax
1082db: 88 45 f7 mov %al,-0x9(%ebp)
rtems_termios_puts (echobuf, 2, tty);
1082de: 50 push %eax
1082df: 52 push %edx
1082e0: 6a 02 push $0x2
1082e2: 8d 45 f6 lea -0xa(%ebp),%eax
1082e5: 50 push %eax
1082e6: 89 55 e4 mov %edx,-0x1c(%ebp)
1082e9: e8 84 fd ff ff call 108072 <rtems_termios_puts>
tty->column += 2;
1082ee: 8b 55 e4 mov -0x1c(%ebp),%edx
1082f1: 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')) {
1082f5: 83 c4 10 add $0x10,%esp
1082f8: eb 08 jmp 108302 <echo+0x53>
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
1082fa: 0f b6 c0 movzbl %al,%eax
1082fd: e8 90 fe ff ff call 108192 <oproc>
}
}
108302: 8b 5d fc mov -0x4(%ebp),%ebx
108305: c9 leave
108306: c3 ret
0010776e <endgrent>:
void endgrent(void)
{
10776e: 55 push %ebp
10776f: 89 e5 mov %esp,%ebp
107771: 83 ec 08 sub $0x8,%esp
if (group_fp != NULL)
107774: a1 98 5e 12 00 mov 0x125e98,%eax
107779: 85 c0 test %eax,%eax
10777b: 74 0c je 107789 <endgrent+0x1b> <== NEVER TAKEN
fclose(group_fp);
10777d: 83 ec 0c sub $0xc,%esp
107780: 50 push %eax
107781: e8 d6 a3 00 00 call 111b5c <fclose>
107786: 83 c4 10 add $0x10,%esp
}
107789: c9 leave
10778a: c3 ret
00107621 <endpwent>:
void endpwent(void)
{
107621: 55 push %ebp
107622: 89 e5 mov %esp,%ebp
107624: 83 ec 08 sub $0x8,%esp
if (passwd_fp != NULL)
107627: a1 74 5f 12 00 mov 0x125f74,%eax
10762c: 85 c0 test %eax,%eax
10762e: 74 0c je 10763c <endpwent+0x1b> <== NEVER TAKEN
fclose(passwd_fp);
107630: 83 ec 0c sub $0xc,%esp
107633: 50 push %eax
107634: e8 23 a5 00 00 call 111b5c <fclose>
107639: 83 c4 10 add $0x10,%esp
}
10763c: c9 leave
10763d: c3 ret
00108307 <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)
{
108307: 55 push %ebp
108308: 89 e5 mov %esp,%ebp
10830a: 57 push %edi
10830b: 56 push %esi
10830c: 53 push %ebx
10830d: 83 ec 2c sub $0x2c,%esp
108310: 89 c3 mov %eax,%ebx
108312: 89 55 e4 mov %edx,-0x1c(%ebp)
if (tty->ccount == 0)
108315: 83 78 20 00 cmpl $0x0,0x20(%eax)
108319: 0f 84 59 01 00 00 je 108478 <erase+0x171>
return;
if (lineFlag) {
10831f: 85 d2 test %edx,%edx
108321: 0f 84 46 01 00 00 je 10846d <erase+0x166>
if (!(tty->termios.c_lflag & ECHO)) {
108327: 8b 40 3c mov 0x3c(%eax),%eax
10832a: a8 08 test $0x8,%al
10832c: 75 0c jne 10833a <erase+0x33> <== ALWAYS TAKEN
tty->ccount = 0;
10832e: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
return;
108335: e9 3e 01 00 00 jmp 108478 <erase+0x171> <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
10833a: a8 10 test $0x10,%al
10833c: 0f 85 2b 01 00 00 jne 10846d <erase+0x166> <== ALWAYS TAKEN
tty->ccount = 0;
108342: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
108349: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED
10834d: 89 da mov %ebx,%edx <== NOT EXECUTED
10834f: e8 5b ff ff ff call 1082af <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
108354: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED
108358: 0f 84 1a 01 00 00 je 108478 <erase+0x171> <== NOT EXECUTED
echo ('\n', tty);
10835e: 89 da mov %ebx,%edx <== NOT EXECUTED
108360: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
108365: eb 2a jmp 108391 <erase+0x8a> <== NOT EXECUTED
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
108367: 8b 7b 1c mov 0x1c(%ebx),%edi
10836a: 8d 50 ff lea -0x1(%eax),%edx
10836d: 89 53 20 mov %edx,0x20(%ebx)
108370: 8a 4c 07 ff mov -0x1(%edi,%eax,1),%cl
if (tty->termios.c_lflag & ECHO) {
108374: 8b 53 3c mov 0x3c(%ebx),%edx
108377: f6 c2 08 test $0x8,%dl
10837a: 0f 84 e7 00 00 00 je 108467 <erase+0x160> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
108380: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
108384: 75 17 jne 10839d <erase+0x96>
108386: f6 c2 10 test $0x10,%dl
108389: 75 12 jne 10839d <erase+0x96> <== ALWAYS TAKEN
echo (tty->termios.c_cc[VERASE], tty);
10838b: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED
10838f: 89 da mov %ebx,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
108391: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108394: 5b pop %ebx <== NOT EXECUTED
108395: 5e pop %esi <== NOT EXECUTED
108396: 5f pop %edi <== NOT EXECUTED
108397: 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);
108398: e9 12 ff ff ff jmp 1082af <echo> <== NOT EXECUTED
} else if (c == '\t') {
10839d: 80 f9 09 cmp $0x9,%cl
1083a0: 8b 35 00 21 12 00 mov 0x122100,%esi
1083a6: 89 75 e0 mov %esi,-0x20(%ebp)
1083a9: 75 60 jne 10840b <erase+0x104>
int col = tty->read_start_column;
1083ab: 8b 73 2c mov 0x2c(%ebx),%esi
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
1083ae: b9 01 00 00 00 mov $0x1,%ecx
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
1083b3: 81 e2 00 02 00 00 and $0x200,%edx
1083b9: 89 55 dc mov %edx,-0x24(%ebp)
1083bc: 89 45 d4 mov %eax,-0x2c(%ebp)
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
1083bf: eb 28 jmp 1083e9 <erase+0xe2>
c = tty->cbuf[i++];
1083c1: 8a 54 0f ff mov -0x1(%edi,%ecx,1),%dl
if (c == '\t') {
1083c5: 80 fa 09 cmp $0x9,%dl
1083c8: 75 05 jne 1083cf <erase+0xc8>
col = (col | 7) + 1;
1083ca: 83 ce 07 or $0x7,%esi
1083cd: eb 18 jmp 1083e7 <erase+0xe0>
} else if (iscntrl (c)) {
1083cf: 0f b6 d2 movzbl %dl,%edx
1083d2: 8b 45 e0 mov -0x20(%ebp),%eax
1083d5: f6 44 10 01 20 testb $0x20,0x1(%eax,%edx,1)
1083da: 74 0b je 1083e7 <erase+0xe0> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
1083dc: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) <== NOT EXECUTED
1083e0: 74 06 je 1083e8 <erase+0xe1> <== NOT EXECUTED
col += 2;
1083e2: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
1083e5: eb 01 jmp 1083e8 <erase+0xe1> <== NOT EXECUTED
} else {
col++;
1083e7: 46 inc %esi
1083e8: 41 inc %ecx
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
1083e9: 3b 4d d4 cmp -0x2c(%ebp),%ecx
1083ec: 75 d3 jne 1083c1 <erase+0xba>
1083ee: eb 14 jmp 108404 <erase+0xfd>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
1083f0: 57 push %edi
1083f1: 53 push %ebx
1083f2: 6a 01 push $0x1
1083f4: 68 bc ea 11 00 push $0x11eabc
1083f9: e8 74 fc ff ff call 108072 <rtems_termios_puts>
tty->column--;
1083fe: ff 4b 28 decl 0x28(%ebx)
108401: 83 c4 10 add $0x10,%esp
}
/*
* Back up over the tab
*/
while (tty->column > col) {
108404: 39 73 28 cmp %esi,0x28(%ebx)
108407: 7f e7 jg 1083f0 <erase+0xe9>
108409: eb 5c jmp 108467 <erase+0x160>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
10840b: 0f b6 f1 movzbl %cl,%esi
10840e: 8b 45 e0 mov -0x20(%ebp),%eax
108411: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1)
108416: 74 21 je 108439 <erase+0x132> <== ALWAYS TAKEN
108418: 80 e6 02 and $0x2,%dh <== NOT EXECUTED
10841b: 74 1c je 108439 <erase+0x132> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
10841d: 51 push %ecx <== NOT EXECUTED
10841e: 53 push %ebx <== NOT EXECUTED
10841f: 6a 03 push $0x3 <== NOT EXECUTED
108421: 68 ba ea 11 00 push $0x11eaba <== NOT EXECUTED
108426: e8 47 fc ff ff call 108072 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
10842b: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
10842e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108431: 85 c0 test %eax,%eax <== NOT EXECUTED
108433: 74 04 je 108439 <erase+0x132> <== NOT EXECUTED
tty->column--;
108435: 48 dec %eax <== NOT EXECUTED
108436: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
108439: a1 00 21 12 00 mov 0x122100,%eax
10843e: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1)
108443: 74 06 je 10844b <erase+0x144> <== ALWAYS TAKEN
108445: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED
108449: 74 1c je 108467 <erase+0x160> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
10844b: 52 push %edx
10844c: 53 push %ebx
10844d: 6a 03 push $0x3
10844f: 68 ba ea 11 00 push $0x11eaba
108454: e8 19 fc ff ff call 108072 <rtems_termios_puts>
if (tty->column)
108459: 8b 43 28 mov 0x28(%ebx),%eax
10845c: 83 c4 10 add $0x10,%esp
10845f: 85 c0 test %eax,%eax
108461: 74 04 je 108467 <erase+0x160> <== NEVER TAKEN
tty->column--;
108463: 48 dec %eax
108464: 89 43 28 mov %eax,0x28(%ebx)
}
}
}
if (!lineFlag)
108467: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10846b: 74 0b je 108478 <erase+0x171>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
10846d: 8b 43 20 mov 0x20(%ebx),%eax
108470: 85 c0 test %eax,%eax
108472: 0f 85 ef fe ff ff jne 108367 <erase+0x60>
}
}
if (!lineFlag)
break;
}
}
108478: 8d 65 f4 lea -0xc(%ebp),%esp
10847b: 5b pop %ebx
10847c: 5e pop %esi
10847d: 5f pop %edi
10847e: c9 leave
10847f: c3 ret
00107228 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
107228: 55 push %ebp
107229: 89 e5 mov %esp,%ebp
10722b: 57 push %edi
10722c: 56 push %esi
10722d: 53 push %ebx
10722e: 83 ec 0c sub $0xc,%esp
107231: 8b 5d 08 mov 0x8(%ebp),%ebx
int ret;
va_list ap;
va_start( ap, cmd );
107234: 8d 75 10 lea 0x10(%ebp),%esi
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
107237: 8b 0d 44 21 12 00 mov 0x122144,%ecx
10723d: 39 cb cmp %ecx,%ebx
10723f: 73 14 jae 107255 <fcntl+0x2d>
iop = rtems_libio_iop( fd );
107241: 8b 15 a0 61 12 00 mov 0x1261a0,%edx
107247: 6b db 38 imul $0x38,%ebx,%ebx
10724a: 8d 1c 1a lea (%edx,%ebx,1),%ebx
rtems_libio_check_is_open(iop);
10724d: 8b 43 14 mov 0x14(%ebx),%eax
107250: f6 c4 01 test $0x1,%ah
107253: 75 10 jne 107265 <fcntl+0x3d>
107255: e8 82 a8 00 00 call 111adc <__errno>
10725a: c7 00 09 00 00 00 movl $0x9,(%eax)
107260: e9 e6 00 00 00 jmp 10734b <fcntl+0x123>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
107265: 83 7d 0c 09 cmpl $0x9,0xc(%ebp)
107269: 0f 87 af 00 00 00 ja 10731e <fcntl+0xf6>
10726f: 8b 7d 0c mov 0xc(%ebp),%edi
107272: ff 24 bd 88 02 12 00 jmp *0x120288(,%edi,4)
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
107279: 8b 36 mov (%esi),%esi
if ( fd2 )
10727b: 85 f6 test %esi,%esi
10727d: 74 0e je 10728d <fcntl+0x65>
diop = rtems_libio_iop( fd2 );
10727f: 31 c0 xor %eax,%eax
107281: 39 ce cmp %ecx,%esi
107283: 73 15 jae 10729a <fcntl+0x72> <== NEVER TAKEN
107285: 6b c6 38 imul $0x38,%esi,%eax
107288: 8d 04 02 lea (%edx,%eax,1),%eax
10728b: eb 0d jmp 10729a <fcntl+0x72>
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
10728d: e8 d1 04 00 00 call 107763 <rtems_libio_allocate>
if ( diop == 0 ) {
107292: 85 c0 test %eax,%eax
107294: 0f 84 b1 00 00 00 je 10734b <fcntl+0x123> <== NEVER TAKEN
ret = -1;
break;
}
}
diop->flags = iop->flags;
10729a: 8b 53 14 mov 0x14(%ebx),%edx
10729d: 89 50 14 mov %edx,0x14(%eax)
diop->pathinfo = iop->pathinfo;
1072a0: 8d 78 18 lea 0x18(%eax),%edi
1072a3: 8d 73 18 lea 0x18(%ebx),%esi
1072a6: b9 05 00 00 00 mov $0x5,%ecx
1072ab: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ret = (int) (diop - rtems_libio_iops);
1072ad: 2b 05 a0 61 12 00 sub 0x1261a0,%eax
1072b3: c1 f8 03 sar $0x3,%eax
1072b6: 69 f0 b7 6d db b6 imul $0xb6db6db7,%eax,%esi
1072bc: eb 6d jmp 10732b <fcntl+0x103>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
1072be: f6 c4 08 test $0x8,%ah
1072c1: 0f 95 c0 setne %al
1072c4: 0f b6 c0 movzbl %al,%eax
1072c7: 89 c6 mov %eax,%esi
1072c9: eb 64 jmp 10732f <fcntl+0x107>
* 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 ) )
1072cb: 83 3e 00 cmpl $0x0,(%esi)
1072ce: 74 05 je 1072d5 <fcntl+0xad>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
1072d0: 80 cc 08 or $0x8,%ah
1072d3: eb 03 jmp 1072d8 <fcntl+0xb0>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
1072d5: 80 e4 f7 and $0xf7,%ah
1072d8: 89 43 14 mov %eax,0x14(%ebx)
1072db: eb 30 jmp 10730d <fcntl+0xe5>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
1072dd: 83 ec 0c sub $0xc,%esp
1072e0: 50 push %eax
1072e1: e8 3f 04 00 00 call 107725 <rtems_libio_to_fcntl_flags>
1072e6: 89 c6 mov %eax,%esi
1072e8: 83 c4 10 add $0x10,%esp
1072eb: eb 3e jmp 10732b <fcntl+0x103>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
1072ed: 83 ec 0c sub $0xc,%esp
1072f0: ff 36 pushl (%esi)
1072f2: e8 f9 03 00 00 call 1076f0 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
1072f7: 25 01 02 00 00 and $0x201,%eax
1072fc: 8b 53 14 mov 0x14(%ebx),%edx
1072ff: 81 e2 fe fd ff ff and $0xfffffdfe,%edx
107305: 09 d0 or %edx,%eax
107307: 89 43 14 mov %eax,0x14(%ebx)
10730a: 83 c4 10 add $0x10,%esp
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
10730d: 31 f6 xor %esi,%esi
10730f: eb 1e jmp 10732f <fcntl+0x107>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
107311: e8 c6 a7 00 00 call 111adc <__errno>
107316: c7 00 86 00 00 00 movl $0x86,(%eax)
10731c: eb 2d jmp 10734b <fcntl+0x123>
ret = -1;
break;
default:
errno = EINVAL;
10731e: e8 b9 a7 00 00 call 111adc <__errno>
107323: c7 00 16 00 00 00 movl $0x16,(%eax)
107329: eb 20 jmp 10734b <fcntl+0x123>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
10732b: 85 f6 test %esi,%esi
10732d: 78 1f js 10734e <fcntl+0x126> <== NEVER TAKEN
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
10732f: 50 push %eax
107330: 50 push %eax
107331: 8b 43 20 mov 0x20(%ebx),%eax
107334: 53 push %ebx
107335: ff 75 0c pushl 0xc(%ebp)
107338: ff 50 30 call *0x30(%eax)
10733b: 89 c3 mov %eax,%ebx
if (err) {
10733d: 83 c4 10 add $0x10,%esp
107340: 85 c0 test %eax,%eax
107342: 74 0a je 10734e <fcntl+0x126> <== ALWAYS TAKEN
errno = err;
107344: e8 93 a7 00 00 call 111adc <__errno> <== NOT EXECUTED
107349: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
ret = -1;
10734b: 83 ce ff or $0xffffffff,%esi
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
10734e: 89 f0 mov %esi,%eax
107350: 8d 65 f4 lea -0xc(%ebp),%esp
107353: 5b pop %ebx
107354: 5e pop %esi
107355: 5f pop %edi
107356: c9 leave
107357: c3 ret
0010f11f <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
10f11f: 55 push %ebp
10f120: 89 e5 mov %esp,%ebp
10f122: 57 push %edi
10f123: 56 push %esi
10f124: 53 push %ebx
10f125: 83 ec 2c sub $0x2c,%esp
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
10f128: 83 3d a8 6f 12 00 00 cmpl $0x0,0x126fa8
10f12f: 75 50 jne 10f181 <fifo_open+0x62>
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 );
10f131: 53 push %ebx
10f132: 6a 00 push $0x0
10f134: 6a 00 push $0x0
10f136: ff 35 a8 71 12 00 pushl 0x1271a8
10f13c: e8 9b c0 ff ff call 10b1dc <rtems_semaphore_obtain>
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
10f141: 83 c4 10 add $0x10,%esp
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10f144: 31 db xor %ebx,%ebx
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
10f146: 83 3d a8 6f 12 00 00 cmpl $0x0,0x126fa8
10f14d: 75 1d jne 10f16c <fifo_open+0x4d> <== NEVER TAKEN
sc = rtems_semaphore_create(
10f14f: 83 ec 0c sub $0xc,%esp
10f152: 68 a8 6f 12 00 push $0x126fa8
10f157: 6a 00 push $0x0
10f159: 6a 54 push $0x54
10f15b: 6a 01 push $0x1
10f15d: 68 45 50 49 50 push $0x50495045
10f162: e8 4d be ff ff call 10afb4 <rtems_semaphore_create>
10f167: 89 c3 mov %eax,%ebx
10f169: 83 c4 20 add $0x20,%esp
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10f16c: 83 ec 0c sub $0xc,%esp
10f16f: ff 35 a8 71 12 00 pushl 0x1271a8
10f175: e8 4e c1 ff ff call 10b2c8 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
10f17a: 83 c4 10 add $0x10,%esp
10f17d: 85 db test %ebx,%ebx
10f17f: 75 19 jne 10f19a <fifo_open+0x7b>
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10f181: 51 push %ecx
10f182: 6a 00 push $0x0
10f184: 6a 00 push $0x0
10f186: ff 35 a8 6f 12 00 pushl 0x126fa8
10f18c: e8 4b c0 ff ff call 10b1dc <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
10f191: 83 c4 10 add $0x10,%esp
return 0;
10f194: 31 f6 xor %esi,%esi
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
}
if (sc == RTEMS_SUCCESSFUL) {
10f196: 85 c0 test %eax,%eax
10f198: 74 05 je 10f19f <fifo_open+0x80> <== ALWAYS TAKEN
return 0;
} else {
return -ENOMEM;
10f19a: be f4 ff ff ff mov $0xfffffff4,%esi
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
if (err)
10f19f: 85 f6 test %esi,%esi
10f1a1: 0f 85 37 03 00 00 jne 10f4de <fifo_open+0x3bf> <== NEVER TAKEN
return err;
pipe = *pipep;
10f1a7: 8b 45 08 mov 0x8(%ebp),%eax
10f1aa: 8b 18 mov (%eax),%ebx
if (pipe == NULL) {
10f1ac: 85 db test %ebx,%ebx
10f1ae: 0f 85 56 01 00 00 jne 10f30a <fifo_open+0x1eb>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
10f1b4: 83 ec 0c sub $0xc,%esp
10f1b7: 6a 34 push $0x34
10f1b9: e8 42 94 ff ff call 108600 <malloc>
10f1be: 89 c3 mov %eax,%ebx
10f1c0: 89 45 d4 mov %eax,-0x2c(%ebp)
if (pipe == NULL)
10f1c3: 83 c4 10 add $0x10,%esp
10f1c6: 85 c0 test %eax,%eax
10f1c8: 0f 84 35 01 00 00 je 10f303 <fifo_open+0x1e4> <== NEVER TAKEN
return err;
memset(pipe, 0, sizeof(pipe_control_t));
10f1ce: b9 0d 00 00 00 mov $0xd,%ecx
10f1d3: 89 c7 mov %eax,%edi
10f1d5: 89 f0 mov %esi,%eax
10f1d7: f3 ab rep stos %eax,%es:(%edi)
pipe->Size = PIPE_BUF;
10f1d9: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx)
pipe->Buffer = malloc(pipe->Size);
10f1e0: 83 ec 0c sub $0xc,%esp
10f1e3: 68 00 02 00 00 push $0x200
10f1e8: e8 13 94 ff ff call 108600 <malloc>
10f1ed: 89 03 mov %eax,(%ebx)
if (! pipe->Buffer)
10f1ef: 83 c4 10 add $0x10,%esp
10f1f2: 85 c0 test %eax,%eax
10f1f4: 0f 84 fb 00 00 00 je 10f2f5 <fifo_open+0x1d6> <== NEVER TAKEN
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
10f1fa: 8d 43 2c lea 0x2c(%ebx),%eax
10f1fd: 50 push %eax
10f1fe: 6a 00 push $0x0
10f200: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'r', c),
10f202: 0f be 05 50 50 12 00 movsbl 0x125050,%eax
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
10f209: 0d 00 72 49 50 or $0x50497200,%eax
10f20e: 50 push %eax
10f20f: e8 84 18 00 00 call 110a98 <rtems_barrier_create>
10f214: 83 c4 10 add $0x10,%esp
10f217: 85 c0 test %eax,%eax
10f219: 0f 85 c6 00 00 00 jne 10f2e5 <fifo_open+0x1c6>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
10f21f: 8d 43 30 lea 0x30(%ebx),%eax
10f222: 50 push %eax
10f223: 6a 00 push $0x0
10f225: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'w', c),
10f227: 0f be 05 50 50 12 00 movsbl 0x125050,%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(
10f22e: 0d 00 77 49 50 or $0x50497700,%eax
10f233: 50 push %eax
10f234: e8 5f 18 00 00 call 110a98 <rtems_barrier_create>
10f239: 83 c4 10 add $0x10,%esp
10f23c: 85 c0 test %eax,%eax
10f23e: 0f 85 90 00 00 00 jne 10f2d4 <fifo_open+0x1b5>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
10f244: 83 ec 0c sub $0xc,%esp
10f247: 8d 43 28 lea 0x28(%ebx),%eax
10f24a: 50 push %eax
10f24b: 6a 00 push $0x0
10f24d: 6a 10 push $0x10
10f24f: 6a 01 push $0x1
rtems_build_name ('P', 'I', 's', c), 1,
10f251: 0f be 05 50 50 12 00 movsbl 0x125050,%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(
10f258: 0d 00 73 49 50 or $0x50497300,%eax
10f25d: 50 push %eax
10f25e: e8 51 bd ff ff call 10afb4 <rtems_semaphore_create>
10f263: 83 c4 20 add $0x20,%esp
10f266: 85 c0 test %eax,%eax
10f268: 75 59 jne 10f2c3 <fifo_open+0x1a4>
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
_Objects_Get( &_Barrier_Information, id, location );
10f26a: 52 push %edx
/* 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
10f26b: 8d 7d e0 lea -0x20(%ebp),%edi
10f26e: 57 push %edi
10f26f: ff 73 2c pushl 0x2c(%ebx)
10f272: 68 dc 7b 12 00 push $0x127bdc
10f277: e8 b0 d3 ff ff call 10c62c <_Objects_Get>
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
10f27c: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax)
_Thread_Enable_dispatch();
10f283: e8 1a de ff ff call 10d0a2 <_Thread_Enable_dispatch>
10f288: 83 c4 0c add $0xc,%esp
10f28b: 57 push %edi
10f28c: ff 73 30 pushl 0x30(%ebx)
10f28f: 68 dc 7b 12 00 push $0x127bdc
10f294: e8 93 d3 ff ff call 10c62c <_Objects_Get>
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
10f299: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax)
_Thread_Enable_dispatch();
10f2a0: e8 fd dd ff ff call 10d0a2 <_Thread_Enable_dispatch>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
10f2a5: a0 50 50 12 00 mov 0x125050,%al
10f2aa: 8d 50 01 lea 0x1(%eax),%edx
10f2ad: 88 15 50 50 12 00 mov %dl,0x125050
10f2b3: 83 c4 10 add $0x10,%esp
10f2b6: 3c 7a cmp $0x7a,%al
10f2b8: 75 50 jne 10f30a <fifo_open+0x1eb>
c = 'a';
10f2ba: c6 05 50 50 12 00 61 movb $0x61,0x125050
10f2c1: eb 47 jmp 10f30a <fifo_open+0x1eb>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
10f2c3: 83 ec 0c sub $0xc,%esp
10f2c6: 8b 55 d4 mov -0x2c(%ebp),%edx
10f2c9: ff 72 30 pushl 0x30(%edx)
10f2cc: e8 7f 18 00 00 call 110b50 <rtems_barrier_delete>
10f2d1: 83 c4 10 add $0x10,%esp
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
10f2d4: 83 ec 0c sub $0xc,%esp
10f2d7: 8b 45 d4 mov -0x2c(%ebp),%eax
10f2da: ff 70 2c pushl 0x2c(%eax)
10f2dd: e8 6e 18 00 00 call 110b50 <rtems_barrier_delete>
10f2e2: 83 c4 10 add $0x10,%esp
err_rbar:
free(pipe->Buffer);
10f2e5: 83 ec 0c sub $0xc,%esp
10f2e8: 8b 55 d4 mov -0x2c(%ebp),%edx
10f2eb: ff 32 pushl (%edx)
10f2ed: e8 ea 8c ff ff call 107fdc <free>
10f2f2: 83 c4 10 add $0x10,%esp
err_buf:
free(pipe);
10f2f5: 83 ec 0c sub $0xc,%esp
10f2f8: ff 75 d4 pushl -0x2c(%ebp)
10f2fb: e8 dc 8c ff ff call 107fdc <free>
10f300: 83 c4 10 add $0x10,%esp
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
10f303: be f4 ff ff ff mov $0xfffffff4,%esi
10f308: eb 33 jmp 10f33d <fifo_open+0x21e>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
10f30a: 50 push %eax
10f30b: 6a 00 push $0x0
10f30d: 6a 00 push $0x0
10f30f: ff 73 28 pushl 0x28(%ebx)
10f312: e8 c5 be ff ff call 10b1dc <rtems_semaphore_obtain>
10f317: 83 c4 10 add $0x10,%esp
10f31a: 85 c0 test %eax,%eax
10f31c: 74 05 je 10f323 <fifo_open+0x204> <== ALWAYS TAKEN
err = -EINTR;
10f31e: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
if (*pipep == NULL) {
10f323: 8b 45 08 mov 0x8(%ebp),%eax
10f326: 83 38 00 cmpl $0x0,(%eax)
10f329: 75 12 jne 10f33d <fifo_open+0x21e>
if (err)
10f32b: 85 f6 test %esi,%esi
10f32d: 74 09 je 10f338 <fifo_open+0x219> <== ALWAYS TAKEN
pipe_free(pipe);
10f32f: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10f331: e8 1c fd ff ff call 10f052 <pipe_free> <== NOT EXECUTED
10f336: eb 05 jmp 10f33d <fifo_open+0x21e> <== NOT EXECUTED
else
*pipep = pipe;
10f338: 8b 55 08 mov 0x8(%ebp),%edx
10f33b: 89 1a mov %ebx,(%edx)
}
out:
pipe_unlock();
10f33d: e8 fa fc ff ff call 10f03c <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
10f342: 85 f6 test %esi,%esi
10f344: 0f 85 94 01 00 00 jne 10f4de <fifo_open+0x3bf>
return err;
pipe = *pipep;
10f34a: 8b 45 08 mov 0x8(%ebp),%eax
10f34d: 8b 18 mov (%eax),%ebx
switch (LIBIO_ACCMODE(iop)) {
10f34f: 8b 55 0c mov 0xc(%ebp),%edx
10f352: 8b 42 14 mov 0x14(%edx),%eax
10f355: 83 e0 06 and $0x6,%eax
10f358: 83 f8 04 cmp $0x4,%eax
10f35b: 0f 84 91 00 00 00 je 10f3f2 <fifo_open+0x2d3>
10f361: 83 f8 06 cmp $0x6,%eax
10f364: 0f 84 10 01 00 00 je 10f47a <fifo_open+0x35b>
10f36a: 83 f8 02 cmp $0x2,%eax
10f36d: 0f 85 49 01 00 00 jne 10f4bc <fifo_open+0x39d> <== NEVER TAKEN
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
10f373: ff 43 20 incl 0x20(%ebx)
if (pipe->Readers ++ == 0)
10f376: 8b 43 10 mov 0x10(%ebx),%eax
10f379: 8d 50 01 lea 0x1(%eax),%edx
10f37c: 89 53 10 mov %edx,0x10(%ebx)
10f37f: 85 c0 test %eax,%eax
10f381: 75 11 jne 10f394 <fifo_open+0x275> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
10f383: 57 push %edi
10f384: 57 push %edi
10f385: 8d 45 e4 lea -0x1c(%ebp),%eax
10f388: 50 push %eax
10f389: ff 73 30 pushl 0x30(%ebx)
10f38c: e8 47 18 00 00 call 110bd8 <rtems_barrier_release>
10f391: 83 c4 10 add $0x10,%esp
if (pipe->Writers == 0) {
10f394: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f398: 0f 85 1e 01 00 00 jne 10f4bc <fifo_open+0x39d>
/* Not an error */
if (LIBIO_NODELAY(iop))
10f39e: 8b 45 0c mov 0xc(%ebp),%eax
10f3a1: f6 40 14 01 testb $0x1,0x14(%eax)
10f3a5: 0f 85 11 01 00 00 jne 10f4bc <fifo_open+0x39d>
break;
prevCounter = pipe->writerCounter;
10f3ab: 8b 7b 24 mov 0x24(%ebx),%edi
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
10f3ae: 83 ec 0c sub $0xc,%esp
10f3b1: ff 73 28 pushl 0x28(%ebx)
10f3b4: e8 0f bf ff ff call 10b2c8 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
10f3b9: 5a pop %edx
10f3ba: 59 pop %ecx
10f3bb: 6a 00 push $0x0
10f3bd: ff 73 2c pushl 0x2c(%ebx)
10f3c0: e8 6b 18 00 00 call 110c30 <rtems_barrier_wait>
10f3c5: 83 c4 10 add $0x10,%esp
10f3c8: 85 c0 test %eax,%eax
10f3ca: 0f 85 f9 00 00 00 jne 10f4c9 <fifo_open+0x3aa> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
10f3d0: 50 push %eax
10f3d1: 6a 00 push $0x0
10f3d3: 6a 00 push $0x0
10f3d5: ff 73 28 pushl 0x28(%ebx)
10f3d8: e8 ff bd ff ff call 10b1dc <rtems_semaphore_obtain>
10f3dd: 83 c4 10 add $0x10,%esp
10f3e0: 85 c0 test %eax,%eax
10f3e2: 0f 85 e1 00 00 00 jne 10f4c9 <fifo_open+0x3aa> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->writerCounter);
10f3e8: 3b 7b 24 cmp 0x24(%ebx),%edi
10f3eb: 74 c1 je 10f3ae <fifo_open+0x28f> <== NEVER TAKEN
10f3ed: e9 ca 00 00 00 jmp 10f4bc <fifo_open+0x39d>
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
10f3f2: ff 43 24 incl 0x24(%ebx)
if (pipe->Writers ++ == 0)
10f3f5: 8b 43 14 mov 0x14(%ebx),%eax
10f3f8: 8d 50 01 lea 0x1(%eax),%edx
10f3fb: 89 53 14 mov %edx,0x14(%ebx)
10f3fe: 85 c0 test %eax,%eax
10f400: 75 11 jne 10f413 <fifo_open+0x2f4> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
10f402: 57 push %edi
10f403: 57 push %edi
10f404: 8d 45 e4 lea -0x1c(%ebp),%eax
10f407: 50 push %eax
10f408: ff 73 2c pushl 0x2c(%ebx)
10f40b: e8 c8 17 00 00 call 110bd8 <rtems_barrier_release>
10f410: 83 c4 10 add $0x10,%esp
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
10f413: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f417: 0f 85 9f 00 00 00 jne 10f4bc <fifo_open+0x39d>
10f41d: 8b 55 0c mov 0xc(%ebp),%edx
10f420: f6 42 14 01 testb $0x1,0x14(%edx)
10f424: 74 18 je 10f43e <fifo_open+0x31f>
PIPE_UNLOCK(pipe);
10f426: 83 ec 0c sub $0xc,%esp
10f429: ff 73 28 pushl 0x28(%ebx)
10f42c: e8 97 be ff ff call 10b2c8 <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
10f431: 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;
10f434: be fa ff ff ff mov $0xfffffffa,%esi
goto out_error;
10f439: e9 90 00 00 00 jmp 10f4ce <fifo_open+0x3af>
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
10f43e: 8b 7b 20 mov 0x20(%ebx),%edi
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
10f441: 83 ec 0c sub $0xc,%esp
10f444: ff 73 28 pushl 0x28(%ebx)
10f447: e8 7c be ff ff call 10b2c8 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
10f44c: 5a pop %edx
10f44d: 59 pop %ecx
10f44e: 6a 00 push $0x0
10f450: ff 73 30 pushl 0x30(%ebx)
10f453: e8 d8 17 00 00 call 110c30 <rtems_barrier_wait>
10f458: 83 c4 10 add $0x10,%esp
10f45b: 85 c0 test %eax,%eax
10f45d: 75 6a jne 10f4c9 <fifo_open+0x3aa> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
10f45f: 50 push %eax
10f460: 6a 00 push $0x0
10f462: 6a 00 push $0x0
10f464: ff 73 28 pushl 0x28(%ebx)
10f467: e8 70 bd ff ff call 10b1dc <rtems_semaphore_obtain>
10f46c: 83 c4 10 add $0x10,%esp
10f46f: 85 c0 test %eax,%eax
10f471: 75 56 jne 10f4c9 <fifo_open+0x3aa> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
10f473: 3b 7b 20 cmp 0x20(%ebx),%edi
10f476: 74 c9 je 10f441 <fifo_open+0x322> <== NEVER TAKEN
10f478: eb 42 jmp 10f4bc <fifo_open+0x39d>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
10f47a: ff 43 20 incl 0x20(%ebx)
if (pipe->Readers ++ == 0)
10f47d: 8b 43 10 mov 0x10(%ebx),%eax
10f480: 8d 50 01 lea 0x1(%eax),%edx
10f483: 89 53 10 mov %edx,0x10(%ebx)
10f486: 85 c0 test %eax,%eax
10f488: 75 11 jne 10f49b <fifo_open+0x37c> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
10f48a: 51 push %ecx
10f48b: 51 push %ecx
10f48c: 8d 45 e4 lea -0x1c(%ebp),%eax
10f48f: 50 push %eax
10f490: ff 73 30 pushl 0x30(%ebx)
10f493: e8 40 17 00 00 call 110bd8 <rtems_barrier_release>
10f498: 83 c4 10 add $0x10,%esp
pipe->writerCounter ++;
10f49b: ff 43 24 incl 0x24(%ebx)
if (pipe->Writers ++ == 0)
10f49e: 8b 43 14 mov 0x14(%ebx),%eax
10f4a1: 8d 50 01 lea 0x1(%eax),%edx
10f4a4: 89 53 14 mov %edx,0x14(%ebx)
10f4a7: 85 c0 test %eax,%eax
10f4a9: 75 11 jne 10f4bc <fifo_open+0x39d> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
10f4ab: 52 push %edx
10f4ac: 52 push %edx
10f4ad: 8d 45 e4 lea -0x1c(%ebp),%eax
10f4b0: 50 push %eax
10f4b1: ff 73 2c pushl 0x2c(%ebx)
10f4b4: e8 1f 17 00 00 call 110bd8 <rtems_barrier_release>
10f4b9: 83 c4 10 add $0x10,%esp
break;
}
PIPE_UNLOCK(pipe);
10f4bc: 83 ec 0c sub $0xc,%esp
10f4bf: ff 73 28 pushl 0x28(%ebx)
10f4c2: e8 01 be ff ff call 10b2c8 <rtems_semaphore_release>
10f4c7: eb 12 jmp 10f4db <fifo_open+0x3bc>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
10f4c9: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
10f4ce: 50 push %eax
10f4cf: 50 push %eax
10f4d0: ff 75 0c pushl 0xc(%ebp)
10f4d3: ff 75 08 pushl 0x8(%ebp)
10f4d6: e8 b2 fb ff ff call 10f08d <pipe_release>
return err;
10f4db: 83 c4 10 add $0x10,%esp
}
10f4de: 89 f0 mov %esi,%eax
10f4e0: 8d 65 f4 lea -0xc(%ebp),%esp
10f4e3: 5b pop %ebx
10f4e4: 5e pop %esi
10f4e5: 5f pop %edi
10f4e6: c9 leave
10f4e7: c3 ret
001073cc <fpathconf>:
long fpathconf(
int fd,
int name
)
{
1073cc: 55 push %ebp
1073cd: 89 e5 mov %esp,%ebp
1073cf: 83 ec 08 sub $0x8,%esp
1073d2: 8b 45 08 mov 0x8(%ebp),%eax
1073d5: 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);
1073d8: 3b 05 44 21 12 00 cmp 0x122144,%eax
1073de: 73 11 jae 1073f1 <fpathconf+0x25>
iop = rtems_libio_iop(fd);
1073e0: 6b c0 38 imul $0x38,%eax,%eax
1073e3: 03 05 a0 61 12 00 add 0x1261a0,%eax
rtems_libio_check_is_open(iop);
1073e9: 8b 48 14 mov 0x14(%eax),%ecx
1073ec: f6 c5 01 test $0x1,%ch
1073ef: 75 0d jne 1073fe <fpathconf+0x32> <== ALWAYS TAKEN
1073f1: e8 e6 a6 00 00 call 111adc <__errno>
1073f6: c7 00 09 00 00 00 movl $0x9,(%eax)
1073fc: eb 5b jmp 107459 <fpathconf+0x8d>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
1073fe: 80 e1 02 and $0x2,%cl
107401: 74 4b je 10744e <fpathconf+0x82>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
107403: 8b 40 28 mov 0x28(%eax),%eax
switch ( name ) {
107406: 83 fa 0b cmp $0xb,%edx
107409: 77 43 ja 10744e <fpathconf+0x82>
10740b: ff 24 95 b0 02 12 00 jmp *0x1202b0(,%edx,4)
case _PC_LINK_MAX:
return_value = the_limits->link_max;
107412: 8b 40 38 mov 0x38(%eax),%eax
break;
107415: eb 45 jmp 10745c <fpathconf+0x90>
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
107417: 8b 40 3c mov 0x3c(%eax),%eax
break;
10741a: eb 40 jmp 10745c <fpathconf+0x90>
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
10741c: 8b 40 40 mov 0x40(%eax),%eax
break;
10741f: eb 3b jmp 10745c <fpathconf+0x90>
case _PC_NAME_MAX:
return_value = the_limits->name_max;
107421: 8b 40 44 mov 0x44(%eax),%eax
break;
107424: eb 36 jmp 10745c <fpathconf+0x90>
case _PC_PATH_MAX:
return_value = the_limits->path_max;
107426: 8b 40 48 mov 0x48(%eax),%eax
break;
107429: eb 31 jmp 10745c <fpathconf+0x90>
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
10742b: 8b 40 4c mov 0x4c(%eax),%eax
break;
10742e: eb 2c jmp 10745c <fpathconf+0x90>
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
107430: 8b 40 54 mov 0x54(%eax),%eax
break;
107433: eb 27 jmp 10745c <fpathconf+0x90>
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
107435: 8b 40 58 mov 0x58(%eax),%eax
break;
107438: eb 22 jmp 10745c <fpathconf+0x90>
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
10743a: 8b 40 64 mov 0x64(%eax),%eax
break;
10743d: eb 1d jmp 10745c <fpathconf+0x90>
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
10743f: 8b 40 50 mov 0x50(%eax),%eax
break;
107442: eb 18 jmp 10745c <fpathconf+0x90>
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
107444: 8b 40 5c mov 0x5c(%eax),%eax
break;
107447: eb 13 jmp 10745c <fpathconf+0x90>
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
107449: 8b 40 60 mov 0x60(%eax),%eax
break;
10744c: eb 0e jmp 10745c <fpathconf+0x90>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10744e: e8 89 a6 00 00 call 111adc <__errno>
107453: c7 00 16 00 00 00 movl $0x16,(%eax)
107459: 83 c8 ff or $0xffffffff,%eax
break;
}
return return_value;
}
10745c: c9 leave
10745d: c3 ret
00106998 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
106998: 55 push %ebp
106999: 89 e5 mov %esp,%ebp
10699b: 53 push %ebx
10699c: 83 ec 04 sub $0x4,%esp
10699f: 8b 5d 08 mov 0x8(%ebp),%ebx
MSBUMP(free_calls, 1);
1069a2: ff 05 c4 41 12 00 incl 0x1241c4
if ( !ptr )
1069a8: 85 db test %ebx,%ebx
1069aa: 74 5f je 106a0b <free+0x73>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1069ac: 83 3d 3c 44 12 00 03 cmpl $0x3,0x12443c
1069b3: 75 15 jne 1069ca <free+0x32> <== NEVER TAKEN
!malloc_is_system_state_OK() ) {
1069b5: e8 56 01 00 00 call 106b10 <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()) &&
1069ba: 84 c0 test %al,%al
1069bc: 75 0c jne 1069ca <free+0x32>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
1069be: 89 5d 08 mov %ebx,0x8(%ebp)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
1069c1: 8b 5d fc mov -0x4(%ebp),%ebx
1069c4: 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);
1069c5: e9 ae 01 00 00 jmp 106b78 <malloc_deferred_free>
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
1069ca: a1 50 26 12 00 mov 0x122650,%eax
1069cf: 85 c0 test %eax,%eax
1069d1: 74 0a je 1069dd <free+0x45>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
1069d3: 83 ec 0c sub $0xc,%esp
1069d6: 53 push %ebx
1069d7: ff 50 08 call *0x8(%eax)
1069da: 83 c4 10 add $0x10,%esp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
1069dd: 50 push %eax
1069de: 50 push %eax
1069df: 53 push %ebx
1069e0: ff 35 80 01 12 00 pushl 0x120180
1069e6: e8 9d 44 00 00 call 10ae88 <_Protected_heap_Free>
1069eb: 83 c4 10 add $0x10,%esp
1069ee: 84 c0 test %al,%al
1069f0: 75 19 jne 106a0b <free+0x73>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
1069f2: a1 80 01 12 00 mov 0x120180,%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",
1069f7: ff 70 1c pushl 0x1c(%eax)
1069fa: ff 70 18 pushl 0x18(%eax)
1069fd: 53 push %ebx
1069fe: 68 db e9 11 00 push $0x11e9db
106a03: e8 fc 0b 00 00 call 107604 <printk>
106a08: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
106a0b: 8b 5d fc mov -0x4(%ebp),%ebx
106a0e: c9 leave
106a0f: c3 ret
00107c44 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
107c44: 55 push %ebp
107c45: 89 e5 mov %esp,%ebp
107c47: 53 push %ebx
107c48: 83 ec 04 sub $0x4,%esp
107c4b: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
107c4e: 81 fb d0 51 12 00 cmp $0x1251d0,%ebx
107c54: 74 26 je 107c7c <free_user_env+0x38> <== NEVER TAKEN
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
107c56: 83 ec 0c sub $0xc,%esp
107c59: 8d 43 04 lea 0x4(%ebx),%eax
107c5c: 50 push %eax
107c5d: e8 46 f1 ff ff call 106da8 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &env->root_directory);
107c62: 8d 43 18 lea 0x18(%ebx),%eax
107c65: 89 04 24 mov %eax,(%esp)
107c68: e8 3b f1 ff ff call 106da8 <rtems_filesystem_freenode>
free(env);
107c6d: 83 c4 10 add $0x10,%esp
107c70: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
107c73: 8b 5d fc mov -0x4(%ebp),%ebx
107c76: c9 leave
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
107c77: e9 40 f1 ff ff jmp 106dbc <free>
}
}
107c7c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107c7f: c9 leave <== NOT EXECUTED
107c80: c3 ret <== NOT EXECUTED
0011e2d8 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
11e2d8: 55 push %ebp
11e2d9: 89 e5 mov %esp,%ebp
11e2db: 57 push %edi
11e2dc: 56 push %esi
11e2dd: 53 push %ebx
11e2de: 83 ec 2c sub $0x2c,%esp
11e2e1: 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 );
11e2e4: 31 db xor %ebx,%ebx
11e2e6: 3b 05 44 31 12 00 cmp 0x123144,%eax
11e2ec: 73 09 jae 11e2f7 <getdents+0x1f> <== NEVER TAKEN
11e2ee: 6b d8 38 imul $0x38,%eax,%ebx
11e2f1: 03 1d e0 72 12 00 add 0x1272e0,%ebx
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
11e2f7: 8d 7d d4 lea -0x2c(%ebp),%edi
11e2fa: 8d 73 18 lea 0x18(%ebx),%esi
11e2fd: b9 05 00 00 00 mov $0x5,%ecx
11e302: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
11e304: 83 ec 0c sub $0xc,%esp
11e307: 8d 45 d4 lea -0x2c(%ebp),%eax
11e30a: 50 push %eax
11e30b: 8b 45 e0 mov -0x20(%ebp),%eax
11e30e: ff 50 10 call *0x10(%eax)
11e311: 83 c4 10 add $0x10,%esp
11e314: 48 dec %eax
11e315: 74 10 je 11e327 <getdents+0x4f>
rtems_set_errno_and_return_minus_one( ENOTDIR );
11e317: e8 e0 38 ff ff call 111bfc <__errno>
11e31c: c7 00 14 00 00 00 movl $0x14,(%eax)
11e322: 83 c8 ff or $0xffffffff,%eax
11e325: eb 11 jmp 11e338 <getdents+0x60>
/*
* 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 );
11e327: 50 push %eax
11e328: 8b 43 20 mov 0x20(%ebx),%eax
11e32b: ff 75 10 pushl 0x10(%ebp)
11e32e: ff 75 0c pushl 0xc(%ebp)
11e331: 53 push %ebx
11e332: ff 50 08 call *0x8(%eax)
11e335: 83 c4 10 add $0x10,%esp
}
11e338: 8d 65 f4 lea -0xc(%ebp),%esp
11e33b: 5b pop %ebx
11e33c: 5e pop %esi
11e33d: 5f pop %edi
11e33e: c9 leave
11e33f: c3 ret
001101e4 <imfs_dir_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
1101e4: 55 push %ebp
1101e5: 89 e5 mov %esp,%ebp
1101e7: 8b 55 08 mov 0x8(%ebp),%edx
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 )
1101ea: 8b 4a 18 mov 0x18(%edx),%ecx
return -1; /* It wasn't a directory --> return error */
1101ed: 83 c8 ff or $0xffffffff,%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 )
1101f0: 83 79 4c 01 cmpl $0x1,0x4c(%ecx)
1101f4: 75 10 jne 110206 <imfs_dir_open+0x22> <== NEVER TAKEN
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
1101f6: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
1101fd: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
return 0;
110204: 31 c0 xor %eax,%eax
}
110206: c9 leave
110207: c3 ret
0011044d <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
11044d: 55 push %ebp
11044e: 89 e5 mov %esp,%ebp
110450: 53 push %ebx
110451: 83 ec 04 sub $0x4,%esp
110454: 8b 45 0c mov 0xc(%ebp),%eax
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
110457: 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 );
110459: 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 ) )
11045c: 39 53 50 cmp %edx,0x50(%ebx)
11045f: 74 0d je 11046e <imfs_dir_rmnod+0x21>
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
110461: e8 7e 08 00 00 call 110ce4 <__errno>
110466: c7 00 5a 00 00 00 movl $0x5a,(%eax)
11046c: eb 13 jmp 110481 <imfs_dir_rmnod+0x34>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
11046e: 8b 40 10 mov 0x10(%eax),%eax
110471: 39 58 1c cmp %ebx,0x1c(%eax)
110474: 75 10 jne 110486 <imfs_dir_rmnod+0x39>
rtems_set_errno_and_return_minus_one( EBUSY );
110476: e8 69 08 00 00 call 110ce4 <__errno>
11047b: c7 00 10 00 00 00 movl $0x10,(%eax)
110481: 83 c8 ff or $0xffffffff,%eax
110484: eb 1c jmp 1104a2 <imfs_dir_rmnod+0x55>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
110486: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx)
11048a: 75 ea jne 110476 <imfs_dir_rmnod+0x29> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
11048c: 83 ec 0c sub $0xc,%esp
11048f: 53 push %ebx
110490: e8 53 d0 ff ff call 10d4e8 <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
110495: 89 1c 24 mov %ebx,(%esp)
110498: e8 8d d0 ff ff call 10d52a <IMFS_check_node_remove>
return 0;
11049d: 83 c4 10 add $0x10,%esp
1104a0: 31 c0 xor %eax,%eax
}
1104a2: 8b 5d fc mov -0x4(%ebp),%ebx
1104a5: c9 leave
1104a6: c3 ret
001072bc <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
1072bc: 55 push %ebp
1072bd: 89 e5 mov %esp,%ebp
1072bf: 53 push %ebx
1072c0: 83 ec 04 sub $0x4,%esp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
1072c3: 80 3d 5c 60 12 00 00 cmpb $0x0,0x12605c
1072ca: 0f 85 b8 00 00 00 jne 107388 <init_etc_passwd_group+0xcc>
return;
etc_passwd_initted = 1;
1072d0: c6 05 5c 60 12 00 01 movb $0x1,0x12605c
mkdir("/etc", 0777);
1072d7: 50 push %eax
1072d8: 50 push %eax
1072d9: 68 ff 01 00 00 push $0x1ff
1072de: 68 07 02 12 00 push $0x120207
1072e3: e8 7c 07 00 00 call 107a64 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
1072e8: 59 pop %ecx
1072e9: 5b pop %ebx
1072ea: 68 72 f0 11 00 push $0x11f072
1072ef: 68 0c 02 12 00 push $0x12020c
1072f4: e8 67 af 00 00 call 112260 <fopen>
1072f9: 83 c4 10 add $0x10,%esp
1072fc: 85 c0 test %eax,%eax
1072fe: 74 06 je 107306 <init_etc_passwd_group+0x4a>
fclose(fp);
107300: 83 ec 0c sub $0xc,%esp
107303: 50 push %eax
107304: eb 2a jmp 107330 <init_etc_passwd_group+0x74>
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
107306: 52 push %edx
107307: 52 push %edx
107308: 68 8c ef 11 00 push $0x11ef8c
10730d: 68 0c 02 12 00 push $0x12020c
107312: e8 49 af 00 00 call 112260 <fopen>
107317: 89 c3 mov %eax,%ebx
107319: 83 c4 10 add $0x10,%esp
10731c: 85 c0 test %eax,%eax
10731e: 74 18 je 107338 <init_etc_passwd_group+0x7c><== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
107320: 50 push %eax
107321: 50 push %eax
107322: 53 push %ebx
107323: 68 18 02 12 00 push $0x120218
107328: e8 ff af 00 00 call 11232c <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
10732d: 89 1c 24 mov %ebx,(%esp)
107330: e8 27 a8 00 00 call 111b5c <fclose>
107335: 83 c4 10 add $0x10,%esp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
107338: 51 push %ecx
107339: 51 push %ecx
10733a: 68 72 f0 11 00 push $0x11f072
10733f: 68 7f 02 12 00 push $0x12027f
107344: e8 17 af 00 00 call 112260 <fopen>
107349: 83 c4 10 add $0x10,%esp
10734c: 85 c0 test %eax,%eax
10734e: 74 06 je 107356 <init_etc_passwd_group+0x9a>
fclose(fp);
107350: 83 ec 0c sub $0xc,%esp
107353: 50 push %eax
107354: eb 2a jmp 107380 <init_etc_passwd_group+0xc4>
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
107356: 52 push %edx
107357: 52 push %edx
107358: 68 8c ef 11 00 push $0x11ef8c
10735d: 68 7f 02 12 00 push $0x12027f
107362: e8 f9 ae 00 00 call 112260 <fopen>
107367: 89 c3 mov %eax,%ebx
107369: 83 c4 10 add $0x10,%esp
10736c: 85 c0 test %eax,%eax
10736e: 74 18 je 107388 <init_etc_passwd_group+0xcc><== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
107370: 50 push %eax
107371: 50 push %eax
107372: 53 push %ebx
107373: 68 8a 02 12 00 push $0x12028a
107378: e8 af af 00 00 call 11232c <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
10737d: 89 1c 24 mov %ebx,(%esp)
107380: e8 d7 a7 00 00 call 111b5c <fclose>
107385: 83 c4 10 add $0x10,%esp
}
}
107388: 8b 5d fc mov -0x4(%ebp),%ebx
10738b: c9 leave
10738c: c3 ret
00108480 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
108480: 55 push %ebp
108481: 89 e5 mov %esp,%ebp
108483: 53 push %ebx
108484: 83 ec 14 sub $0x14,%esp
108487: 89 d3 mov %edx,%ebx
108489: 88 c1 mov %al,%cl
if (tty->termios.c_iflag & ISTRIP)
10848b: 8b 52 30 mov 0x30(%edx),%edx
10848e: f6 c2 20 test $0x20,%dl
108491: 74 03 je 108496 <iproc+0x16> <== ALWAYS TAKEN
c &= 0x7f;
108493: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
108496: f6 c6 02 test $0x2,%dh
108499: 74 16 je 1084b1 <iproc+0x31>
c = tolower (c);
10849b: 0f b6 c9 movzbl %cl,%ecx
10849e: a1 00 21 12 00 mov 0x122100,%eax
1084a3: 0f be 44 08 01 movsbl 0x1(%eax,%ecx,1),%eax
1084a8: 83 e0 03 and $0x3,%eax
1084ab: 48 dec %eax
1084ac: 75 03 jne 1084b1 <iproc+0x31>
1084ae: 83 c1 20 add $0x20,%ecx
if (c == '\r') {
1084b1: 80 f9 0d cmp $0xd,%cl
1084b4: 75 14 jne 1084ca <iproc+0x4a>
if (tty->termios.c_iflag & IGNCR)
return 0;
1084b6: 31 c0 xor %eax,%eax
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
1084b8: f6 c2 80 test $0x80,%dl
1084bb: 0f 85 d9 00 00 00 jne 10859a <iproc+0x11a> <== NEVER TAKEN
return 0;
if (tty->termios.c_iflag & ICRNL)
1084c1: 80 e6 01 and $0x1,%dh
1084c4: 74 1a je 1084e0 <iproc+0x60> <== NEVER TAKEN
c = '\n';
1084c6: b1 0a mov $0xa,%cl
1084c8: eb 16 jmp 1084e0 <iproc+0x60>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
1084ca: 80 f9 0a cmp $0xa,%cl
1084cd: 75 09 jne 1084d8 <iproc+0x58>
1084cf: 80 e2 40 and $0x40,%dl
1084d2: 74 0c je 1084e0 <iproc+0x60> <== ALWAYS TAKEN
c = '\r';
1084d4: b1 0d mov $0xd,%cl <== NOT EXECUTED
1084d6: eb 08 jmp 1084e0 <iproc+0x60> <== NOT EXECUTED
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
1084d8: 84 c9 test %cl,%cl
1084da: 0f 84 87 00 00 00 je 108567 <iproc+0xe7> <== NEVER TAKEN
1084e0: 8b 53 3c mov 0x3c(%ebx),%edx
1084e3: f6 c2 02 test $0x2,%dl
1084e6: 74 7f je 108567 <iproc+0xe7>
if (c == tty->termios.c_cc[VERASE]) {
1084e8: 3a 4b 43 cmp 0x43(%ebx),%cl
1084eb: 75 04 jne 1084f1 <iproc+0x71>
erase (tty, 0);
1084ed: 31 d2 xor %edx,%edx
1084ef: eb 0a jmp 1084fb <iproc+0x7b>
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
1084f1: 3a 4b 44 cmp 0x44(%ebx),%cl
1084f4: 75 11 jne 108507 <iproc+0x87>
erase (tty, 1);
1084f6: ba 01 00 00 00 mov $0x1,%edx
1084fb: 89 d8 mov %ebx,%eax
1084fd: e8 05 fe ff ff call 108307 <erase>
108502: e9 91 00 00 00 jmp 108598 <iproc+0x118>
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
108507: b8 01 00 00 00 mov $0x1,%eax
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
10850c: 3a 4b 45 cmp 0x45(%ebx),%cl
10850f: 0f 84 85 00 00 00 je 10859a <iproc+0x11a> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
108515: 80 f9 0a cmp $0xa,%cl
108518: 75 1a jne 108534 <iproc+0xb4>
if (tty->termios.c_lflag & (ECHO | ECHONL))
10851a: 80 e2 48 and $0x48,%dl
10851d: 74 09 je 108528 <iproc+0xa8> <== NEVER TAKEN
echo (c, tty);
10851f: 89 da mov %ebx,%edx
108521: b0 0a mov $0xa,%al
108523: e8 87 fd ff ff call 1082af <echo>
tty->cbuf[tty->ccount++] = c;
108528: 8b 43 20 mov 0x20(%ebx),%eax
10852b: 8b 53 1c mov 0x1c(%ebx),%edx
10852e: c6 04 02 0a movb $0xa,(%edx,%eax,1)
108532: eb 28 jmp 10855c <iproc+0xdc>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
108534: 3a 4b 4c cmp 0x4c(%ebx),%cl
108537: 74 05 je 10853e <iproc+0xbe> <== NEVER TAKEN
108539: 3a 4b 51 cmp 0x51(%ebx),%cl
10853c: 75 29 jne 108567 <iproc+0xe7> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
10853e: 80 e2 08 and $0x8,%dl <== NOT EXECUTED
108541: 74 10 je 108553 <iproc+0xd3> <== NOT EXECUTED
echo (c, tty);
108543: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
108546: 89 da mov %ebx,%edx <== NOT EXECUTED
108548: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED
10854b: e8 5f fd ff ff call 1082af <echo> <== NOT EXECUTED
108550: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
108553: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
108556: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
108559: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED
10855c: 40 inc %eax
10855d: 89 43 20 mov %eax,0x20(%ebx)
return 1;
108560: b8 01 00 00 00 mov $0x1,%eax
108565: eb 33 jmp 10859a <iproc+0x11a>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
108567: 8b 15 34 20 12 00 mov 0x122034,%edx
10856d: 4a dec %edx
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
10856e: 31 c0 xor %eax,%eax
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
108570: 39 53 20 cmp %edx,0x20(%ebx)
108573: 7d 25 jge 10859a <iproc+0x11a> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
108575: f6 43 3c 08 testb $0x8,0x3c(%ebx)
108579: 74 10 je 10858b <iproc+0x10b> <== NEVER TAKEN
echo (c, tty);
10857b: 0f b6 c1 movzbl %cl,%eax
10857e: 89 da mov %ebx,%edx
108580: 88 4d f4 mov %cl,-0xc(%ebp)
108583: e8 27 fd ff ff call 1082af <echo>
108588: 8a 4d f4 mov -0xc(%ebp),%cl
tty->cbuf[tty->ccount++] = c;
10858b: 8b 43 20 mov 0x20(%ebx),%eax
10858e: 8b 53 1c mov 0x1c(%ebx),%edx
108591: 88 0c 02 mov %cl,(%edx,%eax,1)
108594: 40 inc %eax
108595: 89 43 20 mov %eax,0x20(%ebx)
}
return 0;
108598: 31 c0 xor %eax,%eax
}
10859a: 83 c4 14 add $0x14,%esp
10859d: 5b pop %ebx
10859e: c9 leave
10859f: c3 ret
00121a98 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
121a98: 55 push %ebp
121a99: 89 e5 mov %esp,%ebp
121a9b: 57 push %edi
121a9c: 56 push %esi
121a9d: 53 push %ebx
121a9e: 83 ec 4c sub $0x4c,%esp
121aa1: 8b 5d 0c mov 0xc(%ebp),%ebx
121aa4: 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() )
121aa7: e8 64 fd ff ff call 121810 <getpid>
121aac: 39 45 08 cmp %eax,0x8(%ebp)
121aaf: 74 0d je 121abe <killinfo+0x26>
rtems_set_errno_and_return_minus_one( ESRCH );
121ab1: e8 56 3a ff ff call 11550c <__errno>
121ab6: c7 00 03 00 00 00 movl $0x3,(%eax)
121abc: eb 0f jmp 121acd <killinfo+0x35>
/*
* Validate the signal passed.
*/
if ( !sig )
121abe: 85 db test %ebx,%ebx
121ac0: 75 13 jne 121ad5 <killinfo+0x3d>
rtems_set_errno_and_return_minus_one( EINVAL );
121ac2: e8 45 3a ff ff call 11550c <__errno>
121ac7: c7 00 16 00 00 00 movl $0x16,(%eax)
121acd: 83 c8 ff or $0xffffffff,%eax
121ad0: e9 ef 01 00 00 jmp 121cc4 <killinfo+0x22c>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
121ad5: 8d 4b ff lea -0x1(%ebx),%ecx
if ( !is_valid_signo(sig) )
121ad8: 83 f9 1f cmp $0x1f,%ecx
121adb: 77 e5 ja 121ac2 <killinfo+0x2a>
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 )
121add: 6b d3 0c imul $0xc,%ebx,%edx
return 0;
121ae0: 31 c0 xor %eax,%eax
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 )
121ae2: 83 ba 98 a9 12 00 01 cmpl $0x1,0x12a998(%edx)
121ae9: 0f 84 d5 01 00 00 je 121cc4 <killinfo+0x22c>
/*
* 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 ) )
121aef: 83 fb 04 cmp $0x4,%ebx
121af2: 74 0a je 121afe <killinfo+0x66>
121af4: 83 fb 08 cmp $0x8,%ebx
121af7: 74 05 je 121afe <killinfo+0x66>
121af9: 83 fb 0b cmp $0xb,%ebx
121afc: 75 16 jne 121b14 <killinfo+0x7c>
return pthread_kill( pthread_self(), sig );
121afe: e8 85 03 00 00 call 121e88 <pthread_self>
121b03: 56 push %esi
121b04: 56 push %esi
121b05: 53 push %ebx
121b06: 50 push %eax
121b07: e8 d8 02 00 00 call 121de4 <pthread_kill>
121b0c: 83 c4 10 add $0x10,%esp
121b0f: e9 b0 01 00 00 jmp 121cc4 <killinfo+0x22c>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
121b14: be 01 00 00 00 mov $0x1,%esi
121b19: d3 e6 shl %cl,%esi
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
121b1b: 89 5d dc mov %ebx,-0x24(%ebp)
siginfo->si_code = SI_USER;
121b1e: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
if ( !value ) {
121b25: 85 ff test %edi,%edi
121b27: 75 09 jne 121b32 <killinfo+0x9a>
siginfo->si_value.sival_int = 0;
121b29: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
121b30: eb 05 jmp 121b37 <killinfo+0x9f>
} else {
siginfo->si_value = *value;
121b32: 8b 07 mov (%edi),%eax
121b34: 89 45 e4 mov %eax,-0x1c(%ebp)
121b37: a1 38 a4 12 00 mov 0x12a438,%eax
121b3c: 40 inc %eax
121b3d: a3 38 a4 12 00 mov %eax,0x12a438
/*
* 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;
121b42: a1 5c a9 12 00 mov 0x12a95c,%eax
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
121b47: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
121b4d: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx
121b53: f7 d2 not %edx
121b55: 85 d6 test %edx,%esi
121b57: 0f 85 ed 00 00 00 jne 121c4a <killinfo+0x1b2>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
121b5d: 8b 15 1c ab 12 00 mov 0x12ab1c,%edx
/* 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 );
121b63: eb 23 jmp 121b88 <killinfo+0xf0>
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
121b65: 89 d0 mov %edx,%eax
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
121b67: 8b 8a ec 00 00 00 mov 0xec(%edx),%ecx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
121b6d: 85 72 30 test %esi,0x30(%edx)
121b70: 0f 85 d4 00 00 00 jne 121c4a <killinfo+0x1b2>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
121b76: 8b 89 d0 00 00 00 mov 0xd0(%ecx),%ecx
121b7c: f7 d1 not %ecx
121b7e: 85 ce test %ecx,%esi
121b80: 0f 85 c4 00 00 00 jne 121c4a <killinfo+0x1b2>
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 ) {
121b86: 8b 12 mov (%edx),%edx
/* 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 );
121b88: 81 fa 20 ab 12 00 cmp $0x12ab20,%edx
121b8e: 75 d5 jne 121b65 <killinfo+0xcd>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
121b90: 0f b6 0d 24 62 12 00 movzbl 0x126224,%ecx
121b97: 41 inc %ecx
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
121b98: 31 c0 xor %eax,%eax
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
121b9a: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp)
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
121ba1: 8b 7d cc mov -0x34(%ebp),%edi
121ba4: 8b 14 bd 10 a4 12 00 mov 0x12a410(,%edi,4),%edx
121bab: 85 d2 test %edx,%edx
121bad: 0f 84 86 00 00 00 je 121c39 <killinfo+0x1a1> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
121bb3: 8b 52 04 mov 0x4(%edx),%edx
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
121bb6: 0f b7 7a 10 movzwl 0x10(%edx),%edi
121bba: 89 7d c4 mov %edi,-0x3c(%ebp)
object_table = the_info->local_table;
121bbd: 8b 52 1c mov 0x1c(%edx),%edx
121bc0: 89 55 c0 mov %edx,-0x40(%ebp)
for ( index = 1 ; index <= maximum ; index++ ) {
121bc3: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp)
121bca: 89 5d b4 mov %ebx,-0x4c(%ebp)
121bcd: eb 5f jmp 121c2e <killinfo+0x196>
the_thread = (Thread_Control *) object_table[ index ];
121bcf: 8b 5d d0 mov -0x30(%ebp),%ebx
121bd2: 8b 7d c0 mov -0x40(%ebp),%edi
121bd5: 8b 14 9f mov (%edi,%ebx,4),%edx
if ( !the_thread )
121bd8: 85 d2 test %edx,%edx
121bda: 74 4f je 121c2b <killinfo+0x193>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
121bdc: 8b 5a 14 mov 0x14(%edx),%ebx
121bdf: 89 5d d4 mov %ebx,-0x2c(%ebp)
121be2: 39 cb cmp %ecx,%ebx
121be4: 77 45 ja 121c2b <killinfo+0x193>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
121be6: 8b ba ec 00 00 00 mov 0xec(%edx),%edi
121bec: 8b bf d0 00 00 00 mov 0xd0(%edi),%edi
121bf2: f7 d7 not %edi
121bf4: 85 fe test %edi,%esi
121bf6: 74 33 je 121c2b <killinfo+0x193>
*
* 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 ) {
121bf8: 39 cb cmp %ecx,%ebx
121bfa: 72 2a jb 121c26 <killinfo+0x18e>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
121bfc: 85 c0 test %eax,%eax
121bfe: 74 2b je 121c2b <killinfo+0x193> <== NEVER TAKEN
121c00: 8b 78 10 mov 0x10(%eax),%edi
121c03: 89 7d c8 mov %edi,-0x38(%ebp)
121c06: 85 ff test %edi,%edi
121c08: 74 21 je 121c2b <killinfo+0x193> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
121c0a: 8b 7a 10 mov 0x10(%edx),%edi
121c0d: 85 ff test %edi,%edi
121c0f: 74 15 je 121c26 <killinfo+0x18e>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
121c11: f7 45 c8 00 00 00 10 testl $0x10000000,-0x38(%ebp)
121c18: 75 11 jne 121c2b <killinfo+0x193>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
121c1a: 81 e7 00 00 00 10 and $0x10000000,%edi
121c20: 74 09 je 121c2b <killinfo+0x193>
121c22: 89 d9 mov %ebx,%ecx
121c24: eb 03 jmp 121c29 <killinfo+0x191>
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
121c26: 8b 4d d4 mov -0x2c(%ebp),%ecx
121c29: 89 d0 mov %edx,%eax
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
121c2b: ff 45 d0 incl -0x30(%ebp)
121c2e: 8b 55 c4 mov -0x3c(%ebp),%edx
121c31: 39 55 d0 cmp %edx,-0x30(%ebp)
121c34: 76 99 jbe 121bcf <killinfo+0x137>
121c36: 8b 5d b4 mov -0x4c(%ebp),%ebx
* + 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++) {
121c39: ff 45 cc incl -0x34(%ebp)
121c3c: 83 7d cc 04 cmpl $0x4,-0x34(%ebp)
121c40: 0f 85 5b ff ff ff jne 121ba1 <killinfo+0x109>
}
}
}
}
if ( interested ) {
121c46: 85 c0 test %eax,%eax
121c48: 74 13 je 121c5d <killinfo+0x1c5>
/*
* 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 ) ) {
121c4a: 51 push %ecx
mask = signo_to_mask( sig );
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
121c4b: 8d 55 dc lea -0x24(%ebp),%edx
/*
* 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 ) ) {
121c4e: 52 push %edx
121c4f: 53 push %ebx
121c50: 50 push %eax
121c51: e8 8a 00 00 00 call 121ce0 <_POSIX_signals_Unblock_thread>
121c56: 83 c4 10 add $0x10,%esp
121c59: 84 c0 test %al,%al
121c5b: 75 60 jne 121cbd <killinfo+0x225>
/*
* 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 );
121c5d: 83 ec 0c sub $0xc,%esp
121c60: 56 push %esi
121c61: e8 66 00 00 00 call 121ccc <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
121c66: 6b db 0c imul $0xc,%ebx,%ebx
121c69: 83 c4 10 add $0x10,%esp
121c6c: 83 bb 90 a9 12 00 02 cmpl $0x2,0x12a990(%ebx)
121c73: 75 48 jne 121cbd <killinfo+0x225>
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
121c75: 83 ec 0c sub $0xc,%esp
121c78: 68 10 ab 12 00 push $0x12ab10
121c7d: e8 8a ca fe ff call 10e70c <_Chain_Get>
if ( !psiginfo ) {
121c82: 83 c4 10 add $0x10,%esp
121c85: 85 c0 test %eax,%eax
121c87: 75 15 jne 121c9e <killinfo+0x206>
_Thread_Enable_dispatch();
121c89: e8 44 e1 fe ff call 10fdd2 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
121c8e: e8 79 38 ff ff call 11550c <__errno>
121c93: c7 00 0b 00 00 00 movl $0xb,(%eax)
121c99: e9 2f fe ff ff jmp 121acd <killinfo+0x35>
}
psiginfo->Info = *siginfo;
121c9e: 8d 78 08 lea 0x8(%eax),%edi
121ca1: 8d 75 dc lea -0x24(%ebp),%esi
121ca4: b9 03 00 00 00 mov $0x3,%ecx
121ca9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
121cab: 52 push %edx
121cac: 52 push %edx
121cad: 50 push %eax
121cae: 81 c3 88 ab 12 00 add $0x12ab88,%ebx
121cb4: 53 push %ebx
121cb5: e8 16 ca fe ff call 10e6d0 <_Chain_Append>
121cba: 83 c4 10 add $0x10,%esp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
121cbd: e8 10 e1 fe ff call 10fdd2 <_Thread_Enable_dispatch>
return 0;
121cc2: 31 c0 xor %eax,%eax
}
121cc4: 8d 65 f4 lea -0xc(%ebp),%esp
121cc7: 5b pop %ebx
121cc8: 5e pop %esi
121cc9: 5f pop %edi
121cca: c9 leave
121ccb: c3 ret
0011cc44 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
11cc44: 55 push %ebp
11cc45: 89 e5 mov %esp,%ebp
11cc47: 53 push %ebx
11cc48: 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()))
11cc4b: 83 3d 3c 44 12 00 03 cmpl $0x3,0x12443c
11cc52: 75 4f jne 11cca3 <libc_wrapup+0x5f> <== NEVER TAKEN
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
11cc54: 8b 1d c0 f4 11 00 mov 0x11f4c0,%ebx
11cc5a: 39 1d 20 21 12 00 cmp %ebx,0x122120
11cc60: 74 12 je 11cc74 <libc_wrapup+0x30>
_wrapup_reent(_global_impure_ptr);
11cc62: 83 ec 0c sub $0xc,%esp
11cc65: 53 push %ebx
11cc66: e8 b5 05 00 00 call 11d220 <_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;
11cc6b: 89 1d 20 21 12 00 mov %ebx,0x122120
11cc71: 83 c4 10 add $0x10,%esp
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
11cc74: 83 ec 0c sub $0xc,%esp
11cc77: a1 20 21 12 00 mov 0x122120,%eax
11cc7c: ff 70 04 pushl 0x4(%eax)
11cc7f: e8 b8 41 ff ff call 110e3c <fclose>
fclose (stdout);
11cc84: 5a pop %edx
11cc85: a1 20 21 12 00 mov 0x122120,%eax
11cc8a: ff 70 08 pushl 0x8(%eax)
11cc8d: e8 aa 41 ff ff call 110e3c <fclose>
fclose (stderr);
11cc92: 58 pop %eax
11cc93: a1 20 21 12 00 mov 0x122120,%eax
11cc98: ff 70 0c pushl 0xc(%eax)
11cc9b: e8 9c 41 ff ff call 110e3c <fclose>
11cca0: 83 c4 10 add $0x10,%esp
}
11cca3: 8b 5d fc mov -0x4(%ebp),%ebx
11cca6: c9 leave
11cca7: c3 ret
0011cb50 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
11cb50: 55 push %ebp
11cb51: 89 e5 mov %esp,%ebp
11cb53: 57 push %edi
11cb54: 56 push %esi
11cb55: 53 push %ebx
11cb56: 83 ec 1c sub $0x1c,%esp
11cb59: 8b 5d 08 mov 0x8(%ebp),%ebx
11cb5c: 8b 45 0c mov 0xc(%ebp),%eax
11cb5f: 8b 55 10 mov 0x10(%ebp),%edx
11cb62: 8b 4d 14 mov 0x14(%ebp),%ecx
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
11cb65: 3b 1d 44 01 12 00 cmp 0x120144,%ebx
11cb6b: 73 0f jae 11cb7c <lseek+0x2c>
iop = rtems_libio_iop( fd );
11cb6d: 6b db 38 imul $0x38,%ebx,%ebx
11cb70: 03 1d a0 41 12 00 add 0x1241a0,%ebx
rtems_libio_check_is_open(iop);
11cb76: f6 43 15 01 testb $0x1,0x15(%ebx)
11cb7a: 75 0d jne 11cb89 <lseek+0x39>
11cb7c: e8 63 41 ff ff call 110ce4 <__errno>
11cb81: c7 00 09 00 00 00 movl $0x9,(%eax)
11cb87: eb 4b jmp 11cbd4 <lseek+0x84>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
11cb89: 8b 73 0c mov 0xc(%ebx),%esi
11cb8c: 8b 7b 10 mov 0x10(%ebx),%edi
11cb8f: 89 75 e0 mov %esi,-0x20(%ebp)
11cb92: 89 7d e4 mov %edi,-0x1c(%ebp)
switch ( whence ) {
11cb95: 83 f9 01 cmp $0x1,%ecx
11cb98: 74 11 je 11cbab <lseek+0x5b>
11cb9a: 83 f9 02 cmp $0x2,%ecx
11cb9d: 74 18 je 11cbb7 <lseek+0x67>
11cb9f: 85 c9 test %ecx,%ecx
11cba1: 75 26 jne 11cbc9 <lseek+0x79>
case SEEK_SET:
iop->offset = offset;
11cba3: 89 43 0c mov %eax,0xc(%ebx)
11cba6: 89 53 10 mov %edx,0x10(%ebx)
break;
11cba9: eb 30 jmp 11cbdb <lseek+0x8b>
case SEEK_CUR:
iop->offset += offset;
11cbab: 8b 75 e0 mov -0x20(%ebp),%esi
11cbae: 8b 7d e4 mov -0x1c(%ebp),%edi
11cbb1: 01 c6 add %eax,%esi
11cbb3: 11 d7 adc %edx,%edi
11cbb5: eb 0a jmp 11cbc1 <lseek+0x71>
break;
case SEEK_END:
iop->offset = iop->size + offset;
11cbb7: 89 c6 mov %eax,%esi
11cbb9: 89 d7 mov %edx,%edi
11cbbb: 03 73 04 add 0x4(%ebx),%esi
11cbbe: 13 7b 08 adc 0x8(%ebx),%edi
11cbc1: 89 73 0c mov %esi,0xc(%ebx)
11cbc4: 89 7b 10 mov %edi,0x10(%ebx)
break;
11cbc7: eb 12 jmp 11cbdb <lseek+0x8b>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
11cbc9: e8 16 41 ff ff call 110ce4 <__errno>
11cbce: c7 00 16 00 00 00 movl $0x16,(%eax)
11cbd4: 83 c8 ff or $0xffffffff,%eax
11cbd7: 89 c2 mov %eax,%edx
11cbd9: eb 23 jmp 11cbfe <lseek+0xae>
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
11cbdb: 8b 73 20 mov 0x20(%ebx),%esi
11cbde: 51 push %ecx
11cbdf: 52 push %edx
11cbe0: 50 push %eax
11cbe1: 53 push %ebx
11cbe2: ff 56 14 call *0x14(%esi)
if ( status == (off_t) -1 )
11cbe5: 83 c4 10 add $0x10,%esp
11cbe8: 83 fa ff cmp $0xffffffff,%edx
11cbeb: 75 11 jne 11cbfe <lseek+0xae>
11cbed: 83 f8 ff cmp $0xffffffff,%eax
11cbf0: 75 0c jne 11cbfe <lseek+0xae> <== NEVER TAKEN
iop->offset = old_offset;
11cbf2: 8b 75 e0 mov -0x20(%ebp),%esi
11cbf5: 8b 7d e4 mov -0x1c(%ebp),%edi
11cbf8: 89 73 0c mov %esi,0xc(%ebx)
11cbfb: 89 7b 10 mov %edi,0x10(%ebx)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
11cbfe: 8d 65 f4 lea -0xc(%ebp),%esp
11cc01: 5b pop %ebx
11cc02: 5e pop %esi
11cc03: 5f pop %edi
11cc04: c9 leave
11cc05: c3 ret
00106c34 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
106c34: 55 push %ebp
106c35: 89 e5 mov %esp,%ebp
106c37: 56 push %esi
106c38: 53 push %ebx
106c39: 8b 75 08 mov 0x8(%ebp),%esi
void *return_this;
MSBUMP(malloc_calls, 1);
106c3c: ff 05 bc 41 12 00 incl 0x1241bc
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
106c42: e8 07 ff ff ff call 106b4e <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
return (void *) 0;
106c47: 31 db xor %ebx,%ebx
malloc_deferred_frees_process();
/*
* Validate the parameters
*/
if ( !size )
106c49: 85 f6 test %esi,%esi
106c4b: 74 78 je 106cc5 <malloc+0x91>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
106c4d: 83 3d 3c 44 12 00 03 cmpl $0x3,0x12443c
106c54: 75 09 jne 106c5f <malloc+0x2b>
!malloc_is_system_state_OK() )
106c56: e8 b5 fe ff ff call 106b10 <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()) &&
106c5b: 84 c0 test %al,%al
106c5d: 74 66 je 106cc5 <malloc+0x91> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
106c5f: 6a 00 push $0x0
106c61: 6a 00 push $0x0
106c63: 56 push %esi
106c64: ff 35 80 01 12 00 pushl 0x120180
106c6a: e8 e1 41 00 00 call 10ae50 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
106c6f: 83 c4 10 add $0x10,%esp
106c72: 89 c3 mov %eax,%ebx
106c74: 85 c0 test %eax,%eax
106c76: 75 28 jne 106ca0 <malloc+0x6c>
if (rtems_malloc_sbrk_helpers)
106c78: a1 54 26 12 00 mov 0x122654,%eax
106c7d: 85 c0 test %eax,%eax
106c7f: 74 10 je 106c91 <malloc+0x5d>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
106c81: 83 ec 0c sub $0xc,%esp
106c84: 56 push %esi
106c85: ff 50 04 call *0x4(%eax)
106c88: 89 c3 mov %eax,%ebx
if ( !return_this ) {
106c8a: 83 c4 10 add $0x10,%esp
106c8d: 85 c0 test %eax,%eax
106c8f: 75 0f jne 106ca0 <malloc+0x6c>
errno = ENOMEM;
106c91: e8 4e a0 00 00 call 110ce4 <__errno>
106c96: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
106c9c: 31 db xor %ebx,%ebx
106c9e: eb 25 jmp 106cc5 <malloc+0x91>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
106ca0: a1 58 26 12 00 mov 0x122658,%eax
106ca5: 85 c0 test %eax,%eax
106ca7: 74 09 je 106cb2 <malloc+0x7e>
(*rtems_malloc_dirty_helper)( return_this, size );
106ca9: 52 push %edx
106caa: 52 push %edx
106cab: 56 push %esi
106cac: 53 push %ebx
106cad: ff d0 call *%eax
106caf: 83 c4 10 add $0x10,%esp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
106cb2: a1 50 26 12 00 mov 0x122650,%eax
106cb7: 85 c0 test %eax,%eax
106cb9: 74 0a je 106cc5 <malloc+0x91>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
106cbb: 83 ec 0c sub $0xc,%esp
106cbe: 53 push %ebx
106cbf: ff 50 04 call *0x4(%eax)
106cc2: 83 c4 10 add $0x10,%esp
return return_this;
}
106cc5: 89 d8 mov %ebx,%eax
106cc7: 8d 65 f8 lea -0x8(%ebp),%esp
106cca: 5b pop %ebx
106ccb: 5e pop %esi
106ccc: c9 leave
106ccd: c3 ret
00106f9c <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
106f9c: 55 push %ebp
106f9d: 89 e5 mov %esp,%ebp
106f9f: 57 push %edi
106fa0: 56 push %esi
106fa1: 53 push %ebx
106fa2: 83 ec 0c sub $0xc,%esp
106fa5: 8b 7d 08 mov 0x8(%ebp),%edi
* 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;
106fa8: 8b 0d 1c 53 12 00 mov 0x12531c,%ecx
if ( sbrk_amount == 0 )
return (void *) 0;
106fae: 31 f6 xor %esi,%esi
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
106fb0: 85 c9 test %ecx,%ecx
106fb2: 74 67 je 10701b <malloc_sbrk_extend_and_allocate+0x7f><== NEVER TAKEN
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
106fb4: 8d 1c 0f lea (%edi,%ecx,1),%ebx
106fb7: 89 d8 mov %ebx,%eax
106fb9: 31 d2 xor %edx,%edx
106fbb: f7 f1 div %ecx
106fbd: 89 c3 mov %eax,%ebx
106fbf: 0f af d9 imul %ecx,%ebx
starting_address = (void *) sbrk(the_size);
106fc2: 83 ec 0c sub $0xc,%esp
106fc5: 53 push %ebx
106fc6: e8 88 94 ff ff call 100453 <sbrk>
if ( starting_address == (void*) -1 )
106fcb: 83 c4 10 add $0x10,%esp
106fce: 83 f8 ff cmp $0xffffffff,%eax
106fd1: 74 48 je 10701b <malloc_sbrk_extend_and_allocate+0x7f><== NEVER TAKEN
return (void *) 0;
if ( !_Protected_heap_Extend(
106fd3: 52 push %edx
106fd4: 53 push %ebx
106fd5: 50 push %eax
106fd6: ff 35 80 11 12 00 pushl 0x121180
106fdc: e8 9b 41 00 00 call 10b17c <_Protected_heap_Extend>
106fe1: 83 c4 10 add $0x10,%esp
106fe4: 84 c0 test %al,%al
106fe6: 75 18 jne 107000 <malloc_sbrk_extend_and_allocate+0x64><== NEVER TAKEN
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
106fe8: 83 ec 0c sub $0xc,%esp
106feb: f7 db neg %ebx
106fed: 53 push %ebx
106fee: e8 60 94 ff ff call 100453 <sbrk>
errno = ENOMEM;
106ff3: e8 54 a2 00 00 call 11124c <__errno>
106ff8: c7 00 0c 00 00 00 movl $0xc,(%eax)
106ffe: eb 18 jmp 107018 <malloc_sbrk_extend_and_allocate+0x7c>
return (void *) 0;
}
MSBUMP(space_available, the_size);
107000: 01 1d f0 52 12 00 add %ebx,0x1252f0
107006: 6a 00 push $0x0
107008: 6a 00 push $0x0
10700a: 57 push %edi
10700b: ff 35 80 11 12 00 pushl 0x121180
107011: e8 2e 41 00 00 call 10b144 <_Protected_heap_Allocate_aligned_with_boundary>
107016: 89 c6 mov %eax,%esi
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
107018: 83 c4 10 add $0x10,%esp
}
10701b: 89 f0 mov %esi,%eax
10701d: 8d 65 f4 lea -0xc(%ebp),%esp
107020: 5b pop %ebx
107021: 5e pop %esi
107022: 5f pop %edi
107023: c9 leave
107024: c3 ret
0010feef <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
10feef: 55 push %ebp
10fef0: 89 e5 mov %esp,%ebp
10fef2: 53 push %ebx
10fef3: 83 ec 14 sub $0x14,%esp
10fef6: 8b 4d 08 mov 0x8(%ebp),%ecx
10fef9: 8b 45 0c mov 0xc(%ebp),%eax
10fefc: 8b 55 10 mov 0x10(%ebp),%edx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
10feff: 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 )
10ff02: 3b 53 54 cmp 0x54(%ebx),%edx
10ff05: 7c 15 jl 10ff1c <memfile_ftruncate+0x2d><== NEVER TAKEN
10ff07: 7f 05 jg 10ff0e <memfile_ftruncate+0x1f><== NEVER TAKEN
10ff09: 3b 43 50 cmp 0x50(%ebx),%eax
10ff0c: 76 0e jbe 10ff1c <memfile_ftruncate+0x2d>
return IMFS_memfile_extend( the_jnode, length );
10ff0e: 51 push %ecx
10ff0f: 52 push %edx
10ff10: 50 push %eax
10ff11: 53 push %ebx
10ff12: e8 bf fc ff ff call 10fbd6 <IMFS_memfile_extend>
10ff17: 83 c4 10 add $0x10,%esp
10ff1a: eb 24 jmp 10ff40 <memfile_ftruncate+0x51>
/*
* 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;
10ff1c: 89 43 50 mov %eax,0x50(%ebx)
10ff1f: 89 53 54 mov %edx,0x54(%ebx)
iop->size = the_jnode->info.file.size;
10ff22: 89 41 04 mov %eax,0x4(%ecx)
10ff25: 89 51 08 mov %edx,0x8(%ecx)
IMFS_update_atime( the_jnode );
10ff28: 50 push %eax
10ff29: 50 push %eax
10ff2a: 6a 00 push $0x0
10ff2c: 8d 45 f0 lea -0x10(%ebp),%eax
10ff2f: 50 push %eax
10ff30: e8 db 6a ff ff call 106a10 <gettimeofday>
10ff35: 8b 45 f0 mov -0x10(%ebp),%eax
10ff38: 89 43 40 mov %eax,0x40(%ebx)
return 0;
10ff3b: 83 c4 10 add $0x10,%esp
10ff3e: 31 c0 xor %eax,%eax
}
10ff40: 8b 5d fc mov -0x4(%ebp),%ebx
10ff43: c9 leave
10ff44: c3 ret
0010ff45 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
10ff45: 55 push %ebp
10ff46: 89 e5 mov %esp,%ebp
10ff48: 56 push %esi
10ff49: 53 push %ebx
10ff4a: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
10ff4d: 8b 73 18 mov 0x18(%ebx),%esi
if (the_jnode->type == IMFS_LINEAR_FILE) {
10ff50: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
10ff54: 75 1a jne 10ff70 <memfile_lseek+0x2b>
if (iop->offset > the_jnode->info.linearfile.size)
10ff56: 8b 56 50 mov 0x50(%esi),%edx
10ff59: 8b 46 54 mov 0x54(%esi),%eax
10ff5c: 39 43 10 cmp %eax,0x10(%ebx)
10ff5f: 7c 41 jl 10ffa2 <memfile_lseek+0x5d> <== NEVER TAKEN
10ff61: 7f 05 jg 10ff68 <memfile_lseek+0x23> <== NEVER TAKEN
10ff63: 39 53 0c cmp %edx,0xc(%ebx)
10ff66: 76 3a jbe 10ffa2 <memfile_lseek+0x5d> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
10ff68: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED
10ff6b: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED
10ff6e: eb 32 jmp 10ffa2 <memfile_lseek+0x5d> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
10ff70: 50 push %eax
10ff71: ff 73 10 pushl 0x10(%ebx)
10ff74: ff 73 0c pushl 0xc(%ebx)
10ff77: 56 push %esi
10ff78: e8 59 fc ff ff call 10fbd6 <IMFS_memfile_extend>
10ff7d: 83 c4 10 add $0x10,%esp
10ff80: 85 c0 test %eax,%eax
10ff82: 74 12 je 10ff96 <memfile_lseek+0x51>
rtems_set_errno_and_return_minus_one( ENOSPC );
10ff84: e8 5b 0d 00 00 call 110ce4 <__errno>
10ff89: c7 00 1c 00 00 00 movl $0x1c,(%eax)
10ff8f: 83 c8 ff or $0xffffffff,%eax
10ff92: 89 c2 mov %eax,%edx
10ff94: eb 12 jmp 10ffa8 <memfile_lseek+0x63>
iop->size = the_jnode->info.file.size;
10ff96: 8b 46 50 mov 0x50(%esi),%eax
10ff99: 8b 56 54 mov 0x54(%esi),%edx
10ff9c: 89 43 04 mov %eax,0x4(%ebx)
10ff9f: 89 53 08 mov %edx,0x8(%ebx)
}
return iop->offset;
10ffa2: 8b 43 0c mov 0xc(%ebx),%eax
10ffa5: 8b 53 10 mov 0x10(%ebx),%edx
}
10ffa8: 8d 65 f8 lea -0x8(%ebp),%esp
10ffab: 5b pop %ebx
10ffac: 5e pop %esi
10ffad: c9 leave
10ffae: c3 ret
0010fe60 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
10fe60: 55 push %ebp
10fe61: 89 e5 mov %esp,%ebp
10fe63: 56 push %esi
10fe64: 53 push %ebx
10fe65: 8b 75 08 mov 0x8(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
10fe68: 8b 5e 18 mov 0x18(%esi),%ebx
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
10fe6b: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi)
10fe72: 74 54 je 10fec8 <memfile_open+0x68>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
10fe74: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx)
10fe78: 75 4e jne 10fec8 <memfile_open+0x68> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
10fe7a: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
10fe7d: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
10fe80: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED
the_jnode->info.file.size = 0;
10fe87: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED
10fe8e: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
10fe95: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
10fe9c: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
10fea3: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED
if ((count != 0)
10feaa: 85 c0 test %eax,%eax <== NOT EXECUTED
10feac: 74 1a je 10fec8 <memfile_open+0x68> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
10feae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10feb1: 50 push %eax <== NOT EXECUTED
10feb2: 52 push %edx <== NOT EXECUTED
10feb3: 6a 00 push $0x0 <== NOT EXECUTED
10feb5: 6a 00 push $0x0 <== NOT EXECUTED
10feb7: 53 push %ebx <== NOT EXECUTED
10feb8: e8 0b fe ff ff call 10fcc8 <IMFS_memfile_write> <== NOT EXECUTED
10febd: 89 c2 mov %eax,%edx <== NOT EXECUTED
10febf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
return -1;
10fec2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
10fec5: 42 inc %edx <== NOT EXECUTED
10fec6: 74 20 je 10fee8 <memfile_open+0x88> <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
10fec8: f6 46 15 02 testb $0x2,0x15(%esi)
10fecc: 74 0c je 10feda <memfile_open+0x7a>
iop->offset = the_jnode->info.file.size;
10fece: 8b 43 50 mov 0x50(%ebx),%eax
10fed1: 8b 53 54 mov 0x54(%ebx),%edx
10fed4: 89 46 0c mov %eax,0xc(%esi)
10fed7: 89 56 10 mov %edx,0x10(%esi)
iop->size = the_jnode->info.file.size;
10feda: 8b 43 50 mov 0x50(%ebx),%eax
10fedd: 8b 53 54 mov 0x54(%ebx),%edx
10fee0: 89 46 04 mov %eax,0x4(%esi)
10fee3: 89 56 08 mov %edx,0x8(%esi)
return 0;
10fee6: 31 c0 xor %eax,%eax
}
10fee8: 8d 65 f8 lea -0x8(%ebp),%esp
10feeb: 5b pop %ebx
10feec: 5e pop %esi
10feed: c9 leave
10feee: c3 ret
00106e29 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
106e29: 55 push %ebp
106e2a: 89 e5 mov %esp,%ebp
106e2c: 57 push %edi
106e2d: 56 push %esi
106e2e: 53 push %ebx
106e2f: 83 ec 4c sub $0x4c,%esp
106e32: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
106e35: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
106e39: 77 13 ja 106e4e <mount+0x25>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
106e3b: 83 ec 0c sub $0xc,%esp
106e3e: 56 push %esi
106e3f: e8 b3 6c 00 00 call 10daf7 <rtems_filesystem_get_mount_handler>
106e44: 89 45 b0 mov %eax,-0x50(%ebp)
if ( !mount_h )
106e47: 83 c4 10 add $0x10,%esp
106e4a: 85 c0 test %eax,%eax
106e4c: 75 10 jne 106e5e <mount+0x35>
rtems_set_errno_and_return_minus_one( EINVAL );
106e4e: e8 91 9e 00 00 call 110ce4 <__errno>
106e53: c7 00 16 00 00 00 movl $0x16,(%eax)
106e59: e9 ca 00 00 00 jmp 106f28 <mount+0xff>
{
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;
106e5e: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
106e62: 0f 95 45 b7 setne -0x49(%ebp)
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
106e66: 8b 45 0c mov 0xc(%ebp),%eax
106e69: 89 45 b8 mov %eax,-0x48(%ebp)
106e6c: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
106e70: 75 07 jne 106e79 <mount+0x50>
106e72: c7 45 b8 d4 e9 11 00 movl $0x11e9d4,-0x48(%ebp)
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
106e79: 83 ca ff or $0xffffffff,%edx
106e7c: 31 c0 xor %eax,%eax
106e7e: 89 d1 mov %edx,%ecx
106e80: 89 f7 mov %esi,%edi
106e82: f2 ae repnz scas %es:(%edi),%al
106e84: f7 d1 not %ecx
106e86: 89 4d bc mov %ecx,-0x44(%ebp)
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
106e89: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
106e90: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
106e94: 74 0c je 106ea2 <mount+0x79>
106e96: 89 d1 mov %edx,%ecx
106e98: 8b 7d 08 mov 0x8(%ebp),%edi
106e9b: f2 ae repnz scas %es:(%edi),%al
106e9d: f7 d1 not %ecx
106e9f: 89 4d c4 mov %ecx,-0x3c(%ebp)
size_t target_size = strlen( target ) + 1;
106ea2: 31 c0 xor %eax,%eax
106ea4: 83 c9 ff or $0xffffffff,%ecx
106ea7: 8b 7d b8 mov -0x48(%ebp),%edi
106eaa: f2 ae repnz scas %es:(%edi),%al
106eac: f7 d1 not %ecx
106eae: 89 4d c0 mov %ecx,-0x40(%ebp)
106eb1: 49 dec %ecx
106eb2: 89 4d ac mov %ecx,-0x54(%ebp)
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 );
106eb5: 50 push %eax
106eb6: 50 push %eax
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;
106eb7: 8b 55 c4 mov -0x3c(%ebp),%edx
106eba: 8b 7d bc mov -0x44(%ebp),%edi
106ebd: 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 )
106ec1: 03 45 c0 add -0x40(%ebp),%eax
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
106ec4: 50 push %eax
106ec5: 6a 01 push $0x1
106ec7: e8 60 f9 ff ff call 10682c <calloc>
106ecc: 89 c3 mov %eax,%ebx
if ( mt_entry != NULL ) {
106ece: 83 c4 10 add $0x10,%esp
106ed1: 85 c0 test %eax,%eax
106ed3: 74 48 je 106f1d <mount+0xf4> <== NEVER TAKEN
char *str = (char *) mt_entry + sizeof( *mt_entry );
106ed5: 8d 40 74 lea 0x74(%eax),%eax
memcpy( str, filesystemtype, filesystemtype_size );
106ed8: 89 c7 mov %eax,%edi
106eda: 8b 4d bc mov -0x44(%ebp),%ecx
106edd: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
106edf: 89 fa mov %edi,%edx
mt_entry->type = str;
106ee1: 89 43 6c mov %eax,0x6c(%ebx)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
106ee4: 8b 75 08 mov 0x8(%ebp),%esi
106ee7: 8b 4d c4 mov -0x3c(%ebp),%ecx
106eea: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
106eec: 89 f8 mov %edi,%eax
mt_entry->dev = str;
106eee: 89 53 70 mov %edx,0x70(%ebx)
str += source_size;
memcpy( str, target, target_size );
106ef1: 8b 75 b8 mov -0x48(%ebp),%esi
106ef4: 8b 4d c0 mov -0x40(%ebp),%ecx
106ef7: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
mt_entry->target = str;
106ef9: 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;
106efc: 89 5b 2c mov %ebx,0x2c(%ebx)
mt_entry->options = options;
106eff: 8b 45 14 mov 0x14(%ebp),%eax
106f02: 89 43 30 mov %eax,0x30(%ebx)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
106f05: 8d 7b 38 lea 0x38(%ebx),%edi
106f08: be 14 ea 11 00 mov $0x11ea14,%esi
106f0d: b1 0c mov $0xc,%cl
106f0f: 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 ) {
106f11: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
106f15: 0f 84 a3 00 00 00 je 106fbe <mount+0x195>
106f1b: eb 13 jmp 106f30 <mount+0x107>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
106f1d: e8 c2 9d 00 00 call 110ce4 <__errno> <== NOT EXECUTED
106f22: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
106f28: 83 c8 ff or $0xffffffff,%eax
106f2b: e9 26 01 00 00 jmp 107056 <mount+0x22d>
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
106f30: 83 ec 0c sub $0xc,%esp
106f33: 6a 01 push $0x1
106f35: 8d 75 d4 lea -0x2c(%ebp),%esi
106f38: 56 push %esi
106f39: 6a 07 push $0x7
106f3b: ff 75 ac pushl -0x54(%ebp)
106f3e: ff 75 0c pushl 0xc(%ebp)
106f41: e8 80 f9 ff ff call 1068c6 <rtems_filesystem_evaluate_path>
106f46: 83 c4 20 add $0x20,%esp
106f49: 40 inc %eax
106f4a: 0f 84 df 00 00 00 je 10702f <mount+0x206> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
106f50: 83 ec 0c sub $0xc,%esp
106f53: 56 push %esi
106f54: 8b 45 e0 mov -0x20(%ebp),%eax
106f57: ff 50 10 call *0x10(%eax)
106f5a: 83 c4 10 add $0x10,%esp
106f5d: 48 dec %eax
106f5e: 74 10 je 106f70 <mount+0x147>
errno = ENOTDIR;
106f60: e8 7f 9d 00 00 call 110ce4 <__errno>
106f65: c7 00 14 00 00 00 movl $0x14,(%eax)
goto cleanup_and_bail;
106f6b: e9 c1 00 00 00 jmp 107031 <mount+0x208>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
106f70: 57 push %edi
106f71: 57 push %edi
106f72: ff 75 d4 pushl -0x2c(%ebp)
106f75: 68 a0 6d 10 00 push $0x106da0
106f7a: e8 62 fe ff ff call 106de1 <rtems_filesystem_mount_iterate>
106f7f: 83 c4 10 add $0x10,%esp
106f82: 84 c0 test %al,%al
106f84: 74 10 je 106f96 <mount+0x16d>
errno = EBUSY;
106f86: e8 59 9d 00 00 call 110ce4 <__errno>
106f8b: c7 00 10 00 00 00 movl $0x10,(%eax)
goto cleanup_and_bail;
106f91: e9 9b 00 00 00 jmp 107031 <mount+0x208>
* 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;
106f96: 8b 45 d4 mov -0x2c(%ebp),%eax
106f99: 89 43 08 mov %eax,0x8(%ebx)
mt_entry->mt_point_node.handlers = loc.handlers;
106f9c: 8b 45 dc mov -0x24(%ebp),%eax
106f9f: 89 43 10 mov %eax,0x10(%ebx)
mt_entry->mt_point_node.ops = loc.ops;
106fa2: 8b 45 e0 mov -0x20(%ebp),%eax
106fa5: 89 43 14 mov %eax,0x14(%ebx)
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
106fa8: 8b 55 e4 mov -0x1c(%ebp),%edx
106fab: 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 ) ) {
106fae: 83 ec 0c sub $0xc,%esp
106fb1: 53 push %ebx
106fb2: ff 50 20 call *0x20(%eax)
106fb5: 83 c4 10 add $0x10,%esp
106fb8: 85 c0 test %eax,%eax
106fba: 74 1d je 106fd9 <mount+0x1b0> <== ALWAYS TAKEN
106fbc: eb 73 jmp 107031 <mount+0x208> <== NOT EXECUTED
)
{
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;
106fbe: 31 f6 xor %esi,%esi
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
106fc0: 81 3d 28 1f 12 00 2c cmpl $0x121f2c,0x121f28
106fc7: 1f 12 00
106fca: 74 0d je 106fd9 <mount+0x1b0> <== ALWAYS TAKEN
errno = EINVAL;
106fcc: e8 13 9d 00 00 call 110ce4 <__errno> <== NOT EXECUTED
106fd1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
goto cleanup_and_bail;
106fd7: eb 58 jmp 107031 <mount+0x208> <== NOT EXECUTED
* 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 ) ) {
106fd9: 51 push %ecx
106fda: 51 push %ecx
106fdb: ff 75 18 pushl 0x18(%ebp)
106fde: 53 push %ebx
106fdf: ff 55 b0 call *-0x50(%ebp)
106fe2: 83 c4 10 add $0x10,%esp
106fe5: 85 c0 test %eax,%eax
106fe7: 74 0f je 106ff8 <mount+0x1cf>
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
106fe9: 83 ec 0c sub $0xc,%esp
106fec: 53 push %ebx
106fed: 8b 45 e0 mov -0x20(%ebp),%eax
106ff0: ff 50 28 call *0x28(%eax)
goto cleanup_and_bail;
106ff3: 83 c4 10 add $0x10,%esp
106ff6: eb 39 jmp 107031 <mount+0x208>
}
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
106ff8: e8 b4 fd ff ff call 106db1 <rtems_libio_lock>
106ffd: 52 push %edx
106ffe: 52 push %edx
106fff: 53 push %ebx
107000: 68 28 1f 12 00 push $0x121f28
107005: e8 a6 2f 00 00 call 109fb0 <_Chain_Append>
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
10700a: e8 bc fd ff ff call 106dcb <rtems_libio_unlock>
if ( !has_target )
10700f: 83 c4 10 add $0x10,%esp
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
107012: 31 c0 xor %eax,%eax
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
107014: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
107018: 75 3c jne 107056 <mount+0x22d>
rtems_filesystem_root = mt_entry->mt_fs_root;
10701a: 8b 3d 44 20 12 00 mov 0x122044,%edi
107020: 83 c7 18 add $0x18,%edi
107023: 8d 73 1c lea 0x1c(%ebx),%esi
107026: b9 05 00 00 00 mov $0x5,%ecx
10702b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10702d: eb 27 jmp 107056 <mount+0x22d>
)
{
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;
10702f: 31 f6 xor %esi,%esi
return 0;
cleanup_and_bail:
free( mt_entry );
107031: 83 ec 0c sub $0xc,%esp
107034: 53 push %ebx
107035: e8 5e f9 ff ff call 106998 <free>
if ( loc_to_free )
10703a: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( loc_to_free );
return -1;
10703d: 83 c8 ff or $0xffffffff,%eax
cleanup_and_bail:
free( mt_entry );
if ( loc_to_free )
107040: 85 f6 test %esi,%esi
107042: 74 12 je 107056 <mount+0x22d> <== NEVER TAKEN
rtems_filesystem_freenode( loc_to_free );
107044: 83 ec 0c sub $0xc,%esp
107047: 56 push %esi
107048: 89 45 a8 mov %eax,-0x58(%ebp)
10704b: e8 34 f9 ff ff call 106984 <rtems_filesystem_freenode>
107050: 83 c4 10 add $0x10,%esp
107053: 8b 45 a8 mov -0x58(%ebp),%eax
return -1;
}
107056: 8d 65 f4 lea -0xc(%ebp),%esp
107059: 5b pop %ebx
10705a: 5e pop %esi
10705b: 5f pop %edi
10705c: c9 leave
10705d: c3 ret
001073b0 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
1073b0: 55 push %ebp
1073b1: 89 e5 mov %esp,%ebp
1073b3: 57 push %edi
1073b4: 56 push %esi
1073b5: 53 push %ebx
1073b6: 83 ec 1c sub $0x1c,%esp
1073b9: 8b 4d 08 mov 0x8(%ebp),%ecx
1073bc: 8b 5d 0c mov 0xc(%ebp),%ebx
1073bf: 8b 75 10 mov 0x10(%ebp),%esi
1073c2: 8b 7d 14 mov 0x14(%ebp),%edi
1073c5: 8b 55 18 mov 0x18(%ebp),%edx
int rv = -1;
if (target != NULL) {
1073c8: 85 db test %ebx,%ebx
1073ca: 74 3b je 107407 <mount_and_make_target_path+0x57>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
1073cc: 50 push %eax
1073cd: 50 push %eax
1073ce: 68 ff 01 00 00 push $0x1ff
1073d3: 53 push %ebx
1073d4: 89 55 e0 mov %edx,-0x20(%ebp)
1073d7: 89 4d e4 mov %ecx,-0x1c(%ebp)
1073da: e8 bd 08 00 00 call 107c9c <rtems_mkdir>
if (rv == 0) {
1073df: 83 c4 10 add $0x10,%esp
1073e2: 85 c0 test %eax,%eax
1073e4: 8b 55 e0 mov -0x20(%ebp),%edx
1073e7: 8b 4d e4 mov -0x1c(%ebp),%ecx
1073ea: 75 29 jne 107415 <mount_and_make_target_path+0x65><== NEVER TAKEN
rv = mount(
1073ec: 89 55 18 mov %edx,0x18(%ebp)
1073ef: 89 7d 14 mov %edi,0x14(%ebp)
1073f2: 89 75 10 mov %esi,0x10(%ebp)
1073f5: 89 5d 0c mov %ebx,0xc(%ebp)
1073f8: 89 4d 08 mov %ecx,0x8(%ebp)
} else {
errno = EINVAL;
}
return rv;
}
1073fb: 8d 65 f4 lea -0xc(%ebp),%esp
1073fe: 5b pop %ebx
1073ff: 5e pop %esi
107400: 5f pop %edi
107401: c9 leave
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
107402: e9 a2 00 00 00 jmp 1074a9 <mount>
options,
data
);
}
} else {
errno = EINVAL;
107407: e8 f4 9e 00 00 call 111300 <__errno>
10740c: c7 00 16 00 00 00 movl $0x16,(%eax)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
107412: 83 c8 ff or $0xffffffff,%eax
} else {
errno = EINVAL;
}
return rv;
}
107415: 8d 65 f4 lea -0xc(%ebp),%esp
107418: 5b pop %ebx
107419: 5e pop %esi
10741a: 5f pop %edi
10741b: c9 leave
10741c: c3 ret
0010732b <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
10732b: 55 push %ebp
10732c: 89 e5 mov %esp,%ebp
10732e: 57 push %edi
10732f: 56 push %esi
107330: 53 push %ebx
107331: 83 ec 0c sub $0xc,%esp
107334: 8b 7d 08 mov 0x8(%ebp),%edi
107337: 8b 75 0c mov 0xc(%ebp),%esi
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
10733a: 39 f7 cmp %esi,%edi
10733c: 75 08 jne 107346 <newlib_delete_hook+0x1b>
ptr = _REENT;
10733e: 8b 1d 20 21 12 00 mov 0x122120,%ebx
107344: eb 06 jmp 10734c <newlib_delete_hook+0x21>
} else {
ptr = deleted_task->libc_reent;
107346: 8b 9e e4 00 00 00 mov 0xe4(%esi),%ebx
}
if (ptr && ptr != _global_impure_ptr) {
10734c: 85 db test %ebx,%ebx
10734e: 74 20 je 107370 <newlib_delete_hook+0x45><== NEVER TAKEN
107350: 3b 1d c0 f4 11 00 cmp 0x11f4c0,%ebx
107356: 74 18 je 107370 <newlib_delete_hook+0x45>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
107358: 50 push %eax
107359: 50 push %eax
10735a: 68 68 70 10 00 push $0x107068
10735f: 53 push %ebx
107360: e8 67 a1 00 00 call 1114cc <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
107365: 89 1c 24 mov %ebx,(%esp)
107368: e8 7a 51 00 00 call 10c4e7 <_Workspace_Free>
10736d: 83 c4 10 add $0x10,%esp
#endif
}
deleted_task->libc_reent = NULL;
107370: c7 86 e4 00 00 00 00 movl $0x0,0xe4(%esi)
107377: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
10737a: 39 f7 cmp %esi,%edi
10737c: 75 0a jne 107388 <newlib_delete_hook+0x5d>
_REENT = 0;
10737e: c7 05 20 21 12 00 00 movl $0x0,0x122120
107385: 00 00 00
}
}
107388: 8d 65 f4 lea -0xc(%ebp),%esp
10738b: 5b pop %ebx
10738c: 5e pop %esi
10738d: 5f pop %edi
10738e: c9 leave
10738f: c3 ret
00107068 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
107068: 55 push %ebp
107069: 89 e5 mov %esp,%ebp
10706b: 53 push %ebx
10706c: 83 ec 10 sub $0x10,%esp
10706f: 8b 5d 08 mov 0x8(%ebp),%ebx
switch ( fileno(fp) ) {
107072: 53 push %ebx
107073: e8 40 a0 00 00 call 1110b8 <fileno>
107078: 83 c4 10 add $0x10,%esp
10707b: 83 f8 02 cmp $0x2,%eax
10707e: 77 26 ja 1070a6 <newlib_free_buffers+0x3e><== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
107080: f6 43 0c 80 testb $0x80,0xc(%ebx)
107084: 74 2c je 1070b2 <newlib_free_buffers+0x4a><== ALWAYS TAKEN
free( fp->_bf._base );
107086: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107089: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10708c: e8 07 f9 ff ff call 106998 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
107091: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
107097: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
10709d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
1070a4: eb 09 jmp 1070af <newlib_free_buffers+0x47><== NOT EXECUTED
}
break;
default:
fclose(fp);
1070a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1070a9: 53 push %ebx <== NOT EXECUTED
1070aa: e8 8d 9d 00 00 call 110e3c <fclose> <== NOT EXECUTED
1070af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
1070b2: 31 c0 xor %eax,%eax
1070b4: 8b 5d fc mov -0x4(%ebp),%ebx
1070b7: c9 leave
1070b8: c3 ret
001073f0 <open>:
int open(
const char *pathname,
int flags,
...
)
{
1073f0: 55 push %ebp
1073f1: 89 e5 mov %esp,%ebp
1073f3: 57 push %edi
1073f4: 56 push %esi
1073f5: 53 push %ebx
1073f6: 83 ec 3c sub $0x3c,%esp
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
1073f9: 8b 45 0c mov 0xc(%ebp),%eax
1073fc: 40 inc %eax
if ( ( status & _FREAD ) == _FREAD )
1073fd: 89 c6 mov %eax,%esi
1073ff: 83 e6 01 and $0x1,%esi
eval_flags |= RTEMS_LIBIO_PERMS_READ;
107402: f7 de neg %esi
107404: 83 e6 04 and $0x4,%esi
if ( ( status & _FWRITE ) == _FWRITE )
107407: a8 02 test $0x2,%al
107409: 74 03 je 10740e <open+0x1e>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
10740b: 83 ce 02 or $0x2,%esi
va_start(ap, flags);
mode = va_arg( ap, int );
10740e: 8b 45 10 mov 0x10(%ebp),%eax
107411: 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();
107414: e8 c2 64 00 00 call 10d8db <rtems_libio_allocate>
107419: 89 c3 mov %eax,%ebx
if ( iop == 0 ) {
10741b: 85 c0 test %eax,%eax
10741d: 0f 84 56 01 00 00 je 107579 <open+0x189>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
107423: 83 c9 ff or $0xffffffff,%ecx
107426: 8b 7d 08 mov 0x8(%ebp),%edi
107429: 31 c0 xor %eax,%eax
10742b: f2 ae repnz scas %es:(%edi),%al
10742d: f7 d1 not %ecx
10742f: 49 dec %ecx
107430: 83 ec 0c sub $0xc,%esp
107433: 6a 01 push $0x1
107435: 8d 45 d4 lea -0x2c(%ebp),%eax
107438: 50 push %eax
107439: 56 push %esi
10743a: 51 push %ecx
10743b: ff 75 08 pushl 0x8(%ebp)
10743e: e8 83 f4 ff ff call 1068c6 <rtems_filesystem_evaluate_path>
107443: 89 c6 mov %eax,%esi
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
107445: 83 c4 20 add $0x20,%esp
107448: 83 f8 ff cmp $0xffffffff,%eax
10744b: 75 6c jne 1074b9 <open+0xc9>
if ( errno != ENOENT ) {
10744d: e8 92 98 00 00 call 110ce4 <__errno>
107452: 83 38 02 cmpl $0x2,(%eax)
107455: 75 27 jne 10747e <open+0x8e>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
107457: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
10745e: 0f 84 1c 01 00 00 je 107580 <open+0x190>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
107464: 6a 00 push $0x0
107466: 6a 00 push $0x0
107468: 8b 45 c4 mov -0x3c(%ebp),%eax
10746b: 80 cc 80 or $0x80,%ah
10746e: 50 push %eax
10746f: ff 75 08 pushl 0x8(%ebp)
107472: e8 75 f8 ff ff call 106cec <mknod>
if ( rc ) {
107477: 83 c4 10 add $0x10,%esp
10747a: 85 c0 test %eax,%eax
10747c: 74 0e je 10748c <open+0x9c> <== ALWAYS TAKEN
rc = errno;
10747e: e8 61 98 00 00 call 110ce4 <__errno>
107483: 8b 30 mov (%eax),%esi
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;
107485: 31 ff xor %edi,%edi
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
goto done;
107487: e9 10 01 00 00 jmp 10759c <open+0x1ac>
/*
* 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(
10748c: 89 f1 mov %esi,%ecx
10748e: 8b 7d 08 mov 0x8(%ebp),%edi
107491: 31 c0 xor %eax,%eax
107493: f2 ae repnz scas %es:(%edi),%al
107495: f7 d1 not %ecx
107497: 49 dec %ecx
107498: 83 ec 0c sub $0xc,%esp
10749b: 6a 01 push $0x1
10749d: 8d 45 d4 lea -0x2c(%ebp),%eax
1074a0: 50 push %eax
1074a1: 6a 00 push $0x0
1074a3: 51 push %ecx
1074a4: ff 75 08 pushl 0x8(%ebp)
1074a7: e8 1a f4 ff ff call 1068c6 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
1074ac: 83 c4 20 add $0x20,%esp
1074af: 85 c0 test %eax,%eax
1074b1: 0f 85 d2 00 00 00 jne 107589 <open+0x199> <== NEVER TAKEN
1074b7: eb 13 jmp 1074cc <open+0xdc>
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
1074b9: 8b 45 0c mov 0xc(%ebp),%eax
1074bc: 25 00 0a 00 00 and $0xa00,%eax
1074c1: 3d 00 0a 00 00 cmp $0xa00,%eax
1074c6: 0f 84 c6 00 00 00 je 107592 <open+0x1a2>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
1074cc: 8b 73 14 mov 0x14(%ebx),%esi
1074cf: 83 ec 0c sub $0xc,%esp
1074d2: ff 75 0c pushl 0xc(%ebp)
1074d5: e8 8e 63 00 00 call 10d868 <rtems_libio_fcntl_flags>
1074da: 09 f0 or %esi,%eax
1074dc: 89 43 14 mov %eax,0x14(%ebx)
iop->pathinfo = loc;
1074df: 8d 7b 18 lea 0x18(%ebx),%edi
1074e2: 8d 75 d4 lea -0x2c(%ebp),%esi
1074e5: b9 05 00 00 00 mov $0x5,%ecx
1074ea: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
1074ec: 8b 43 20 mov 0x20(%ebx),%eax
1074ef: ff 75 c4 pushl -0x3c(%ebp)
1074f2: ff 75 0c pushl 0xc(%ebp)
1074f5: ff 75 08 pushl 0x8(%ebp)
1074f8: 53 push %ebx
1074f9: ff 10 call *(%eax)
if ( rc ) {
1074fb: 83 c4 20 add $0x20,%esp
1074fe: 85 c0 test %eax,%eax
107500: 74 0f je 107511 <open+0x121>
rc = errno;
107502: e8 dd 97 00 00 call 110ce4 <__errno>
107507: 8b 30 mov (%eax),%esi
rc = EEXIST;
loc_to_free = &loc;
goto done;
}
loc_to_free = &loc;
107509: 8d 7d d4 lea -0x2c(%ebp),%edi
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
goto done;
10750c: e9 8b 00 00 00 jmp 10759c <open+0x1ac>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
107511: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
107518: 0f 84 ae 00 00 00 je 1075cc <open+0x1dc>
rc = ftruncate( iop - rtems_libio_iops, 0 );
10751e: 50 push %eax
10751f: 6a 00 push $0x0
107521: 6a 00 push $0x0
107523: 89 d8 mov %ebx,%eax
107525: 2b 05 a0 41 12 00 sub 0x1241a0,%eax
10752b: c1 f8 03 sar $0x3,%eax
10752e: 69 c0 b7 6d db b6 imul $0xb6db6db7,%eax,%eax
107534: 50 push %eax
107535: e8 02 62 00 00 call 10d73c <ftruncate>
10753a: 89 c6 mov %eax,%esi
if ( rc ) {
10753c: 83 c4 10 add $0x10,%esp
10753f: 85 c0 test %eax,%eax
107541: 0f 84 85 00 00 00 je 1075cc <open+0x1dc>
if(errno) rc = errno;
107547: e8 98 97 00 00 call 110ce4 <__errno>
10754c: 83 38 00 cmpl $0x0,(%eax)
10754f: 74 07 je 107558 <open+0x168> <== NEVER TAKEN
107551: e8 8e 97 00 00 call 110ce4 <__errno>
107556: 8b 30 mov (%eax),%esi
close( iop - rtems_libio_iops );
107558: 83 ec 0c sub $0xc,%esp
10755b: 2b 1d a0 41 12 00 sub 0x1241a0,%ebx
107561: c1 fb 03 sar $0x3,%ebx
107564: 69 db b7 6d db b6 imul $0xb6db6db7,%ebx,%ebx
10756a: 53 push %ebx
10756b: e8 5c 61 00 00 call 10d6cc <close>
107570: 83 c4 10 add $0x10,%esp
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
107573: 31 ff xor %edi,%edi
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;
107575: 31 db xor %ebx,%ebx
107577: eb 23 jmp 10759c <open+0x1ac>
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
107579: be 17 00 00 00 mov $0x17,%esi
10757e: eb 40 jmp 1075c0 <open+0x1d0>
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;
107580: 31 ff xor %edi,%edi
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
107582: be 02 00 00 00 mov $0x2,%esi
107587: eb 17 jmp 1075a0 <open+0x1b0>
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;
107589: 31 ff xor %edi,%edi <== NOT EXECUTED
* 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;
10758b: be 0d 00 00 00 mov $0xd,%esi <== NOT EXECUTED
107590: eb 0e jmp 1075a0 <open+0x1b0> <== NOT EXECUTED
}
} 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;
107592: 8d 7d d4 lea -0x2c(%ebp),%edi
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;
107595: be 11 00 00 00 mov $0x11,%esi
10759a: eb 04 jmp 1075a0 <open+0x1b0>
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
10759c: 85 f6 test %esi,%esi
10759e: 74 2c je 1075cc <open+0x1dc> <== NEVER TAKEN
if ( iop )
1075a0: 85 db test %ebx,%ebx
1075a2: 74 0c je 1075b0 <open+0x1c0>
rtems_libio_free( iop );
1075a4: 83 ec 0c sub $0xc,%esp
1075a7: 53 push %ebx
1075a8: e8 a7 63 00 00 call 10d954 <rtems_libio_free>
1075ad: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
1075b0: 85 ff test %edi,%edi
1075b2: 74 0c je 1075c0 <open+0x1d0>
rtems_filesystem_freenode( loc_to_free );
1075b4: 83 ec 0c sub $0xc,%esp
1075b7: 57 push %edi
1075b8: e8 c7 f3 ff ff call 106984 <rtems_filesystem_freenode>
1075bd: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( rc );
1075c0: e8 1f 97 00 00 call 110ce4 <__errno>
1075c5: 89 30 mov %esi,(%eax)
1075c7: 83 c8 ff or $0xffffffff,%eax
1075ca: eb 0f jmp 1075db <open+0x1eb>
}
return iop - rtems_libio_iops;
1075cc: 2b 1d a0 41 12 00 sub 0x1241a0,%ebx
1075d2: c1 fb 03 sar $0x3,%ebx
1075d5: 69 c3 b7 6d db b6 imul $0xb6db6db7,%ebx,%eax
}
1075db: 8d 65 f4 lea -0xc(%ebp),%esp
1075de: 5b pop %ebx
1075df: 5e pop %esi
1075e0: 5f pop %edi
1075e1: c9 leave
1075e2: c3 ret
00108192 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
108192: 55 push %ebp
108193: 89 e5 mov %esp,%ebp
108195: 56 push %esi
108196: 53 push %ebx
108197: 83 ec 10 sub $0x10,%esp
10819a: 89 d3 mov %edx,%ebx
10819c: 88 45 f4 mov %al,-0xc(%ebp)
int i;
if (tty->termios.c_oflag & OPOST) {
10819f: 8b 52 34 mov 0x34(%edx),%edx
1081a2: f6 c2 01 test $0x1,%dl
1081a5: 0f 84 ed 00 00 00 je 108298 <oproc+0x106> <== NEVER TAKEN
switch (c) {
1081ab: 3c 09 cmp $0x9,%al
1081ad: 74 75 je 108224 <oproc+0x92>
1081af: 77 0d ja 1081be <oproc+0x2c> <== ALWAYS TAKEN
1081b1: 3c 08 cmp $0x8,%al <== NOT EXECUTED
1081b3: 0f 85 aa 00 00 00 jne 108263 <oproc+0xd1> <== NOT EXECUTED
1081b9: e9 98 00 00 00 jmp 108256 <oproc+0xc4> <== NOT EXECUTED
1081be: 3c 0a cmp $0xa,%al
1081c0: 74 0a je 1081cc <oproc+0x3a>
1081c2: 3c 0d cmp $0xd,%al
1081c4: 0f 85 99 00 00 00 jne 108263 <oproc+0xd1> <== ALWAYS TAKEN
1081ca: eb 32 jmp 1081fe <oproc+0x6c> <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
1081cc: f6 c2 20 test $0x20,%dl
1081cf: 74 07 je 1081d8 <oproc+0x46> <== ALWAYS TAKEN
tty->column = 0;
1081d1: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
1081d8: 80 e2 04 and $0x4,%dl
1081db: 0f 84 b7 00 00 00 je 108298 <oproc+0x106> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
1081e1: 56 push %esi
1081e2: 53 push %ebx
1081e3: 6a 01 push $0x1
1081e5: 68 b8 ea 11 00 push $0x11eab8
1081ea: e8 83 fe ff ff call 108072 <rtems_termios_puts>
tty->column = 0;
1081ef: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx)
1081f6: 83 c4 10 add $0x10,%esp
1081f9: e9 9a 00 00 00 jmp 108298 <oproc+0x106>
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
1081fe: f6 c2 10 test $0x10,%dl <== NOT EXECUTED
108201: 74 0a je 10820d <oproc+0x7b> <== NOT EXECUTED
108203: 83 7b 28 00 cmpl $0x0,0x28(%ebx) <== NOT EXECUTED
108207: 0f 84 9b 00 00 00 je 1082a8 <oproc+0x116> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
10820d: f6 c2 08 test $0x8,%dl <== NOT EXECUTED
108210: 74 09 je 10821b <oproc+0x89> <== NOT EXECUTED
c = '\n';
108212: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
108216: 80 e2 20 and $0x20,%dl <== NOT EXECUTED
108219: 74 7d je 108298 <oproc+0x106> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
10821b: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
break;
108222: eb 74 jmp 108298 <oproc+0x106> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
108224: 8b 4b 28 mov 0x28(%ebx),%ecx
108227: 89 ce mov %ecx,%esi
108229: 83 e6 07 and $0x7,%esi
10822c: b8 08 00 00 00 mov $0x8,%eax
108231: 29 f0 sub %esi,%eax
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
108233: 81 e2 00 18 00 00 and $0x1800,%edx
108239: 81 fa 00 18 00 00 cmp $0x1800,%edx
10823f: 8d 14 08 lea (%eax,%ecx,1),%edx
108242: 75 0d jne 108251 <oproc+0xbf> <== NEVER TAKEN
tty->column += i;
108244: 89 53 28 mov %edx,0x28(%ebx)
rtems_termios_puts ( " ", i, tty);
108247: 51 push %ecx
108248: 53 push %ebx
108249: 50 push %eax
10824a: 68 78 e6 11 00 push $0x11e678
10824f: eb 4f jmp 1082a0 <oproc+0x10e>
return;
}
tty->column += i;
108251: 89 53 28 mov %edx,0x28(%ebx) <== NOT EXECUTED
break;
108254: eb 42 jmp 108298 <oproc+0x106> <== NOT EXECUTED
case '\b':
if (tty->column > 0)
108256: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
108259: 85 c0 test %eax,%eax <== NOT EXECUTED
10825b: 7e 3b jle 108298 <oproc+0x106> <== NOT EXECUTED
tty->column--;
10825d: 48 dec %eax <== NOT EXECUTED
10825e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
108261: eb 35 jmp 108298 <oproc+0x106> <== NOT EXECUTED
break;
default:
if (tty->termios.c_oflag & OLCUC)
108263: 80 e2 02 and $0x2,%dl
108266: 74 1c je 108284 <oproc+0xf2> <== ALWAYS TAKEN
c = toupper(c);
108268: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10826b: 8b 15 00 21 12 00 mov 0x122100,%edx <== NOT EXECUTED
108271: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx <== NOT EXECUTED
108276: 83 e2 03 and $0x3,%edx <== NOT EXECUTED
108279: 83 fa 02 cmp $0x2,%edx <== NOT EXECUTED
10827c: 75 03 jne 108281 <oproc+0xef> <== NOT EXECUTED
10827e: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED
108281: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED
if (!iscntrl(c))
108284: 0f b6 45 f4 movzbl -0xc(%ebp),%eax
108288: 8b 15 00 21 12 00 mov 0x122100,%edx
10828e: f6 44 02 01 20 testb $0x20,0x1(%edx,%eax,1)
108293: 75 03 jne 108298 <oproc+0x106> <== NEVER TAKEN
tty->column++;
108295: ff 43 28 incl 0x28(%ebx)
break;
}
}
rtems_termios_puts (&c, 1, tty);
108298: 52 push %edx
108299: 53 push %ebx
10829a: 6a 01 push $0x1
10829c: 8d 45 f4 lea -0xc(%ebp),%eax
10829f: 50 push %eax
1082a0: e8 cd fd ff ff call 108072 <rtems_termios_puts>
1082a5: 83 c4 10 add $0x10,%esp
}
1082a8: 8d 65 f8 lea -0x8(%ebp),%esp
1082ab: 5b pop %ebx
1082ac: 5e pop %esi
1082ad: c9 leave
1082ae: c3 ret
0010e508 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
10e508: 55 push %ebp
10e509: 89 e5 mov %esp,%ebp
10e50b: 57 push %edi
10e50c: 56 push %esi
10e50d: 53 push %ebx
10e50e: 83 ec 34 sub $0x34,%esp
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
10e511: 68 ff 01 00 00 push $0x1ff
10e516: 68 f0 07 12 00 push $0x1207f0
10e51b: e8 9c 14 00 00 call 10f9bc <rtems_mkdir>
10e520: 83 c4 10 add $0x10,%esp
return -1;
10e523: c7 45 d4 ff ff ff ff movl $0xffffffff,-0x2c(%ebp)
)
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
10e52a: 85 c0 test %eax,%eax
10e52c: 0f 85 e8 00 00 00 jne 10e61a <pipe_create+0x112> <== NEVER TAKEN
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
10e532: 8d 5d d9 lea -0x27(%ebp),%ebx
10e535: be f5 07 12 00 mov $0x1207f5,%esi
10e53a: b9 0a 00 00 00 mov $0xa,%ecx
10e53f: 89 df mov %ebx,%edi
10e541: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
10e543: 0f b7 05 a8 5f 12 00 movzwl 0x125fa8,%eax
10e54a: 8d 50 01 lea 0x1(%eax),%edx
10e54d: 66 89 15 a8 5f 12 00 mov %dx,0x125fa8
10e554: 57 push %edi
10e555: 50 push %eax
10e556: 68 00 08 12 00 push $0x120800
10e55b: 8d 45 e3 lea -0x1d(%ebp),%eax
10e55e: 50 push %eax
10e55f: e8 60 49 00 00 call 112ec4 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
10e564: 59 pop %ecx
10e565: 5e pop %esi
10e566: 68 80 01 00 00 push $0x180
10e56b: 53 push %ebx
10e56c: e8 0b 12 00 00 call 10f77c <mkfifo>
10e571: 83 c4 10 add $0x10,%esp
10e574: 85 c0 test %eax,%eax
10e576: 74 0a je 10e582 <pipe_create+0x7a>
if (errno != EEXIST){
10e578: e8 5b 3f 00 00 call 1124d8 <__errno>
10e57d: e9 98 00 00 00 jmp 10e61a <pipe_create+0x112>
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);
10e582: 52 push %edx
10e583: 52 push %edx
10e584: 68 00 40 00 00 push $0x4000
10e589: 53 push %ebx
10e58a: e8 c1 9e ff ff call 108450 <open>
10e58f: 8b 55 08 mov 0x8(%ebp),%edx
10e592: 89 02 mov %eax,(%edx)
if (filsdes[0] < 0) {
10e594: 83 c4 10 add $0x10,%esp
10e597: 85 c0 test %eax,%eax
10e599: 79 0d jns 10e5a8 <pipe_create+0xa0>
err = errno;
10e59b: e8 38 3f 00 00 call 1124d8 <__errno>
10e5a0: 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);
10e5a2: 83 ec 0c sub $0xc,%esp
10e5a5: 53 push %ebx
10e5a6: eb 51 jmp 10e5f9 <pipe_create+0xf1>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
10e5a8: 31 d2 xor %edx,%edx
10e5aa: 3b 05 44 21 12 00 cmp 0x122144,%eax
10e5b0: 73 09 jae 10e5bb <pipe_create+0xb3> <== NEVER TAKEN
10e5b2: 6b d0 38 imul $0x38,%eax,%edx
10e5b5: 03 15 a8 61 12 00 add 0x1261a8,%edx
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
10e5bb: 83 62 14 fe andl $0xfffffffe,0x14(%edx)
filsdes[1] = open(fifopath, O_WRONLY);
10e5bf: 50 push %eax
10e5c0: 50 push %eax
10e5c1: 6a 01 push $0x1
10e5c3: 8d 45 d9 lea -0x27(%ebp),%eax
10e5c6: 50 push %eax
10e5c7: e8 84 9e ff ff call 108450 <open>
10e5cc: 8b 55 08 mov 0x8(%ebp),%edx
10e5cf: 89 42 04 mov %eax,0x4(%edx)
if (filsdes[1] < 0) {
10e5d2: 83 c4 10 add $0x10,%esp
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
10e5d5: 31 f6 xor %esi,%esi
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
10e5d7: 85 c0 test %eax,%eax
10e5d9: 79 17 jns 10e5f2 <pipe_create+0xea>
err = errno;
10e5db: e8 f8 3e 00 00 call 1124d8 <__errno>
10e5e0: 8b 30 mov (%eax),%esi
close(filsdes[0]);
10e5e2: 83 ec 0c sub $0xc,%esp
10e5e5: 8b 45 08 mov 0x8(%ebp),%eax
10e5e8: ff 30 pushl (%eax)
10e5ea: e8 45 90 ff ff call 107634 <close>
10e5ef: 83 c4 10 add $0x10,%esp
}
unlink(fifopath);
10e5f2: 83 ec 0c sub $0xc,%esp
10e5f5: 8d 45 d9 lea -0x27(%ebp),%eax
10e5f8: 50 push %eax
10e5f9: e8 ee b9 ff ff call 109fec <unlink>
10e5fe: 83 c4 10 add $0x10,%esp
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
10e601: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
10e608: 85 f6 test %esi,%esi
10e60a: 74 0e je 10e61a <pipe_create+0x112>
rtems_set_errno_and_return_minus_one(err);
10e60c: e8 c7 3e 00 00 call 1124d8 <__errno>
10e611: 89 30 mov %esi,(%eax)
10e613: c7 45 d4 ff ff ff ff movl $0xffffffff,-0x2c(%ebp)
return 0;
}
10e61a: 8b 45 d4 mov -0x2c(%ebp),%eax
10e61d: 8d 65 f4 lea -0xc(%ebp),%esp
10e620: 5b pop %ebx
10e621: 5e pop %esi
10e622: 5f pop %edi
10e623: c9 leave
10e624: c3 ret
0010f7f7 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
10f7f7: 55 push %ebp
10f7f8: 89 e5 mov %esp,%ebp
10f7fa: 56 push %esi
10f7fb: 53 push %ebx
10f7fc: 8b 5d 08 mov 0x8(%ebp),%ebx
10f7ff: 8b 75 10 mov 0x10(%ebp),%esi
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
10f802: b8 ea ff ff ff mov $0xffffffea,%eax
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
10f807: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp)
10f80e: 75 36 jne 10f846 <pipe_ioctl+0x4f>
if (buffer == NULL)
return -EFAULT;
10f810: b0 f2 mov $0xf2,%al
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
10f812: 85 f6 test %esi,%esi
10f814: 74 30 je 10f846 <pipe_ioctl+0x4f>
return -EFAULT;
if (! PIPE_LOCK(pipe))
10f816: 51 push %ecx
10f817: 6a 00 push $0x0
10f819: 6a 00 push $0x0
10f81b: ff 73 28 pushl 0x28(%ebx)
10f81e: e8 b9 b9 ff ff call 10b1dc <rtems_semaphore_obtain>
10f823: 89 c2 mov %eax,%edx
10f825: 83 c4 10 add $0x10,%esp
return -EINTR;
10f828: b8 fc ff ff ff mov $0xfffffffc,%eax
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
10f82d: 85 d2 test %edx,%edx
10f82f: 75 15 jne 10f846 <pipe_ioctl+0x4f> <== NEVER TAKEN
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
10f831: 8b 43 0c mov 0xc(%ebx),%eax
10f834: 89 06 mov %eax,(%esi)
PIPE_UNLOCK(pipe);
10f836: 83 ec 0c sub $0xc,%esp
10f839: ff 73 28 pushl 0x28(%ebx)
10f83c: e8 87 ba ff ff call 10b2c8 <rtems_semaphore_release>
return 0;
10f841: 83 c4 10 add $0x10,%esp
10f844: 31 c0 xor %eax,%eax
}
return -EINVAL;
}
10f846: 8d 65 f8 lea -0x8(%ebp),%esp
10f849: 5b pop %ebx
10f84a: 5e pop %esi
10f84b: c9 leave
10f84c: c3 ret
0010f4e8 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
10f4e8: 55 push %ebp
10f4e9: 89 e5 mov %esp,%ebp
10f4eb: 57 push %edi
10f4ec: 56 push %esi
10f4ed: 53 push %ebx
10f4ee: 83 ec 30 sub $0x30,%esp
10f4f1: 8b 5d 08 mov 0x8(%ebp),%ebx
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
10f4f4: 6a 00 push $0x0
10f4f6: 6a 00 push $0x0
10f4f8: ff 73 28 pushl 0x28(%ebx)
10f4fb: e8 dc bc ff ff call 10b1dc <rtems_semaphore_obtain>
10f500: 83 c4 10 add $0x10,%esp
return -EINTR;
10f503: be fc ff ff ff mov $0xfffffffc,%esi
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
10f508: 85 c0 test %eax,%eax
10f50a: 0f 85 2f 01 00 00 jne 10f63f <pipe_read+0x157> <== NEVER TAKEN
10f510: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
10f517: e9 f0 00 00 00 jmp 10f60c <pipe_read+0x124>
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
10f51c: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f520: 0f 84 f2 00 00 00 je 10f618 <pipe_read+0x130>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
10f526: 8b 45 14 mov 0x14(%ebp),%eax
10f529: f6 40 14 01 testb $0x1,0x14(%eax)
10f52d: 0f 85 e9 00 00 00 jne 10f61c <pipe_read+0x134>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
10f533: ff 43 18 incl 0x18(%ebx)
PIPE_UNLOCK(pipe);
10f536: 83 ec 0c sub $0xc,%esp
10f539: ff 73 28 pushl 0x28(%ebx)
10f53c: e8 87 bd ff ff call 10b2c8 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
10f541: 5f pop %edi
10f542: 58 pop %eax
10f543: 6a 00 push $0x0
10f545: ff 73 2c pushl 0x2c(%ebx)
10f548: e8 e3 16 00 00 call 110c30 <rtems_barrier_wait>
10f54d: 83 c4 0c add $0xc,%esp
10f550: 83 f8 01 cmp $0x1,%eax
10f553: 19 f6 sbb %esi,%esi
10f555: f7 d6 not %esi
10f557: 83 e6 fc and $0xfffffffc,%esi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10f55a: 6a 00 push $0x0
10f55c: 6a 00 push $0x0
10f55e: ff 73 28 pushl 0x28(%ebx)
10f561: e8 76 bc ff ff call 10b1dc <rtems_semaphore_obtain>
10f566: 83 c4 10 add $0x10,%esp
10f569: 85 c0 test %eax,%eax
10f56b: 0f 85 c0 00 00 00 jne 10f631 <pipe_read+0x149> <== NEVER TAKEN
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
10f571: ff 4b 18 decl 0x18(%ebx)
if (ret != 0)
10f574: 85 f6 test %esi,%esi
10f576: 0f 85 a5 00 00 00 jne 10f621 <pipe_read+0x139> <== NEVER TAKEN
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
10f57c: 8b 53 0c mov 0xc(%ebx),%edx
10f57f: 85 d2 test %edx,%edx
10f581: 74 99 je 10f51c <pipe_read+0x34>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
10f583: 8b 45 10 mov 0x10(%ebp),%eax
10f586: 2b 45 d0 sub -0x30(%ebp),%eax
10f589: 89 55 d4 mov %edx,-0x2c(%ebp)
10f58c: 39 c2 cmp %eax,%edx
10f58e: 76 03 jbe 10f593 <pipe_read+0xab>
10f590: 89 45 d4 mov %eax,-0x2c(%ebp)
chunk1 = pipe->Size - pipe->Start;
10f593: 8b 73 08 mov 0x8(%ebx),%esi
10f596: 8b 43 04 mov 0x4(%ebx),%eax
10f599: 29 f0 sub %esi,%eax
if (chunk > chunk1) {
10f59b: 39 45 d4 cmp %eax,-0x2c(%ebp)
10f59e: 8b 7d 0c mov 0xc(%ebp),%edi
10f5a1: 8b 4d d0 mov -0x30(%ebp),%ecx
10f5a4: 8d 14 0f lea (%edi,%ecx,1),%edx
10f5a7: 7e 1b jle 10f5c4 <pipe_read+0xdc>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
10f5a9: 03 33 add (%ebx),%esi
10f5ab: 89 d7 mov %edx,%edi
10f5ad: 89 c1 mov %eax,%ecx
10f5af: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
10f5b1: 8b 55 d0 mov -0x30(%ebp),%edx
10f5b4: 01 c2 add %eax,%edx
10f5b6: 03 55 0c add 0xc(%ebp),%edx
10f5b9: 8b 4d d4 mov -0x2c(%ebp),%ecx
10f5bc: 29 c1 sub %eax,%ecx
10f5be: 8b 33 mov (%ebx),%esi
10f5c0: 89 d7 mov %edx,%edi
10f5c2: eb 07 jmp 10f5cb <pipe_read+0xe3>
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
10f5c4: 03 33 add (%ebx),%esi
10f5c6: 89 d7 mov %edx,%edi
10f5c8: 8b 4d d4 mov -0x2c(%ebp),%ecx
10f5cb: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
pipe->Start += chunk;
10f5cd: 8b 45 d4 mov -0x2c(%ebp),%eax
10f5d0: 03 43 08 add 0x8(%ebx),%eax
pipe->Start %= pipe->Size;
10f5d3: 31 d2 xor %edx,%edx
10f5d5: f7 73 04 divl 0x4(%ebx)
10f5d8: 89 53 08 mov %edx,0x8(%ebx)
pipe->Length -= chunk;
10f5db: 8b 43 0c mov 0xc(%ebx),%eax
10f5de: 2b 45 d4 sub -0x2c(%ebp),%eax
10f5e1: 89 43 0c mov %eax,0xc(%ebx)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
10f5e4: 85 c0 test %eax,%eax
10f5e6: 75 07 jne 10f5ef <pipe_read+0x107>
pipe->Start = 0;
10f5e8: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
if (pipe->waitingWriters > 0)
10f5ef: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx)
10f5f3: 74 11 je 10f606 <pipe_read+0x11e>
PIPE_WAKEUPWRITERS(pipe);
10f5f5: 56 push %esi
10f5f6: 56 push %esi
10f5f7: 8d 45 e4 lea -0x1c(%ebp),%eax
10f5fa: 50 push %eax
10f5fb: ff 73 30 pushl 0x30(%ebx)
10f5fe: e8 d5 15 00 00 call 110bd8 <rtems_barrier_release>
10f603: 83 c4 10 add $0x10,%esp
read += chunk;
10f606: 8b 4d d4 mov -0x2c(%ebp),%ecx
10f609: 01 4d d0 add %ecx,-0x30(%ebp)
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
10f60c: 8b 7d 10 mov 0x10(%ebp),%edi
10f60f: 39 7d d0 cmp %edi,-0x30(%ebp)
10f612: 0f 82 64 ff ff ff jb 10f57c <pipe_read+0x94>
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
10f618: 31 f6 xor %esi,%esi
10f61a: eb 05 jmp 10f621 <pipe_read+0x139>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
10f61c: be f5 ff ff ff mov $0xfffffff5,%esi
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
10f621: 83 ec 0c sub $0xc,%esp
10f624: ff 73 28 pushl 0x28(%ebx)
10f627: e8 9c bc ff ff call 10b2c8 <rtems_semaphore_release>
10f62c: 83 c4 10 add $0x10,%esp
10f62f: eb 05 jmp 10f636 <pipe_read+0x14e>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
10f631: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
10f636: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10f63a: 7e 03 jle 10f63f <pipe_read+0x157>
10f63c: 8b 75 d0 mov -0x30(%ebp),%esi
return read;
return ret;
}
10f63f: 89 f0 mov %esi,%eax
10f641: 8d 65 f4 lea -0xc(%ebp),%esp
10f644: 5b pop %ebx
10f645: 5e pop %esi
10f646: 5f pop %edi
10f647: c9 leave
10f648: c3 ret
0010f08d <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
10f08d: 55 push %ebp
10f08e: 89 e5 mov %esp,%ebp
10f090: 57 push %edi
10f091: 56 push %esi
10f092: 53 push %ebx
10f093: 83 ec 1c sub $0x1c,%esp
10f096: 8b 7d 08 mov 0x8(%ebp),%edi
pipe_control_t *pipe = *pipep;
10f099: 8b 1f mov (%edi),%ebx
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
10f09b: 8b 45 0c mov 0xc(%ebp),%eax
10f09e: 8b 40 14 mov 0x14(%eax),%eax
10f0a1: 89 c6 mov %eax,%esi
10f0a3: 83 e6 06 and $0x6,%esi
if (mode & LIBIO_FLAGS_READ)
10f0a6: a8 02 test $0x2,%al
10f0a8: 74 03 je 10f0ad <pipe_release+0x20>
pipe->Readers --;
10f0aa: ff 4b 10 decl 0x10(%ebx)
if (mode & LIBIO_FLAGS_WRITE)
10f0ad: f7 c6 04 00 00 00 test $0x4,%esi
10f0b3: 74 03 je 10f0b8 <pipe_release+0x2b>
pipe->Writers --;
10f0b5: ff 4b 14 decl 0x14(%ebx)
PIPE_UNLOCK(pipe);
10f0b8: 83 ec 0c sub $0xc,%esp
10f0bb: ff 73 28 pushl 0x28(%ebx)
10f0be: e8 05 c2 ff ff call 10b2c8 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
10f0c3: 8b 43 10 mov 0x10(%ebx),%eax
10f0c6: 83 c4 10 add $0x10,%esp
10f0c9: 85 c0 test %eax,%eax
10f0cb: 75 15 jne 10f0e2 <pipe_release+0x55>
10f0cd: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f0d1: 75 0f jne 10f0e2 <pipe_release+0x55>
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
10f0d3: 89 d8 mov %ebx,%eax
10f0d5: e8 78 ff ff ff call 10f052 <pipe_free>
*pipep = NULL;
10f0da: c7 07 00 00 00 00 movl $0x0,(%edi)
10f0e0: eb 30 jmp 10f112 <pipe_release+0x85>
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
10f0e2: 83 fe 04 cmp $0x4,%esi
10f0e5: 74 0f je 10f0f6 <pipe_release+0x69>
10f0e7: 85 c0 test %eax,%eax
10f0e9: 75 0b jne 10f0f6 <pipe_release+0x69> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
10f0eb: 57 push %edi
10f0ec: 57 push %edi
10f0ed: 8d 45 e4 lea -0x1c(%ebp),%eax
10f0f0: 50 push %eax
10f0f1: ff 73 30 pushl 0x30(%ebx)
10f0f4: eb 14 jmp 10f10a <pipe_release+0x7d>
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
10f0f6: 83 fe 02 cmp $0x2,%esi
10f0f9: 74 17 je 10f112 <pipe_release+0x85> <== NEVER TAKEN
10f0fb: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f0ff: 75 11 jne 10f112 <pipe_release+0x85> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
10f101: 56 push %esi
10f102: 56 push %esi
10f103: 8d 45 e4 lea -0x1c(%ebp),%eax
10f106: 50 push %eax
10f107: ff 73 2c pushl 0x2c(%ebx)
10f10a: e8 c9 1a 00 00 call 110bd8 <rtems_barrier_release>
10f10f: 83 c4 10 add $0x10,%esp
pipe_unlock();
10f112: e8 25 ff ff ff call 10f03c <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
10f117: 8d 65 f4 lea -0xc(%ebp),%esp
10f11a: 5b pop %ebx
10f11b: 5e pop %esi
10f11c: 5f pop %edi
10f11d: c9 leave
10f11e: c3 ret
0010f649 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
10f649: 55 push %ebp
10f64a: 89 e5 mov %esp,%ebp
10f64c: 57 push %edi
10f64d: 56 push %esi
10f64e: 53 push %ebx
10f64f: 83 ec 2c sub $0x2c,%esp
10f652: 8b 5d 08 mov 0x8(%ebp),%ebx
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
10f655: 31 f6 xor %esi,%esi
)
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
10f657: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10f65b: 0f 84 8c 01 00 00 je 10f7ed <pipe_write+0x1a4> <== NEVER TAKEN
return 0;
if (! PIPE_LOCK(pipe))
10f661: 52 push %edx
10f662: 6a 00 push $0x0
10f664: 6a 00 push $0x0
10f666: ff 73 28 pushl 0x28(%ebx)
10f669: e8 6e bb ff ff call 10b1dc <rtems_semaphore_obtain>
10f66e: 83 c4 10 add $0x10,%esp
return -EINTR;
10f671: be fc ff ff ff mov $0xfffffffc,%esi
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
10f676: 85 c0 test %eax,%eax
10f678: 0f 85 6f 01 00 00 jne 10f7ed <pipe_write+0x1a4> <== NEVER TAKEN
return -EINTR;
if (pipe->Readers == 0) {
10f67e: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f682: 0f 84 16 01 00 00 je 10f79e <pipe_write+0x155>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
10f688: bf 01 00 00 00 mov $0x1,%edi
10f68d: 8b 45 10 mov 0x10(%ebp),%eax
10f690: 3b 43 04 cmp 0x4(%ebx),%eax
10f693: 77 02 ja 10f697 <pipe_write+0x4e> <== NEVER TAKEN
10f695: 89 c7 mov %eax,%edi
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
10f697: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
10f69e: e9 eb 00 00 00 jmp 10f78e <pipe_write+0x145>
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
10f6a3: 8b 4d 14 mov 0x14(%ebp),%ecx
10f6a6: f6 41 14 01 testb $0x1,0x14(%ecx)
10f6aa: 0f 85 fc 00 00 00 jne 10f7ac <pipe_write+0x163>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
10f6b0: ff 43 1c incl 0x1c(%ebx)
PIPE_UNLOCK(pipe);
10f6b3: 83 ec 0c sub $0xc,%esp
10f6b6: ff 73 28 pushl 0x28(%ebx)
10f6b9: e8 0a bc ff ff call 10b2c8 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
10f6be: 5e pop %esi
10f6bf: 58 pop %eax
10f6c0: 6a 00 push $0x0
10f6c2: ff 73 30 pushl 0x30(%ebx)
10f6c5: e8 66 15 00 00 call 110c30 <rtems_barrier_wait>
10f6ca: 83 c4 0c add $0xc,%esp
10f6cd: 83 f8 01 cmp $0x1,%eax
10f6d0: 19 f6 sbb %esi,%esi
10f6d2: f7 d6 not %esi
10f6d4: 83 e6 fc and $0xfffffffc,%esi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
10f6d7: 6a 00 push $0x0
10f6d9: 6a 00 push $0x0
10f6db: ff 73 28 pushl 0x28(%ebx)
10f6de: e8 f9 ba ff ff call 10b1dc <rtems_semaphore_obtain>
10f6e3: 83 c4 10 add $0x10,%esp
10f6e6: 85 c0 test %eax,%eax
10f6e8: 0f 85 f1 00 00 00 jne 10f7df <pipe_write+0x196> <== NEVER TAKEN
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
10f6ee: ff 4b 1c decl 0x1c(%ebx)
if (ret != 0)
10f6f1: 85 f6 test %esi,%esi
10f6f3: 0f 85 bf 00 00 00 jne 10f7b8 <pipe_write+0x16f> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
10f6f9: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f6fd: 0f 84 b0 00 00 00 je 10f7b3 <pipe_write+0x16a> <== NEVER TAKEN
/* 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) {
10f703: 8b 73 04 mov 0x4(%ebx),%esi
10f706: 8b 43 0c mov 0xc(%ebx),%eax
10f709: 89 f1 mov %esi,%ecx
10f70b: 29 c1 sub %eax,%ecx
10f70d: 39 f9 cmp %edi,%ecx
10f70f: 72 92 jb 10f6a3 <pipe_write+0x5a>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
10f711: 8b 55 10 mov 0x10(%ebp),%edx
10f714: 2b 55 d4 sub -0x2c(%ebp),%edx
10f717: 89 4d d0 mov %ecx,-0x30(%ebp)
10f71a: 39 d1 cmp %edx,%ecx
10f71c: 76 03 jbe 10f721 <pipe_write+0xd8>
10f71e: 89 55 d0 mov %edx,-0x30(%ebp)
chunk1 = pipe->Size - PIPE_WSTART(pipe);
10f721: 03 43 08 add 0x8(%ebx),%eax
10f724: 31 d2 xor %edx,%edx
10f726: f7 f6 div %esi
10f728: 29 d6 sub %edx,%esi
10f72a: 89 75 cc mov %esi,-0x34(%ebp)
if (chunk > chunk1) {
10f72d: 39 75 d0 cmp %esi,-0x30(%ebp)
10f730: 8b 4d 0c mov 0xc(%ebp),%ecx
10f733: 8b 45 d4 mov -0x2c(%ebp),%eax
10f736: 8d 34 01 lea (%ecx,%eax,1),%esi
10f739: 7e 20 jle 10f75b <pipe_write+0x112>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
10f73b: 8b 03 mov (%ebx),%eax
10f73d: 01 d0 add %edx,%eax
10f73f: 89 c7 mov %eax,%edi
10f741: 8b 4d cc mov -0x34(%ebp),%ecx
10f744: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
10f746: 8b 03 mov (%ebx),%eax
10f748: 8b 4d d0 mov -0x30(%ebp),%ecx
10f74b: 2b 4d cc sub -0x34(%ebp),%ecx
10f74e: 8b 75 cc mov -0x34(%ebp),%esi
10f751: 03 75 d4 add -0x2c(%ebp),%esi
10f754: 03 75 0c add 0xc(%ebp),%esi
10f757: 89 c7 mov %eax,%edi
10f759: eb 09 jmp 10f764 <pipe_write+0x11b>
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
10f75b: 8b 03 mov (%ebx),%eax
10f75d: 01 d0 add %edx,%eax
10f75f: 89 c7 mov %eax,%edi
10f761: 8b 4d d0 mov -0x30(%ebp),%ecx
10f764: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
pipe->Length += chunk;
10f766: 8b 45 d0 mov -0x30(%ebp),%eax
10f769: 01 43 0c add %eax,0xc(%ebx)
if (pipe->waitingReaders > 0)
10f76c: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10f770: 74 11 je 10f783 <pipe_write+0x13a>
PIPE_WAKEUPREADERS(pipe);
10f772: 51 push %ecx
10f773: 51 push %ecx
10f774: 8d 4d e4 lea -0x1c(%ebp),%ecx
10f777: 51 push %ecx
10f778: ff 73 2c pushl 0x2c(%ebx)
10f77b: e8 58 14 00 00 call 110bd8 <rtems_barrier_release>
10f780: 83 c4 10 add $0x10,%esp
written += chunk;
10f783: 8b 45 d0 mov -0x30(%ebp),%eax
10f786: 01 45 d4 add %eax,-0x2c(%ebp)
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
10f789: bf 01 00 00 00 mov $0x1,%edi
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
10f78e: 8b 4d 10 mov 0x10(%ebp),%ecx
10f791: 39 4d d4 cmp %ecx,-0x2c(%ebp)
10f794: 0f 82 69 ff ff ff jb 10f703 <pipe_write+0xba>
10f79a: 31 f6 xor %esi,%esi
10f79c: eb 1a jmp 10f7b8 <pipe_write+0x16f>
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
10f79e: 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;
10f7a3: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
10f7aa: eb 0c jmp 10f7b8 <pipe_write+0x16f>
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
10f7ac: be f5 ff ff ff mov $0xfffffff5,%esi
10f7b1: eb 05 jmp 10f7b8 <pipe_write+0x16f>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
10f7b3: 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);
10f7b8: 83 ec 0c sub $0xc,%esp
10f7bb: ff 73 28 pushl 0x28(%ebx)
10f7be: e8 05 bb ff ff call 10b2c8 <rtems_semaphore_release>
10f7c3: 83 c4 10 add $0x10,%esp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
10f7c6: 83 fe e0 cmp $0xffffffe0,%esi
10f7c9: 75 19 jne 10f7e4 <pipe_write+0x19b>
kill(getpid(), SIGPIPE);
10f7cb: e8 24 07 00 00 call 10fef4 <getpid>
10f7d0: 52 push %edx
10f7d1: 52 push %edx
10f7d2: 6a 0d push $0xd
10f7d4: 50 push %eax
10f7d5: e8 e6 09 00 00 call 1101c0 <kill>
10f7da: 83 c4 10 add $0x10,%esp
10f7dd: eb 05 jmp 10f7e4 <pipe_write+0x19b>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
10f7df: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
10f7e4: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10f7e8: 7e 03 jle 10f7ed <pipe_write+0x1a4>
10f7ea: 8b 75 d4 mov -0x2c(%ebp),%esi
return written;
return ret;
}
10f7ed: 89 f0 mov %esi,%eax
10f7ef: 8d 65 f4 lea -0xc(%ebp),%esp
10f7f2: 5b pop %ebx
10f7f3: 5e pop %esi
10f7f4: 5f pop %edi
10f7f5: c9 leave
10f7f6: c3 ret
00109ea8 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
109ea8: 55 push %ebp
109ea9: 89 e5 mov %esp,%ebp
109eab: 53 push %ebx
109eac: 83 ec 04 sub $0x4,%esp
109eaf: 8b 45 0c mov 0xc(%ebp),%eax
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
109eb2: ff 05 0c be 12 00 incl 0x12be0c
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
109eb8: 8d 58 ff lea -0x1(%eax),%ebx
109ebb: 85 c3 test %eax,%ebx
109ebd: 75 0d jne 109ecc <posix_memalign+0x24> <== NEVER TAKEN
109ebf: 83 f8 03 cmp $0x3,%eax
109ec2: 76 08 jbe 109ecc <posix_memalign+0x24>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
109ec4: 59 pop %ecx
109ec5: 5b pop %ebx
109ec6: c9 leave
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
109ec7: e9 74 01 00 00 jmp 10a040 <rtems_memalign>
}
109ecc: b8 16 00 00 00 mov $0x16,%eax
109ed1: 5a pop %edx
109ed2: 5b pop %ebx
109ed3: c9 leave
109ed4: c3 ret
0010e86c <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
10e86c: 55 push %ebp
10e86d: 89 e5 mov %esp,%ebp
10e86f: 8b 55 08 mov 0x8(%ebp),%edx
10e872: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr || !attr->is_initialized )
return EINVAL;
10e875: b8 16 00 00 00 mov $0x16,%eax
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
10e87a: 85 d2 test %edx,%edx
10e87c: 74 1e je 10e89c <pthread_attr_setschedpolicy+0x30>
10e87e: 83 3a 00 cmpl $0x0,(%edx)
10e881: 74 19 je 10e89c <pthread_attr_setschedpolicy+0x30>
return EINVAL;
switch ( policy ) {
10e883: 83 f9 04 cmp $0x4,%ecx
10e886: 77 0f ja 10e897 <pthread_attr_setschedpolicy+0x2b>
10e888: b0 01 mov $0x1,%al
10e88a: d3 e0 shl %cl,%eax
10e88c: a8 17 test $0x17,%al
10e88e: 74 07 je 10e897 <pthread_attr_setschedpolicy+0x2b><== NEVER TAKEN
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
10e890: 89 4a 14 mov %ecx,0x14(%edx)
return 0;
10e893: 31 c0 xor %eax,%eax
10e895: eb 05 jmp 10e89c <pthread_attr_setschedpolicy+0x30>
default:
return ENOTSUP;
10e897: b8 86 00 00 00 mov $0x86,%eax
}
}
10e89c: c9 leave
10e89d: c3 ret
00109b8c <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
109b8c: 55 push %ebp
109b8d: 89 e5 mov %esp,%ebp
109b8f: 57 push %edi
109b90: 56 push %esi
109b91: 53 push %ebx
109b92: 83 ec 1c sub $0x1c,%esp
109b95: 8b 5d 08 mov 0x8(%ebp),%ebx
109b98: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Error check parameters
*/
if ( !barrier )
return EINVAL;
109b9b: b8 16 00 00 00 mov $0x16,%eax
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
109ba0: 85 db test %ebx,%ebx
109ba2: 0f 84 96 00 00 00 je 109c3e <pthread_barrier_init+0xb2>
return EINVAL;
if ( count == 0 )
109ba8: 85 f6 test %esi,%esi
109baa: 0f 84 8e 00 00 00 je 109c3e <pthread_barrier_init+0xb2>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
109bb0: 8b 7d 0c mov 0xc(%ebp),%edi
109bb3: 85 ff test %edi,%edi
109bb5: 75 0f jne 109bc6 <pthread_barrier_init+0x3a>
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
109bb7: 83 ec 0c sub $0xc,%esp
109bba: 8d 7d d8 lea -0x28(%ebp),%edi
109bbd: 57 push %edi
109bbe: e8 19 ff ff ff call 109adc <pthread_barrierattr_init>
109bc3: 83 c4 10 add $0x10,%esp
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
return EINVAL;
109bc6: b8 16 00 00 00 mov $0x16,%eax
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
109bcb: 83 3f 00 cmpl $0x0,(%edi)
109bce: 74 6e je 109c3e <pthread_barrier_init+0xb2>
return EINVAL;
switch ( the_attr->process_shared ) {
109bd0: 83 7f 04 00 cmpl $0x0,0x4(%edi)
109bd4: 75 68 jne 109c3e <pthread_barrier_init+0xb2><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
109bd6: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_attributes.maximum_count = count;
109bdd: 89 75 e4 mov %esi,-0x1c(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
109be0: a1 f4 62 12 00 mov 0x1262f4,%eax
109be5: 40 inc %eax
109be6: a3 f4 62 12 00 mov %eax,0x1262f4
* 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 );
109beb: 83 ec 0c sub $0xc,%esp
109bee: 68 94 66 12 00 push $0x126694
109bf3: e8 70 1c 00 00 call 10b868 <_Objects_Allocate>
109bf8: 89 c6 mov %eax,%esi
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
109bfa: 83 c4 10 add $0x10,%esp
109bfd: 85 c0 test %eax,%eax
109bff: 75 0c jne 109c0d <pthread_barrier_init+0x81>
_Thread_Enable_dispatch();
109c01: e8 d4 2a 00 00 call 10c6da <_Thread_Enable_dispatch>
return EAGAIN;
109c06: b8 0b 00 00 00 mov $0xb,%eax
109c0b: eb 31 jmp 109c3e <pthread_barrier_init+0xb2>
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
109c0d: 50 push %eax
109c0e: 50 push %eax
109c0f: 8d 45 e0 lea -0x20(%ebp),%eax
109c12: 50 push %eax
109c13: 8d 46 10 lea 0x10(%esi),%eax
109c16: 50 push %eax
109c17: e8 04 14 00 00 call 10b020 <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
109c1c: 8b 46 08 mov 0x8(%esi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
109c1f: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
109c22: 8b 15 b0 66 12 00 mov 0x1266b0,%edx
109c28: 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;
109c2b: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
109c32: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
109c34: e8 a1 2a 00 00 call 10c6da <_Thread_Enable_dispatch>
return 0;
109c39: 83 c4 10 add $0x10,%esp
109c3c: 31 c0 xor %eax,%eax
}
109c3e: 8d 65 f4 lea -0xc(%ebp),%esp
109c41: 5b pop %ebx
109c42: 5e pop %esi
109c43: 5f pop %edi
109c44: c9 leave
109c45: c3 ret
00109540 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
109540: 55 push %ebp
109541: 89 e5 mov %esp,%ebp
109543: 56 push %esi
109544: 53 push %ebx
109545: 8b 5d 08 mov 0x8(%ebp),%ebx
109548: 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 )
10954b: 85 db test %ebx,%ebx
10954d: 74 4b je 10959a <pthread_cleanup_push+0x5a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10954f: a1 cc 62 12 00 mov 0x1262cc,%eax
109554: 40 inc %eax
109555: a3 cc 62 12 00 mov %eax,0x1262cc
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
10955a: 83 ec 0c sub $0xc,%esp
10955d: 6a 10 push $0x10
10955f: e8 36 3a 00 00 call 10cf9a <_Workspace_Allocate>
if ( handler ) {
109564: 83 c4 10 add $0x10,%esp
109567: 85 c0 test %eax,%eax
109569: 74 24 je 10958f <pthread_cleanup_push+0x4f><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10956b: 8b 15 f0 67 12 00 mov 0x1267f0,%edx
handler_stack = &thread_support->Cancellation_Handlers;
109571: 8b 92 ec 00 00 00 mov 0xec(%edx),%edx
109577: 81 c2 e4 00 00 00 add $0xe4,%edx
handler->routine = routine;
10957d: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
109580: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
109583: 51 push %ecx
109584: 51 push %ecx
109585: 50 push %eax
109586: 52 push %edx
109587: e8 e0 14 00 00 call 10aa6c <_Chain_Append>
10958c: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
}
10958f: 8d 65 f8 lea -0x8(%ebp),%esp
109592: 5b pop %ebx
109593: 5e pop %esi
109594: c9 leave
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
109595: e9 34 2b 00 00 jmp 10c0ce <_Thread_Enable_dispatch>
}
10959a: 8d 65 f8 lea -0x8(%ebp),%esp
10959d: 5b pop %ebx
10959e: 5e pop %esi
10959f: c9 leave
1095a0: c3 ret
0010a2b4 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10a2b4: 55 push %ebp
10a2b5: 89 e5 mov %esp,%ebp
10a2b7: 56 push %esi
10a2b8: 53 push %ebx
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10a2b9: 8b 5d 0c mov 0xc(%ebp),%ebx
10a2bc: 85 db test %ebx,%ebx
10a2be: 75 05 jne 10a2c5 <pthread_cond_init+0x11>
else the_attr = &_POSIX_Condition_variables_Default_attributes;
10a2c0: bb a8 0f 12 00 mov $0x120fa8,%ebx
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
10a2c5: b8 16 00 00 00 mov $0x16,%eax
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10a2ca: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10a2ce: 74 76 je 10a346 <pthread_cond_init+0x92><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10a2d0: 83 3b 00 cmpl $0x0,(%ebx)
10a2d3: 74 71 je 10a346 <pthread_cond_init+0x92>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10a2d5: a1 e4 72 12 00 mov 0x1272e4,%eax
10a2da: 40 inc %eax
10a2db: a3 e4 72 12 00 mov %eax,0x1272e4
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
_Objects_Allocate( &_POSIX_Condition_variables_Information );
10a2e0: 83 ec 0c sub $0xc,%esp
10a2e3: 68 1c 77 12 00 push $0x12771c
10a2e8: e8 5b 21 00 00 call 10c448 <_Objects_Allocate>
10a2ed: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10a2ef: 83 c4 10 add $0x10,%esp
10a2f2: 85 c0 test %eax,%eax
10a2f4: 75 0c jne 10a302 <pthread_cond_init+0x4e>
_Thread_Enable_dispatch();
10a2f6: e8 bf 2f 00 00 call 10d2ba <_Thread_Enable_dispatch>
return ENOMEM;
10a2fb: b8 0c 00 00 00 mov $0xc,%eax
10a300: eb 44 jmp 10a346 <pthread_cond_init+0x92>
}
the_cond->process_shared = the_attr->process_shared;
10a302: 8b 43 04 mov 0x4(%ebx),%eax
10a305: 89 46 10 mov %eax,0x10(%esi)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10a308: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
_Thread_queue_Initialize(
10a30f: 6a 74 push $0x74
10a311: 68 00 08 00 10 push $0x10000800
10a316: 6a 00 push $0x0
10a318: 8d 46 18 lea 0x18(%esi),%eax
10a31b: 50 push %eax
10a31c: e8 57 36 00 00 call 10d978 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10a321: 8b 46 08 mov 0x8(%esi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10a324: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10a327: 8b 15 38 77 12 00 mov 0x127738,%edx
10a32d: 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;
10a330: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10a337: 8b 55 08 mov 0x8(%ebp),%edx
10a33a: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
10a33c: e8 79 2f 00 00 call 10d2ba <_Thread_Enable_dispatch>
return 0;
10a341: 83 c4 10 add $0x10,%esp
10a344: 31 c0 xor %eax,%eax
}
10a346: 8d 65 f8 lea -0x8(%ebp),%esp
10a349: 5b pop %ebx
10a34a: 5e pop %esi
10a34b: c9 leave
10a34c: c3 ret
0010a168 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10a168: 55 push %ebp
10a169: 89 e5 mov %esp,%ebp
10a16b: 8b 55 08 mov 0x8(%ebp),%edx
if ( !attr || attr->is_initialized == false )
return EINVAL;
10a16e: b8 16 00 00 00 mov $0x16,%eax
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
10a173: 85 d2 test %edx,%edx
10a175: 74 0d je 10a184 <pthread_condattr_destroy+0x1c>
10a177: 83 3a 00 cmpl $0x0,(%edx)
10a17a: 74 08 je 10a184 <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
10a17c: c7 02 00 00 00 00 movl $0x0,(%edx)
return 0;
10a182: 30 c0 xor %al,%al
}
10a184: c9 leave
10a185: c3 ret
0010989c <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10989c: 55 push %ebp
10989d: 89 e5 mov %esp,%ebp
10989f: 57 push %edi
1098a0: 56 push %esi
1098a1: 53 push %ebx
1098a2: 83 ec 5c sub $0x5c,%esp
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
1098a5: c7 45 b4 0e 00 00 00 movl $0xe,-0x4c(%ebp)
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
1098ac: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
1098b0: 0f 84 0f 02 00 00 je 109ac5 <pthread_create+0x229>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
1098b6: 8b 5d 0c mov 0xc(%ebp),%ebx
1098b9: 85 db test %ebx,%ebx
1098bb: 75 05 jne 1098c2 <pthread_create+0x26>
1098bd: bb 14 fc 11 00 mov $0x11fc14,%ebx
if ( !the_attr->is_initialized )
return EINVAL;
1098c2: c7 45 b4 16 00 00 00 movl $0x16,-0x4c(%ebp)
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
if ( !the_attr->is_initialized )
1098c9: 83 3b 00 cmpl $0x0,(%ebx)
1098cc: 0f 84 f3 01 00 00 je 109ac5 <pthread_create+0x229>
* 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) )
1098d2: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
1098d6: 74 0e je 1098e6 <pthread_create+0x4a>
1098d8: a1 44 12 12 00 mov 0x121244,%eax
1098dd: 39 43 08 cmp %eax,0x8(%ebx)
1098e0: 0f 82 df 01 00 00 jb 109ac5 <pthread_create+0x229>
* 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 ) {
1098e6: 8b 43 10 mov 0x10(%ebx),%eax
1098e9: 83 f8 01 cmp $0x1,%eax
1098ec: 74 0b je 1098f9 <pthread_create+0x5d>
1098ee: 83 f8 02 cmp $0x2,%eax
1098f1: 0f 85 c7 01 00 00 jne 109abe <pthread_create+0x222>
1098f7: eb 1f jmp 109918 <pthread_create+0x7c>
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
1098f9: a1 f8 57 12 00 mov 0x1257f8,%eax
1098fe: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi
schedpolicy = api->schedpolicy;
109904: 8b 86 84 00 00 00 mov 0x84(%esi),%eax
10990a: 89 45 ac mov %eax,-0x54(%ebp)
schedparam = api->schedparam;
10990d: 8d 7d c4 lea -0x3c(%ebp),%edi
109910: 81 c6 88 00 00 00 add $0x88,%esi
109916: eb 0c jmp 109924 <pthread_create+0x88>
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
109918: 8b 43 14 mov 0x14(%ebx),%eax
10991b: 89 45 ac mov %eax,-0x54(%ebp)
schedparam = the_attr->schedparam;
10991e: 8d 7d c4 lea -0x3c(%ebp),%edi
109921: 8d 73 18 lea 0x18(%ebx),%esi
109924: b9 07 00 00 00 mov $0x7,%ecx
109929: 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 )
return ENOTSUP;
10992b: c7 45 b4 86 00 00 00 movl $0x86,-0x4c(%ebp)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
109932: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
109936: 0f 85 89 01 00 00 jne 109ac5 <pthread_create+0x229>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10993c: 83 ec 0c sub $0xc,%esp
10993f: ff 75 c4 pushl -0x3c(%ebp)
109942: e8 ed 58 00 00 call 10f234 <_POSIX_Priority_Is_valid>
109947: 83 c4 10 add $0x10,%esp
return EINVAL;
10994a: c7 45 b4 16 00 00 00 movl $0x16,-0x4c(%ebp)
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
109951: 84 c0 test %al,%al
109953: 0f 84 6c 01 00 00 je 109ac5 <pthread_create+0x229> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
109959: 8b 45 c4 mov -0x3c(%ebp),%eax
10995c: 89 45 a8 mov %eax,-0x58(%ebp)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10995f: 0f b6 3d 48 12 12 00 movzbl 0x121248,%edi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
109966: 8d 45 e0 lea -0x20(%ebp),%eax
109969: 50 push %eax
10996a: 8d 45 e4 lea -0x1c(%ebp),%eax
10996d: 50 push %eax
10996e: 8d 45 c4 lea -0x3c(%ebp),%eax
109971: 50 push %eax
109972: ff 75 ac pushl -0x54(%ebp)
109975: e8 da 58 00 00 call 10f254 <_POSIX_Thread_Translate_sched_param>
10997a: 89 45 b4 mov %eax,-0x4c(%ebp)
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
10997d: 83 c4 10 add $0x10,%esp
109980: 85 c0 test %eax,%eax
109982: 0f 85 3d 01 00 00 jne 109ac5 <pthread_create+0x229>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
109988: 83 ec 0c sub $0xc,%esp
10998b: ff 35 74 53 12 00 pushl 0x125374
109991: e8 aa 14 00 00 call 10ae40 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
109996: c7 04 24 f4 54 12 00 movl $0x1254f4,(%esp)
10999d: e8 06 1d 00 00 call 10b6a8 <_Objects_Allocate>
1099a2: 89 45 b0 mov %eax,-0x50(%ebp)
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
1099a5: 83 c4 10 add $0x10,%esp
1099a8: 85 c0 test %eax,%eax
1099aa: 75 05 jne 1099b1 <pthread_create+0x115>
_RTEMS_Unlock_allocator();
1099ac: 83 ec 0c sub $0xc,%esp
1099af: eb 53 jmp 109a04 <pthread_create+0x168>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
1099b1: 8b 4d e0 mov -0x20(%ebp),%ecx
1099b4: 8b 75 e4 mov -0x1c(%ebp),%esi
1099b7: 8b 53 08 mov 0x8(%ebx),%edx
1099ba: a1 44 12 12 00 mov 0x121244,%eax
1099bf: d1 e0 shl %eax
1099c1: 39 d0 cmp %edx,%eax
1099c3: 73 02 jae 1099c7 <pthread_create+0x12b>
1099c5: 89 d0 mov %edx,%eax
1099c7: 52 push %edx
1099c8: 6a 00 push $0x0
1099ca: 6a 00 push $0x0
1099cc: 51 push %ecx
1099cd: 56 push %esi
1099ce: 6a 01 push $0x1
1099d0: 81 e7 ff 00 00 00 and $0xff,%edi
1099d6: 2b 7d a8 sub -0x58(%ebp),%edi
1099d9: 57 push %edi
1099da: 6a 01 push $0x1
1099dc: 50 push %eax
1099dd: ff 73 04 pushl 0x4(%ebx)
1099e0: ff 75 b0 pushl -0x50(%ebp)
1099e3: 68 f4 54 12 00 push $0x1254f4
1099e8: e8 c3 2b 00 00 call 10c5b0 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
1099ed: 83 c4 30 add $0x30,%esp
1099f0: 84 c0 test %al,%al
1099f2: 75 2a jne 109a1e <pthread_create+0x182>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
1099f4: 56 push %esi
1099f5: 56 push %esi
1099f6: ff 75 b0 pushl -0x50(%ebp)
1099f9: 68 f4 54 12 00 push $0x1254f4
1099fe: e8 99 1f 00 00 call 10b99c <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
109a03: 5b pop %ebx
109a04: ff 35 74 53 12 00 pushl 0x125374
109a0a: e8 79 14 00 00 call 10ae88 <_API_Mutex_Unlock>
return EAGAIN;
109a0f: 83 c4 10 add $0x10,%esp
109a12: c7 45 b4 0b 00 00 00 movl $0xb,-0x4c(%ebp)
109a19: e9 a7 00 00 00 jmp 109ac5 <pthread_create+0x229>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
109a1e: 8b 45 b0 mov -0x50(%ebp),%eax
109a21: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
api->Attributes = *the_attr;
109a27: b9 10 00 00 00 mov $0x10,%ecx
109a2c: 89 d7 mov %edx,%edi
109a2e: 89 de mov %ebx,%esi
109a30: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
109a32: 8b 43 3c mov 0x3c(%ebx),%eax
109a35: 89 42 40 mov %eax,0x40(%edx)
api->schedpolicy = schedpolicy;
109a38: 8b 45 ac mov -0x54(%ebp),%eax
109a3b: 89 82 84 00 00 00 mov %eax,0x84(%edx)
api->schedparam = schedparam;
109a41: 8d ba 88 00 00 00 lea 0x88(%edx),%edi
109a47: 8d 75 c4 lea -0x3c(%ebp),%esi
109a4a: b1 07 mov $0x7,%cl
109a4c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
109a4e: 83 ec 0c sub $0xc,%esp
109a51: 6a 00 push $0x0
109a53: ff 75 14 pushl 0x14(%ebp)
109a56: ff 75 10 pushl 0x10(%ebp)
109a59: 6a 01 push $0x1
109a5b: ff 75 b0 pushl -0x50(%ebp)
109a5e: 89 55 a4 mov %edx,-0x5c(%ebp)
109a61: e8 6a 33 00 00 call 10cdd0 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
109a66: 83 c4 20 add $0x20,%esp
109a69: 83 7d ac 04 cmpl $0x4,-0x54(%ebp)
109a6d: 8b 55 a4 mov -0x5c(%ebp),%edx
109a70: 75 2e jne 109aa0 <pthread_create+0x204>
_Watchdog_Insert_ticks(
109a72: 83 ec 0c sub $0xc,%esp
&api->Sporadic_timer,
_Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
109a75: 8d 82 90 00 00 00 lea 0x90(%edx),%eax
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
109a7b: 50 push %eax
109a7c: e8 9f 34 00 00 call 10cf20 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
109a81: 8b 55 a4 mov -0x5c(%ebp),%edx
109a84: 89 82 b4 00 00 00 mov %eax,0xb4(%edx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
109a8a: 58 pop %eax
109a8b: 59 pop %ecx
109a8c: 81 c2 a8 00 00 00 add $0xa8,%edx
109a92: 52 push %edx
109a93: 68 94 53 12 00 push $0x125394
109a98: e8 37 37 00 00 call 10d1d4 <_Watchdog_Insert>
109a9d: 83 c4 10 add $0x10,%esp
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
109aa0: 8b 45 b0 mov -0x50(%ebp),%eax
109aa3: 8b 50 08 mov 0x8(%eax),%edx
109aa6: 8b 45 08 mov 0x8(%ebp),%eax
109aa9: 89 10 mov %edx,(%eax)
_RTEMS_Unlock_allocator();
109aab: 83 ec 0c sub $0xc,%esp
109aae: ff 35 74 53 12 00 pushl 0x125374
109ab4: e8 cf 13 00 00 call 10ae88 <_API_Mutex_Unlock>
return 0;
109ab9: 83 c4 10 add $0x10,%esp
109abc: eb 07 jmp 109ac5 <pthread_create+0x229>
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
break;
default:
return EINVAL;
109abe: c7 45 b4 16 00 00 00 movl $0x16,-0x4c(%ebp)
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
109ac5: 8b 45 b4 mov -0x4c(%ebp),%eax
109ac8: 8d 65 f4 lea -0xc(%ebp),%esp
109acb: 5b pop %ebx
109acc: 5e pop %esi
109acd: 5f pop %edi
109ace: c9 leave
109acf: c3 ret
00110820 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
110820: 55 push %ebp
110821: 89 e5 mov %esp,%ebp
110823: 83 ec 10 sub $0x10,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
110826: ff 75 08 pushl 0x8(%ebp)
110829: ff 35 08 48 12 00 pushl 0x124808
11082f: e8 88 ff ff ff call 1107bc <_POSIX_Thread_Exit>
110834: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
110837: c9 leave <== NOT EXECUTED
110838: c3 ret <== NOT EXECUTED
00121de4 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
121de4: 55 push %ebp
121de5: 89 e5 mov %esp,%ebp
121de7: 57 push %edi
121de8: 56 push %esi
121de9: 53 push %ebx
121dea: 83 ec 1c sub $0x1c,%esp
121ded: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
121df0: 85 db test %ebx,%ebx
121df2: 74 08 je 121dfc <pthread_kill+0x18>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
121df4: 8d 7b ff lea -0x1(%ebx),%edi
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
121df7: 83 ff 1f cmp $0x1f,%edi
121dfa: 76 0d jbe 121e09 <pthread_kill+0x25>
rtems_set_errno_and_return_minus_one( EINVAL );
121dfc: e8 0b 37 ff ff call 11550c <__errno>
121e01: c7 00 16 00 00 00 movl $0x16,(%eax)
121e07: eb 73 jmp 121e7c <pthread_kill+0x98>
the_thread = _Thread_Get( thread, &location );
121e09: 52 push %edx
121e0a: 52 push %edx
121e0b: 8d 45 e4 lea -0x1c(%ebp),%eax
121e0e: 50 push %eax
121e0f: ff 75 08 pushl 0x8(%ebp)
121e12: e8 dd df fe ff call 10fdf4 <_Thread_Get>
121e17: 89 c6 mov %eax,%esi
switch ( location ) {
121e19: 83 c4 10 add $0x10,%esp
121e1c: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
121e20: 75 4f jne 121e71 <pthread_kill+0x8d> <== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
121e22: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
121e28: 6b c3 0c imul $0xc,%ebx,%eax
121e2b: 83 b8 98 a9 12 00 01 cmpl $0x1,0x12a998(%eax)
121e32: 74 34 je 121e68 <pthread_kill+0x84>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
121e34: b8 01 00 00 00 mov $0x1,%eax
121e39: 89 f9 mov %edi,%ecx
121e3b: d3 e0 shl %cl,%eax
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
121e3d: 09 82 d4 00 00 00 or %eax,0xd4(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
121e43: 50 push %eax
121e44: 6a 00 push $0x0
121e46: 53 push %ebx
121e47: 56 push %esi
121e48: e8 93 fe ff ff call 121ce0 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
121e4d: 83 c4 10 add $0x10,%esp
121e50: 83 3d 58 a9 12 00 00 cmpl $0x0,0x12a958
121e57: 74 0f je 121e68 <pthread_kill+0x84>
121e59: 3b 35 5c a9 12 00 cmp 0x12a95c,%esi
121e5f: 75 07 jne 121e68 <pthread_kill+0x84>
_Thread_Dispatch_necessary = true;
121e61: c6 05 68 a9 12 00 01 movb $0x1,0x12a968
}
_Thread_Enable_dispatch();
121e68: e8 65 df fe ff call 10fdd2 <_Thread_Enable_dispatch>
return 0;
121e6d: 31 c0 xor %eax,%eax
121e6f: eb 0e jmp 121e7f <pthread_kill+0x9b>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
121e71: e8 96 36 ff ff call 11550c <__errno> <== NOT EXECUTED
121e76: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
121e7c: 83 c8 ff or $0xffffffff,%eax
}
121e7f: 8d 65 f4 lea -0xc(%ebp),%esp
121e82: 5b pop %ebx
121e83: 5e pop %esi
121e84: 5f pop %edi
121e85: c9 leave
121e86: c3 ret
0010b598 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10b598: 55 push %ebp
10b599: 89 e5 mov %esp,%ebp
10b59b: 53 push %ebx
10b59c: 83 ec 2c sub $0x2c,%esp
*
* 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 );
10b59f: 8d 45 f4 lea -0xc(%ebp),%eax
10b5a2: 50 push %eax
10b5a3: ff 75 0c pushl 0xc(%ebp)
10b5a6: e8 b9 00 00 00 call 10b664 <_POSIX_Absolute_timeout_to_ticks>
10b5ab: 89 c3 mov %eax,%ebx
int _EXFUN(pthread_mutex_trylock, (pthread_mutex_t *__mutex));
int _EXFUN(pthread_mutex_unlock, (pthread_mutex_t *__mutex));
#if defined(_POSIX_TIMEOUTS)
int _EXFUN(pthread_mutex_timedlock,
10b5ad: 83 c4 0c add $0xc,%esp
10b5b0: 83 f8 03 cmp $0x3,%eax
10b5b3: 0f 94 c2 sete %dl
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10b5b6: ff 75 f4 pushl -0xc(%ebp)
10b5b9: 0f b6 c2 movzbl %dl,%eax
10b5bc: 50 push %eax
10b5bd: ff 75 08 pushl 0x8(%ebp)
10b5c0: 88 55 e4 mov %dl,-0x1c(%ebp)
10b5c3: e8 e8 fe ff ff call 10b4b0 <_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) ) {
10b5c8: 83 c4 10 add $0x10,%esp
10b5cb: 8a 55 e4 mov -0x1c(%ebp),%dl
10b5ce: 84 d2 test %dl,%dl
10b5d0: 75 1d jne 10b5ef <pthread_mutex_timedlock+0x57>
10b5d2: 83 f8 10 cmp $0x10,%eax
10b5d5: 75 18 jne 10b5ef <pthread_mutex_timedlock+0x57><== NEVER TAKEN
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10b5d7: 85 db test %ebx,%ebx
10b5d9: 74 08 je 10b5e3 <pthread_mutex_timedlock+0x4b><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10b5db: 4b dec %ebx
10b5dc: 83 fb 01 cmp $0x1,%ebx
10b5df: 77 0e ja 10b5ef <pthread_mutex_timedlock+0x57><== NEVER TAKEN
10b5e1: eb 07 jmp 10b5ea <pthread_mutex_timedlock+0x52>
* 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;
10b5e3: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
10b5e8: eb 05 jmp 10b5ef <pthread_mutex_timedlock+0x57><== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10b5ea: b8 74 00 00 00 mov $0x74,%eax
}
return lock_status;
}
10b5ef: 8b 5d fc mov -0x4(%ebp),%ebx
10b5f2: c9 leave
10b5f3: c3 ret
0010b210 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10b210: 55 push %ebp
10b211: 89 e5 mov %esp,%ebp
10b213: 8b 55 08 mov 0x8(%ebp),%edx
10b216: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr || !attr->is_initialized )
return EINVAL;
10b219: b8 16 00 00 00 mov $0x16,%eax
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
10b21e: 85 d2 test %edx,%edx
10b220: 74 0f je 10b231 <pthread_mutexattr_setpshared+0x21>
10b222: 83 3a 00 cmpl $0x0,(%edx)
10b225: 74 0a je 10b231 <pthread_mutexattr_setpshared+0x21>
return EINVAL;
switch ( pshared ) {
10b227: 83 f9 01 cmp $0x1,%ecx
10b22a: 77 05 ja 10b231 <pthread_mutexattr_setpshared+0x21><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10b22c: 89 4a 04 mov %ecx,0x4(%edx)
return 0;
10b22f: 30 c0 xor %al,%al
default:
return EINVAL;
}
}
10b231: c9 leave
10b232: c3 ret
00109438 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
109438: 55 push %ebp
109439: 89 e5 mov %esp,%ebp
10943b: 8b 55 08 mov 0x8(%ebp),%edx
10943e: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr || !attr->is_initialized )
return EINVAL;
109441: b8 16 00 00 00 mov $0x16,%eax
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
if ( !attr || !attr->is_initialized )
109446: 85 d2 test %edx,%edx
109448: 74 0f je 109459 <pthread_mutexattr_settype+0x21>
10944a: 83 3a 00 cmpl $0x0,(%edx)
10944d: 74 0a je 109459 <pthread_mutexattr_settype+0x21><== NEVER TAKEN
return EINVAL;
switch ( type ) {
10944f: 83 f9 03 cmp $0x3,%ecx
109452: 77 05 ja 109459 <pthread_mutexattr_settype+0x21>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
109454: 89 4a 10 mov %ecx,0x10(%edx)
return 0;
109457: 30 c0 xor %al,%al
default:
return EINVAL;
}
}
109459: c9 leave
10945a: c3 ret
00109ee8 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
109ee8: 55 push %ebp
109ee9: 89 e5 mov %esp,%ebp
109eeb: 56 push %esi
109eec: 53 push %ebx
109eed: 83 ec 10 sub $0x10,%esp
109ef0: 8b 5d 08 mov 0x8(%ebp),%ebx
109ef3: 8b 75 0c mov 0xc(%ebp),%esi
if ( !once_control || !init_routine )
109ef6: 85 f6 test %esi,%esi
109ef8: 74 51 je 109f4b <pthread_once+0x63>
109efa: 85 db test %ebx,%ebx
109efc: 74 4d je 109f4b <pthread_once+0x63>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
109efe: 31 c0 xor %eax,%eax
)
{
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
109f00: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
109f04: 75 4a jne 109f50 <pthread_once+0x68>
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
109f06: 52 push %edx
109f07: 8d 45 f4 lea -0xc(%ebp),%eax
109f0a: 50 push %eax
109f0b: 68 00 01 00 00 push $0x100
109f10: 68 00 01 00 00 push $0x100
109f15: e8 fa 09 00 00 call 10a914 <rtems_task_mode>
if ( !once_control->init_executed ) {
109f1a: 83 c4 10 add $0x10,%esp
109f1d: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
109f21: 75 0f jne 109f32 <pthread_once+0x4a> <== NEVER TAKEN
once_control->is_initialized = true;
109f23: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
109f29: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
109f30: ff d6 call *%esi
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
109f32: 50 push %eax
109f33: 8d 45 f4 lea -0xc(%ebp),%eax
109f36: 50 push %eax
109f37: 68 00 01 00 00 push $0x100
109f3c: ff 75 f4 pushl -0xc(%ebp)
109f3f: e8 d0 09 00 00 call 10a914 <rtems_task_mode>
109f44: 83 c4 10 add $0x10,%esp
}
return 0;
109f47: 31 c0 xor %eax,%eax
109f49: eb 05 jmp 109f50 <pthread_once+0x68>
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
109f4b: b8 16 00 00 00 mov $0x16,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
109f50: 8d 65 f8 lea -0x8(%ebp),%esp
109f53: 5b pop %ebx
109f54: 5e pop %esi
109f55: c9 leave
109f56: c3 ret
0010a714 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10a714: 55 push %ebp
10a715: 89 e5 mov %esp,%ebp
10a717: 56 push %esi
10a718: 53 push %ebx
10a719: 83 ec 10 sub $0x10,%esp
10a71c: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Error check parameters
*/
if ( !rwlock )
return EINVAL;
10a71f: b8 16 00 00 00 mov $0x16,%eax
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10a724: 85 db test %ebx,%ebx
10a726: 0f 84 8b 00 00 00 je 10a7b7 <pthread_rwlock_init+0xa3>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10a72c: 8b 75 0c mov 0xc(%ebp),%esi
10a72f: 85 f6 test %esi,%esi
10a731: 75 0f jne 10a742 <pthread_rwlock_init+0x2e>
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
10a733: 83 ec 0c sub $0xc,%esp
10a736: 8d 75 ec lea -0x14(%ebp),%esi
10a739: 56 push %esi
10a73a: e8 5d 09 00 00 call 10b09c <pthread_rwlockattr_init>
10a73f: 83 c4 10 add $0x10,%esp
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
return EINVAL;
10a742: b8 16 00 00 00 mov $0x16,%eax
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10a747: 83 3e 00 cmpl $0x0,(%esi)
10a74a: 74 6b je 10a7b7 <pthread_rwlock_init+0xa3><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
10a74c: 83 7e 04 00 cmpl $0x0,0x4(%esi)
10a750: 75 65 jne 10a7b7 <pthread_rwlock_init+0xa3><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
10a752: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10a759: a1 f4 82 12 00 mov 0x1282f4,%eax
10a75e: 40 inc %eax
10a75f: a3 f4 82 12 00 mov %eax,0x1282f4
* 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 );
10a764: 83 ec 0c sub $0xc,%esp
10a767: 68 d4 84 12 00 push $0x1284d4
10a76c: e8 97 21 00 00 call 10c908 <_Objects_Allocate>
10a771: 89 c6 mov %eax,%esi
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10a773: 83 c4 10 add $0x10,%esp
10a776: 85 c0 test %eax,%eax
10a778: 75 0c jne 10a786 <pthread_rwlock_init+0x72>
_Thread_Enable_dispatch();
10a77a: e8 fb 2f 00 00 call 10d77a <_Thread_Enable_dispatch>
return EAGAIN;
10a77f: b8 0b 00 00 00 mov $0xb,%eax
10a784: eb 31 jmp 10a7b7 <pthread_rwlock_init+0xa3>
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10a786: 50 push %eax
10a787: 50 push %eax
10a788: 8d 45 f4 lea -0xc(%ebp),%eax
10a78b: 50 push %eax
10a78c: 8d 46 10 lea 0x10(%esi),%eax
10a78f: 50 push %eax
10a790: e8 df 19 00 00 call 10c174 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10a795: 8b 46 08 mov 0x8(%esi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10a798: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10a79b: 8b 15 f0 84 12 00 mov 0x1284f0,%edx
10a7a1: 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;
10a7a4: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10a7ab: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10a7ad: e8 c8 2f 00 00 call 10d77a <_Thread_Enable_dispatch>
return 0;
10a7b2: 83 c4 10 add $0x10,%esp
10a7b5: 31 c0 xor %eax,%eax
}
10a7b7: 8d 65 f8 lea -0x8(%ebp),%esp
10a7ba: 5b pop %ebx
10a7bb: 5e pop %esi
10a7bc: c9 leave
10a7bd: c3 ret
0010a828 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10a828: 55 push %ebp
10a829: 89 e5 mov %esp,%ebp
10a82b: 57 push %edi
10a82c: 56 push %esi
10a82d: 53 push %ebx
10a82e: 83 ec 2c sub $0x2c,%esp
10a831: 8b 7d 08 mov 0x8(%ebp),%edi
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
return EINVAL;
10a834: bb 16 00 00 00 mov $0x16,%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10a839: 85 ff test %edi,%edi
10a83b: 0f 84 87 00 00 00 je 10a8c8 <pthread_rwlock_timedrdlock+0xa0>
*
* 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 );
10a841: 50 push %eax
10a842: 50 push %eax
10a843: 8d 45 e0 lea -0x20(%ebp),%eax
10a846: 50 push %eax
10a847: ff 75 0c pushl 0xc(%ebp)
10a84a: e8 35 59 00 00 call 110184 <_POSIX_Absolute_timeout_to_ticks>
10a84f: 89 c6 mov %eax,%esi
10a851: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10a854: 8d 45 e4 lea -0x1c(%ebp),%eax
10a857: 50 push %eax
10a858: ff 37 pushl (%edi)
10a85a: 68 d4 84 12 00 push $0x1284d4
10a85f: e8 d0 24 00 00 call 10cd34 <_Objects_Get>
switch ( location ) {
10a864: 83 c4 10 add $0x10,%esp
10a867: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10a86b: 75 5b jne 10a8c8 <pthread_rwlock_timedrdlock+0xa0>
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,
10a86d: 83 fe 03 cmp $0x3,%esi
10a870: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10a873: 83 ec 0c sub $0xc,%esp
10a876: 6a 00 push $0x0
10a878: ff 75 e0 pushl -0x20(%ebp)
10a87b: 0f b6 ca movzbl %dl,%ecx
10a87e: 51 push %ecx
10a87f: ff 37 pushl (%edi)
10a881: 83 c0 10 add $0x10,%eax
10a884: 50 push %eax
10a885: 88 55 d4 mov %dl,-0x2c(%ebp)
10a888: e8 1b 19 00 00 call 10c1a8 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10a88d: 83 c4 20 add $0x20,%esp
10a890: e8 e5 2e 00 00 call 10d77a <_Thread_Enable_dispatch>
if ( !do_wait ) {
10a895: 8a 55 d4 mov -0x2c(%ebp),%dl
10a898: 84 d2 test %dl,%dl
10a89a: 75 17 jne 10a8b3 <pthread_rwlock_timedrdlock+0x8b>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10a89c: a1 18 88 12 00 mov 0x128818,%eax
10a8a1: 83 78 34 02 cmpl $0x2,0x34(%eax)
10a8a5: 75 0c jne 10a8b3 <pthread_rwlock_timedrdlock+0x8b>
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10a8a7: 85 f6 test %esi,%esi
10a8a9: 74 1d je 10a8c8 <pthread_rwlock_timedrdlock+0xa0><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10a8ab: 4e dec %esi
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10a8ac: b3 74 mov $0x74,%bl
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10a8ae: 83 fe 01 cmp $0x1,%esi
10a8b1: 76 15 jbe 10a8c8 <pthread_rwlock_timedrdlock+0xa0><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10a8b3: 83 ec 0c sub $0xc,%esp
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
10a8b6: a1 18 88 12 00 mov 0x128818,%eax
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10a8bb: ff 70 34 pushl 0x34(%eax)
10a8be: e8 bd 00 00 00 call 10a980 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10a8c3: 89 c3 mov %eax,%ebx
10a8c5: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a8c8: 89 d8 mov %ebx,%eax
10a8ca: 8d 65 f4 lea -0xc(%ebp),%esp
10a8cd: 5b pop %ebx
10a8ce: 5e pop %esi
10a8cf: 5f pop %edi
10a8d0: c9 leave
10a8d1: c3 ret
0010a8d4 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10a8d4: 55 push %ebp
10a8d5: 89 e5 mov %esp,%ebp
10a8d7: 57 push %edi
10a8d8: 56 push %esi
10a8d9: 53 push %ebx
10a8da: 83 ec 2c sub $0x2c,%esp
10a8dd: 8b 7d 08 mov 0x8(%ebp),%edi
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
return EINVAL;
10a8e0: bb 16 00 00 00 mov $0x16,%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10a8e5: 85 ff test %edi,%edi
10a8e7: 0f 84 87 00 00 00 je 10a974 <pthread_rwlock_timedwrlock+0xa0>
*
* 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 );
10a8ed: 50 push %eax
10a8ee: 50 push %eax
10a8ef: 8d 45 e0 lea -0x20(%ebp),%eax
10a8f2: 50 push %eax
10a8f3: ff 75 0c pushl 0xc(%ebp)
10a8f6: e8 89 58 00 00 call 110184 <_POSIX_Absolute_timeout_to_ticks>
10a8fb: 89 c6 mov %eax,%esi
10a8fd: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10a900: 8d 45 e4 lea -0x1c(%ebp),%eax
10a903: 50 push %eax
10a904: ff 37 pushl (%edi)
10a906: 68 d4 84 12 00 push $0x1284d4
10a90b: e8 24 24 00 00 call 10cd34 <_Objects_Get>
switch ( location ) {
10a910: 83 c4 10 add $0x10,%esp
10a913: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10a917: 75 5b jne 10a974 <pthread_rwlock_timedwrlock+0xa0>
(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,
10a919: 83 fe 03 cmp $0x3,%esi
10a91c: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10a91f: 83 ec 0c sub $0xc,%esp
10a922: 6a 00 push $0x0
10a924: ff 75 e0 pushl -0x20(%ebp)
10a927: 0f b6 ca movzbl %dl,%ecx
10a92a: 51 push %ecx
10a92b: ff 37 pushl (%edi)
10a92d: 83 c0 10 add $0x10,%eax
10a930: 50 push %eax
10a931: 88 55 d4 mov %dl,-0x2c(%ebp)
10a934: e8 27 19 00 00 call 10c260 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10a939: 83 c4 20 add $0x20,%esp
10a93c: e8 39 2e 00 00 call 10d77a <_Thread_Enable_dispatch>
if ( !do_wait &&
10a941: 8a 55 d4 mov -0x2c(%ebp),%dl
10a944: 84 d2 test %dl,%dl
10a946: 75 17 jne 10a95f <pthread_rwlock_timedwrlock+0x8b>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10a948: a1 18 88 12 00 mov 0x128818,%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10a94d: 83 78 34 02 cmpl $0x2,0x34(%eax)
10a951: 75 0c jne 10a95f <pthread_rwlock_timedwrlock+0x8b>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10a953: 85 f6 test %esi,%esi
10a955: 74 1d je 10a974 <pthread_rwlock_timedwrlock+0xa0><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10a957: 4e dec %esi
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10a958: b3 74 mov $0x74,%bl
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10a95a: 83 fe 01 cmp $0x1,%esi
10a95d: 76 15 jbe 10a974 <pthread_rwlock_timedwrlock+0xa0><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10a95f: 83 ec 0c sub $0xc,%esp
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
10a962: a1 18 88 12 00 mov 0x128818,%eax
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10a967: ff 70 34 pushl 0x34(%eax)
10a96a: e8 11 00 00 00 call 10a980 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10a96f: 89 c3 mov %eax,%ebx
10a971: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a974: 89 d8 mov %ebx,%eax
10a976: 8d 65 f4 lea -0xc(%ebp),%esp
10a979: 5b pop %ebx
10a97a: 5e pop %esi
10a97b: 5f pop %edi
10a97c: c9 leave
10a97d: c3 ret
0010b0bc <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10b0bc: 55 push %ebp
10b0bd: 89 e5 mov %esp,%ebp
10b0bf: 8b 55 08 mov 0x8(%ebp),%edx
10b0c2: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr )
return EINVAL;
10b0c5: b8 16 00 00 00 mov $0x16,%eax
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
10b0ca: 85 d2 test %edx,%edx
10b0cc: 74 0f je 10b0dd <pthread_rwlockattr_setpshared+0x21>
return EINVAL;
if ( !attr->is_initialized )
10b0ce: 83 3a 00 cmpl $0x0,(%edx)
10b0d1: 74 0a je 10b0dd <pthread_rwlockattr_setpshared+0x21>
return EINVAL;
switch ( pshared ) {
10b0d3: 83 f9 01 cmp $0x1,%ecx
10b0d6: 77 05 ja 10b0dd <pthread_rwlockattr_setpshared+0x21><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10b0d8: 89 4a 04 mov %ecx,0x4(%edx)
return 0;
10b0db: 30 c0 xor %al,%al
default:
return EINVAL;
}
}
10b0dd: c9 leave
10b0de: c3 ret
0010bdb8 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10bdb8: 55 push %ebp
10bdb9: 89 e5 mov %esp,%ebp
10bdbb: 57 push %edi
10bdbc: 56 push %esi
10bdbd: 53 push %ebx
10bdbe: 83 ec 2c sub $0x2c,%esp
10bdc1: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
10bdc4: c7 45 d4 16 00 00 00 movl $0x16,-0x2c(%ebp)
int rc;
/*
* Check all the parameters
*/
if ( !param )
10bdcb: 85 f6 test %esi,%esi
10bdcd: 0f 84 fc 00 00 00 je 10becf <pthread_setschedparam+0x117>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10bdd3: 8d 45 e0 lea -0x20(%ebp),%eax
10bdd6: 50 push %eax
10bdd7: 8d 45 e4 lea -0x1c(%ebp),%eax
10bdda: 50 push %eax
10bddb: 56 push %esi
10bddc: ff 75 0c pushl 0xc(%ebp)
10bddf: e8 f0 52 00 00 call 1110d4 <_POSIX_Thread_Translate_sched_param>
10bde4: 89 45 d4 mov %eax,-0x2c(%ebp)
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10bde7: 83 c4 10 add $0x10,%esp
10bdea: 85 c0 test %eax,%eax
10bdec: 0f 85 dd 00 00 00 jne 10becf <pthread_setschedparam+0x117>
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
10bdf2: 53 push %ebx
10bdf3: 53 push %ebx
10bdf4: 8d 45 dc lea -0x24(%ebp),%eax
10bdf7: 50 push %eax
10bdf8: ff 75 08 pushl 0x8(%ebp)
10bdfb: e8 4c 25 00 00 call 10e34c <_Thread_Get>
10be00: 89 c2 mov %eax,%edx
switch ( location ) {
10be02: 83 c4 10 add $0x10,%esp
10be05: 83 7d dc 00 cmpl $0x0,-0x24(%ebp)
10be09: 0f 85 b9 00 00 00 jne 10bec8 <pthread_setschedparam+0x110>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10be0f: 8b 98 ec 00 00 00 mov 0xec(%eax),%ebx
if ( api->schedpolicy == SCHED_SPORADIC )
10be15: 83 bb 84 00 00 00 04 cmpl $0x4,0x84(%ebx)
10be1c: 75 18 jne 10be36 <pthread_setschedparam+0x7e>
(void) _Watchdog_Remove( &api->Sporadic_timer );
10be1e: 83 ec 0c sub $0xc,%esp
10be21: 8d 83 a8 00 00 00 lea 0xa8(%ebx),%eax
10be27: 50 push %eax
10be28: 89 55 d0 mov %edx,-0x30(%ebp)
10be2b: e8 60 33 00 00 call 10f190 <_Watchdog_Remove>
10be30: 83 c4 10 add $0x10,%esp
10be33: 8b 55 d0 mov -0x30(%ebp),%edx
api->schedpolicy = policy;
10be36: 8b 45 0c mov 0xc(%ebp),%eax
10be39: 89 83 84 00 00 00 mov %eax,0x84(%ebx)
api->schedparam = *param;
10be3f: 8d bb 88 00 00 00 lea 0x88(%ebx),%edi
10be45: b9 07 00 00 00 mov $0x7,%ecx
10be4a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10be4c: 8b 45 e4 mov -0x1c(%ebp),%eax
10be4f: 89 42 7c mov %eax,0x7c(%edx)
the_thread->budget_callout = budget_callout;
10be52: 8b 45 e0 mov -0x20(%ebp),%eax
10be55: 89 82 80 00 00 00 mov %eax,0x80(%edx)
switch ( api->schedpolicy ) {
10be5b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10be5f: 78 60 js 10bec1 <pthread_setschedparam+0x109><== NEVER TAKEN
10be61: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10be65: 7e 08 jle 10be6f <pthread_setschedparam+0xb7>
10be67: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10be6b: 75 54 jne 10bec1 <pthread_setschedparam+0x109><== NEVER TAKEN
10be6d: eb 24 jmp 10be93 <pthread_setschedparam+0xdb>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10be6f: a1 08 93 12 00 mov 0x129308,%eax
10be74: 89 42 78 mov %eax,0x78(%edx)
10be77: 0f b6 05 48 52 12 00 movzbl 0x125248,%eax
10be7e: 2b 83 88 00 00 00 sub 0x88(%ebx),%eax
the_thread->real_priority =
10be84: 89 42 18 mov %eax,0x18(%edx)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10be87: 51 push %ecx
10be88: 6a 01 push $0x1
10be8a: 50 push %eax
10be8b: 52 push %edx
10be8c: e8 c3 20 00 00 call 10df54 <_Thread_Change_priority>
10be91: eb 2b jmp 10bebe <pthread_setschedparam+0x106>
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10be93: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10be99: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
_Watchdog_Remove( &api->Sporadic_timer );
10be9f: 83 ec 0c sub $0xc,%esp
10bea2: 81 c3 a8 00 00 00 add $0xa8,%ebx
10bea8: 53 push %ebx
10bea9: 89 55 d0 mov %edx,-0x30(%ebp)
10beac: e8 df 32 00 00 call 10f190 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10beb1: 58 pop %eax
10beb2: 5a pop %edx
10beb3: 8b 55 d0 mov -0x30(%ebp),%edx
10beb6: 52 push %edx
10beb7: 6a 00 push $0x0
10beb9: e8 e5 fd ff ff call 10bca3 <_POSIX_Threads_Sporadic_budget_TSR>
break;
10bebe: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10bec1: e8 64 24 00 00 call 10e32a <_Thread_Enable_dispatch>
return 0;
10bec6: eb 07 jmp 10becf <pthread_setschedparam+0x117>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10bec8: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp)
}
10becf: 8b 45 d4 mov -0x2c(%ebp),%eax
10bed2: 8d 65 f4 lea -0xc(%ebp),%esp
10bed5: 5b pop %ebx
10bed6: 5e pop %esi
10bed7: 5f pop %edi
10bed8: c9 leave
10bed9: c3 ret
00109cb0 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
109cb0: 55 push %ebp
109cb1: 89 e5 mov %esp,%ebp
109cb3: 53 push %ebx
109cb4: 83 ec 04 sub $0x4,%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() )
109cb7: 83 3d ec 67 12 00 00 cmpl $0x0,0x1267ec
109cbe: 75 48 jne 109d08 <pthread_testcancel+0x58><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
109cc0: a1 f0 67 12 00 mov 0x1267f0,%eax
109cc5: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
109ccb: 8b 15 cc 62 12 00 mov 0x1262cc,%edx
109cd1: 42 inc %edx
109cd2: 89 15 cc 62 12 00 mov %edx,0x1262cc
*/
void pthread_testcancel( void )
{
POSIX_API_Control *thread_support;
bool cancel = false;
109cd8: 31 db xor %ebx,%ebx
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
109cda: 83 b8 d8 00 00 00 00 cmpl $0x0,0xd8(%eax)
109ce1: 75 0a jne 109ced <pthread_testcancel+0x3d><== NEVER TAKEN
/* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */
int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate));
int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype));
void _EXFUN(pthread_testcancel, (void));
109ce3: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax)
109cea: 0f 95 c3 setne %bl
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
109ced: e8 dc 23 00 00 call 10c0ce <_Thread_Enable_dispatch>
if ( cancel )
109cf2: 84 db test %bl,%bl
109cf4: 74 12 je 109d08 <pthread_testcancel+0x58>
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
109cf6: 50 push %eax
109cf7: 50 push %eax
109cf8: 6a ff push $0xffffffff
109cfa: ff 35 f0 67 12 00 pushl 0x1267f0
109d00: e8 8f 52 00 00 call 10ef94 <_POSIX_Thread_Exit>
109d05: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
109d08: 8b 5d fc mov -0x4(%ebp),%ebx
109d0b: c9 leave
109d0c: c3 ret
0011ccc4 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
11ccc4: 55 push %ebp
11ccc5: 89 e5 mov %esp,%ebp
11ccc7: 56 push %esi
11ccc8: 53 push %ebx
11ccc9: 8b 5d 08 mov 0x8(%ebp),%ebx
11cccc: 8b 55 0c mov 0xc(%ebp),%edx
11cccf: 8b 4d 10 mov 0x10(%ebp),%ecx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11ccd2: 3b 1d 44 01 12 00 cmp 0x120144,%ebx
11ccd8: 73 14 jae 11ccee <read+0x2a> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11ccda: 6b db 38 imul $0x38,%ebx,%ebx
11ccdd: 03 1d a0 41 12 00 add 0x1241a0,%ebx
rtems_libio_check_is_open( iop );
11cce3: 8b 73 14 mov 0x14(%ebx),%esi
11cce6: f7 c6 00 01 00 00 test $0x100,%esi
11ccec: 75 0d jne 11ccfb <read+0x37>
11ccee: e8 f1 3f ff ff call 110ce4 <__errno>
11ccf3: c7 00 09 00 00 00 movl $0x9,(%eax)
11ccf9: eb 1a jmp 11cd15 <read+0x51>
rtems_libio_check_buffer( buffer );
11ccfb: 85 d2 test %edx,%edx
11ccfd: 74 0b je 11cd0a <read+0x46> <== NEVER TAKEN
rtems_libio_check_count( count );
11ccff: 31 c0 xor %eax,%eax
11cd01: 85 c9 test %ecx,%ecx
11cd03: 74 31 je 11cd36 <read+0x72>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
11cd05: 83 e6 02 and $0x2,%esi
11cd08: 75 10 jne 11cd1a <read+0x56>
11cd0a: e8 d5 3f ff ff call 110ce4 <__errno>
11cd0f: c7 00 16 00 00 00 movl $0x16,(%eax)
11cd15: 83 c8 ff or $0xffffffff,%eax
11cd18: eb 1c jmp 11cd36 <read+0x72>
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
11cd1a: 50 push %eax
11cd1b: 8b 43 20 mov 0x20(%ebx),%eax
11cd1e: 51 push %ecx
11cd1f: 52 push %edx
11cd20: 53 push %ebx
11cd21: ff 50 08 call *0x8(%eax)
if ( rc > 0 )
11cd24: 83 c4 10 add $0x10,%esp
11cd27: 85 c0 test %eax,%eax
11cd29: 7e 0b jle 11cd36 <read+0x72>
iop->offset += rc;
11cd2b: 89 c1 mov %eax,%ecx
11cd2d: c1 f9 1f sar $0x1f,%ecx
11cd30: 01 43 0c add %eax,0xc(%ebx)
11cd33: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11cd36: 8d 65 f8 lea -0x8(%ebp),%esp
11cd39: 5b pop %ebx
11cd3a: 5e pop %esi
11cd3b: c9 leave
11cd3c: c3 ret
00109518 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
109518: 55 push %ebp
109519: 89 e5 mov %esp,%ebp
10951b: 57 push %edi
10951c: 56 push %esi
10951d: 53 push %ebx
10951e: 83 ec 2c sub $0x2c,%esp
109521: 8b 55 08 mov 0x8(%ebp),%edx
109524: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
109527: 85 db test %ebx,%ebx
109529: 75 10 jne 10953b <readlink+0x23>
rtems_set_errno_and_return_minus_one( EFAULT );
10952b: e8 50 9e 00 00 call 113380 <__errno>
109530: c7 00 0e 00 00 00 movl $0xe,(%eax)
109536: 83 cf ff or $0xffffffff,%edi
109539: eb 69 jmp 1095a4 <readlink+0x8c>
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
10953b: 31 c0 xor %eax,%eax
10953d: 83 c9 ff or $0xffffffff,%ecx
109540: 89 d7 mov %edx,%edi
109542: f2 ae repnz scas %es:(%edi),%al
109544: f7 d1 not %ecx
109546: 49 dec %ecx
109547: 83 ec 0c sub $0xc,%esp
10954a: 6a 00 push $0x0
10954c: 8d 75 d4 lea -0x2c(%ebp),%esi
10954f: 56 push %esi
109550: 6a 00 push $0x0
109552: 51 push %ecx
109553: 52 push %edx
109554: e8 49 f0 ff ff call 1085a2 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
109559: 83 c4 20 add $0x20,%esp
return -1;
10955c: 83 cf ff or $0xffffffff,%edi
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
10955f: 85 c0 test %eax,%eax
109561: 75 41 jne 1095a4 <readlink+0x8c> <== NEVER TAKEN
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
109563: 83 ec 0c sub $0xc,%esp
109566: 56 push %esi
109567: 8b 45 e0 mov -0x20(%ebp),%eax
10956a: ff 50 10 call *0x10(%eax)
10956d: 83 c4 10 add $0x10,%esp
109570: 83 f8 04 cmp $0x4,%eax
109573: 74 16 je 10958b <readlink+0x73>
rtems_filesystem_freenode( &loc );
109575: 83 ec 0c sub $0xc,%esp
109578: 56 push %esi
109579: e8 e2 f0 ff ff call 108660 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
10957e: e8 fd 9d 00 00 call 113380 <__errno>
109583: c7 00 16 00 00 00 movl $0x16,(%eax)
109589: eb 16 jmp 1095a1 <readlink+0x89>
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
10958b: 50 push %eax
10958c: ff 75 10 pushl 0x10(%ebp)
10958f: 53 push %ebx
109590: 56 push %esi
109591: 8b 45 e0 mov -0x20(%ebp),%eax
109594: ff 50 3c call *0x3c(%eax)
109597: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &loc );
109599: 89 34 24 mov %esi,(%esp)
10959c: e8 bf f0 ff ff call 108660 <rtems_filesystem_freenode>
return result;
1095a1: 83 c4 10 add $0x10,%esp
}
1095a4: 89 f8 mov %edi,%eax
1095a6: 8d 65 f4 lea -0xc(%ebp),%esp
1095a9: 5b pop %ebx
1095aa: 5e pop %esi
1095ab: 5f pop %edi
1095ac: c9 leave
1095ad: c3 ret
001082d8 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
1082d8: 55 push %ebp
1082d9: 89 e5 mov %esp,%ebp
1082db: 57 push %edi
1082dc: 56 push %esi
1082dd: 53 push %ebx
1082de: 83 ec 2c sub $0x2c,%esp
1082e1: 8b 75 08 mov 0x8(%ebp),%esi
1082e4: 8b 7d 0c mov 0xc(%ebp),%edi
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
1082e7: 3b 35 44 21 12 00 cmp 0x122144,%esi
1082ed: 73 11 jae 108300 <readv+0x28>
iop = rtems_libio_iop( fd );
1082ef: 6b f6 38 imul $0x38,%esi,%esi
1082f2: 03 35 a0 61 12 00 add 0x1261a0,%esi
rtems_libio_check_is_open( iop );
1082f8: 8b 46 14 mov 0x14(%esi),%eax
1082fb: f6 c4 01 test $0x1,%ah
1082fe: 75 10 jne 108310 <readv+0x38>
108300: e8 1b 95 00 00 call 111820 <__errno>
108305: c7 00 09 00 00 00 movl $0x9,(%eax)
10830b: e9 a4 00 00 00 jmp 1083b4 <readv+0xdc>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
108310: a8 02 test $0x2,%al
108312: 74 35 je 108349 <readv+0x71> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
108314: 85 ff test %edi,%edi
108316: 74 31 je 108349 <readv+0x71>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
108318: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10831c: 7e 2b jle 108349 <readv+0x71>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10831e: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp)
108325: 7f 22 jg 108349 <readv+0x71> <== NEVER TAKEN
108327: b2 01 mov $0x1,%dl
108329: 31 c0 xor %eax,%eax
10832b: 31 c9 xor %ecx,%ecx
10832d: 89 75 d4 mov %esi,-0x2c(%ebp)
108330: eb 03 jmp 108335 <readv+0x5d>
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
108332: 8b 4d e4 mov -0x1c(%ebp),%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 )
108335: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8)
108339: 74 0e je 108349 <readv+0x71>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
10833b: 8b 5c c7 04 mov 0x4(%edi,%eax,8),%ebx
10833f: 8d 34 19 lea (%ecx,%ebx,1),%esi
108342: 89 75 e4 mov %esi,-0x1c(%ebp)
if ( total < old )
108345: 39 ce cmp %ecx,%esi
108347: 7d 0d jge 108356 <readv+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
108349: e8 d2 94 00 00 call 111820 <__errno>
10834e: c7 00 16 00 00 00 movl $0x16,(%eax)
108354: eb 5e jmp 1083b4 <readv+0xdc>
if ( iov[v].iov_len )
all_zeros = false;
108356: 85 db test %ebx,%ebx
108358: 0f 94 c1 sete %cl
10835b: f7 d9 neg %ecx
10835d: 21 ca and %ecx,%edx
* 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++ ) {
10835f: 40 inc %eax
108360: 3b 45 10 cmp 0x10(%ebp),%eax
108363: 7c cd jl 108332 <readv+0x5a>
108365: 8b 75 d4 mov -0x2c(%ebp),%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;
108368: 31 db xor %ebx,%ebx
/*
* 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 ) {
10836a: 84 d2 test %dl,%dl
10836c: 75 49 jne 1083b7 <readv+0xdf>
10836e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
108375: 50 push %eax
108376: 8b 46 20 mov 0x20(%esi),%eax
108379: 8b 55 e4 mov -0x1c(%ebp),%edx
10837c: ff 74 d7 04 pushl 0x4(%edi,%edx,8)
108380: ff 34 d7 pushl (%edi,%edx,8)
108383: 56 push %esi
108384: ff 50 08 call *0x8(%eax)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
108387: 83 c4 10 add $0x10,%esp
10838a: 83 f8 00 cmp $0x0,%eax
10838d: 7c 25 jl 1083b4 <readv+0xdc> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
10838f: 74 0d je 10839e <readv+0xc6> <== NEVER TAKEN
iop->offset += bytes;
108391: 89 c1 mov %eax,%ecx
108393: c1 f9 1f sar $0x1f,%ecx
108396: 01 46 0c add %eax,0xc(%esi)
108399: 11 4e 10 adc %ecx,0x10(%esi)
total += bytes;
10839c: 01 c3 add %eax,%ebx
}
if (bytes != iov[ v ].iov_len)
10839e: 8b 55 e4 mov -0x1c(%ebp),%edx
1083a1: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax
1083a5: 75 10 jne 1083b7 <readv+0xdf> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
1083a7: 42 inc %edx
1083a8: 89 55 e4 mov %edx,-0x1c(%ebp)
1083ab: 8b 45 10 mov 0x10(%ebp),%eax
1083ae: 39 c2 cmp %eax,%edx
1083b0: 7c c3 jl 108375 <readv+0x9d>
1083b2: eb 03 jmp 1083b7 <readv+0xdf>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
1083b4: 83 cb ff or $0xffffffff,%ebx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
1083b7: 89 d8 mov %ebx,%eax
1083b9: 8d 65 f4 lea -0xc(%ebp),%esp
1083bc: 5b pop %ebx
1083bd: 5e pop %esi
1083be: 5f pop %edi
1083bf: c9 leave
1083c0: c3 ret
0011cdc8 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
11cdc8: 55 push %ebp
11cdc9: 89 e5 mov %esp,%ebp
11cdcb: 57 push %edi
11cdcc: 56 push %esi
11cdcd: 53 push %ebx
11cdce: 83 ec 2c sub $0x2c,%esp
11cdd1: 8b 5d 08 mov 0x8(%ebp),%ebx
11cdd4: 8b 75 0c mov 0xc(%ebp),%esi
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
11cdd7: ff 05 c8 41 12 00 incl 0x1241c8
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
11cddd: 83 3d 3c 44 12 00 03 cmpl $0x3,0x12443c
11cde4: 75 1a jne 11ce00 <realloc+0x38> <== NEVER TAKEN
if (_Thread_Dispatch_disable_level > 0)
11cde6: a1 e4 42 12 00 mov 0x1242e4,%eax
11cdeb: 85 c0 test %eax,%eax
11cded: 0f 85 ad 00 00 00 jne 11cea0 <realloc+0xd8> <== NEVER TAKEN
return (void *) 0;
if (_ISR_Nest_level > 0)
11cdf3: 83 3d 04 48 12 00 00 cmpl $0x0,0x124804
11cdfa: 0f 85 a0 00 00 00 jne 11cea0 <realloc+0xd8> <== NEVER TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
11ce00: 85 db test %ebx,%ebx
11ce02: 75 13 jne 11ce17 <realloc+0x4f>
return malloc( size );
11ce04: 83 ec 0c sub $0xc,%esp
11ce07: 56 push %esi
11ce08: e8 27 9e fe ff call 106c34 <malloc>
11ce0d: 89 c3 mov %eax,%ebx
11ce0f: 83 c4 10 add $0x10,%esp
11ce12: e9 8b 00 00 00 jmp 11cea2 <realloc+0xda>
if ( !size ) {
11ce17: 85 f6 test %esi,%esi
11ce19: 75 0e jne 11ce29 <realloc+0x61> <== ALWAYS TAKEN
free( ptr );
11ce1b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11ce1e: 53 push %ebx <== NOT EXECUTED
11ce1f: e8 74 9b fe ff call 106998 <free> <== NOT EXECUTED
return (void *) 0;
11ce24: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11ce27: eb 77 jmp 11cea0 <realloc+0xd8> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
11ce29: 52 push %edx
11ce2a: 8d 45 e4 lea -0x1c(%ebp),%eax
11ce2d: 50 push %eax
11ce2e: 53 push %ebx
11ce2f: ff 35 80 01 12 00 pushl 0x120180
11ce35: e8 ee 00 00 00 call 11cf28 <_Protected_heap_Get_block_size>
11ce3a: 83 c4 10 add $0x10,%esp
11ce3d: 84 c0 test %al,%al
11ce3f: 75 0d jne 11ce4e <realloc+0x86>
errno = EINVAL;
11ce41: e8 9e 3e ff ff call 110ce4 <__errno>
11ce46: c7 00 16 00 00 00 movl $0x16,(%eax)
11ce4c: eb 52 jmp 11cea0 <realloc+0xd8>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
11ce4e: 50 push %eax
11ce4f: 56 push %esi
11ce50: 53 push %ebx
11ce51: ff 35 80 01 12 00 pushl 0x120180
11ce57: e8 04 01 00 00 call 11cf60 <_Protected_heap_Resize_block>
11ce5c: 83 c4 10 add $0x10,%esp
11ce5f: 84 c0 test %al,%al
11ce61: 75 3f jne 11cea2 <realloc+0xda>
* 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 );
11ce63: 83 ec 0c sub $0xc,%esp
11ce66: 56 push %esi
11ce67: e8 c8 9d fe ff call 106c34 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
11ce6c: ff 0d bc 41 12 00 decl 0x1241bc
if ( !new_area ) {
11ce72: 83 c4 10 add $0x10,%esp
11ce75: 85 c0 test %eax,%eax
11ce77: 74 27 je 11cea0 <realloc+0xd8>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
11ce79: 8b 55 e4 mov -0x1c(%ebp),%edx
11ce7c: 89 f1 mov %esi,%ecx
11ce7e: 39 d6 cmp %edx,%esi
11ce80: 76 02 jbe 11ce84 <realloc+0xbc> <== NEVER TAKEN
11ce82: 89 d1 mov %edx,%ecx
11ce84: 89 c7 mov %eax,%edi
11ce86: 89 de mov %ebx,%esi
11ce88: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
11ce8a: 83 ec 0c sub $0xc,%esp
11ce8d: 53 push %ebx
11ce8e: 89 45 d4 mov %eax,-0x2c(%ebp)
11ce91: e8 02 9b fe ff call 106998 <free>
return new_area;
11ce96: 83 c4 10 add $0x10,%esp
11ce99: 8b 45 d4 mov -0x2c(%ebp),%eax
11ce9c: 89 c3 mov %eax,%ebx
11ce9e: eb 02 jmp 11cea2 <realloc+0xda>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
11cea0: 31 db xor %ebx,%ebx
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
11cea2: 89 d8 mov %ebx,%eax
11cea4: 8d 65 f4 lea -0xc(%ebp),%esp
11cea7: 5b pop %ebx
11cea8: 5e pop %esi
11cea9: 5f pop %edi
11ceaa: c9 leave
11ceab: c3 ret
00107a04 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
107a04: 55 push %ebp
107a05: 89 e5 mov %esp,%ebp
107a07: 57 push %edi
107a08: 56 push %esi
107a09: 53 push %ebx
107a0a: 83 ec 58 sub $0x58,%esp
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
107a0d: ff 75 08 pushl 0x8(%ebp)
107a10: e8 da f2 ff ff call 106cef <rtems_filesystem_dirname>
107a15: 89 45 b4 mov %eax,-0x4c(%ebp)
if ( parentpathlen == 0 )
107a18: 83 c4 10 add $0x10,%esp
107a1b: 85 c0 test %eax,%eax
107a1d: 8d 45 d0 lea -0x30(%ebp),%eax
107a20: 75 15 jne 107a37 <rmdir+0x33>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
107a22: 51 push %ecx
107a23: 50 push %eax
107a24: 8d 45 e4 lea -0x1c(%ebp),%eax
107a27: 50 push %eax
107a28: ff 75 08 pushl 0x8(%ebp)
107a2b: e8 08 01 00 00 call 107b38 <rtems_filesystem_get_start_loc>
107a30: 83 c4 10 add $0x10,%esp
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
107a33: 31 db xor %ebx,%ebx
107a35: eb 25 jmp 107a5c <rmdir+0x58>
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
107a37: 83 ec 0c sub $0xc,%esp
107a3a: 6a 00 push $0x0
107a3c: 50 push %eax
107a3d: 6a 02 push $0x2
107a3f: ff 75 b4 pushl -0x4c(%ebp)
107a42: ff 75 08 pushl 0x8(%ebp)
107a45: e8 64 f2 ff ff call 106cae <rtems_filesystem_evaluate_path>
107a4a: 89 c2 mov %eax,%edx
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
107a4c: 83 c4 20 add $0x20,%esp
return -1;
107a4f: 83 c8 ff or $0xffffffff,%eax
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
107a52: 85 d2 test %edx,%edx
107a54: 0f 85 d6 00 00 00 jne 107b30 <rmdir+0x12c> <== NEVER TAKEN
return -1;
free_parentloc = true;
107a5a: b3 01 mov $0x1,%bl
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
107a5c: 8d 7d bc lea -0x44(%ebp),%edi
107a5f: 8d 75 d0 lea -0x30(%ebp),%esi
107a62: b9 05 00 00 00 mov $0x5,%ecx
107a67: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = pathname + parentpathlen;
107a69: 8b 75 08 mov 0x8(%ebp),%esi
107a6c: 03 75 b4 add -0x4c(%ebp),%esi
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
107a6f: 83 c9 ff or $0xffffffff,%ecx
107a72: 89 f7 mov %esi,%edi
107a74: 31 c0 xor %eax,%eax
107a76: f2 ae repnz scas %es:(%edi),%al
107a78: f7 d1 not %ecx
107a7a: 49 dec %ecx
107a7b: 52 push %edx
107a7c: 52 push %edx
107a7d: 51 push %ecx
107a7e: 56 push %esi
107a7f: e8 aa f2 ff ff call 106d2e <rtems_filesystem_prefix_separators>
107a84: 01 c6 add %eax,%esi
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
107a86: 83 c9 ff or $0xffffffff,%ecx
107a89: 89 f7 mov %esi,%edi
107a8b: 31 c0 xor %eax,%eax
107a8d: f2 ae repnz scas %es:(%edi),%al
107a8f: f7 d1 not %ecx
107a91: 49 dec %ecx
107a92: c7 04 24 00 00 00 00 movl $0x0,(%esp)
107a99: 8d 7d bc lea -0x44(%ebp),%edi
107a9c: 57 push %edi
107a9d: 6a 00 push $0x0
107a9f: 51 push %ecx
107aa0: 56 push %esi
107aa1: e8 aa f1 ff ff call 106c50 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
107aa6: 83 c4 20 add $0x20,%esp
107aa9: 85 c0 test %eax,%eax
107aab: 74 13 je 107ac0 <rmdir+0xbc>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
107aad: 83 c8 ff or $0xffffffff,%eax
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 )
107ab0: 84 db test %bl,%bl
107ab2: 74 7c je 107b30 <rmdir+0x12c>
rtems_filesystem_freenode( &parentloc );
107ab4: 83 ec 0c sub $0xc,%esp
107ab7: 8d 55 d0 lea -0x30(%ebp),%edx
107aba: 52 push %edx
107abb: 89 45 b0 mov %eax,-0x50(%ebp)
107abe: eb 65 jmp 107b25 <rmdir+0x121>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
107ac0: 83 ec 0c sub $0xc,%esp
107ac3: 57 push %edi
107ac4: 8b 45 c8 mov -0x38(%ebp),%eax
107ac7: ff 50 10 call *0x10(%eax)
107aca: 83 c4 10 add $0x10,%esp
107acd: 48 dec %eax
107ace: 74 2f je 107aff <rmdir+0xfb>
rtems_filesystem_freenode( &loc );
107ad0: 83 ec 0c sub $0xc,%esp
107ad3: 57 push %edi
107ad4: e8 93 f2 ff ff call 106d6c <rtems_filesystem_freenode>
if ( free_parentloc )
107ad9: 83 c4 10 add $0x10,%esp
107adc: 84 db test %bl,%bl
107ade: 74 0f je 107aef <rmdir+0xeb> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
107ae0: 83 ec 0c sub $0xc,%esp
107ae3: 8d 45 d0 lea -0x30(%ebp),%eax
107ae6: 50 push %eax
107ae7: e8 80 f2 ff ff call 106d6c <rtems_filesystem_freenode>
107aec: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
107aef: e8 20 99 00 00 call 111414 <__errno>
107af4: c7 00 14 00 00 00 movl $0x14,(%eax)
107afa: 83 c8 ff or $0xffffffff,%eax
107afd: eb 31 jmp 107b30 <rmdir+0x12c>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
107aff: 50 push %eax
107b00: 50 push %eax
107b01: 57 push %edi
107b02: 8d 75 d0 lea -0x30(%ebp),%esi
107b05: 56 push %esi
107b06: 8b 45 c4 mov -0x3c(%ebp),%eax
107b09: ff 50 34 call *0x34(%eax)
rtems_filesystem_freenode( &loc );
107b0c: 89 3c 24 mov %edi,(%esp)
107b0f: 89 45 b0 mov %eax,-0x50(%ebp)
107b12: e8 55 f2 ff ff call 106d6c <rtems_filesystem_freenode>
if ( free_parentloc )
107b17: 83 c4 10 add $0x10,%esp
107b1a: 84 db test %bl,%bl
107b1c: 8b 45 b0 mov -0x50(%ebp),%eax
107b1f: 74 0f je 107b30 <rmdir+0x12c>
rtems_filesystem_freenode( &parentloc );
107b21: 83 ec 0c sub $0xc,%esp
107b24: 56 push %esi
107b25: e8 42 f2 ff ff call 106d6c <rtems_filesystem_freenode>
107b2a: 83 c4 10 add $0x10,%esp
107b2d: 8b 45 b0 mov -0x50(%ebp),%eax
return result;
}
107b30: 8d 65 f4 lea -0xc(%ebp),%esp
107b33: 5b pop %ebx
107b34: 5e pop %esi
107b35: 5f pop %edi
107b36: c9 leave
107b37: c3 ret
0010a5a5 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
10a5a5: 55 push %ebp
10a5a6: 89 e5 mov %esp,%ebp
10a5a8: 57 push %edi
10a5a9: 56 push %esi
10a5aa: 53 push %ebx
10a5ab: 83 ec 58 sub $0x58,%esp
10a5ae: 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);
10a5b1: 68 60 72 12 00 push $0x127260
10a5b6: e8 c5 08 00 00 call 10ae80 <pthread_mutex_lock>
10a5bb: 89 45 b4 mov %eax,-0x4c(%ebp)
if (result != 0) {
10a5be: 83 c4 10 add $0x10,%esp
10a5c1: 85 c0 test %eax,%eax
10a5c3: 74 0e je 10a5d3 <rtems_aio_enqueue+0x2e><== ALWAYS TAKEN
free (req);
10a5c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a5c8: 53 push %ebx <== NOT EXECUTED
10a5c9: e8 c2 cd ff ff call 107390 <free> <== NOT EXECUTED
10a5ce: e9 c6 01 00 00 jmp 10a799 <rtems_aio_enqueue+0x1f4><== NOT EXECUTED
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);
10a5d3: e8 a4 10 00 00 call 10b67c <pthread_self>
10a5d8: 57 push %edi
10a5d9: 8d 55 c4 lea -0x3c(%ebp),%edx
10a5dc: 52 push %edx
10a5dd: 8d 55 e0 lea -0x20(%ebp),%edx
10a5e0: 52 push %edx
10a5e1: 50 push %eax
10a5e2: e8 9d 0c 00 00 call 10b284 <pthread_getschedparam>
req->caller_thread = pthread_self ();
10a5e7: e8 90 10 00 00 call 10b67c <pthread_self>
10a5ec: 89 43 10 mov %eax,0x10(%ebx)
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
10a5ef: 8b 43 14 mov 0x14(%ebx),%eax
10a5f2: 8b 55 c4 mov -0x3c(%ebp),%edx
10a5f5: 2b 50 14 sub 0x14(%eax),%edx
10a5f8: 89 53 0c mov %edx,0xc(%ebx)
req->policy = policy;
10a5fb: 8b 55 e0 mov -0x20(%ebp),%edx
10a5fe: 89 53 08 mov %edx,0x8(%ebx)
req->aiocbp->error_code = EINPROGRESS;
10a601: c7 40 30 77 00 00 00 movl $0x77,0x30(%eax)
req->aiocbp->return_value = 0;
10a608: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
if ((aio_request_queue.idle_threads == 0) &&
10a60f: 83 c4 10 add $0x10,%esp
10a612: 83 3d c8 72 12 00 00 cmpl $0x0,0x1272c8
10a619: 0f 85 b7 00 00 00 jne 10a6d6 <rtems_aio_enqueue+0x131><== NEVER TAKEN
10a61f: 83 3d c4 72 12 00 04 cmpl $0x4,0x1272c4
10a626: 0f 8f aa 00 00 00 jg 10a6d6 <rtems_aio_enqueue+0x131>
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);
10a62c: 56 push %esi
10a62d: 6a 01 push $0x1
10a62f: ff 30 pushl (%eax)
10a631: 68 a8 72 12 00 push $0x1272a8
10a636: e8 81 fb ff ff call 10a1bc <rtems_aio_search_fd>
10a63b: 89 c6 mov %eax,%esi
if (r_chain->new_fd == 1) {
10a63d: 83 c4 10 add $0x10,%esp
10a640: 83 78 18 01 cmpl $0x1,0x18(%eax)
10a644: 8d 50 08 lea 0x8(%eax),%edx
10a647: 8d 78 1c lea 0x1c(%eax),%edi
10a64a: 8d 40 20 lea 0x20(%eax),%eax
10a64d: 89 45 b0 mov %eax,-0x50(%ebp)
10a650: 75 66 jne 10a6b8 <rtems_aio_enqueue+0x113>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10a652: 51 push %ecx
10a653: 51 push %ecx
10a654: 53 push %ebx
10a655: 52 push %edx
10a656: e8 1d 1f 00 00 call 10c578 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10a65b: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
pthread_mutex_init (&r_chain->mutex, NULL);
10a662: 5b pop %ebx
10a663: 58 pop %eax
10a664: 6a 00 push $0x0
10a666: 57 push %edi
10a667: e8 f4 06 00 00 call 10ad60 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10a66c: 5a pop %edx
10a66d: 59 pop %ecx
10a66e: 6a 00 push $0x0
10a670: ff 75 b0 pushl -0x50(%ebp)
10a673: e8 a8 03 00 00 call 10aa20 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
10a678: 56 push %esi
10a679: 68 98 a2 10 00 push $0x10a298
10a67e: 68 68 72 12 00 push $0x127268
10a683: 8d 45 e4 lea -0x1c(%ebp),%eax
10a686: 50 push %eax
10a687: e8 c4 09 00 00 call 10b050 <pthread_create>
10a68c: 89 c3 mov %eax,%ebx
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
10a68e: 83 c4 20 add $0x20,%esp
10a691: 85 c0 test %eax,%eax
10a693: 74 18 je 10a6ad <rtems_aio_enqueue+0x108><== ALWAYS TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
10a695: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a698: 68 60 72 12 00 push $0x127260 <== NOT EXECUTED
10a69d: e8 5e 08 00 00 call 10af00 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
10a6a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a6a5: 89 5d b4 mov %ebx,-0x4c(%ebp) <== NOT EXECUTED
10a6a8: e9 ef 00 00 00 jmp 10a79c <rtems_aio_enqueue+0x1f7><== NOT EXECUTED
}
++aio_request_queue.active_threads;
10a6ad: ff 05 c4 72 12 00 incl 0x1272c4
10a6b3: e9 d4 00 00 00 jmp 10a78c <rtems_aio_enqueue+0x1e7>
}
else {
/* put request in the fd chain it belongs to */
pthread_mutex_lock (&r_chain->mutex);
10a6b8: 83 ec 0c sub $0xc,%esp
10a6bb: 57 push %edi
10a6bc: 89 55 ac mov %edx,-0x54(%ebp)
10a6bf: e8 bc 07 00 00 call 10ae80 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
10a6c4: 5e pop %esi
10a6c5: 58 pop %eax
10a6c6: 53 push %ebx
10a6c7: 8b 55 ac mov -0x54(%ebp),%edx
10a6ca: 52 push %edx
10a6cb: e8 ec fd ff ff call 10a4bc <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
10a6d0: 5b pop %ebx
10a6d1: ff 75 b0 pushl -0x50(%ebp)
10a6d4: eb 36 jmp 10a70c <rtems_aio_enqueue+0x167>
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,
10a6d6: 51 push %ecx
10a6d7: 6a 00 push $0x0
10a6d9: ff 30 pushl (%eax)
10a6db: 68 a8 72 12 00 push $0x1272a8
10a6e0: e8 d7 fa ff ff call 10a1bc <rtems_aio_search_fd>
10a6e5: 89 c6 mov %eax,%esi
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
10a6e7: 83 c4 10 add $0x10,%esp
10a6ea: 85 c0 test %eax,%eax
10a6ec: 74 2d je 10a71b <rtems_aio_enqueue+0x176>
{
pthread_mutex_lock (&r_chain->mutex);
10a6ee: 8d 78 1c lea 0x1c(%eax),%edi
10a6f1: 83 ec 0c sub $0xc,%esp
10a6f4: 57 push %edi
10a6f5: e8 86 07 00 00 call 10ae80 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
10a6fa: 58 pop %eax
10a6fb: 5a pop %edx
10a6fc: 53 push %ebx
10a6fd: 8d 46 08 lea 0x8(%esi),%eax
10a700: 50 push %eax
10a701: e8 b6 fd ff ff call 10a4bc <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
10a706: 83 c6 20 add $0x20,%esi
10a709: 89 34 24 mov %esi,(%esp)
10a70c: e8 ab 03 00 00 call 10aabc <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
10a711: 89 3c 24 mov %edi,(%esp)
10a714: e8 e7 07 00 00 call 10af00 <pthread_mutex_unlock>
10a719: eb 6e jmp 10a789 <rtems_aio_enqueue+0x1e4>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10a71b: 56 push %esi
10a71c: 6a 01 push $0x1
10a71e: 8b 43 14 mov 0x14(%ebx),%eax
10a721: ff 30 pushl (%eax)
10a723: 68 b4 72 12 00 push $0x1272b4
10a728: e8 8f fa ff ff call 10a1bc <rtems_aio_search_fd>
10a72d: 89 c6 mov %eax,%esi
if (r_chain->new_fd == 1) {
10a72f: 83 c4 10 add $0x10,%esp
10a732: 83 78 18 01 cmpl $0x1,0x18(%eax)
10a736: 8d 40 08 lea 0x8(%eax),%eax
10a739: 75 2c jne 10a767 <rtems_aio_enqueue+0x1c2>
10a73b: 51 push %ecx
10a73c: 51 push %ecx
10a73d: 53 push %ebx
10a73e: 50 push %eax
10a73f: e8 34 1e 00 00 call 10c578 <_Chain_Insert>
/* 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;
10a744: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
pthread_mutex_init (&r_chain->mutex, NULL);
10a74b: 58 pop %eax
10a74c: 5a pop %edx
10a74d: 6a 00 push $0x0
10a74f: 8d 46 1c lea 0x1c(%esi),%eax
10a752: 50 push %eax
10a753: e8 08 06 00 00 call 10ad60 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10a758: 5b pop %ebx
10a759: 5f pop %edi
10a75a: 6a 00 push $0x0
10a75c: 83 c6 20 add $0x20,%esi
10a75f: 56 push %esi
10a760: e8 bb 02 00 00 call 10aa20 <pthread_cond_init>
10a765: eb 09 jmp 10a770 <rtems_aio_enqueue+0x1cb>
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
10a767: 51 push %ecx
10a768: 51 push %ecx
10a769: 53 push %ebx
10a76a: 50 push %eax
10a76b: e8 4c fd ff ff call 10a4bc <rtems_aio_insert_prio>
10a770: 83 c4 10 add $0x10,%esp
if (aio_request_queue.idle_threads > 0)
10a773: 83 3d c8 72 12 00 00 cmpl $0x0,0x1272c8
10a77a: 7e 10 jle 10a78c <rtems_aio_enqueue+0x1e7><== ALWAYS TAKEN
pthread_cond_signal (&aio_request_queue.new_req);
10a77c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a77f: 68 64 72 12 00 push $0x127264 <== NOT EXECUTED
10a784: e8 33 03 00 00 call 10aabc <pthread_cond_signal> <== NOT EXECUTED
10a789: 83 c4 10 add $0x10,%esp
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
10a78c: 83 ec 0c sub $0xc,%esp
10a78f: 68 60 72 12 00 push $0x127260
10a794: e8 67 07 00 00 call 10af00 <pthread_mutex_unlock>
return 0;
10a799: 83 c4 10 add $0x10,%esp
}
10a79c: 8b 45 b4 mov -0x4c(%ebp),%eax
10a79f: 8d 65 f4 lea -0xc(%ebp),%esp
10a7a2: 5b pop %ebx
10a7a3: 5e pop %esi
10a7a4: 5f pop %edi
10a7a5: c9 leave
10a7a6: c3 ret
0010a298 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
10a298: 55 push %ebp
10a299: 89 e5 mov %esp,%ebp
10a29b: 57 push %edi
10a29c: 56 push %esi
10a29d: 53 push %ebx
10a29e: 83 ec 4c sub $0x4c,%esp
rtems_aio_request_chain *r_chain = arg;
10a2a1: 8b 5d 08 mov 0x8(%ebp),%ebx
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
10a2a4: 8d 7d dc lea -0x24(%ebp),%edi
/* 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);
10a2a7: 8d 43 1c lea 0x1c(%ebx),%eax
10a2aa: 89 45 b4 mov %eax,-0x4c(%ebp)
10a2ad: 83 ec 0c sub $0xc,%esp
10a2b0: 50 push %eax
10a2b1: e8 ca 0b 00 00 call 10ae80 <pthread_mutex_lock>
if (result != 0)
10a2b6: 83 c4 10 add $0x10,%esp
10a2b9: 85 c0 test %eax,%eax
10a2bb: 0f 85 f1 01 00 00 jne 10a4b2 <rtems_aio_handle+0x21a><== NEVER TAKEN
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a2c1: 8b 73 08 mov 0x8(%ebx),%esi
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10a2c4: 8d 43 0c lea 0xc(%ebx),%eax
/* 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)) {
10a2c7: 39 c6 cmp %eax,%esi
10a2c9: 0f 84 cd 00 00 00 je 10a39c <rtems_aio_handle+0x104>
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);
10a2cf: e8 a8 13 00 00 call 10b67c <pthread_self>
10a2d4: 52 push %edx
10a2d5: 8d 55 c0 lea -0x40(%ebp),%edx
10a2d8: 52 push %edx
10a2d9: 8d 4d e4 lea -0x1c(%ebp),%ecx
10a2dc: 51 push %ecx
10a2dd: 50 push %eax
10a2de: e8 a1 0f 00 00 call 10b284 <pthread_getschedparam>
param.sched_priority = req->priority;
10a2e3: 8b 46 0c mov 0xc(%esi),%eax
10a2e6: 89 45 c0 mov %eax,-0x40(%ebp)
pthread_setschedparam (pthread_self(), req->policy, ¶m);
10a2e9: 8b 56 08 mov 0x8(%esi),%edx
10a2ec: 89 55 b0 mov %edx,-0x50(%ebp)
10a2ef: e8 88 13 00 00 call 10b67c <pthread_self>
10a2f4: 83 c4 0c add $0xc,%esp
10a2f7: 8d 4d c0 lea -0x40(%ebp),%ecx
10a2fa: 51 push %ecx
10a2fb: 8b 55 b0 mov -0x50(%ebp),%edx
10a2fe: 52 push %edx
10a2ff: 50 push %eax
10a300: e8 87 13 00 00 call 10b68c <pthread_setschedparam>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10a305: 89 34 24 mov %esi,(%esp)
10a308: e8 2f 22 00 00 call 10c53c <_Chain_Extract>
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
10a30d: 59 pop %ecx
10a30e: ff 75 b4 pushl -0x4c(%ebp)
10a311: e8 ea 0b 00 00 call 10af00 <pthread_mutex_unlock>
switch (req->aiocbp->aio_lio_opcode) {
10a316: 8b 46 14 mov 0x14(%esi),%eax
10a319: 83 c4 10 add $0x10,%esp
10a31c: 8b 50 2c mov 0x2c(%eax),%edx
10a31f: 83 fa 02 cmp $0x2,%edx
10a322: 74 20 je 10a344 <rtems_aio_handle+0xac>
10a324: 83 fa 03 cmp $0x3,%edx
10a327: 74 36 je 10a35f <rtems_aio_handle+0xc7> <== NEVER TAKEN
10a329: 4a dec %edx
10a32a: 75 45 jne 10a371 <rtems_aio_handle+0xd9> <== NEVER TAKEN
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
10a32c: 83 ec 0c sub $0xc,%esp
10a32f: ff 70 08 pushl 0x8(%eax)
10a332: ff 70 04 pushl 0x4(%eax)
10a335: ff 70 10 pushl 0x10(%eax)
10a338: ff 70 0c pushl 0xc(%eax)
10a33b: ff 30 pushl (%eax)
10a33d: e8 1a 99 00 00 call 113c5c <pread>
10a342: eb 16 jmp 10a35a <rtems_aio_handle+0xc2>
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
10a344: 83 ec 0c sub $0xc,%esp
10a347: ff 70 08 pushl 0x8(%eax)
10a34a: ff 70 04 pushl 0x4(%eax)
10a34d: ff 70 10 pushl 0x10(%eax)
10a350: ff 70 0c pushl 0xc(%eax)
10a353: ff 30 pushl (%eax)
10a355: e8 b6 99 00 00 call 113d10 <pwrite>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
10a35a: 83 c4 20 add $0x20,%esp
10a35d: eb 0d jmp 10a36c <rtems_aio_handle+0xd4>
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
10a35f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a362: ff 30 pushl (%eax) <== NOT EXECUTED
10a364: e8 af 5c 00 00 call 110018 <fsync> <== NOT EXECUTED
break;
10a369: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
10a36c: 83 f8 ff cmp $0xffffffff,%eax
10a36f: 75 19 jne 10a38a <rtems_aio_handle+0xf2> <== ALWAYS TAKEN
req->aiocbp->return_value = -1;
10a371: 8b 76 14 mov 0x14(%esi),%esi <== NOT EXECUTED
10a374: c7 46 34 ff ff ff ff movl $0xffffffff,0x34(%esi) <== NOT EXECUTED
req->aiocbp->error_code = errno;
10a37b: e8 a4 8e 00 00 call 113224 <__errno> <== NOT EXECUTED
10a380: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10a382: 89 46 30 mov %eax,0x30(%esi) <== NOT EXECUTED
10a385: e9 1d ff ff ff jmp 10a2a7 <rtems_aio_handle+0xf> <== NOT EXECUTED
} else {
req->aiocbp->return_value = result;
10a38a: 8b 56 14 mov 0x14(%esi),%edx
10a38d: 89 42 34 mov %eax,0x34(%edx)
req->aiocbp->error_code = 0;
10a390: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
10a397: e9 0b ff ff ff jmp 10a2a7 <rtems_aio_handle+0xf>
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
10a39c: 83 ec 0c sub $0xc,%esp
10a39f: ff 75 b4 pushl -0x4c(%ebp)
10a3a2: e8 59 0b 00 00 call 10af00 <pthread_mutex_unlock>
pthread_mutex_lock (&aio_request_queue.mutex);
10a3a7: c7 04 24 60 72 12 00 movl $0x127260,(%esp)
10a3ae: e8 cd 0a 00 00 call 10ae80 <pthread_mutex_lock>
if (rtems_chain_is_empty (chain))
10a3b3: 83 c4 10 add $0x10,%esp
10a3b6: 39 73 08 cmp %esi,0x8(%ebx)
10a3b9: 0f 85 de 00 00 00 jne 10a49d <rtems_aio_handle+0x205><== NEVER TAKEN
{
clock_gettime (CLOCK_REALTIME, &timeout);
10a3bf: 52 push %edx
10a3c0: 52 push %edx
10a3c1: 57 push %edi
10a3c2: 6a 01 push $0x1
10a3c4: e8 47 05 00 00 call 10a910 <clock_gettime>
timeout.tv_sec += 3;
10a3c9: 83 45 dc 03 addl $0x3,-0x24(%ebp)
timeout.tv_nsec = 0;
10a3cd: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
result = pthread_cond_timedwait (&r_chain->cond,
10a3d4: 8d 73 20 lea 0x20(%ebx),%esi
10a3d7: 83 c4 0c add $0xc,%esp
10a3da: 57 push %edi
10a3db: 68 60 72 12 00 push $0x127260
10a3e0: 56 push %esi
10a3e1: e8 46 07 00 00 call 10ab2c <pthread_cond_timedwait>
&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) {
10a3e6: 83 c4 10 add $0x10,%esp
10a3e9: 83 f8 74 cmp $0x74,%eax
10a3ec: 0f 85 ab 00 00 00 jne 10a49d <rtems_aio_handle+0x205><== NEVER TAKEN
10a3f2: 83 ec 0c sub $0xc,%esp
10a3f5: 53 push %ebx
10a3f6: e8 41 21 00 00 call 10c53c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
10a3fb: 58 pop %eax
10a3fc: ff 75 b4 pushl -0x4c(%ebp)
10a3ff: e8 5c 08 00 00 call 10ac60 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
10a404: 89 34 24 mov %esi,(%esp)
10a407: e8 60 05 00 00 call 10a96c <pthread_cond_destroy>
free (r_chain);
10a40c: 89 1c 24 mov %ebx,(%esp)
10a40f: e8 7c cf ff ff call 107390 <free>
/* 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)) {
10a414: 83 c4 10 add $0x10,%esp
10a417: 81 3d b4 72 12 00 b8 cmpl $0x1272b8,0x1272b4
10a41e: 72 12 00
10a421: 75 54 jne 10a477 <rtems_aio_handle+0x1df>
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
10a423: ff 05 c8 72 12 00 incl 0x1272c8
--aio_request_queue.active_threads;
10a429: ff 0d c4 72 12 00 decl 0x1272c4
clock_gettime (CLOCK_REALTIME, &timeout);
10a42f: 53 push %ebx
10a430: 53 push %ebx
10a431: 57 push %edi
10a432: 6a 01 push $0x1
10a434: e8 d7 04 00 00 call 10a910 <clock_gettime>
timeout.tv_sec += 3;
10a439: 83 45 dc 03 addl $0x3,-0x24(%ebp)
timeout.tv_nsec = 0;
10a43d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
result = pthread_cond_timedwait (&aio_request_queue.new_req,
10a444: 83 c4 0c add $0xc,%esp
10a447: 57 push %edi
10a448: 68 60 72 12 00 push $0x127260
10a44d: 68 64 72 12 00 push $0x127264
10a452: e8 d5 06 00 00 call 10ab2c <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
10a457: 83 c4 10 add $0x10,%esp
10a45a: 83 f8 74 cmp $0x74,%eax
10a45d: 75 18 jne 10a477 <rtems_aio_handle+0x1df><== NEVER TAKEN
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
10a45f: ff 0d c8 72 12 00 decl 0x1272c8
pthread_mutex_unlock (&aio_request_queue.mutex);
10a465: 83 ec 0c sub $0xc,%esp
10a468: 68 60 72 12 00 push $0x127260
10a46d: e8 8e 0a 00 00 call 10af00 <pthread_mutex_unlock>
return NULL;
10a472: 83 c4 10 add $0x10,%esp
10a475: eb 3b jmp 10a4b2 <rtems_aio_handle+0x21a>
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
10a477: ff 0d c8 72 12 00 decl 0x1272c8
++aio_request_queue.active_threads;
10a47d: ff 05 c4 72 12 00 incl 0x1272c4
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a483: 8b 1d b4 72 12 00 mov 0x1272b4,%ebx
10a489: 83 ec 0c sub $0xc,%esp
10a48c: 53 push %ebx
10a48d: e8 aa 20 00 00 call 10c53c <_Chain_Extract>
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = (rtems_aio_request_chain *) node;
rtems_aio_move_to_work (r_chain);
10a492: 89 1c 24 mov %ebx,(%esp)
10a495: e8 cd fd ff ff call 10a267 <rtems_aio_move_to_work>
10a49a: 83 c4 10 add $0x10,%esp
}
}
/* 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);
10a49d: 83 ec 0c sub $0xc,%esp
10a4a0: 68 60 72 12 00 push $0x127260
10a4a5: e8 56 0a 00 00 call 10af00 <pthread_mutex_unlock>
10a4aa: 83 c4 10 add $0x10,%esp
10a4ad: e9 f5 fd ff ff jmp 10a2a7 <rtems_aio_handle+0xf>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a4b2: 31 c0 xor %eax,%eax
10a4b4: 8d 65 f4 lea -0xc(%ebp),%esp
10a4b7: 5b pop %ebx
10a4b8: 5e pop %esi
10a4b9: 5f pop %edi
10a4ba: c9 leave
10a4bb: c3 ret
0010a0c0 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
10a0c0: 55 push %ebp
10a0c1: 89 e5 mov %esp,%ebp
10a0c3: 53 push %ebx
10a0c4: 83 ec 10 sub $0x10,%esp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
10a0c7: 68 68 72 12 00 push $0x127268
10a0cc: e8 33 0f 00 00 call 10b004 <pthread_attr_init>
10a0d1: 89 c3 mov %eax,%ebx
if (result != 0)
10a0d3: 83 c4 10 add $0x10,%esp
10a0d6: 85 c0 test %eax,%eax
10a0d8: 0f 85 d7 00 00 00 jne 10a1b5 <rtems_aio_init+0xf5> <== NEVER TAKEN
return result;
result =
10a0de: 51 push %ecx
10a0df: 51 push %ecx
10a0e0: 6a 00 push $0x0
10a0e2: 68 68 72 12 00 push $0x127268
10a0e7: e8 40 0f 00 00 call 10b02c <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
10a0ec: 83 c4 10 add $0x10,%esp
10a0ef: 85 c0 test %eax,%eax
10a0f1: 74 10 je 10a103 <rtems_aio_init+0x43> <== ALWAYS TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
10a0f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a0f6: 68 68 72 12 00 push $0x127268 <== NOT EXECUTED
10a0fb: e8 e4 0e 00 00 call 10afe4 <pthread_attr_destroy> <== NOT EXECUTED
10a100: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
10a103: 52 push %edx
10a104: 52 push %edx
10a105: 6a 00 push $0x0
10a107: 68 60 72 12 00 push $0x127260
10a10c: e8 4f 0c 00 00 call 10ad60 <pthread_mutex_init>
if (result != 0)
10a111: 83 c4 10 add $0x10,%esp
10a114: 85 c0 test %eax,%eax
10a116: 74 10 je 10a128 <rtems_aio_init+0x68> <== ALWAYS TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
10a118: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a11b: 68 68 72 12 00 push $0x127268 <== NOT EXECUTED
10a120: e8 bf 0e 00 00 call 10afe4 <pthread_attr_destroy> <== NOT EXECUTED
10a125: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
10a128: 50 push %eax
10a129: 50 push %eax
10a12a: 6a 00 push $0x0
10a12c: 68 64 72 12 00 push $0x127264
10a131: e8 ea 08 00 00 call 10aa20 <pthread_cond_init>
10a136: 89 c3 mov %eax,%ebx
if (result != 0) {
10a138: 83 c4 10 add $0x10,%esp
10a13b: 85 c0 test %eax,%eax
10a13d: 74 1c je 10a15b <rtems_aio_init+0x9b> <== ALWAYS TAKEN
pthread_mutex_destroy (&aio_request_queue.mutex);
10a13f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a142: 68 60 72 12 00 push $0x127260 <== NOT EXECUTED
10a147: e8 14 0b 00 00 call 10ac60 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
10a14c: c7 04 24 68 72 12 00 movl $0x127268,(%esp) <== NOT EXECUTED
10a153: e8 8c 0e 00 00 call 10afe4 <pthread_attr_destroy> <== NOT EXECUTED
10a158: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10a15b: c7 05 a8 72 12 00 ac movl $0x1272ac,0x1272a8
10a162: 72 12 00
head->previous = NULL;
10a165: c7 05 ac 72 12 00 00 movl $0x0,0x1272ac
10a16c: 00 00 00
tail->previous = head;
10a16f: c7 05 b0 72 12 00 a8 movl $0x1272a8,0x1272b0
10a176: 72 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10a179: c7 05 b4 72 12 00 b8 movl $0x1272b8,0x1272b4
10a180: 72 12 00
head->previous = NULL;
10a183: c7 05 b8 72 12 00 00 movl $0x0,0x1272b8
10a18a: 00 00 00
tail->previous = head;
10a18d: c7 05 bc 72 12 00 b4 movl $0x1272b4,0x1272bc
10a194: 72 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;
10a197: c7 05 c4 72 12 00 00 movl $0x0,0x1272c4
10a19e: 00 00 00
aio_request_queue.idle_threads = 0;
10a1a1: c7 05 c8 72 12 00 00 movl $0x0,0x1272c8
10a1a8: 00 00 00
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
10a1ab: c7 05 c0 72 12 00 0b movl $0xb00b,0x1272c0
10a1b2: b0 00 00
return result;
}
10a1b5: 89 d8 mov %ebx,%eax
10a1b7: 8b 5d fc mov -0x4(%ebp),%ebx
10a1ba: c9 leave
10a1bb: c3 ret
0010a4bc <rtems_aio_insert_prio>:
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
10a4bc: 55 push %ebp
10a4bd: 89 e5 mov %esp,%ebp
10a4bf: 56 push %esi
10a4c0: 53 push %ebx
10a4c1: 8b 4d 08 mov 0x8(%ebp),%ecx
10a4c4: 8b 55 0c mov 0xc(%ebp),%edx
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a4c7: 8b 01 mov (%ecx),%eax
10a4c9: 8d 59 04 lea 0x4(%ecx),%ebx
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
10a4cc: 39 d8 cmp %ebx,%eax
10a4ce: 74 27 je 10a4f7 <rtems_aio_insert_prio+0x3b><== NEVER TAKEN
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;
10a4d0: 8b 48 14 mov 0x14(%eax),%ecx
10a4d3: 8b 49 14 mov 0x14(%ecx),%ecx
while (req->aiocbp->aio_reqprio > prio &&
10a4d6: 8b 72 14 mov 0x14(%edx),%esi
10a4d9: 8b 76 14 mov 0x14(%esi),%esi
10a4dc: eb 08 jmp 10a4e6 <rtems_aio_insert_prio+0x2a>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a4de: 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;
10a4e0: 8b 48 14 mov 0x14(%eax),%ecx <== NOT EXECUTED
10a4e3: 8b 49 14 mov 0x14(%ecx),%ecx <== 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 &&
10a4e6: 39 ce cmp %ecx,%esi
10a4e8: 7e 04 jle 10a4ee <rtems_aio_insert_prio+0x32><== ALWAYS TAKEN
10a4ea: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
10a4ec: 75 f0 jne 10a4de <rtems_aio_insert_prio+0x22><== 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 );
10a4ee: 89 55 0c mov %edx,0xc(%ebp)
10a4f1: 8b 40 04 mov 0x4(%eax),%eax
10a4f4: 89 45 08 mov %eax,0x8(%ebp)
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
10a4f7: 5b pop %ebx
10a4f8: 5e pop %esi
10a4f9: c9 leave
10a4fa: e9 79 20 00 00 jmp 10c578 <_Chain_Insert>
0010a267 <rtems_aio_move_to_work>:
* NONE
*/
void
rtems_aio_move_to_work (rtems_aio_request_chain *r_chain)
{
10a267: 55 push %ebp
10a268: 89 e5 mov %esp,%ebp
10a26a: 83 ec 08 sub $0x8,%esp
10a26d: 8b 55 08 mov 0x8(%ebp),%edx
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a270: a1 a8 72 12 00 mov 0x1272a8,%eax
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
10a275: 8b 4a 14 mov 0x14(%edx),%ecx
10a278: eb 02 jmp 10a27c <rtems_aio_move_to_work+0x15>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a27a: 8b 00 mov (%eax),%eax
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
10a27c: 39 48 14 cmp %ecx,0x14(%eax)
10a27f: 7d 07 jge 10a288 <rtems_aio_move_to_work+0x21>
10a281: 3d ac 72 12 00 cmp $0x1272ac,%eax
10a286: 75 f2 jne 10a27a <rtems_aio_move_to_work+0x13><== ALWAYS TAKEN
10a288: 51 push %ecx
10a289: 51 push %ecx
10a28a: 52 push %edx
10a28b: ff 70 04 pushl 0x4(%eax)
10a28e: e8 e5 22 00 00 call 10c578 <_Chain_Insert>
10a293: 83 c4 10 add $0x10,%esp
node = rtems_chain_next (node);
temp = (rtems_aio_request_chain *) node;
}
rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd);
}
10a296: c9 leave
10a297: c3 ret
0010a548 <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)
{
10a548: 55 push %ebp
10a549: 89 e5 mov %esp,%ebp
10a54b: 53 push %ebx
10a54c: 83 ec 04 sub $0x4,%esp
10a54f: 8b 55 08 mov 0x8(%ebp),%edx
10a552: 8b 4d 0c mov 0xc(%ebp),%ecx
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a555: 8b 1a mov (%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 );
10a557: 83 c2 04 add $0x4,%edx
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
10a55a: b8 02 00 00 00 mov $0x2,%eax
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
10a55f: 39 d3 cmp %edx,%ebx
10a561: 75 08 jne 10a56b <rtems_aio_remove_req+0x23>
10a563: eb 3b jmp 10a5a0 <rtems_aio_remove_req+0x58>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a565: 8b 18 mov (%eax),%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) {
10a567: 39 d3 cmp %edx,%ebx <== NOT EXECUTED
10a569: 74 30 je 10a59b <rtems_aio_remove_req+0x53><== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
10a56b: 89 d8 mov %ebx,%eax
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) {
10a56d: 39 4b 14 cmp %ecx,0x14(%ebx)
10a570: 75 f3 jne 10a565 <rtems_aio_remove_req+0x1d><== NEVER TAKEN
10a572: 83 ec 0c sub $0xc,%esp
10a575: 53 push %ebx
10a576: e8 c1 1f 00 00 call 10c53c <_Chain_Extract>
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
10a57b: 8b 43 14 mov 0x14(%ebx),%eax
10a57e: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax)
current->aiocbp->return_value = -1;
10a585: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax)
free (current);
10a58c: 89 1c 24 mov %ebx,(%esp)
10a58f: e8 fc cd ff ff call 107390 <free>
}
return AIO_CANCELED;
10a594: 83 c4 10 add $0x10,%esp
10a597: 31 c0 xor %eax,%eax
10a599: eb 05 jmp 10a5a0 <rtems_aio_remove_req+0x58>
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
10a59b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
10a5a0: 8b 5d fc mov -0x4(%ebp),%ebx
10a5a3: c9 leave
10a5a4: c3 ret
0010a244 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10a244: 55 push %ebp
10a245: 89 e5 mov %esp,%ebp
10a247: 57 push %edi
10a248: 56 push %esi
10a249: 53 push %ebx
10a24a: 83 ec 1c sub $0x1c,%esp
10a24d: 8b 7d 0c mov 0xc(%ebp),%edi
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10a250: 8d 75 e4 lea -0x1c(%ebp),%esi
10a253: eb 13 jmp 10a268 <rtems_chain_get_with_wait+0x24>
10a255: 56 push %esi
10a256: ff 75 10 pushl 0x10(%ebp)
10a259: 6a 00 push $0x0
10a25b: 57 push %edi
10a25c: e8 b3 f5 ff ff call 109814 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10a261: 83 c4 10 add $0x10,%esp
10a264: 85 c0 test %eax,%eax
10a266: 75 16 jne 10a27e <rtems_chain_get_with_wait+0x3a><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10a268: 83 ec 0c sub $0xc,%esp
10a26b: ff 75 08 pushl 0x8(%ebp)
10a26e: e8 a5 04 00 00 call 10a718 <_Chain_Get>
10a273: 89 c3 mov %eax,%ebx
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10a275: 83 c4 10 add $0x10,%esp
10a278: 85 c0 test %eax,%eax
10a27a: 74 d9 je 10a255 <rtems_chain_get_with_wait+0x11>
10a27c: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10a27e: 8b 55 14 mov 0x14(%ebp),%edx
10a281: 89 1a mov %ebx,(%edx)
return sc;
}
10a283: 8d 65 f4 lea -0xc(%ebp),%esp
10a286: 5b pop %ebx
10a287: 5e pop %esi
10a288: 5f pop %edi
10a289: c9 leave
10a28a: c3 ret
00106cf8 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
106cf8: 55 push %ebp
106cf9: 89 e5 mov %esp,%ebp
106cfb: 57 push %edi
106cfc: 56 push %esi
106cfd: 53 push %ebx
106cfe: 83 ec 6c sub $0x6c,%esp
Timestamp_Control uptime, total, ran, uptime_at_last_reset;
#else
uint32_t total_units = 0;
#endif
if ( !print )
106d01: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
106d05: 0f 84 82 01 00 00 je 106e8d <rtems_cpu_usage_report_with_plugin+0x195><== 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__
_Timestamp_Set_to_zero( &total );
106d0b: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
106d12: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
106d19: a1 a0 8f 12 00 mov 0x128fa0,%eax
106d1e: 8b 15 a4 8f 12 00 mov 0x128fa4,%edx
106d24: 89 45 c0 mov %eax,-0x40(%ebp)
106d27: 89 55 c4 mov %edx,-0x3c(%ebp)
}
}
}
#endif
(*print)(
106d2a: 53 push %ebx
106d2b: 53 push %ebx
106d2c: 68 55 0e 12 00 push $0x120e55
106d31: ff 75 08 pushl 0x8(%ebp)
106d34: ff 55 0c call *0xc(%ebp)
106d37: 83 c4 10 add $0x10,%esp
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
106d3a: bf 01 00 00 00 mov $0x1,%edi
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
106d3f: 8b 04 bd e0 89 12 00 mov 0x1289e0(,%edi,4),%eax
106d46: 8b 70 04 mov 0x4(%eax),%esi
if ( information ) {
106d49: 85 f6 test %esi,%esi
106d4b: 0f 84 14 01 00 00 je 106e65 <rtems_cpu_usage_report_with_plugin+0x16d><== NEVER TAKEN
106d51: c7 45 94 01 00 00 00 movl $0x1,-0x6c(%ebp)
106d58: e9 fb 00 00 00 jmp 106e58 <rtems_cpu_usage_report_with_plugin+0x160>
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
106d5d: 8b 46 1c mov 0x1c(%esi),%eax
106d60: 8b 4d 94 mov -0x6c(%ebp),%ecx
106d63: 8b 14 88 mov (%eax,%ecx,4),%edx
if ( !the_thread )
106d66: 85 d2 test %edx,%edx
106d68: 0f 84 e7 00 00 00 je 106e55 <rtems_cpu_usage_report_with_plugin+0x15d><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
106d6e: 51 push %ecx
106d6f: 8d 5d a3 lea -0x5d(%ebp),%ebx
106d72: 53 push %ebx
106d73: 6a 0d push $0xd
106d75: ff 72 08 pushl 0x8(%edx)
106d78: 89 55 90 mov %edx,-0x70(%ebp)
106d7b: e8 54 39 00 00 call 10a6d4 <rtems_object_get_name>
(*print)(
106d80: 53 push %ebx
106d81: 8b 55 90 mov -0x70(%ebp),%edx
106d84: ff 72 08 pushl 0x8(%edx)
106d87: 68 c7 0f 12 00 push $0x120fc7
106d8c: ff 75 08 pushl 0x8(%ebp)
106d8f: 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;
106d92: 8b 55 90 mov -0x70(%ebp),%edx
106d95: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx
106d9b: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx
106da1: 89 4d c8 mov %ecx,-0x38(%ebp)
106da4: 89 5d cc mov %ebx,-0x34(%ebp)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
106da7: 83 c4 20 add $0x20,%esp
106daa: a1 6c 8f 12 00 mov 0x128f6c,%eax
106daf: 8b 5a 08 mov 0x8(%edx),%ebx
106db2: 39 58 08 cmp %ebx,0x8(%eax)
106db5: 75 45 jne 106dfc <rtems_cpu_usage_report_with_plugin+0x104>
Timestamp_Control used;
Timestamp_Control last = _Thread_Time_of_last_context_switch;
106db7: a1 b4 8a 12 00 mov 0x128ab4,%eax
106dbc: 8b 15 b8 8a 12 00 mov 0x128ab8,%edx
106dc2: 89 45 b0 mov %eax,-0x50(%ebp)
106dc5: 89 55 b4 mov %edx,-0x4c(%ebp)
_TOD_Get_uptime( &uptime );
106dc8: 83 ec 0c sub $0xc,%esp
106dcb: 8d 45 d8 lea -0x28(%ebp),%eax
106dce: 50 push %eax
106dcf: e8 7c 49 00 00 call 10b750 <_TOD_Get_uptime>
_Timestamp_Subtract( &last, &uptime, &used );
106dd4: 83 c4 0c add $0xc,%esp
106dd7: 8d 45 b8 lea -0x48(%ebp),%eax
106dda: 50 push %eax
106ddb: 8d 55 d8 lea -0x28(%ebp),%edx
106dde: 52 push %edx
106ddf: 8d 55 b0 lea -0x50(%ebp),%edx
106de2: 52 push %edx
106de3: 89 45 90 mov %eax,-0x70(%ebp)
106de6: e8 7d 68 00 00 call 10d668 <_Timespec_Subtract>
_Timestamp_Add_to( &ran, &used );
106deb: 58 pop %eax
106dec: 5a pop %edx
106ded: 8b 45 90 mov -0x70(%ebp),%eax
106df0: 50 push %eax
106df1: 8d 45 c8 lea -0x38(%ebp),%eax
106df4: 50 push %eax
106df5: e8 82 67 00 00 call 10d57c <_Timespec_Add_to>
106dfa: eb 0c jmp 106e08 <rtems_cpu_usage_report_with_plugin+0x110>
} else {
_TOD_Get_uptime( &uptime );
106dfc: 83 ec 0c sub $0xc,%esp
106dff: 8d 4d d8 lea -0x28(%ebp),%ecx
106e02: 51 push %ecx
106e03: e8 48 49 00 00 call 10b750 <_TOD_Get_uptime>
106e08: 83 c4 0c add $0xc,%esp
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
106e0b: 8d 5d d0 lea -0x30(%ebp),%ebx
106e0e: 53 push %ebx
106e0f: 8d 45 d8 lea -0x28(%ebp),%eax
106e12: 50 push %eax
106e13: 8d 55 c0 lea -0x40(%ebp),%edx
106e16: 52 push %edx
106e17: e8 4c 68 00 00 call 10d668 <_Timespec_Subtract>
_Timestamp_Divide( &ran, &total, &ival, &fval );
106e1c: 8d 4d e0 lea -0x20(%ebp),%ecx
106e1f: 51 push %ecx
106e20: 8d 45 e4 lea -0x1c(%ebp),%eax
106e23: 50 push %eax
106e24: 53 push %ebx
106e25: 8d 45 c8 lea -0x38(%ebp),%eax
106e28: 50 push %eax
106e29: e8 7e 67 00 00 call 10d5ac <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
106e2e: 83 c4 18 add $0x18,%esp
106e31: ff 75 e0 pushl -0x20(%ebp)
106e34: ff 75 e4 pushl -0x1c(%ebp)
106e37: 8b 45 cc mov -0x34(%ebp),%eax
106e3a: b9 e8 03 00 00 mov $0x3e8,%ecx
106e3f: 31 d2 xor %edx,%edx
106e41: f7 f1 div %ecx
106e43: 50 push %eax
106e44: ff 75 c8 pushl -0x38(%ebp)
106e47: 68 da 0f 12 00 push $0x120fda
106e4c: ff 75 08 pushl 0x8(%ebp)
106e4f: ff 55 0c call *0xc(%ebp)
106e52: 83 c4 20 add $0x20,%esp
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
106e55: ff 45 94 incl -0x6c(%ebp)
106e58: 0f b7 46 10 movzwl 0x10(%esi),%eax
106e5c: 39 45 94 cmp %eax,-0x6c(%ebp)
106e5f: 0f 86 f8 fe ff ff jbe 106d5d <rtems_cpu_usage_report_with_plugin+0x65>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
106e65: 47 inc %edi
106e66: 83 ff 04 cmp $0x4,%edi
106e69: 0f 85 d0 fe ff ff jne 106d3f <rtems_cpu_usage_report_with_plugin+0x47>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
106e6f: 8b 45 d4 mov -0x2c(%ebp),%eax
106e72: b9 e8 03 00 00 mov $0x3e8,%ecx
106e77: 31 d2 xor %edx,%edx
106e79: f7 f1 div %ecx
106e7b: 50 push %eax
106e7c: ff 75 d0 pushl -0x30(%ebp)
106e7f: 68 f2 0f 12 00 push $0x120ff2
106e84: ff 75 08 pushl 0x8(%ebp)
106e87: ff 55 0c call *0xc(%ebp)
106e8a: 83 c4 10 add $0x10,%esp
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
106e8d: 8d 65 f4 lea -0xc(%ebp),%esp
106e90: 5b pop %ebx
106e91: 5e pop %esi
106e92: 5f pop %edi
106e93: c9 leave
106e94: c3 ret
00110c64 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
110c64: 55 push %ebp
110c65: 89 e5 mov %esp,%ebp
110c67: 53 push %ebx
110c68: 83 ec 04 sub $0x4,%esp
110c6b: 8b 55 08 mov 0x8(%ebp),%edx
if (sc == RTEMS_SUCCESSFUL) {
return 0;
110c6e: 31 c0 xor %eax,%eax
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
110c70: 85 d2 test %edx,%edx
110c72: 74 1b je 110c8f <rtems_deviceio_errno+0x2b>
return 0;
} else {
int eno = EINVAL;
110c74: bb 16 00 00 00 mov $0x16,%ebx
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
110c79: 83 fa 1c cmp $0x1c,%edx
110c7c: 77 07 ja 110c85 <rtems_deviceio_errno+0x21><== NEVER TAKEN
eno = status_code_to_errno [sc];
110c7e: 8b 1c 95 a8 f1 11 00 mov 0x11f1a8(,%edx,4),%ebx
}
errno = eno;
110c85: e8 5a 00 00 00 call 110ce4 <__errno>
110c8a: 89 18 mov %ebx,(%eax)
return -1;
110c8c: 83 c8 ff or $0xffffffff,%eax
}
}
110c8f: 5a pop %edx
110c90: 5b pop %ebx
110c91: c9 leave
110c92: c3 ret
0010daf7 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
10daf7: 55 push %ebp
10daf8: 89 e5 mov %esp,%ebp
10dafa: 83 ec 18 sub $0x18,%esp
10dafd: 8b 45 08 mov 0x8(%ebp),%eax
find_arg fa = {
10db00: 89 45 f0 mov %eax,-0x10(%ebp)
10db03: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
10db0a: 85 c0 test %eax,%eax
10db0c: 74 13 je 10db21 <rtems_filesystem_get_mount_handler+0x2a><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
10db0e: 50 push %eax
10db0f: 50 push %eax
10db10: 8d 45 f0 lea -0x10(%ebp),%eax
10db13: 50 push %eax
10db14: 68 20 da 10 00 push $0x10da20
10db19: e8 62 ff ff ff call 10da80 <rtems_filesystem_iterate>
10db1e: 83 c4 10 add $0x10,%esp
}
return fa.mount_h;
}
10db21: 8b 45 f4 mov -0xc(%ebp),%eax
10db24: c9 leave
10db25: c3 ret
0010674c <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 )
{
10674c: 55 push %ebp
10674d: 89 e5 mov %esp,%ebp
10674f: 57 push %edi
106750: 56 push %esi
106751: 53 push %ebx
106752: 83 ec 2c sub $0x2c,%esp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
106755: a1 44 20 12 00 mov 0x122044,%eax
10675a: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
106761: 83 3d a0 d3 11 00 00 cmpl $0x0,0x11d3a0
106768: 75 0a jne 106774 <rtems_filesystem_initialize+0x28><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
10676a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10676d: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED
106772: eb 28 jmp 10679c <rtems_filesystem_initialize+0x50><== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
106774: a1 4c 01 12 00 mov 0x12014c,%eax
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
106779: 83 ec 0c sub $0xc,%esp
10677c: 6a 00 push $0x0
10677e: ff 70 04 pushl 0x4(%eax)
106781: ff 30 pushl (%eax)
106783: ff 70 0c pushl 0xc(%eax)
106786: ff 70 08 pushl 0x8(%eax)
106789: e8 9b 06 00 00 call 106e29 <mount>
if ( status == -1 )
10678e: 83 c4 20 add $0x20,%esp
106791: 40 inc %eax
106792: 75 0d jne 1067a1 <rtems_filesystem_initialize+0x55><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
106794: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106797: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED
10679c: e8 63 35 00 00 call 109d04 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_filesystem_link_counts = 0;
1067a1: a1 44 20 12 00 mov 0x122044,%eax
1067a6: 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);
1067ac: 83 ec 0c sub $0xc,%esp
1067af: 6a 00 push $0x0
1067b1: 8d 5d d4 lea -0x2c(%ebp),%ebx
1067b4: 53 push %ebx
1067b5: 6a 00 push $0x0
1067b7: 6a 01 push $0x1
1067b9: 68 d4 e9 11 00 push $0x11e9d4
1067be: e8 03 01 00 00 call 1068c6 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
1067c3: 8b 3d 44 20 12 00 mov 0x122044,%edi
1067c9: 83 c7 18 add $0x18,%edi
1067cc: b9 05 00 00 00 mov $0x5,%ecx
1067d1: 89 de mov %ebx,%esi
1067d3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1067d5: 83 c4 14 add $0x14,%esp
1067d8: 6a 00 push $0x0
1067da: 53 push %ebx
1067db: 6a 00 push $0x0
1067dd: 6a 01 push $0x1
1067df: 68 d4 e9 11 00 push $0x11e9d4
1067e4: e8 dd 00 00 00 call 1068c6 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
1067e9: 8b 3d 44 20 12 00 mov 0x122044,%edi
1067ef: 83 c7 04 add $0x4,%edi
1067f2: b9 05 00 00 00 mov $0x5,%ecx
1067f7: 89 de mov %ebx,%esi
1067f9: 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);
1067fb: 83 c4 18 add $0x18,%esp
1067fe: 68 ff 01 00 00 push $0x1ff
106803: 68 d6 e9 11 00 push $0x11e9d6
106808: e8 c3 04 00 00 call 106cd0 <mkdir>
if ( status != 0 )
10680d: 83 c4 10 add $0x10,%esp
106810: 85 c0 test %eax,%eax
106812: 74 0d je 106821 <rtems_filesystem_initialize+0xd5><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
106814: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106817: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED
10681c: e9 7b ff ff ff jmp 10679c <rtems_filesystem_initialize+0x50><== NOT EXECUTED
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
106821: 8d 65 f4 lea -0xc(%ebp),%esp
106824: 5b pop %ebx
106825: 5e pop %esi
106826: 5f pop %edi
106827: c9 leave
106828: c3 ret
0010da80 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
10da80: 55 push %ebp
10da81: 89 e5 mov %esp,%ebp
10da83: 57 push %edi
10da84: 56 push %esi
10da85: 53 push %ebx
10da86: 83 ec 1c sub $0x1c,%esp
10da89: 8b 75 08 mov 0x8(%ebp),%esi
10da8c: 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;
10da8f: 31 c0 xor %eax,%eax
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
10da91: bb 80 d3 11 00 mov $0x11d380,%ebx
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10da96: eb 0c jmp 10daa4 <rtems_filesystem_iterate+0x24>
stop = (*routine)( table_entry, routine_arg );
10da98: 51 push %ecx
10da99: 51 push %ecx
10da9a: 57 push %edi
10da9b: 53 push %ebx
10da9c: ff d6 call *%esi
++table_entry;
10da9e: 83 c3 08 add $0x8,%ebx
10daa1: 83 c4 10 add $0x10,%esp
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10daa4: 83 3b 00 cmpl $0x0,(%ebx)
10daa7: 74 06 je 10daaf <rtems_filesystem_iterate+0x2f>
10daa9: 84 c0 test %al,%al
10daab: 74 eb je 10da98 <rtems_filesystem_iterate+0x18>
10daad: eb 40 jmp 10daef <rtems_filesystem_iterate+0x6f>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
10daaf: 84 c0 test %al,%al
10dab1: 75 3c jne 10daef <rtems_filesystem_iterate+0x6f>
rtems_libio_lock();
10dab3: 88 45 e4 mov %al,-0x1c(%ebp)
10dab6: e8 95 ff ff ff call 10da50 <rtems_libio_lock>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
10dabb: 8b 1d 50 20 12 00 mov 0x122050,%ebx
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
10dac1: 8a 55 e4 mov -0x1c(%ebp),%dl
10dac4: eb 10 jmp 10dad6 <rtems_filesystem_iterate+0x56>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
10dac6: 52 push %edx
10dac7: 52 push %edx
10dac8: 57 push %edi
10dac9: 8d 43 08 lea 0x8(%ebx),%eax
10dacc: 50 push %eax
10dacd: ff d6 call *%esi
10dacf: 88 c2 mov %al,%dl
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
10dad1: 8b 1b mov (%ebx),%ebx
if ( !stop ) {
rtems_libio_lock();
for (
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
10dad3: 83 c4 10 add $0x10,%esp
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
10dad6: 81 fb 54 20 12 00 cmp $0x122054,%ebx
10dadc: 74 04 je 10dae2 <rtems_filesystem_iterate+0x62>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
10dade: 84 d2 test %dl,%dl
10dae0: 74 e4 je 10dac6 <rtems_filesystem_iterate+0x46><== ALWAYS TAKEN
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
}
rtems_libio_unlock();
10dae2: 88 55 e4 mov %dl,-0x1c(%ebp)
10dae5: e8 80 ff ff ff call 10da6a <rtems_libio_unlock>
10daea: 8a 55 e4 mov -0x1c(%ebp),%dl
10daed: 88 d0 mov %dl,%al
}
return stop;
}
10daef: 8d 65 f4 lea -0xc(%ebp),%esp
10daf2: 5b pop %ebx
10daf3: 5e pop %esi
10daf4: 5f pop %edi
10daf5: c9 leave
10daf6: c3 ret
00106de1 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
106de1: 55 push %ebp
106de2: 89 e5 mov %esp,%ebp
106de4: 57 push %edi
106de5: 56 push %esi
106de6: 53 push %ebx
106de7: 83 ec 1c sub $0x1c,%esp
106dea: 8b 7d 08 mov 0x8(%ebp),%edi
106ded: 8b 75 0c mov 0xc(%ebp),%esi
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
106df0: e8 bc ff ff ff call 106db1 <rtems_libio_lock>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
106df5: 8b 1d 28 1f 12 00 mov 0x121f28,%ebx
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
106dfb: 31 c0 xor %eax,%eax
rtems_libio_lock();
for (
106dfd: eb 0b jmp 106e0a <rtems_filesystem_mount_iterate+0x29>
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 );
106dff: 50 push %eax
106e00: 50 push %eax
106e01: 56 push %esi
106e02: 53 push %ebx
106e03: ff d7 call *%edi
}
rtems_libio_unlock();
return stop;
}
106e05: 8b 1b mov (%ebx),%ebx
rtems_libio_lock();
for (
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
node = rtems_chain_next( node )
106e07: 83 c4 10 add $0x10,%esp
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
106e0a: 81 fb 2c 1f 12 00 cmp $0x121f2c,%ebx
106e10: 74 04 je 106e16 <rtems_filesystem_mount_iterate+0x35>
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
106e12: 84 c0 test %al,%al
106e14: 74 e9 je 106dff <rtems_filesystem_mount_iterate+0x1e><== ALWAYS TAKEN
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
106e16: 88 45 e4 mov %al,-0x1c(%ebp)
106e19: e8 ad ff ff ff call 106dcb <rtems_libio_unlock>
return stop;
}
106e1e: 8a 45 e4 mov -0x1c(%ebp),%al
106e21: 8d 65 f4 lea -0xc(%ebp),%esp
106e24: 5b pop %ebx
106e25: 5e pop %esi
106e26: 5f pop %edi
106e27: c9 leave
106e28: c3 ret
00106946 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
106946: 55 push %ebp
106947: 89 e5 mov %esp,%ebp
106949: 57 push %edi
10694a: 56 push %esi
10694b: 53 push %ebx
10694c: 83 ec 0c sub $0xc,%esp
10694f: 8b 7d 08 mov 0x8(%ebp),%edi
106952: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
106955: 31 db xor %ebx,%ebx
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
106957: eb 01 jmp 10695a <rtems_filesystem_prefix_separators+0x14>
{
pathname++;
pathnamelen--;
stripped++;
106959: 43 inc %ebx
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
10695a: 8a 04 1f mov (%edi,%ebx,1),%al
10695d: 39 de cmp %ebx,%esi
10695f: 74 17 je 106978 <rtems_filesystem_prefix_separators+0x32><== NEVER TAKEN
106961: 84 c0 test %al,%al
106963: 74 13 je 106978 <rtems_filesystem_prefix_separators+0x32><== NEVER TAKEN
106965: 83 ec 0c sub $0xc,%esp
106968: 0f be c0 movsbl %al,%eax
10696b: 50 push %eax
10696c: e8 03 0d 00 00 call 107674 <rtems_filesystem_is_separator>
106971: 83 c4 10 add $0x10,%esp
106974: 85 c0 test %eax,%eax
106976: 75 e1 jne 106959 <rtems_filesystem_prefix_separators+0x13>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
106978: 89 d8 mov %ebx,%eax
10697a: 8d 65 f4 lea -0xc(%ebp),%esp
10697d: 5b pop %ebx
10697e: 5e pop %esi
10697f: 5f pop %edi
106980: c9 leave
106981: c3 ret
0010721d <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
10721d: 55 push %ebp
10721e: 89 e5 mov %esp,%ebp
107220: 56 push %esi
107221: 53 push %ebx
107222: 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 ) );
107225: 83 ec 0c sub $0xc,%esp
107228: 6a 08 push $0x8
10722a: e8 89 03 00 00 call 1075b8 <malloc>
10722f: 89 c3 mov %eax,%ebx
*key = new_key;
107231: 8b 45 08 mov 0x8(%ebp),%eax
107234: 89 18 mov %ebx,(%eax)
new_key->val = NULL;
107236: c7 03 00 00 00 00 movl $0x0,(%ebx)
new_key->dtor = dtor;
10723c: 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 );
10723f: 83 c4 0c add $0xc,%esp
107242: 56 push %esi
107243: 53 push %ebx
107244: 6a 00 push $0x0
107246: e8 9d 33 00 00 call 10a5e8 <rtems_task_variable_add>
10724b: 89 c2 mov %eax,%edx
if ( status == RTEMS_SUCCESSFUL )
10724d: 83 c4 10 add $0x10,%esp
return 0;
107250: 31 c0 xor %eax,%eax
);
#endif
/* 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 )
107252: 85 d2 test %edx,%edx
107254: 74 0f je 107265 <rtems_gxx_key_create+0x48><== ALWAYS TAKEN
return 0;
free( new_key );
107256: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107259: 53 push %ebx <== NOT EXECUTED
10725a: e8 79 fe ff ff call 1070d8 <free> <== NOT EXECUTED
return -1;
10725f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107262: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
}
107265: 8d 65 f8 lea -0x8(%ebp),%esp
107268: 5b pop %ebx
107269: 5e pop %esi
10726a: c9 leave
10726b: c3 ret
0010727c <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
10727c: 55 push %ebp
10727d: 89 e5 mov %esp,%ebp
10727f: 53 push %ebx
107280: 83 ec 0c sub $0xc,%esp
107283: 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 );
107286: 53 push %ebx
107287: 6a 00 push $0x0
107289: e8 ee 33 00 00 call 10a67c <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
10728e: 83 c4 10 add $0x10,%esp
107291: 85 c0 test %eax,%eax
107293: 75 11 jne 1072a6 <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
107295: 85 db test %ebx,%ebx
107297: 74 0d je 1072a6 <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
107299: 83 ec 0c sub $0xc,%esp
10729c: ff 33 pushl (%ebx)
10729e: e8 35 fe ff ff call 1070d8 <free>
1072a3: 83 c4 10 add $0x10,%esp
return 0;
}
key = NULL;
return 0;
}
1072a6: 31 c0 xor %eax,%eax
1072a8: 8b 5d fc mov -0x4(%ebp),%ebx
1072ab: c9 leave
1072ac: c3 ret
001071c4 <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))
{
1071c4: 55 push %ebp
1071c5: 89 e5 mov %esp,%ebp
1071c7: 56 push %esi
1071c8: 53 push %ebx
1071c9: 83 ec 10 sub $0x10,%esp
1071cc: 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 ) {
1071cf: 8b 03 mov (%ebx),%eax
1071d1: 85 c0 test %eax,%eax
1071d3: 75 3f jne 107214 <rtems_gxx_once+0x50>
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
1071d5: 52 push %edx
1071d6: 8d 45 f4 lea -0xc(%ebp),%eax
1071d9: 50 push %eax
1071da: 68 00 01 00 00 push $0x100
1071df: 68 00 01 00 00 push $0x100
1071e4: e8 7f 32 00 00 call 10a468 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
1071e9: 8b 33 mov (%ebx),%esi
1071eb: 83 c4 10 add $0x10,%esp
1071ee: 85 f6 test %esi,%esi
1071f0: 75 06 jne 1071f8 <rtems_gxx_once+0x34> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
1071f2: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
1071f8: 50 push %eax
1071f9: 8d 45 f4 lea -0xc(%ebp),%eax
1071fc: 50 push %eax
1071fd: 68 00 01 00 00 push $0x100
107202: ff 75 f4 pushl -0xc(%ebp)
107205: e8 5e 32 00 00 call 10a468 <rtems_task_mode>
if ( o == 0 )
10720a: 83 c4 10 add $0x10,%esp
10720d: 85 f6 test %esi,%esi
10720f: 75 03 jne 107214 <rtems_gxx_once+0x50> <== NEVER TAKEN
(*func)();
107211: ff 55 0c call *0xc(%ebp)
}
return 0;
}
107214: 31 c0 xor %eax,%eax
107216: 8d 65 f8 lea -0x8(%ebp),%esp
107219: 5b pop %ebx
10721a: 5e pop %esi
10721b: c9 leave
10721c: c3 ret
00107305 <rtems_gxx_setspecific>:
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
107305: 55 push %ebp
107306: 89 e5 mov %esp,%ebp
107308: 53 push %ebx
107309: 83 ec 08 sub $0x8,%esp
10730c: 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 );
10730f: ff 73 04 pushl 0x4(%ebx)
107312: 53 push %ebx
107313: 6a 00 push $0x0
107315: e8 ce 32 00 00 call 10a5e8 <rtems_task_variable_add>
10731a: 89 c2 mov %eax,%edx
if ( status == RTEMS_SUCCESSFUL ) {
10731c: 83 c4 10 add $0x10,%esp
/* now let's set the proper value */
key->val = (void *)ptr;
return 0;
}
return -1;
10731f: 83 c8 ff or $0xffffffff,%eax
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
if ( status == RTEMS_SUCCESSFUL ) {
107322: 85 d2 test %edx,%edx
107324: 75 07 jne 10732d <rtems_gxx_setspecific+0x28><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
107326: 8b 45 0c mov 0xc(%ebp),%eax
107329: 89 03 mov %eax,(%ebx)
return 0;
10732b: 31 c0 xor %eax,%eax
}
return -1;
}
10732d: 8b 5d fc mov -0x4(%ebp),%ebx
107330: c9 leave
107331: c3 ret
0010a004 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
10a004: 55 push %ebp
10a005: 89 e5 mov %esp,%ebp
10a007: 83 ec 08 sub $0x8,%esp
if (
10a00a: 83 3d 88 c0 12 00 03 cmpl $0x3,0x12c088
10a011: 75 0d jne 10a020 <rtems_heap_allocate_aligned_with_boundary+0x1c><== NEVER TAKEN
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
10a013: e8 10 f1 ff ff call 109128 <malloc_is_system_state_OK>
10a018: 88 c2 mov %al,%dl
) {
return NULL;
10a01a: 31 c0 xor %eax,%eax
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
10a01c: 84 d2 test %dl,%dl
10a01e: 74 1c je 10a03c <rtems_heap_allocate_aligned_with_boundary+0x38>
) {
return NULL;
}
malloc_deferred_frees_process();
10a020: e8 41 f1 ff ff call 109166 <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
10a025: ff 75 10 pushl 0x10(%ebp)
10a028: ff 75 0c pushl 0xc(%ebp)
10a02b: ff 75 08 pushl 0x8(%ebp)
10a02e: ff 35 c0 74 12 00 pushl 0x1274c0
10a034: e8 53 42 00 00 call 10e28c <_Protected_heap_Allocate_aligned_with_boundary>
10a039: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
10a03c: c9 leave
10a03d: c3 ret
00106672 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
106672: 55 push %ebp
106673: 89 e5 mov %esp,%ebp
106675: 57 push %edi
106676: 56 push %esi
106677: 53 push %ebx
106678: 83 ec 48 sub $0x48,%esp
10667b: 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(
10667e: 31 c0 xor %eax,%eax
106680: 83 c9 ff or $0xffffffff,%ecx
106683: 89 f7 mov %esi,%edi
106685: f2 ae repnz scas %es:(%edi),%al
106687: f7 d1 not %ecx
106689: 49 dec %ecx
10668a: 6a 01 push $0x1
10668c: 8d 55 d4 lea -0x2c(%ebp),%edx
10668f: 52 push %edx
106690: 6a 00 push $0x0
106692: 51 push %ecx
106693: 56 push %esi
106694: 89 55 c4 mov %edx,-0x3c(%ebp)
106697: e8 2a 02 00 00 call 1068c6 <rtems_filesystem_evaluate_path>
10669c: 89 c7 mov %eax,%edi
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
10669e: 8b 5d d4 mov -0x2c(%ebp),%ebx
node_type = (*loc.ops->node_type_h)( &loc );
1066a1: 83 c4 14 add $0x14,%esp
1066a4: 8b 55 c4 mov -0x3c(%ebp),%edx
1066a7: 52 push %edx
1066a8: 8b 45 e0 mov -0x20(%ebp),%eax
1066ab: ff 50 10 call *0x10(%eax)
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
1066ae: 83 c4 10 add $0x10,%esp
1066b1: 83 f8 02 cmp $0x2,%eax
1066b4: 8b 55 c4 mov -0x3c(%ebp),%edx
1066b7: 75 07 jne 1066c0 <rtems_io_lookup_name+0x4e>
1066b9: 85 ff test %edi,%edi
1066bb: 0f 95 c0 setne %al
1066be: 74 16 je 1066d6 <rtems_io_lookup_name+0x64><== ALWAYS TAKEN
rtems_filesystem_freenode( &loc );
1066c0: 83 ec 0c sub $0xc,%esp
1066c3: 8d 45 d4 lea -0x2c(%ebp),%eax
1066c6: 50 push %eax
1066c7: e8 b8 02 00 00 call 106984 <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
1066cc: 83 c4 10 add $0x10,%esp
1066cf: b8 0d 00 00 00 mov $0xd,%eax
1066d4: eb 32 jmp 106708 <rtems_io_lookup_name+0x96>
}
device_info->device_name = (char *) name;
1066d6: 8b 4d 0c mov 0xc(%ebp),%ecx
1066d9: 89 31 mov %esi,(%ecx)
device_info->device_name_length = strlen( name );
1066db: 83 c9 ff or $0xffffffff,%ecx
1066de: 89 f7 mov %esi,%edi
1066e0: f2 ae repnz scas %es:(%edi),%al
1066e2: f7 d1 not %ecx
1066e4: 49 dec %ecx
1066e5: 8b 45 0c mov 0xc(%ebp),%eax
1066e8: 89 48 04 mov %ecx,0x4(%eax)
device_info->major = the_jnode->info.device.major;
1066eb: 8b 43 50 mov 0x50(%ebx),%eax
1066ee: 8b 4d 0c mov 0xc(%ebp),%ecx
1066f1: 89 41 08 mov %eax,0x8(%ecx)
device_info->minor = the_jnode->info.device.minor;
1066f4: 8b 43 54 mov 0x54(%ebx),%eax
1066f7: 89 41 0c mov %eax,0xc(%ecx)
rtems_filesystem_freenode( &loc );
1066fa: 83 ec 0c sub $0xc,%esp
1066fd: 52 push %edx
1066fe: e8 81 02 00 00 call 106984 <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
106703: 83 c4 10 add $0x10,%esp
106706: 31 c0 xor %eax,%eax
}
106708: 8d 65 f4 lea -0xc(%ebp),%esp
10670b: 5b pop %ebx
10670c: 5e pop %esi
10670d: 5f pop %edi
10670e: c9 leave
10670f: c3 ret
0010bc54 <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)
{
10bc54: 55 push %ebp
10bc55: 89 e5 mov %esp,%ebp
10bc57: 57 push %edi
10bc58: 56 push %esi
10bc59: 53 push %ebx
10bc5a: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10bc5d: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10bc61: 74 3d je 10bca0 <rtems_iterate_over_all_threads+0x4c><== NEVER TAKEN
10bc63: bb 01 00 00 00 mov $0x1,%ebx
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10bc68: 8b 04 9d e0 89 12 00 mov 0x1289e0(,%ebx,4),%eax
10bc6f: 8b 78 04 mov 0x4(%eax),%edi
if ( !information )
10bc72: be 01 00 00 00 mov $0x1,%esi
10bc77: 85 ff test %edi,%edi
10bc79: 75 17 jne 10bc92 <rtems_iterate_over_all_threads+0x3e>
10bc7b: eb 1d jmp 10bc9a <rtems_iterate_over_all_threads+0x46>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
10bc7d: 8b 47 1c mov 0x1c(%edi),%eax
10bc80: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !the_thread )
10bc83: 85 c0 test %eax,%eax
10bc85: 74 0a je 10bc91 <rtems_iterate_over_all_threads+0x3d><== NEVER TAKEN
continue;
(*routine)(the_thread);
10bc87: 83 ec 0c sub $0xc,%esp
10bc8a: 50 push %eax
10bc8b: ff 55 08 call *0x8(%ebp)
10bc8e: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10bc91: 46 inc %esi
10bc92: 0f b7 47 10 movzwl 0x10(%edi),%eax
10bc96: 39 c6 cmp %eax,%esi
10bc98: 76 e3 jbe 10bc7d <rtems_iterate_over_all_threads+0x29>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10bc9a: 43 inc %ebx
10bc9b: 83 fb 04 cmp $0x4,%ebx
10bc9e: 75 c8 jne 10bc68 <rtems_iterate_over_all_threads+0x14>
(*routine)(the_thread);
}
}
}
10bca0: 8d 65 f4 lea -0xc(%ebp),%esp
10bca3: 5b pop %ebx
10bca4: 5e pop %esi
10bca5: 5f pop %edi
10bca6: c9 leave
10bca7: c3 ret
0010d954 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
10d954: 55 push %ebp
10d955: 89 e5 mov %esp,%ebp
10d957: 53 push %ebx
10d958: 83 ec 04 sub $0x4,%esp
10d95b: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_lock();
10d95e: e8 d5 fe ff ff call 10d838 <rtems_libio_lock>
if (iop->sem)
10d963: 8b 43 2c mov 0x2c(%ebx),%eax
10d966: 85 c0 test %eax,%eax
10d968: 74 0c je 10d976 <rtems_libio_free+0x22> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
10d96a: 83 ec 0c sub $0xc,%esp
10d96d: 50 push %eax
10d96e: e8 35 bd ff ff call 1096a8 <rtems_semaphore_delete>
10d973: 83 c4 10 add $0x10,%esp
iop->flags &= ~LIBIO_FLAGS_OPEN;
10d976: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx)
iop->data1 = rtems_libio_iop_freelist;
10d97d: a1 a4 41 12 00 mov 0x1241a4,%eax
10d982: 89 43 34 mov %eax,0x34(%ebx)
rtems_libio_iop_freelist = iop;
10d985: 89 1d a4 41 12 00 mov %ebx,0x1241a4
rtems_libio_unlock();
}
10d98b: 8b 5d fc mov -0x4(%ebp),%ebx
10d98e: c9 leave
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
rtems_libio_unlock();
10d98f: e9 be fe ff ff jmp 10d852 <rtems_libio_unlock>
00106a84 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
106a84: 55 push %ebp
106a85: 89 e5 mov %esp,%ebp
106a87: 53 push %ebx
106a88: 83 ec 04 sub $0x4,%esp
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
106a8b: 8b 1d 44 01 12 00 mov 0x120144,%ebx
106a91: 85 db test %ebx,%ebx
106a93: 74 3e je 106ad3 <rtems_libio_init+0x4f> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
106a95: 50 push %eax
106a96: 50 push %eax
106a97: 6a 38 push $0x38
106a99: 53 push %ebx
106a9a: e8 8d fd ff ff call 10682c <calloc>
106a9f: a3 a0 41 12 00 mov %eax,0x1241a0
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
106aa4: 83 c4 10 add $0x10,%esp
106aa7: 85 c0 test %eax,%eax
106aa9: 75 07 jne 106ab2 <rtems_libio_init+0x2e>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
106aab: 83 ec 0c sub $0xc,%esp
106aae: 6a 1a push $0x1a
106ab0: eb 44 jmp 106af6 <rtems_libio_init+0x72>
iop = rtems_libio_iop_freelist = rtems_libio_iops;
106ab2: a3 a4 41 12 00 mov %eax,0x1241a4
106ab7: 89 c2 mov %eax,%edx
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
106ab9: 31 c9 xor %ecx,%ecx
106abb: eb 03 jmp 106ac0 <rtems_libio_init+0x3c>
iop->data1 = iop + 1;
106abd: 89 52 fc mov %edx,-0x4(%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++)
106ac0: 41 inc %ecx
106ac1: 83 c2 38 add $0x38,%edx
106ac4: 39 d9 cmp %ebx,%ecx
106ac6: 72 f5 jb 106abd <rtems_libio_init+0x39>
iop->data1 = iop + 1;
iop->data1 = NULL;
106ac8: 6b db 38 imul $0x38,%ebx,%ebx
106acb: c7 44 18 fc 00 00 00 movl $0x0,-0x4(%eax,%ebx,1)
106ad2: 00
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
106ad3: 83 ec 0c sub $0xc,%esp
106ad6: 68 a8 41 12 00 push $0x1241a8
106adb: 6a 00 push $0x0
106add: 6a 54 push $0x54
106adf: 6a 01 push $0x1
106ae1: 68 4f 49 42 4c push $0x4c42494f
106ae6: e8 25 2a 00 00 call 109510 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
106aeb: 83 c4 20 add $0x20,%esp
106aee: 85 c0 test %eax,%eax
106af0: 74 09 je 106afb <rtems_libio_init+0x77> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
106af2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106af5: 50 push %eax <== NOT EXECUTED
106af6: e8 09 32 00 00 call 109d04 <rtems_fatal_error_occurred>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
106afb: a1 40 01 12 00 mov 0x120140,%eax
106b00: 85 c0 test %eax,%eax
106b02: 74 06 je 106b0a <rtems_libio_init+0x86> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
106b04: 8b 5d fc mov -0x4(%ebp),%ebx
106b07: c9 leave
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
106b08: ff e0 jmp *%eax
}
106b0a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
106b0d: c9 leave <== NOT EXECUTED
106b0e: c3 ret <== NOT EXECUTED
00107c81 <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
107c81: 55 push %ebp
107c82: 89 e5 mov %esp,%ebp
107c84: 57 push %edi
107c85: 56 push %esi
107c86: 53 push %ebx
107c87: 83 ec 3c sub $0x3c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id task_id = rtems_task_self();
107c8a: e8 a9 26 00 00 call 10a338 <rtems_task_self>
107c8f: 89 c3 mov %eax,%ebx
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);
107c91: 83 ec 0c sub $0xc,%esp
107c94: 6a 00 push $0x0
107c96: 8d 45 d4 lea -0x2c(%ebp),%eax
107c99: 50 push %eax
107c9a: 6a 00 push $0x0
107c9c: 6a 01 push $0x1
107c9e: 68 bc f1 11 00 push $0x11f1bc
107ca3: e8 42 f0 ff ff call 106cea <rtems_filesystem_evaluate_path>
107ca8: 89 c2 mov %eax,%edx
if (rv != 0)
107caa: 83 c4 20 add $0x20,%esp
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
107cad: b8 1a 00 00 00 mov $0x1a,%eax
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);
if (rv != 0)
107cb2: 85 d2 test %edx,%edx
107cb4: 0f 85 c0 00 00 00 jne 107d7a <rtems_libio_set_private_env+0xf9><== NEVER TAKEN
goto error_0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0);
107cba: 83 ec 0c sub $0xc,%esp
107cbd: 6a 00 push $0x0
107cbf: 8d 45 c0 lea -0x40(%ebp),%eax
107cc2: 50 push %eax
107cc3: 6a 00 push $0x0
107cc5: 6a 01 push $0x1
107cc7: 68 bc f1 11 00 push $0x11f1bc
107ccc: e8 19 f0 ff ff call 106cea <rtems_filesystem_evaluate_path>
if (rv != 0)
107cd1: 83 c4 20 add $0x20,%esp
107cd4: 85 c0 test %eax,%eax
107cd6: 0f 85 8a 00 00 00 jne 107d66 <rtems_libio_set_private_env+0xe5><== 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
107cdc: a1 30 30 12 00 mov 0x123030,%eax
/*
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
107ce1: 3d d0 51 12 00 cmp $0x1251d0,%eax
107ce6: 74 04 je 107cec <rtems_libio_set_private_env+0x6b>
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
107ce8: 39 18 cmp %ebx,(%eax)
107cea: 74 32 je 107d1e <rtems_libio_set_private_env+0x9d>
) {
new_env = malloc(sizeof(rtems_user_env_t));
107cec: 83 ec 0c sub $0xc,%esp
107cef: 6a 48 push $0x48
107cf1: e8 66 f5 ff ff call 10725c <malloc>
107cf6: 89 c6 mov %eax,%esi
if (new_env == NULL)
107cf8: 83 c4 10 add $0x10,%esp
107cfb: 85 c0 test %eax,%eax
107cfd: 74 58 je 107d57 <rtems_libio_set_private_env+0xd6>
#ifdef HAVE_USERENV_REFCNT
new_env->refcnt = 1;
#endif
sc = rtems_task_variable_add(
107cff: 50 push %eax
107d00: 68 44 7c 10 00 push $0x107c44
107d05: 68 30 30 12 00 push $0x123030
107d0a: 6a 00 push $0x0
107d0c: e8 9b 26 00 00 call 10a3ac <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL)
107d11: 83 c4 10 add $0x10,%esp
107d14: 85 c0 test %eax,%eax
107d16: 75 33 jne 107d4b <rtems_libio_set_private_env+0xca>
goto error_3;
rtems_current_user_env = new_env;
107d18: 89 35 30 30 12 00 mov %esi,0x123030
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
107d1e: a1 30 30 12 00 mov 0x123030,%eax
107d23: be d0 51 12 00 mov $0x1251d0,%esi
107d28: b9 12 00 00 00 mov $0x12,%ecx
107d2d: 89 c7 mov %eax,%edi
107d2f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_current_user_env->task_id = task_id;
107d31: 89 18 mov %ebx,(%eax)
* 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;
107d33: 8d 78 18 lea 0x18(%eax),%edi
107d36: 8d 75 d4 lea -0x2c(%ebp),%esi
107d39: b1 05 mov $0x5,%cl
107d3b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_current = current_loc;
107d3d: 8d 78 04 lea 0x4(%eax),%edi
107d40: 8d 75 c0 lea -0x40(%ebp),%esi
107d43: b1 05 mov $0x5,%cl
107d45: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return RTEMS_SUCCESSFUL;
107d47: 31 c0 xor %eax,%eax
107d49: eb 2f jmp 107d7a <rtems_libio_set_private_env+0xf9>
error_3:
free(new_env);
107d4b: 83 ec 0c sub $0xc,%esp
107d4e: 56 push %esi
107d4f: e8 68 f0 ff ff call 106dbc <free>
107d54: 83 c4 10 add $0x10,%esp
error_2:
rtems_filesystem_freenode(¤t_loc);
107d57: 83 ec 0c sub $0xc,%esp
107d5a: 8d 45 c0 lea -0x40(%ebp),%eax
107d5d: 50 push %eax
107d5e: e8 45 f0 ff ff call 106da8 <rtems_filesystem_freenode>
107d63: 83 c4 10 add $0x10,%esp
error_1:
rtems_filesystem_freenode(&root_loc);
107d66: 83 ec 0c sub $0xc,%esp
107d69: 8d 45 d4 lea -0x2c(%ebp),%eax
107d6c: 50 push %eax
107d6d: e8 36 f0 ff ff call 106da8 <rtems_filesystem_freenode>
107d72: 83 c4 10 add $0x10,%esp
error_0:
return RTEMS_NO_MEMORY;
107d75: b8 1a 00 00 00 mov $0x1a,%eax
}
107d7a: 8d 65 f4 lea -0xc(%ebp),%esp
107d7d: 5b pop %ebx
107d7e: 5e pop %esi
107d7f: 5f pop %edi
107d80: c9 leave
107d81: c3 ret
00107d82 <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)
{
107d82: 55 push %ebp
107d83: 89 e5 mov %esp,%ebp
107d85: 56 push %esi
107d86: 53 push %ebx
107d87: 83 ec 20 sub $0x20,%esp
107d8a: 8b 75 08 mov 0x8(%ebp),%esi
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
107d8d: e8 a6 25 00 00 call 10a338 <rtems_task_self>
107d92: 89 c3 mov %eax,%ebx
* 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;
107d94: 31 c0 xor %eax,%eax
/*
* 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 )
107d96: 39 de cmp %ebx,%esi
107d98: 74 3c je 107dd6 <rtems_libio_share_private_env+0x54><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
107d9a: 52 push %edx
task_id,
(void*)&rtems_current_user_env,
(void*)&shared_user_env );
107d9b: 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(
107d9e: 50 push %eax
107d9f: 68 30 30 12 00 push $0x123030
107da4: 56 push %esi
107da5: e8 96 26 00 00 call 10a440 <rtems_task_variable_get>
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
107daa: 83 c4 10 add $0x10,%esp
107dad: 85 c0 test %eax,%eax
107daf: 75 25 jne 107dd6 <rtems_libio_share_private_env+0x54>
* 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) {
107db1: 8b 15 30 30 12 00 mov 0x123030,%edx
107db7: 39 1a cmp %ebx,(%edx)
107db9: 75 12 jne 107dcd <rtems_libio_share_private_env+0x4b>
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
107dbb: 83 ec 0c sub $0xc,%esp
107dbe: 52 push %edx
107dbf: 89 45 e4 mov %eax,-0x1c(%ebp)
107dc2: e8 7d fe ff ff call 107c44 <free_user_env>
107dc7: 83 c4 10 add $0x10,%esp
107dca: 8b 45 e4 mov -0x1c(%ebp),%eax
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
107dcd: 8b 55 f4 mov -0xc(%ebp),%edx
107dd0: 89 15 30 30 12 00 mov %edx,0x123030
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
107dd6: 8d 65 f8 lea -0x8(%ebp),%esp
107dd9: 5b pop %ebx
107dda: 5e pop %esi
107ddb: c9 leave
107ddc: c3 ret
0010d89d <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
10d89d: 55 push %ebp
10d89e: 89 e5 mov %esp,%ebp
10d8a0: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10d8a3: 89 d1 mov %edx,%ecx
10d8a5: 83 e1 06 and $0x6,%ecx
fcntl_flags |= O_RDWR;
10d8a8: b8 02 00 00 00 mov $0x2,%eax
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10d8ad: 83 f9 06 cmp $0x6,%ecx
10d8b0: 74 0f je 10d8c1 <rtems_libio_to_fcntl_flags+0x24>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
10d8b2: 30 c0 xor %al,%al
{
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) {
10d8b4: f6 c2 02 test $0x2,%dl
10d8b7: 75 08 jne 10d8c1 <rtems_libio_to_fcntl_flags+0x24><== ALWAYS TAKEN
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
10d8b9: 31 c0 xor %eax,%eax
10d8bb: f6 c2 04 test $0x4,%dl <== NOT EXECUTED
10d8be: 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 ) {
10d8c1: f6 c2 01 test $0x1,%dl
10d8c4: 74 03 je 10d8c9 <rtems_libio_to_fcntl_flags+0x2c>
fcntl_flags |= O_NONBLOCK;
10d8c6: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
10d8c9: f6 c6 02 test $0x2,%dh
10d8cc: 74 03 je 10d8d1 <rtems_libio_to_fcntl_flags+0x34>
fcntl_flags |= O_APPEND;
10d8ce: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
10d8d1: 80 e6 04 and $0x4,%dh
10d8d4: 74 03 je 10d8d9 <rtems_libio_to_fcntl_flags+0x3c>
fcntl_flags |= O_CREAT;
10d8d6: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
10d8d9: c9 leave
10d8da: c3 ret
0010942c <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
10942c: 55 push %ebp
10942d: 89 e5 mov %esp,%ebp
10942f: 83 ec 1c sub $0x1c,%esp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
109432: 8d 45 f4 lea -0xc(%ebp),%eax
109435: 50 push %eax
109436: ff 75 08 pushl 0x8(%ebp)
109439: ff 35 c0 74 12 00 pushl 0x1274c0
10943f: e8 f0 4e 00 00 call 10e334 <_Protected_heap_Get_block_size>
109444: 83 c4 10 add $0x10,%esp
109447: 84 c0 test %al,%al
109449: 74 11 je 10945c <rtems_malloc_statistics_at_free+0x30><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
10944b: 8b 45 f4 mov -0xc(%ebp),%eax
10944e: 31 d2 xor %edx,%edx
109450: 01 05 28 be 12 00 add %eax,0x12be28
109456: 11 15 2c be 12 00 adc %edx,0x12be2c
}
}
10945c: c9 leave
10945d: c3 ret
0010945e <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
10945e: 55 push %ebp
10945f: 89 e5 mov %esp,%ebp
109461: 83 ec 18 sub $0x18,%esp
109464: 8b 45 08 mov 0x8(%ebp),%eax
uintptr_t actual_size = 0;
109467: 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 )
10946e: 85 c0 test %eax,%eax
109470: 74 43 je 1094b5 <rtems_malloc_statistics_at_malloc+0x57><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
109472: 52 push %edx
109473: 8d 55 f4 lea -0xc(%ebp),%edx
109476: 52 push %edx
109477: 50 push %eax
109478: ff 35 c0 74 12 00 pushl 0x1274c0
10947e: e8 b1 4e 00 00 call 10e334 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
109483: 8b 45 f4 mov -0xc(%ebp),%eax
109486: 31 d2 xor %edx,%edx
109488: 03 05 20 be 12 00 add 0x12be20,%eax
10948e: 13 15 24 be 12 00 adc 0x12be24,%edx
109494: a3 20 be 12 00 mov %eax,0x12be20
109499: 89 15 24 be 12 00 mov %edx,0x12be24
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
10949f: 2b 05 28 be 12 00 sub 0x12be28,%eax
if (current_depth > s->max_depth)
1094a5: 83 c4 10 add $0x10,%esp
1094a8: 3b 05 1c be 12 00 cmp 0x12be1c,%eax
1094ae: 76 05 jbe 1094b5 <rtems_malloc_statistics_at_malloc+0x57>
s->max_depth = current_depth;
1094b0: a3 1c be 12 00 mov %eax,0x12be1c
}
1094b5: c9 leave
1094b6: c3 ret
0011109c <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
11109c: 55 push %ebp
11109d: 89 e5 mov %esp,%ebp
11109f: 57 push %edi
1110a0: 56 push %esi
1110a1: 53 push %ebx
1110a2: 83 ec 0c sub $0xc,%esp
1110a5: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Parameter error checks
*/
if ( !pointer )
return EINVAL;
1110a8: be 16 00 00 00 mov $0x16,%esi
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
1110ad: 85 db test %ebx,%ebx
1110af: 74 55 je 111106 <rtems_memalign+0x6a>
return EINVAL;
*pointer = NULL;
1110b1: 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()) &&
1110b7: 83 3d f4 84 12 00 03 cmpl $0x3,0x1284f4
1110be: 75 09 jne 1110c9 <rtems_memalign+0x2d> <== NEVER TAKEN
!malloc_is_system_state_OK() )
1110c0: e8 97 67 ff ff call 10785c <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()) &&
1110c5: 84 c0 test %al,%al
1110c7: 74 3d je 111106 <rtems_memalign+0x6a> <== NEVER TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
1110c9: e8 cc 67 ff ff call 10789a <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
1110ce: 6a 00 push $0x0
1110d0: ff 75 0c pushl 0xc(%ebp)
1110d3: ff 75 10 pushl 0x10(%ebp)
1110d6: ff 35 80 41 12 00 pushl 0x124180
1110dc: e8 af ad ff ff call 10be90 <_Protected_heap_Allocate_aligned_with_boundary>
1110e1: 89 c7 mov %eax,%edi
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
1110e3: 83 c4 10 add $0x10,%esp
return ENOMEM;
1110e6: be 0c 00 00 00 mov $0xc,%esi
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
1110eb: 85 c0 test %eax,%eax
1110ed: 74 17 je 111106 <rtems_memalign+0x6a>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
1110ef: a1 70 66 12 00 mov 0x126670,%eax
1110f4: 85 c0 test %eax,%eax
1110f6: 74 0a je 111102 <rtems_memalign+0x66>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
1110f8: 83 ec 0c sub $0xc,%esp
1110fb: 53 push %ebx
1110fc: ff 50 04 call *0x4(%eax)
1110ff: 83 c4 10 add $0x10,%esp
*pointer = return_this;
111102: 89 3b mov %edi,(%ebx)
return 0;
111104: 31 f6 xor %esi,%esi
}
111106: 89 f0 mov %esi,%eax
111108: 8d 65 f4 lea -0xc(%ebp),%esp
11110b: 5b pop %ebx
11110c: 5e pop %esi
11110d: 5f pop %edi
11110e: c9 leave
11110f: c3 ret
0010f9bc <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
10f9bc: 55 push %ebp
10f9bd: 89 e5 mov %esp,%ebp
10f9bf: 57 push %edi
10f9c0: 56 push %esi
10f9c1: 53 push %ebx
10f9c2: 83 ec 78 sub $0x78,%esp
int success = 0;
char *dup_path = strdup(path);
10f9c5: ff 75 08 pushl 0x8(%ebp)
10f9c8: e8 e7 37 00 00 call 1131b4 <strdup>
10f9cd: 89 c3 mov %eax,%ebx
if (dup_path != NULL) {
10f9cf: 83 c4 10 add $0x10,%esp
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
10f9d2: 83 c8 ff or $0xffffffff,%eax
rtems_mkdir(const char *path, mode_t mode)
{
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
10f9d5: 85 db test %ebx,%ebx
10f9d7: 0f 84 1e 01 00 00 je 10fafb <rtems_mkdir+0x13f> <== NEVER TAKEN
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
10f9dd: 31 c0 xor %eax,%eax
10f9df: 80 3b 2f cmpb $0x2f,(%ebx)
10f9e2: 0f 94 c0 sete %al
10f9e5: 8d 3c 03 lea (%ebx,%eax,1),%edi
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
10f9e8: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp)
10f9ef: b8 01 00 00 00 mov $0x1,%eax
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
10f9f4: 8a 0f mov (%edi),%cl
last = 1;
10f9f6: ba 01 00 00 00 mov $0x1,%edx
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
10f9fb: 84 c9 test %cl,%cl
10f9fd: 74 0b je 10fa0a <rtems_mkdir+0x4e>
last = 1;
else if (p[0] != '/')
10f9ff: 80 f9 2f cmp $0x2f,%cl
10fa02: 0f 85 c8 00 00 00 jne 10fad0 <rtems_mkdir+0x114>
10fa08: 30 d2 xor %dl,%dl
continue;
*p = '\0';
10fa0a: c6 07 00 movb $0x0,(%edi)
if (!last && p[1] == '\0')
10fa0d: be 01 00 00 00 mov $0x1,%esi
10fa12: 85 d2 test %edx,%edx
10fa14: 75 0b jne 10fa21 <rtems_mkdir+0x65>
10fa16: 31 d2 xor %edx,%edx
10fa18: 80 7f 01 00 cmpb $0x0,0x1(%edi)
10fa1c: 0f 94 c2 sete %dl
10fa1f: 89 d6 mov %edx,%esi
last = 1;
if (first) {
10fa21: 85 c0 test %eax,%eax
10fa23: 74 1a je 10fa3f <rtems_mkdir+0x83>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
10fa25: 83 ec 0c sub $0xc,%esp
10fa28: 6a 00 push $0x0
10fa2a: e8 75 01 00 00 call 10fba4 <umask>
10fa2f: 89 45 94 mov %eax,-0x6c(%ebp)
numask = oumask & ~(S_IWUSR | S_IXUSR);
10fa32: 24 3f and $0x3f,%al
(void)umask(numask);
10fa34: 89 04 24 mov %eax,(%esp)
10fa37: e8 68 01 00 00 call 10fba4 <umask>
10fa3c: 83 c4 10 add $0x10,%esp
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
10fa3f: b8 ff 01 00 00 mov $0x1ff,%eax
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
10fa44: 85 f6 test %esi,%esi
10fa46: 74 11 je 10fa59 <rtems_mkdir+0x9d>
(void)umask(oumask);
10fa48: 83 ec 0c sub $0xc,%esp
10fa4b: ff 75 94 pushl -0x6c(%ebp)
10fa4e: e8 51 01 00 00 call 10fba4 <umask>
10fa53: 83 c4 10 add $0x10,%esp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
10fa56: 8b 45 0c mov 0xc(%ebp),%eax
10fa59: 52 push %edx
10fa5a: 52 push %edx
10fa5b: 50 push %eax
10fa5c: 53 push %ebx
10fa5d: e8 ce 82 ff ff call 107d30 <mkdir>
10fa62: 83 c4 10 add $0x10,%esp
10fa65: 85 c0 test %eax,%eax
10fa67: 79 5e jns 10fac7 <rtems_mkdir+0x10b>
if (errno == EEXIST || errno == EISDIR) {
10fa69: e8 6a 2a 00 00 call 1124d8 <__errno>
10fa6e: 83 38 11 cmpl $0x11,(%eax)
10fa71: 74 0a je 10fa7d <rtems_mkdir+0xc1>
10fa73: e8 60 2a 00 00 call 1124d8 <__errno>
10fa78: 83 38 15 cmpl $0x15,(%eax)
10fa7b: 75 59 jne 10fad6 <rtems_mkdir+0x11a> <== ALWAYS TAKEN
if (stat(path, &sb) < 0) {
10fa7d: 50 push %eax
10fa7e: 50 push %eax
10fa7f: 8d 45 a0 lea -0x60(%ebp),%eax
10fa82: 50 push %eax
10fa83: 53 push %ebx
10fa84: e8 8b 00 00 00 call 10fb14 <stat>
10fa89: 83 c4 10 add $0x10,%esp
10fa8c: 85 c0 test %eax,%eax
10fa8e: 78 46 js 10fad6 <rtems_mkdir+0x11a> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
10fa90: 8b 45 ac mov -0x54(%ebp),%eax
10fa93: 25 00 f0 00 00 and $0xf000,%eax
10fa98: 3d 00 40 00 00 cmp $0x4000,%eax
10fa9d: 74 22 je 10fac1 <rtems_mkdir+0x105>
if (last)
10fa9f: 85 f6 test %esi,%esi
10faa1: 74 0f je 10fab2 <rtems_mkdir+0xf6>
errno = EEXIST;
10faa3: e8 30 2a 00 00 call 1124d8 <__errno>
10faa8: c7 00 11 00 00 00 movl $0x11,(%eax)
else
errno = ENOTDIR;
retval = 0;
10faae: 31 ff xor %edi,%edi
10fab0: eb 38 jmp 10faea <rtems_mkdir+0x12e>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
10fab2: e8 21 2a 00 00 call 1124d8 <__errno>
10fab7: c7 00 14 00 00 00 movl $0x14,(%eax)
retval = 0;
10fabd: 31 ff xor %edi,%edi
10fabf: eb 1b jmp 10fadc <rtems_mkdir+0x120>
break;
}
if (last)
10fac1: 85 f6 test %esi,%esi
10fac3: 75 3e jne 10fb03 <rtems_mkdir+0x147>
10fac5: eb 04 jmp 10facb <rtems_mkdir+0x10f>
} else {
retval = 0;
break;
}
}
if (!last)
10fac7: 85 f6 test %esi,%esi
10fac9: 75 3f jne 10fb0a <rtems_mkdir+0x14e>
*p = '/';
10facb: c6 07 2f movb $0x2f,(%edi)
10face: 31 c0 xor %eax,%eax
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
10fad0: 47 inc %edi
10fad1: e9 1e ff ff ff jmp 10f9f4 <rtems_mkdir+0x38>
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
10fad6: 31 ff xor %edi,%edi
}
}
if (!last)
*p = '/';
}
if (!first && !last)
10fad8: 85 f6 test %esi,%esi
10fada: 75 0e jne 10faea <rtems_mkdir+0x12e> <== ALWAYS TAKEN
(void)umask(oumask);
10fadc: 83 ec 0c sub $0xc,%esp
10fadf: ff 75 94 pushl -0x6c(%ebp)
10fae2: e8 bd 00 00 00 call 10fba4 <umask>
10fae7: 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);
10faea: 83 ec 0c sub $0xc,%esp
10faed: 53 push %ebx
10faee: e8 e1 7c ff ff call 1077d4 <free>
}
return success != 0 ? 0 : -1;
10faf3: 83 c4 10 add $0x10,%esp
10faf6: 83 ff 01 cmp $0x1,%edi
10faf9: 19 c0 sbb %eax,%eax
}
10fafb: 8d 65 f4 lea -0xc(%ebp),%esp
10fafe: 5b pop %ebx
10faff: 5e pop %esi
10fb00: 5f pop %edi
10fb01: c9 leave
10fb02: c3 ret
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
retval = 2;
10fb03: bf 02 00 00 00 mov $0x2,%edi
10fb08: eb e0 jmp 10faea <rtems_mkdir+0x12e>
} else {
retval = 0;
break;
}
}
if (!last)
10fb0a: bf 01 00 00 00 mov $0x1,%edi
10fb0f: eb d9 jmp 10faea <rtems_mkdir+0x12e>
001099c0 <rtems_object_get_api_class_name>:
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
1099c0: 55 push %ebp
1099c1: 89 e5 mov %esp,%ebp
1099c3: 83 ec 08 sub $0x8,%esp
1099c6: 8b 55 08 mov 0x8(%ebp),%edx
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
1099c9: 83 fa 01 cmp $0x1,%edx
1099cc: 74 16 je 1099e4 <rtems_object_get_api_class_name+0x24><== NEVER TAKEN
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
1099ce: 83 fa 02 cmp $0x2,%edx
1099d1: 74 18 je 1099eb <rtems_object_get_api_class_name+0x2b><== NEVER TAKEN
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
1099d3: b8 0f 01 12 00 mov $0x12010f,%eax
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
1099d8: 83 fa 03 cmp $0x3,%edx
1099db: 75 2e jne 109a0b <rtems_object_get_api_class_name+0x4b>
api_assoc = rtems_object_api_posix_assoc;
1099dd: b8 08 41 12 00 mov $0x124108,%eax
1099e2: eb 0c jmp 1099f0 <rtems_object_get_api_class_name+0x30>
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
1099e4: b8 78 40 12 00 mov $0x124078,%eax
1099e9: eb 05 jmp 1099f0 <rtems_object_get_api_class_name+0x30>
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
1099eb: b8 90 40 12 00 mov $0x124090,%eax
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
1099f0: 52 push %edx
1099f1: 52 push %edx
1099f2: ff 75 0c pushl 0xc(%ebp)
1099f5: 50 push %eax
1099f6: e8 25 43 00 00 call 10dd20 <rtems_assoc_ptr_by_local>
1099fb: 89 c2 mov %eax,%edx
if ( class_assoc )
1099fd: 83 c4 10 add $0x10,%esp
return class_assoc->name;
return "BAD CLASS";
109a00: b8 17 01 12 00 mov $0x120117,%eax
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
109a05: 85 d2 test %edx,%edx
109a07: 74 02 je 109a0b <rtems_object_get_api_class_name+0x4b>
return class_assoc->name;
109a09: 8b 02 mov (%edx),%eax
return "BAD CLASS";
}
109a0b: c9 leave
109a0c: c3 ret
00113f00 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
113f00: 55 push %ebp
113f01: 89 e5 mov %esp,%ebp
113f03: 57 push %edi
113f04: 56 push %esi
113f05: 53 push %ebx
113f06: 83 ec 1c sub $0x1c,%esp
113f09: 8b 75 0c mov 0xc(%ebp),%esi
113f0c: 8b 55 10 mov 0x10(%ebp),%edx
113f0f: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
113f12: b8 03 00 00 00 mov $0x3,%eax
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
113f17: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
113f1b: 0f 84 ce 00 00 00 je 113fef <rtems_partition_create+0xef>
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
113f21: b0 09 mov $0x9,%al
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
113f23: 85 f6 test %esi,%esi
113f25: 0f 84 c4 00 00 00 je 113fef <rtems_partition_create+0xef>
return RTEMS_INVALID_ADDRESS;
if ( !id )
113f2b: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp)
113f2f: 0f 84 ba 00 00 00 je 113fef <rtems_partition_create+0xef><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
113f35: 85 ff test %edi,%edi
113f37: 0f 84 ad 00 00 00 je 113fea <rtems_partition_create+0xea>
113f3d: 85 d2 test %edx,%edx
113f3f: 0f 84 a5 00 00 00 je 113fea <rtems_partition_create+0xea>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
113f45: b0 08 mov $0x8,%al
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
113f47: 39 fa cmp %edi,%edx
113f49: 0f 82 a0 00 00 00 jb 113fef <rtems_partition_create+0xef>
113f4f: f7 c7 03 00 00 00 test $0x3,%edi
113f55: 0f 85 94 00 00 00 jne 113fef <rtems_partition_create+0xef>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
113f5b: b0 09 mov $0x9,%al
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
113f5d: f7 c6 03 00 00 00 test $0x3,%esi
113f63: 0f 85 86 00 00 00 jne 113fef <rtems_partition_create+0xef>
113f69: a1 b8 d6 13 00 mov 0x13d6b8,%eax
113f6e: 40 inc %eax
113f6f: a3 b8 d6 13 00 mov %eax,0x13d6b8
* 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 );
113f74: 83 ec 0c sub $0xc,%esp
113f77: 68 4c d5 13 00 push $0x13d54c
113f7c: 89 55 e4 mov %edx,-0x1c(%ebp)
113f7f: e8 20 3e 00 00 call 117da4 <_Objects_Allocate>
113f84: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
113f86: 83 c4 10 add $0x10,%esp
113f89: 85 c0 test %eax,%eax
113f8b: 8b 55 e4 mov -0x1c(%ebp),%edx
113f8e: 75 0c jne 113f9c <rtems_partition_create+0x9c>
_Thread_Enable_dispatch();
113f90: e8 29 4d 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
113f95: b8 05 00 00 00 mov $0x5,%eax
113f9a: eb 53 jmp 113fef <rtems_partition_create+0xef>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
113f9c: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
113f9f: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
113fa2: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
113fa5: 8b 45 18 mov 0x18(%ebp),%eax
113fa8: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
113fab: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
113fb2: 57 push %edi
113fb3: 89 d0 mov %edx,%eax
113fb5: 31 d2 xor %edx,%edx
113fb7: f7 f7 div %edi
113fb9: 50 push %eax
113fba: 56 push %esi
113fbb: 8d 43 24 lea 0x24(%ebx),%eax
113fbe: 50 push %eax
113fbf: e8 84 2a 00 00 call 116a48 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
113fc4: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
113fc7: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
113fca: 8b 15 68 d5 13 00 mov 0x13d568,%edx
113fd0: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
113fd3: 8b 55 08 mov 0x8(%ebp),%edx
113fd6: 89 53 0c mov %edx,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
113fd9: 8b 55 1c mov 0x1c(%ebp),%edx
113fdc: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
113fde: e8 db 4c 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
113fe3: 83 c4 10 add $0x10,%esp
113fe6: 31 c0 xor %eax,%eax
113fe8: eb 05 jmp 113fef <rtems_partition_create+0xef>
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;
113fea: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113fef: 8d 65 f4 lea -0xc(%ebp),%esp
113ff2: 5b pop %ebx
113ff3: 5e pop %esi
113ff4: 5f pop %edi
113ff5: c9 leave
113ff6: c3 ret
0010a601 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10a601: 55 push %ebp
10a602: 89 e5 mov %esp,%ebp
10a604: 57 push %edi
10a605: 56 push %esi
10a606: 53 push %ebx
10a607: 83 ec 30 sub $0x30,%esp
10a60a: 8b 75 08 mov 0x8(%ebp),%esi
10a60d: 8b 5d 0c mov 0xc(%ebp),%ebx
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 );
10a610: 8d 45 e4 lea -0x1c(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
10a613: 50 push %eax
10a614: 56 push %esi
10a615: 68 fc 72 12 00 push $0x1272fc
10a61a: e8 41 1d 00 00 call 10c360 <_Objects_Get>
10a61f: 89 c7 mov %eax,%edi
switch ( location ) {
10a621: 83 c4 10 add $0x10,%esp
10a624: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10a628: 0f 85 3b 01 00 00 jne 10a769 <rtems_rate_monotonic_period+0x168>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10a62e: a1 0c 79 12 00 mov 0x12790c,%eax
10a633: 39 47 40 cmp %eax,0x40(%edi)
10a636: 74 0f je 10a647 <rtems_rate_monotonic_period+0x46>
_Thread_Enable_dispatch();
10a638: e8 d5 27 00 00 call 10ce12 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
10a63d: be 17 00 00 00 mov $0x17,%esi
10a642: e9 27 01 00 00 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
}
if ( length == RTEMS_PERIOD_STATUS ) {
10a647: 85 db test %ebx,%ebx
10a649: 75 1b jne 10a666 <rtems_rate_monotonic_period+0x65>
switch ( the_period->state ) {
10a64b: 8b 47 38 mov 0x38(%edi),%eax
10a64e: 31 f6 xor %esi,%esi
10a650: 83 f8 04 cmp $0x4,%eax
10a653: 77 07 ja 10a65c <rtems_rate_monotonic_period+0x5b><== NEVER TAKEN
10a655: 8b 34 85 e0 10 12 00 mov 0x1210e0(,%eax,4),%esi
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10a65c: e8 b1 27 00 00 call 10ce12 <_Thread_Enable_dispatch>
return( return_value );
10a661: e9 08 01 00 00 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
}
_ISR_Disable( level );
10a666: 9c pushf
10a667: fa cli
10a668: 8f 45 d4 popl -0x2c(%ebp)
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
10a66b: 8b 47 38 mov 0x38(%edi),%eax
10a66e: 85 c0 test %eax,%eax
10a670: 75 4c jne 10a6be <rtems_rate_monotonic_period+0xbd>
_ISR_Enable( level );
10a672: ff 75 d4 pushl -0x2c(%ebp)
10a675: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10a676: 83 ec 0c sub $0xc,%esp
10a679: 57 push %edi
10a67a: e8 3f fe ff ff call 10a4be <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10a67f: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10a686: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10a68d: c7 47 2c 78 a9 10 00 movl $0x10a978,0x2c(%edi)
the_watchdog->id = id;
10a694: 89 77 30 mov %esi,0x30(%edi)
the_watchdog->user_data = user_data;
10a697: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10a69e: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a6a1: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a6a4: 58 pop %eax
10a6a5: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, length );
10a6a6: 83 c7 10 add $0x10,%edi
10a6a9: 57 push %edi
10a6aa: 68 a8 74 12 00 push $0x1274a8
10a6af: e8 34 34 00 00 call 10dae8 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10a6b4: e8 59 27 00 00 call 10ce12 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10a6b9: 83 c4 10 add $0x10,%esp
10a6bc: eb 65 jmp 10a723 <rtems_rate_monotonic_period+0x122>
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
10a6be: 83 f8 02 cmp $0x2,%eax
10a6c1: 75 64 jne 10a727 <rtems_rate_monotonic_period+0x126>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10a6c3: 83 ec 0c sub $0xc,%esp
10a6c6: 57 push %edi
10a6c7: e8 5a fe ff ff call 10a526 <_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;
10a6cc: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi)
the_period->next_length = length;
10a6d3: 89 5f 3c mov %ebx,0x3c(%edi)
_ISR_Enable( level );
10a6d6: ff 75 d4 pushl -0x2c(%ebp)
10a6d9: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10a6da: a1 0c 79 12 00 mov 0x12790c,%eax
10a6df: 8b 57 08 mov 0x8(%edi),%edx
10a6e2: 89 50 20 mov %edx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10a6e5: 5b pop %ebx
10a6e6: 5e pop %esi
10a6e7: 68 00 40 00 00 push $0x4000
10a6ec: 50 push %eax
10a6ed: e8 92 2e 00 00 call 10d584 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10a6f2: 9c pushf
10a6f3: fa cli
10a6f4: 5a pop %edx
local_state = the_period->state;
10a6f5: 8b 47 38 mov 0x38(%edi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
10a6f8: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
_ISR_Enable( level );
10a6ff: 52 push %edx
10a700: 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 )
10a701: 83 c4 10 add $0x10,%esp
10a704: 83 f8 03 cmp $0x3,%eax
10a707: 75 15 jne 10a71e <rtems_rate_monotonic_period+0x11d>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10a709: 51 push %ecx
10a70a: 51 push %ecx
10a70b: 68 00 40 00 00 push $0x4000
10a710: ff 35 0c 79 12 00 pushl 0x12790c
10a716: e8 e1 23 00 00 call 10cafc <_Thread_Clear_state>
10a71b: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
10a71e: e8 ef 26 00 00 call 10ce12 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10a723: 31 f6 xor %esi,%esi
10a725: eb 47 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10a727: be 04 00 00 00 mov $0x4,%esi
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
10a72c: 83 f8 04 cmp $0x4,%eax
10a72f: 75 3d jne 10a76e <rtems_rate_monotonic_period+0x16d><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10a731: 83 ec 0c sub $0xc,%esp
10a734: 57 push %edi
10a735: e8 ec fd ff ff call 10a526 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10a73a: ff 75 d4 pushl -0x2c(%ebp)
10a73d: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10a73e: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
the_period->next_length = length;
10a745: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a748: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a74b: 58 pop %eax
10a74c: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, length );
10a74d: 83 c7 10 add $0x10,%edi
10a750: 57 push %edi
10a751: 68 a8 74 12 00 push $0x1274a8
10a756: e8 8d 33 00 00 call 10dae8 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10a75b: e8 b2 26 00 00 call 10ce12 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
10a760: 83 c4 10 add $0x10,%esp
10a763: 66 be 06 00 mov $0x6,%si
10a767: eb 05 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10a769: be 04 00 00 00 mov $0x4,%esi
}
10a76e: 89 f0 mov %esi,%eax
10a770: 8d 65 f4 lea -0xc(%ebp),%esp
10a773: 5b pop %ebx
10a774: 5e pop %esi
10a775: 5f pop %edi
10a776: c9 leave
10a777: c3 ret
0010a778 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10a778: 55 push %ebp
10a779: 89 e5 mov %esp,%ebp
10a77b: 57 push %edi
10a77c: 56 push %esi
10a77d: 53 push %ebx
10a77e: 83 ec 7c sub $0x7c,%esp
10a781: 8b 5d 08 mov 0x8(%ebp),%ebx
10a784: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
10a787: 85 ff test %edi,%edi
10a789: 0f 84 2b 01 00 00 je 10a8ba <rtems_rate_monotonic_report_statistics_with_plugin+0x142><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10a78f: 52 push %edx
10a790: 52 push %edx
10a791: 68 f4 10 12 00 push $0x1210f4
10a796: 53 push %ebx
10a797: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10a799: 5e pop %esi
10a79a: 58 pop %eax
10a79b: 68 12 11 12 00 push $0x121112
10a7a0: 53 push %ebx
10a7a1: ff d7 call *%edi
(*print)( context, "--- Wall times are in seconds ---\n" );
10a7a3: 5a pop %edx
10a7a4: 59 pop %ecx
10a7a5: 68 34 11 12 00 push $0x121134
10a7aa: 53 push %ebx
10a7ab: ff d7 call *%edi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10a7ad: 5e pop %esi
10a7ae: 58 pop %eax
10a7af: 68 57 11 12 00 push $0x121157
10a7b4: 53 push %ebx
10a7b5: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10a7b7: 5a pop %edx
10a7b8: 59 pop %ecx
10a7b9: 68 a2 11 12 00 push $0x1211a2
10a7be: 53 push %ebx
10a7bf: ff d7 call *%edi
/*
* 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 ;
10a7c1: 8b 35 04 73 12 00 mov 0x127304,%esi
10a7c7: 83 c4 10 add $0x10,%esp
10a7ca: e9 df 00 00 00 jmp 10a8ae <rtems_rate_monotonic_report_statistics_with_plugin+0x136>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10a7cf: 50 push %eax
10a7d0: 50 push %eax
10a7d1: 8d 45 88 lea -0x78(%ebp),%eax
10a7d4: 50 push %eax
10a7d5: 56 push %esi
10a7d6: e8 85 59 00 00 call 110160 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10a7db: 83 c4 10 add $0x10,%esp
10a7de: 85 c0 test %eax,%eax
10a7e0: 0f 85 c7 00 00 00 jne 10a8ad <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
#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 );
10a7e6: 51 push %ecx
10a7e7: 51 push %ecx
10a7e8: 8d 55 c0 lea -0x40(%ebp),%edx
10a7eb: 52 push %edx
10a7ec: 56 push %esi
10a7ed: e8 12 5a 00 00 call 110204 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10a7f2: 83 c4 0c add $0xc,%esp
10a7f5: 8d 45 e3 lea -0x1d(%ebp),%eax
10a7f8: 50 push %eax
10a7f9: 6a 05 push $0x5
10a7fb: ff 75 c0 pushl -0x40(%ebp)
10a7fe: e8 01 02 00 00 call 10aa04 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10a803: 58 pop %eax
10a804: 5a pop %edx
10a805: ff 75 8c pushl -0x74(%ebp)
10a808: ff 75 88 pushl -0x78(%ebp)
10a80b: 8d 55 e3 lea -0x1d(%ebp),%edx
10a80e: 52 push %edx
10a80f: 56 push %esi
10a810: 68 ee 11 12 00 push $0x1211ee
10a815: 53 push %ebx
10a816: ff d7 call *%edi
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10a818: 8b 45 88 mov -0x78(%ebp),%eax
10a81b: 83 c4 20 add $0x20,%esp
10a81e: 85 c0 test %eax,%eax
10a820: 75 0f jne 10a831 <rtems_rate_monotonic_report_statistics_with_plugin+0xb9>
(*print)( context, "\n" );
10a822: 51 push %ecx
10a823: 51 push %ecx
10a824: 68 58 14 12 00 push $0x121458
10a829: 53 push %ebx
10a82a: ff d7 call *%edi
continue;
10a82c: 83 c4 10 add $0x10,%esp
10a82f: eb 7c jmp 10a8ad <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
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 );
10a831: 52 push %edx
10a832: 8d 55 d8 lea -0x28(%ebp),%edx
10a835: 52 push %edx
10a836: 50 push %eax
10a837: 8d 45 a0 lea -0x60(%ebp),%eax
10a83a: 50 push %eax
10a83b: e8 7c 2f 00 00 call 10d7bc <_Timespec_Divide_by_integer>
(*print)( context,
10a840: 8b 45 dc mov -0x24(%ebp),%eax
10a843: b9 e8 03 00 00 mov $0x3e8,%ecx
10a848: 99 cltd
10a849: f7 f9 idiv %ecx
10a84b: 50 push %eax
10a84c: ff 75 d8 pushl -0x28(%ebp)
10a84f: 8b 45 9c mov -0x64(%ebp),%eax
10a852: 99 cltd
10a853: f7 f9 idiv %ecx
10a855: 50 push %eax
10a856: ff 75 98 pushl -0x68(%ebp)
10a859: 8b 45 94 mov -0x6c(%ebp),%eax
10a85c: 99 cltd
10a85d: f7 f9 idiv %ecx
10a85f: 50 push %eax
10a860: ff 75 90 pushl -0x70(%ebp)
10a863: 68 05 12 12 00 push $0x121205
10a868: 53 push %ebx
10a869: 89 4d 84 mov %ecx,-0x7c(%ebp)
10a86c: ff d7 call *%edi
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);
10a86e: 83 c4 2c add $0x2c,%esp
10a871: 8d 55 d8 lea -0x28(%ebp),%edx
10a874: 52 push %edx
10a875: ff 75 88 pushl -0x78(%ebp)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
10a878: 8d 45 b8 lea -0x48(%ebp),%eax
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
10a87b: 50 push %eax
10a87c: e8 3b 2f 00 00 call 10d7bc <_Timespec_Divide_by_integer>
(*print)( context,
10a881: 8b 45 dc mov -0x24(%ebp),%eax
10a884: 8b 4d 84 mov -0x7c(%ebp),%ecx
10a887: 99 cltd
10a888: f7 f9 idiv %ecx
10a88a: 50 push %eax
10a88b: ff 75 d8 pushl -0x28(%ebp)
10a88e: 8b 45 b4 mov -0x4c(%ebp),%eax
10a891: 99 cltd
10a892: f7 f9 idiv %ecx
10a894: 50 push %eax
10a895: ff 75 b0 pushl -0x50(%ebp)
10a898: 8b 45 ac mov -0x54(%ebp),%eax
10a89b: 99 cltd
10a89c: f7 f9 idiv %ecx
10a89e: 50 push %eax
10a89f: ff 75 a8 pushl -0x58(%ebp)
10a8a2: 68 24 12 12 00 push $0x121224
10a8a7: 53 push %ebx
10a8a8: ff d7 call *%edi
10a8aa: 83 c4 30 add $0x30,%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++ ) {
10a8ad: 46 inc %esi
/*
* 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 ;
10a8ae: 3b 35 08 73 12 00 cmp 0x127308,%esi
10a8b4: 0f 86 15 ff ff ff jbe 10a7cf <rtems_rate_monotonic_report_statistics_with_plugin+0x57>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10a8ba: 8d 65 f4 lea -0xc(%ebp),%esp
10a8bd: 5b pop %ebx
10a8be: 5e pop %esi
10a8bf: 5f pop %edi
10a8c0: c9 leave
10a8c1: c3 ret
00115260 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
115260: 55 push %ebp
115261: 89 e5 mov %esp,%ebp
115263: 53 push %ebx
115264: 83 ec 14 sub $0x14,%esp
115267: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
11526a: b8 0a 00 00 00 mov $0xa,%eax
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
11526f: 85 db test %ebx,%ebx
115271: 74 6d je 1152e0 <rtems_signal_send+0x80>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
115273: 50 push %eax
115274: 50 push %eax
115275: 8d 45 f4 lea -0xc(%ebp),%eax
115278: 50 push %eax
115279: ff 75 08 pushl 0x8(%ebp)
11527c: e8 5f 3a 00 00 call 118ce0 <_Thread_Get>
switch ( location ) {
115281: 83 c4 10 add $0x10,%esp
115284: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115288: 75 51 jne 1152db <rtems_signal_send+0x7b>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
11528a: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
115290: 83 7a 0c 00 cmpl $0x0,0xc(%edx)
115294: 74 39 je 1152cf <rtems_signal_send+0x6f>
if ( asr->is_enabled ) {
115296: 80 7a 08 00 cmpb $0x0,0x8(%edx)
11529a: 74 22 je 1152be <rtems_signal_send+0x5e>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
11529c: 9c pushf
11529d: fa cli
11529e: 59 pop %ecx
*signal_set |= signals;
11529f: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
1152a2: 51 push %ecx
1152a3: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1152a4: 83 3d e0 db 13 00 00 cmpl $0x0,0x13dbe0
1152ab: 74 19 je 1152c6 <rtems_signal_send+0x66>
1152ad: 3b 05 e4 db 13 00 cmp 0x13dbe4,%eax
1152b3: 75 11 jne 1152c6 <rtems_signal_send+0x66><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
1152b5: c6 05 f0 db 13 00 01 movb $0x1,0x13dbf0
1152bc: eb 08 jmp 1152c6 <rtems_signal_send+0x66>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
1152be: 9c pushf
1152bf: fa cli
1152c0: 58 pop %eax
*signal_set |= signals;
1152c1: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
1152c4: 50 push %eax
1152c5: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
1152c6: e8 f3 39 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1152cb: 31 c0 xor %eax,%eax
1152cd: eb 11 jmp 1152e0 <rtems_signal_send+0x80>
}
_Thread_Enable_dispatch();
1152cf: e8 ea 39 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
1152d4: b8 0b 00 00 00 mov $0xb,%eax
1152d9: eb 05 jmp 1152e0 <rtems_signal_send+0x80>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1152db: b8 04 00 00 00 mov $0x4,%eax
}
1152e0: 8b 5d fc mov -0x4(%ebp),%ebx
1152e3: c9 leave
1152e4: c3 ret
00106914 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
106914: 55 push %ebp
106915: 89 e5 mov %esp,%ebp
106917: 57 push %edi
106918: 56 push %esi
106919: 8b 45 08 mov 0x8(%ebp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
10691c: 83 78 08 00 cmpl $0x0,0x8(%eax)
106920: 74 15 je 106937 <rtems_stack_checker_begin_extension+0x23><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
106922: 8b b8 bc 00 00 00 mov 0xbc(%eax),%edi
106928: 83 c7 08 add $0x8,%edi
10692b: be b0 71 12 00 mov $0x1271b0,%esi
106930: b9 04 00 00 00 mov $0x4,%ecx
106935: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
106937: 5e pop %esi
106938: 5f pop %edi
106939: c9 leave
10693a: c3 ret
001068ed <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
1068ed: 55 push %ebp
1068ee: 89 e5 mov %esp,%ebp
1068f0: 57 push %edi
1068f1: 8b 7d 0c mov 0xc(%ebp),%edi
Stack_check_Initialize();
1068f4: e8 8a ff ff ff call 106883 <Stack_check_Initialize>
if (the_thread)
1068f9: 85 ff test %edi,%edi
1068fb: 74 12 je 10690f <rtems_stack_checker_create_extension+0x22><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
1068fd: 8b 8f b8 00 00 00 mov 0xb8(%edi),%ecx
106903: 8b 97 bc 00 00 00 mov 0xbc(%edi),%edx
106909: b0 a5 mov $0xa5,%al
10690b: 89 d7 mov %edx,%edi
10690d: f3 aa rep stos %al,%es:(%edi)
return true;
}
10690f: b0 01 mov $0x1,%al
106911: 5f pop %edi
106912: c9 leave
106913: c3 ret
00106a48 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
106a48: 55 push %ebp
106a49: 89 e5 mov %esp,%ebp
106a4b: 53 push %ebx
106a4c: 83 ec 04 sub $0x4,%esp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
106a4f: a1 9c 78 12 00 mov 0x12789c,%eax
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
106a54: 8b 90 bc 00 00 00 mov 0xbc(%eax),%edx
return false;
106a5a: 31 db xor %ebx,%ebx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
106a5c: 39 d5 cmp %edx,%ebp
106a5e: 72 0e jb 106a6e <rtems_stack_checker_is_blown+0x26><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
106a60: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax
106a66: 8d 04 02 lea (%edx,%eax,1),%eax
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
106a69: 39 c5 cmp %eax,%ebp
106a6b: 0f 96 c3 setbe %bl
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
106a6e: b0 01 mov $0x1,%al
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
106a70: 83 3d 98 6e 12 00 00 cmpl $0x0,0x126e98
106a77: 74 19 je 106a92 <rtems_stack_checker_is_blown+0x4a><== NEVER TAKEN
pattern_ok = (!memcmp(
106a79: 83 c2 08 add $0x8,%edx
106a7c: 51 push %ecx
106a7d: 6a 10 push $0x10
106a7f: 68 b0 71 12 00 push $0x1271b0
106a84: 52 push %edx
106a85: e8 66 d0 00 00 call 113af0 <memcmp>
106a8a: 83 c4 10 add $0x10,%esp
106a8d: 85 c0 test %eax,%eax
106a8f: 0f 94 c0 sete %al
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
106a92: 84 db test %bl,%bl
106a94: 74 04 je 106a9a <rtems_stack_checker_is_blown+0x52><== NEVER TAKEN
106a96: 84 c0 test %al,%al
106a98: 75 11 jne 106aab <rtems_stack_checker_is_blown+0x63><== ALWAYS TAKEN
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
106a9a: 52 push %edx <== NOT EXECUTED
106a9b: 52 push %edx <== NOT EXECUTED
106a9c: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
106a9f: 50 push %eax <== NOT EXECUTED
106aa0: ff 35 9c 78 12 00 pushl 0x12789c <== NOT EXECUTED
106aa6: e8 90 fe ff ff call 10693b <Stack_check_report_blown_task><== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
106aab: 31 c0 xor %eax,%eax
106aad: 8b 5d fc mov -0x4(%ebp),%ebx
106ab0: c9 leave
106ab1: c3 ret
00106b17 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
106b17: 55 push %ebp <== NOT EXECUTED
106b18: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106b1a: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
106b1d: 68 a0 82 10 00 push $0x1082a0 <== NOT EXECUTED
106b22: 6a 00 push $0x0 <== NOT EXECUTED
106b24: e8 89 ff ff ff call 106ab2 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
106b29: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
106b2c: c9 leave <== NOT EXECUTED
106b2d: c3 ret <== NOT EXECUTED
00106ab2 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
106ab2: 55 push %ebp <== NOT EXECUTED
106ab3: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106ab5: 56 push %esi <== NOT EXECUTED
106ab6: 53 push %ebx <== NOT EXECUTED
106ab7: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
106aba: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if ( !print )
106abd: 85 db test %ebx,%ebx <== NOT EXECUTED
106abf: 74 4f je 106b10 <rtems_stack_checker_report_usage_with_plugin+0x5e><== NOT EXECUTED
return;
print_context = context;
106ac1: 89 35 90 6e 12 00 mov %esi,0x126e90 <== NOT EXECUTED
print_handler = print;
106ac7: 89 1d 94 6e 12 00 mov %ebx,0x126e94 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
106acd: 51 push %ecx <== NOT EXECUTED
106ace: 51 push %ecx <== NOT EXECUTED
106acf: 68 47 11 12 00 push $0x121147 <== NOT EXECUTED
106ad4: 56 push %esi <== NOT EXECUTED
106ad5: ff d3 call *%ebx <== NOT EXECUTED
(*print)( context,
106ad7: 58 pop %eax <== NOT EXECUTED
106ad8: 5a pop %edx <== NOT EXECUTED
106ad9: 68 5e 11 12 00 push $0x12115e <== NOT EXECUTED
106ade: 56 push %esi <== NOT EXECUTED
106adf: 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 );
106ae1: c7 04 24 68 67 10 00 movl $0x106768,(%esp) <== NOT EXECUTED
106ae8: e8 5f 62 00 00 call 10cd4c <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);
106aed: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
106af4: e8 6f fc ff ff call 106768 <Stack_check_Dump_threads_usage><== NOT EXECUTED
#endif
print_context = NULL;
106af9: c7 05 90 6e 12 00 00 movl $0x0,0x126e90 <== NOT EXECUTED
106b00: 00 00 00
print_handler = NULL;
106b03: c7 05 94 6e 12 00 00 movl $0x0,0x126e94 <== NOT EXECUTED
106b0a: 00 00 00
106b0d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
106b10: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
106b13: 5b pop %ebx <== NOT EXECUTED
106b14: 5e pop %esi <== NOT EXECUTED
106b15: c9 leave <== NOT EXECUTED
106b16: c3 ret <== NOT EXECUTED
001069ef <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
1069ef: 55 push %ebp
1069f0: 89 e5 mov %esp,%ebp
1069f2: 53 push %ebx
1069f3: 83 ec 14 sub $0x14,%esp
1069f6: 8b 5d 08 mov 0x8(%ebp),%ebx
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);
1069f9: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax
1069ff: 8d 48 08 lea 0x8(%eax),%ecx
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
106a02: 31 d2 xor %edx,%edx
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
106a04: 39 c5 cmp %eax,%ebp
106a06: 72 0b jb 106a13 <rtems_stack_checker_switch_extension+0x24><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
106a08: 03 83 b8 00 00 00 add 0xb8(%ebx),%eax
}
/*
* rtems_stack_checker_switch_extension
*/
void rtems_stack_checker_switch_extension(
106a0e: 39 c5 cmp %eax,%ebp
106a10: 0f 96 c2 setbe %dl
/*
* 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,
106a13: 50 push %eax
106a14: 6a 10 push $0x10
106a16: 68 b0 71 12 00 push $0x1271b0
106a1b: 51 push %ecx
106a1c: 88 55 f4 mov %dl,-0xc(%ebp)
106a1f: e8 cc d0 00 00 call 113af0 <memcmp>
106a24: 83 c4 10 add $0x10,%esp
106a27: 85 c0 test %eax,%eax
106a29: 0f 94 c0 sete %al
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
106a2c: 8a 55 f4 mov -0xc(%ebp),%dl
106a2f: 84 d2 test %dl,%dl
106a31: 74 04 je 106a37 <rtems_stack_checker_switch_extension+0x48><== NEVER TAKEN
106a33: 84 c0 test %al,%al
106a35: 75 0c jne 106a43 <rtems_stack_checker_switch_extension+0x54><== ALWAYS TAKEN
Stack_check_report_blown_task( running, pattern_ok );
106a37: 52 push %edx <== NOT EXECUTED
106a38: 52 push %edx <== NOT EXECUTED
106a39: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
106a3c: 50 push %eax <== NOT EXECUTED
106a3d: 53 push %ebx <== NOT EXECUTED
106a3e: e8 f8 fe ff ff call 10693b <Stack_check_report_blown_task><== NOT EXECUTED
}
}
106a43: 8b 5d fc mov -0x4(%ebp),%ebx
106a46: c9 leave
106a47: c3 ret
0010e4a0 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
10e4a0: 55 push %ebp
10e4a1: 89 e5 mov %esp,%ebp
10e4a3: 57 push %edi
10e4a4: 56 push %esi
10e4a5: 53 push %ebx
10e4a6: 83 ec 2c sub $0x2c,%esp
10e4a9: 8b 75 08 mov 0x8(%ebp),%esi
10e4ac: 8b 5d 0c mov 0xc(%ebp),%ebx
10e4af: 8b 7d 10 mov 0x10(%ebp),%edi
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e4b2: ba 09 00 00 00 mov $0x9,%edx
)
{
double result;
char *end;
if ( !n )
10e4b7: 85 db test %ebx,%ebx
10e4b9: 0f 84 95 00 00 00 je 10e554 <rtems_string_to_double+0xb4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e4bf: e8 80 31 00 00 call 111644 <__errno>
10e4c4: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e4ca: c7 03 00 00 00 00 movl $0x0,(%ebx)
10e4d0: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtod( s, &end );
10e4d7: 50 push %eax
10e4d8: 50 push %eax
10e4d9: 8d 45 e4 lea -0x1c(%ebp),%eax
10e4dc: 50 push %eax
10e4dd: 56 push %esi
10e4de: e8 05 5c 00 00 call 1140e8 <strtod>
if ( endptr )
10e4e3: 83 c4 10 add $0x10,%esp
10e4e6: 85 ff test %edi,%edi
10e4e8: 74 05 je 10e4ef <rtems_string_to_double+0x4f>
*endptr = end;
10e4ea: 8b 45 e4 mov -0x1c(%ebp),%eax
10e4ed: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e4ef: ba 0b 00 00 00 mov $0xb,%edx
result = strtod( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
10e4f4: 39 75 e4 cmp %esi,-0x1c(%ebp)
10e4f7: 74 4d je 10e546 <rtems_string_to_double+0xa6>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e4f9: dd 5d c8 fstpl -0x38(%ebp)
10e4fc: e8 43 31 00 00 call 111644 <__errno>
10e501: 83 38 22 cmpl $0x22,(%eax)
10e504: dd 45 c8 fldl -0x38(%ebp)
10e507: 75 37 jne 10e540 <rtems_string_to_double+0xa0>
10e509: d9 ee fldz
10e50b: d9 c9 fxch %st(1)
10e50d: dd e1 fucom %st(1)
10e50f: df e0 fnstsw %ax
10e511: dd d9 fstp %st(1)
10e513: 9e sahf
10e514: 7a 07 jp 10e51d <rtems_string_to_double+0x7d><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
10e516: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e51b: 74 2d je 10e54a <rtems_string_to_double+0xaa><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
10e51d: ba 0a 00 00 00 mov $0xa,%edx
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
10e522: dd 05 20 38 12 00 fldl 0x123820
10e528: d9 c9 fxch %st(1)
10e52a: dd e1 fucom %st(1)
10e52c: df e0 fnstsw %ax
10e52e: dd d9 fstp %st(1)
10e530: 9e sahf
10e531: 77 1b ja 10e54e <rtems_string_to_double+0xae><== ALWAYS TAKEN
10e533: dd 05 28 38 12 00 fldl 0x123828 <== NOT EXECUTED
10e539: dd e9 fucomp %st(1) <== NOT EXECUTED
10e53b: df e0 fnstsw %ax <== NOT EXECUTED
10e53d: 9e sahf <== NOT EXECUTED
10e53e: 77 12 ja 10e552 <rtems_string_to_double+0xb2><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
10e540: dd 1b fstpl (%ebx)
return RTEMS_SUCCESSFUL;
10e542: 31 d2 xor %edx,%edx
10e544: eb 0e jmp 10e554 <rtems_string_to_double+0xb4>
10e546: dd d8 fstp %st(0)
10e548: eb 0a jmp 10e554 <rtems_string_to_double+0xb4>
10e54a: dd d8 fstp %st(0) <== NOT EXECUTED
10e54c: eb 06 jmp 10e554 <rtems_string_to_double+0xb4><== NOT EXECUTED
10e54e: dd d8 fstp %st(0)
10e550: eb 02 jmp 10e554 <rtems_string_to_double+0xb4>
10e552: dd d8 fstp %st(0) <== NOT EXECUTED
}
10e554: 89 d0 mov %edx,%eax
10e556: 8d 65 f4 lea -0xc(%ebp),%esp
10e559: 5b pop %ebx
10e55a: 5e pop %esi
10e55b: 5f pop %edi
10e55c: c9 leave
10e55d: c3 ret
0010e560 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
10e560: 55 push %ebp
10e561: 89 e5 mov %esp,%ebp
10e563: 57 push %edi
10e564: 56 push %esi
10e565: 53 push %ebx
10e566: 83 ec 2c sub $0x2c,%esp
10e569: 8b 75 08 mov 0x8(%ebp),%esi
10e56c: 8b 5d 0c mov 0xc(%ebp),%ebx
10e56f: 8b 7d 10 mov 0x10(%ebp),%edi
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e572: ba 09 00 00 00 mov $0x9,%edx
)
{
float result;
char *end;
if ( !n )
10e577: 85 db test %ebx,%ebx
10e579: 0f 84 8e 00 00 00 je 10e60d <rtems_string_to_float+0xad>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e57f: e8 c0 30 00 00 call 111644 <__errno>
10e584: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e58a: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtof( s, &end );
10e590: 50 push %eax
10e591: 50 push %eax
10e592: 8d 45 e4 lea -0x1c(%ebp),%eax
10e595: 50 push %eax
10e596: 56 push %esi
10e597: e8 68 5b 00 00 call 114104 <strtof>
if ( endptr )
10e59c: 83 c4 10 add $0x10,%esp
10e59f: 85 ff test %edi,%edi
10e5a1: 74 05 je 10e5a8 <rtems_string_to_float+0x48>
*endptr = end;
10e5a3: 8b 45 e4 mov -0x1c(%ebp),%eax
10e5a6: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e5a8: ba 0b 00 00 00 mov $0xb,%edx
result = strtof( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
10e5ad: 39 75 e4 cmp %esi,-0x1c(%ebp)
10e5b0: 74 4d je 10e5ff <rtems_string_to_float+0x9f>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e5b2: d9 5d c8 fstps -0x38(%ebp)
10e5b5: e8 8a 30 00 00 call 111644 <__errno>
10e5ba: 83 38 22 cmpl $0x22,(%eax)
10e5bd: d9 45 c8 flds -0x38(%ebp)
10e5c0: 75 37 jne 10e5f9 <rtems_string_to_float+0x99>
10e5c2: d9 ee fldz
10e5c4: d9 c9 fxch %st(1)
10e5c6: dd e1 fucom %st(1)
10e5c8: df e0 fnstsw %ax
10e5ca: dd d9 fstp %st(1)
10e5cc: 9e sahf
10e5cd: 7a 07 jp 10e5d6 <rtems_string_to_float+0x76><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
10e5cf: ba 0a 00 00 00 mov $0xa,%edx
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e5d4: 74 2d je 10e603 <rtems_string_to_float+0xa3><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
10e5d6: ba 0a 00 00 00 mov $0xa,%edx
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
10e5db: d9 05 30 38 12 00 flds 0x123830
10e5e1: d9 c9 fxch %st(1)
10e5e3: dd e1 fucom %st(1)
10e5e5: df e0 fnstsw %ax
10e5e7: dd d9 fstp %st(1)
10e5e9: 9e sahf
10e5ea: 77 1b ja 10e607 <rtems_string_to_float+0xa7><== ALWAYS TAKEN
10e5ec: d9 05 34 38 12 00 flds 0x123834 <== NOT EXECUTED
10e5f2: dd e9 fucomp %st(1) <== NOT EXECUTED
10e5f4: df e0 fnstsw %ax <== NOT EXECUTED
10e5f6: 9e sahf <== NOT EXECUTED
10e5f7: 77 12 ja 10e60b <rtems_string_to_float+0xab><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
10e5f9: d9 1b fstps (%ebx)
return RTEMS_SUCCESSFUL;
10e5fb: 31 d2 xor %edx,%edx
10e5fd: eb 0e jmp 10e60d <rtems_string_to_float+0xad>
10e5ff: dd d8 fstp %st(0)
10e601: eb 0a jmp 10e60d <rtems_string_to_float+0xad>
10e603: dd d8 fstp %st(0) <== NOT EXECUTED
10e605: eb 06 jmp 10e60d <rtems_string_to_float+0xad><== NOT EXECUTED
10e607: dd d8 fstp %st(0)
10e609: eb 02 jmp 10e60d <rtems_string_to_float+0xad>
10e60b: dd d8 fstp %st(0) <== NOT EXECUTED
}
10e60d: 89 d0 mov %edx,%eax
10e60f: 8d 65 f4 lea -0xc(%ebp),%esp
10e612: 5b pop %ebx
10e613: 5e pop %esi
10e614: 5f pop %edi
10e615: c9 leave
10e616: c3 ret
0010e618 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
10e618: 55 push %ebp
10e619: 89 e5 mov %esp,%ebp
10e61b: 57 push %edi
10e61c: 56 push %esi
10e61d: 53 push %ebx
10e61e: 83 ec 2c sub $0x2c,%esp
10e621: 8b 7d 08 mov 0x8(%ebp),%edi
10e624: 8b 75 0c mov 0xc(%ebp),%esi
10e627: 8b 55 10 mov 0x10(%ebp),%edx
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e62a: b8 09 00 00 00 mov $0x9,%eax
)
{
long result;
char *end;
if ( !n )
10e62f: 85 f6 test %esi,%esi
10e631: 74 6b je 10e69e <rtems_string_to_int+0x86>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e633: 89 55 d4 mov %edx,-0x2c(%ebp)
10e636: e8 09 30 00 00 call 111644 <__errno>
10e63b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e641: c7 06 00 00 00 00 movl $0x0,(%esi)
result = strtol( s, &end, base );
10e647: 50 push %eax
10e648: ff 75 14 pushl 0x14(%ebp)
10e64b: 8d 45 e4 lea -0x1c(%ebp),%eax
10e64e: 50 push %eax
10e64f: 57 push %edi
10e650: e8 6f 5c 00 00 call 1142c4 <strtol>
10e655: 89 c3 mov %eax,%ebx
if ( endptr )
10e657: 83 c4 10 add $0x10,%esp
10e65a: 8b 55 d4 mov -0x2c(%ebp),%edx
10e65d: 85 d2 test %edx,%edx
10e65f: 74 05 je 10e666 <rtems_string_to_int+0x4e>
*endptr = end;
10e661: 8b 45 e4 mov -0x1c(%ebp),%eax
10e664: 89 02 mov %eax,(%edx)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e666: b8 0b 00 00 00 mov $0xb,%eax
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10e66b: 39 7d e4 cmp %edi,-0x1c(%ebp)
10e66e: 74 2e je 10e69e <rtems_string_to_int+0x86>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e670: e8 cf 2f 00 00 call 111644 <__errno>
10e675: 83 38 22 cmpl $0x22,(%eax)
10e678: 75 19 jne 10e693 <rtems_string_to_int+0x7b>
10e67a: 81 fb ff ff ff 7f cmp $0x7fffffff,%ebx
10e680: 74 17 je 10e699 <rtems_string_to_int+0x81><== ALWAYS TAKEN
10e682: 85 db test %ebx,%ebx <== NOT EXECUTED
10e684: 74 13 je 10e699 <rtems_string_to_int+0x81><== NOT EXECUTED
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
10e686: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
10e68b: 81 fb 00 00 00 80 cmp $0x80000000,%ebx <== NOT EXECUTED
10e691: 74 0b je 10e69e <rtems_string_to_int+0x86><== NOT EXECUTED
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
10e693: 89 1e mov %ebx,(%esi)
return RTEMS_SUCCESSFUL;
10e695: 31 c0 xor %eax,%eax
10e697: eb 05 jmp 10e69e <rtems_string_to_int+0x86>
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
10e699: b8 0a 00 00 00 mov $0xa,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
10e69e: 8d 65 f4 lea -0xc(%ebp),%esp
10e6a1: 5b pop %ebx
10e6a2: 5e pop %esi
10e6a3: 5f pop %edi
10e6a4: c9 leave
10e6a5: c3 ret
0010e754 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
10e754: 55 push %ebp
10e755: 89 e5 mov %esp,%ebp
10e757: 57 push %edi
10e758: 56 push %esi
10e759: 53 push %ebx
10e75a: 83 ec 2c sub $0x2c,%esp
10e75d: 8b 7d 08 mov 0x8(%ebp),%edi
10e760: 8b 75 0c mov 0xc(%ebp),%esi
10e763: 8b 55 10 mov 0x10(%ebp),%edx
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e766: b8 09 00 00 00 mov $0x9,%eax
)
{
long result;
char *end;
if ( !n )
10e76b: 85 f6 test %esi,%esi
10e76d: 74 6b je 10e7da <rtems_string_to_long+0x86>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e76f: 89 55 d4 mov %edx,-0x2c(%ebp)
10e772: e8 cd 2e 00 00 call 111644 <__errno>
10e777: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e77d: c7 06 00 00 00 00 movl $0x0,(%esi)
result = strtol( s, &end, base );
10e783: 50 push %eax
10e784: ff 75 14 pushl 0x14(%ebp)
10e787: 8d 45 e4 lea -0x1c(%ebp),%eax
10e78a: 50 push %eax
10e78b: 57 push %edi
10e78c: e8 33 5b 00 00 call 1142c4 <strtol>
10e791: 89 c3 mov %eax,%ebx
if ( endptr )
10e793: 83 c4 10 add $0x10,%esp
10e796: 8b 55 d4 mov -0x2c(%ebp),%edx
10e799: 85 d2 test %edx,%edx
10e79b: 74 05 je 10e7a2 <rtems_string_to_long+0x4e>
*endptr = end;
10e79d: 8b 45 e4 mov -0x1c(%ebp),%eax
10e7a0: 89 02 mov %eax,(%edx)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e7a2: b8 0b 00 00 00 mov $0xb,%eax
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10e7a7: 39 7d e4 cmp %edi,-0x1c(%ebp)
10e7aa: 74 2e je 10e7da <rtems_string_to_long+0x86>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e7ac: e8 93 2e 00 00 call 111644 <__errno>
10e7b1: 83 38 22 cmpl $0x22,(%eax)
10e7b4: 75 19 jne 10e7cf <rtems_string_to_long+0x7b>
10e7b6: 81 fb ff ff ff 7f cmp $0x7fffffff,%ebx
10e7bc: 74 17 je 10e7d5 <rtems_string_to_long+0x81>
10e7be: 85 db test %ebx,%ebx
10e7c0: 74 13 je 10e7d5 <rtems_string_to_long+0x81><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
10e7c2: b8 0a 00 00 00 mov $0xa,%eax
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
10e7c7: 81 fb 00 00 00 80 cmp $0x80000000,%ebx
10e7cd: 74 0b je 10e7da <rtems_string_to_long+0x86><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
10e7cf: 89 1e mov %ebx,(%esi)
return RTEMS_SUCCESSFUL;
10e7d1: 31 c0 xor %eax,%eax
10e7d3: eb 05 jmp 10e7da <rtems_string_to_long+0x86>
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
10e7d5: b8 0a 00 00 00 mov $0xa,%eax
*n = result;
return RTEMS_SUCCESSFUL;
}
10e7da: 8d 65 f4 lea -0xc(%ebp),%esp
10e7dd: 5b pop %ebx
10e7de: 5e pop %esi
10e7df: 5f pop %edi
10e7e0: c9 leave
10e7e1: c3 ret
0010e6a8 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
10e6a8: 55 push %ebp
10e6a9: 89 e5 mov %esp,%ebp
10e6ab: 57 push %edi
10e6ac: 56 push %esi
10e6ad: 53 push %ebx
10e6ae: 83 ec 2c sub $0x2c,%esp
10e6b1: 8b 5d 0c mov 0xc(%ebp),%ebx
10e6b4: 8b 7d 10 mov 0x10(%ebp),%edi
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e6b7: b8 09 00 00 00 mov $0x9,%eax
)
{
long long result;
char *end;
if ( !n )
10e6bc: 85 db test %ebx,%ebx
10e6be: 0f 84 85 00 00 00 je 10e749 <rtems_string_to_long_long+0xa1>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e6c4: e8 7b 2f 00 00 call 111644 <__errno>
10e6c9: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e6cf: c7 03 00 00 00 00 movl $0x0,(%ebx)
10e6d5: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtoll( s, &end, base );
10e6dc: 50 push %eax
10e6dd: ff 75 14 pushl 0x14(%ebp)
10e6e0: 8d 45 e4 lea -0x1c(%ebp),%eax
10e6e3: 50 push %eax
10e6e4: ff 75 08 pushl 0x8(%ebp)
10e6e7: e8 f4 5b 00 00 call 1142e0 <strtoll>
10e6ec: 89 c6 mov %eax,%esi
if ( endptr )
10e6ee: 83 c4 10 add $0x10,%esp
10e6f1: 85 ff test %edi,%edi
10e6f3: 74 05 je 10e6fa <rtems_string_to_long_long+0x52>
*endptr = end;
10e6f5: 8b 45 e4 mov -0x1c(%ebp),%eax
10e6f8: 89 07 mov %eax,(%edi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e6fa: b8 0b 00 00 00 mov $0xb,%eax
result = strtoll( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10e6ff: 8b 4d 08 mov 0x8(%ebp),%ecx
10e702: 39 4d e4 cmp %ecx,-0x1c(%ebp)
10e705: 74 42 je 10e749 <rtems_string_to_long_long+0xa1>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e707: 89 55 d4 mov %edx,-0x2c(%ebp)
10e70a: e8 35 2f 00 00 call 111644 <__errno>
10e70f: 83 38 22 cmpl $0x22,(%eax)
10e712: 8b 55 d4 mov -0x2c(%ebp),%edx
10e715: 75 24 jne 10e73b <rtems_string_to_long_long+0x93>
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
10e717: 89 f1 mov %esi,%ecx
10e719: f7 d1 not %ecx
10e71b: 89 d0 mov %edx,%eax
10e71d: 35 ff ff ff 7f xor $0x7fffffff,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e722: 09 c1 or %eax,%ecx
10e724: 74 1e je 10e744 <rtems_string_to_long_long+0x9c>
10e726: 89 f0 mov %esi,%eax
10e728: 09 d0 or %edx,%eax
10e72a: 74 18 je 10e744 <rtems_string_to_long_long+0x9c><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
10e72c: 8d 8a 00 00 00 80 lea -0x80000000(%edx),%ecx
return RTEMS_INVALID_NUMBER;
10e732: b8 0a 00 00 00 mov $0xa,%eax
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
10e737: 09 f1 or %esi,%ecx
10e739: 74 0e je 10e749 <rtems_string_to_long_long+0xa1><== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
10e73b: 89 33 mov %esi,(%ebx)
10e73d: 89 53 04 mov %edx,0x4(%ebx)
return RTEMS_SUCCESSFUL;
10e740: 31 c0 xor %eax,%eax
10e742: eb 05 jmp 10e749 <rtems_string_to_long_long+0xa1>
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
10e744: b8 0a 00 00 00 mov $0xa,%eax
*n = result;
return RTEMS_SUCCESSFUL;
}
10e749: 8d 65 f4 lea -0xc(%ebp),%esp
10e74c: 5b pop %ebx
10e74d: 5e pop %esi
10e74e: 5f pop %edi
10e74f: c9 leave
10e750: c3 ret
0010e7fc <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
10e7fc: 55 push %ebp
10e7fd: 89 e5 mov %esp,%ebp
10e7ff: 57 push %edi
10e800: 56 push %esi
10e801: 53 push %ebx
10e802: 83 ec 2c sub $0x2c,%esp
10e805: 8b 7d 08 mov 0x8(%ebp),%edi
10e808: 8b 5d 0c mov 0xc(%ebp),%ebx
10e80b: 8b 55 10 mov 0x10(%ebp),%edx
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e80e: b8 09 00 00 00 mov $0x9,%eax
)
{
unsigned long result;
char *end;
if ( !n )
10e813: 85 db test %ebx,%ebx
10e815: 74 71 je 10e888 <rtems_string_to_unsigned_char+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e817: 89 55 d4 mov %edx,-0x2c(%ebp)
10e81a: e8 25 2e 00 00 call 111644 <__errno>
10e81f: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e825: c6 03 00 movb $0x0,(%ebx)
result = strtoul( s, &end, base );
10e828: 50 push %eax
10e829: ff 75 14 pushl 0x14(%ebp)
10e82c: 8d 45 e4 lea -0x1c(%ebp),%eax
10e82f: 50 push %eax
10e830: 57 push %edi
10e831: e8 4a 5f 00 00 call 114780 <strtoul>
10e836: 89 c6 mov %eax,%esi
if ( endptr )
10e838: 83 c4 10 add $0x10,%esp
10e83b: 8b 55 d4 mov -0x2c(%ebp),%edx
10e83e: 85 d2 test %edx,%edx
10e840: 74 05 je 10e847 <rtems_string_to_unsigned_char+0x4b>
*endptr = end;
10e842: 8b 45 e4 mov -0x1c(%ebp),%eax
10e845: 89 02 mov %eax,(%edx)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e847: b8 0b 00 00 00 mov $0xb,%eax
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10e84c: 39 7d e4 cmp %edi,-0x1c(%ebp)
10e84f: 74 37 je 10e888 <rtems_string_to_unsigned_char+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e851: e8 ee 2d 00 00 call 111644 <__errno>
10e856: 83 38 22 cmpl $0x22,(%eax)
10e859: 75 0d jne 10e868 <rtems_string_to_unsigned_char+0x6c><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
10e85b: 8d 56 ff lea -0x1(%esi),%edx <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
10e85e: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e863: 83 fa fd cmp $0xfffffffd,%edx <== NOT EXECUTED
10e866: 77 20 ja 10e888 <rtems_string_to_unsigned_char+0x8c><== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
10e868: 81 fe ff 00 00 00 cmp $0xff,%esi
10e86e: 76 12 jbe 10e882 <rtems_string_to_unsigned_char+0x86><== ALWAYS TAKEN
errno = ERANGE;
10e870: e8 cf 2d 00 00 call 111644 <__errno> <== NOT EXECUTED
10e875: c7 00 22 00 00 00 movl $0x22,(%eax) <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
10e87b: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
10e880: eb 06 jmp 10e888 <rtems_string_to_unsigned_char+0x8c><== NOT EXECUTED
}
#endif
*n = result;
10e882: 89 f0 mov %esi,%eax
10e884: 88 03 mov %al,(%ebx)
return RTEMS_SUCCESSFUL;
10e886: 31 c0 xor %eax,%eax
}
10e888: 8d 65 f4 lea -0xc(%ebp),%esp
10e88b: 5b pop %ebx
10e88c: 5e pop %esi
10e88d: 5f pop %edi
10e88e: c9 leave
10e88f: c3 ret
0010e890 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
10e890: 55 push %ebp
10e891: 89 e5 mov %esp,%ebp
10e893: 57 push %edi
10e894: 56 push %esi
10e895: 53 push %ebx
10e896: 83 ec 2c sub $0x2c,%esp
10e899: 8b 7d 08 mov 0x8(%ebp),%edi
10e89c: 8b 5d 0c mov 0xc(%ebp),%ebx
10e89f: 8b 55 10 mov 0x10(%ebp),%edx
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e8a2: b8 09 00 00 00 mov $0x9,%eax
)
{
unsigned long result;
char *end;
if ( !n )
10e8a7: 85 db test %ebx,%ebx
10e8a9: 74 58 je 10e903 <rtems_string_to_unsigned_int+0x73>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e8ab: 89 55 d4 mov %edx,-0x2c(%ebp)
10e8ae: e8 91 2d 00 00 call 111644 <__errno>
10e8b3: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e8b9: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
10e8bf: 50 push %eax
10e8c0: ff 75 14 pushl 0x14(%ebp)
10e8c3: 8d 45 e4 lea -0x1c(%ebp),%eax
10e8c6: 50 push %eax
10e8c7: 57 push %edi
10e8c8: e8 b3 5e 00 00 call 114780 <strtoul>
10e8cd: 89 c6 mov %eax,%esi
if ( endptr )
10e8cf: 83 c4 10 add $0x10,%esp
10e8d2: 8b 55 d4 mov -0x2c(%ebp),%edx
10e8d5: 85 d2 test %edx,%edx
10e8d7: 74 05 je 10e8de <rtems_string_to_unsigned_int+0x4e>
*endptr = end;
10e8d9: 8b 45 e4 mov -0x1c(%ebp),%eax
10e8dc: 89 02 mov %eax,(%edx)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e8de: b8 0b 00 00 00 mov $0xb,%eax
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10e8e3: 39 7d e4 cmp %edi,-0x1c(%ebp)
10e8e6: 74 1b je 10e903 <rtems_string_to_unsigned_int+0x73>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e8e8: e8 57 2d 00 00 call 111644 <__errno>
10e8ed: 83 38 22 cmpl $0x22,(%eax)
10e8f0: 75 0d jne 10e8ff <rtems_string_to_unsigned_int+0x6f>
(( result == 0 ) || ( result == ULONG_MAX )))
10e8f2: 8d 56 ff lea -0x1(%esi),%edx
return RTEMS_INVALID_NUMBER;
10e8f5: b8 0a 00 00 00 mov $0xa,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e8fa: 83 fa fd cmp $0xfffffffd,%edx
10e8fd: 77 04 ja 10e903 <rtems_string_to_unsigned_int+0x73><== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
10e8ff: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
10e901: 31 c0 xor %eax,%eax
}
10e903: 8d 65 f4 lea -0xc(%ebp),%esp
10e906: 5b pop %ebx
10e907: 5e pop %esi
10e908: 5f pop %edi
10e909: c9 leave
10e90a: c3 ret
0010e9a8 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
10e9a8: 55 push %ebp
10e9a9: 89 e5 mov %esp,%ebp
10e9ab: 57 push %edi
10e9ac: 56 push %esi
10e9ad: 53 push %ebx
10e9ae: 83 ec 2c sub $0x2c,%esp
10e9b1: 8b 7d 08 mov 0x8(%ebp),%edi
10e9b4: 8b 5d 0c mov 0xc(%ebp),%ebx
10e9b7: 8b 55 10 mov 0x10(%ebp),%edx
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e9ba: b8 09 00 00 00 mov $0x9,%eax
)
{
unsigned long result;
char *end;
if ( !n )
10e9bf: 85 db test %ebx,%ebx
10e9c1: 74 58 je 10ea1b <rtems_string_to_unsigned_long+0x73>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e9c3: 89 55 d4 mov %edx,-0x2c(%ebp)
10e9c6: e8 79 2c 00 00 call 111644 <__errno>
10e9cb: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e9d1: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
10e9d7: 50 push %eax
10e9d8: ff 75 14 pushl 0x14(%ebp)
10e9db: 8d 45 e4 lea -0x1c(%ebp),%eax
10e9de: 50 push %eax
10e9df: 57 push %edi
10e9e0: e8 9b 5d 00 00 call 114780 <strtoul>
10e9e5: 89 c6 mov %eax,%esi
if ( endptr )
10e9e7: 83 c4 10 add $0x10,%esp
10e9ea: 8b 55 d4 mov -0x2c(%ebp),%edx
10e9ed: 85 d2 test %edx,%edx
10e9ef: 74 05 je 10e9f6 <rtems_string_to_unsigned_long+0x4e>
*endptr = end;
10e9f1: 8b 45 e4 mov -0x1c(%ebp),%eax
10e9f4: 89 02 mov %eax,(%edx)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e9f6: b8 0b 00 00 00 mov $0xb,%eax
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10e9fb: 39 7d e4 cmp %edi,-0x1c(%ebp)
10e9fe: 74 1b je 10ea1b <rtems_string_to_unsigned_long+0x73>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ea00: e8 3f 2c 00 00 call 111644 <__errno>
10ea05: 83 38 22 cmpl $0x22,(%eax)
10ea08: 75 0d jne 10ea17 <rtems_string_to_unsigned_long+0x6f>
(( result == 0 ) || ( result == ULONG_MAX )))
10ea0a: 8d 56 ff lea -0x1(%esi),%edx
return RTEMS_INVALID_NUMBER;
10ea0d: b8 0a 00 00 00 mov $0xa,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10ea12: 83 fa fd cmp $0xfffffffd,%edx
10ea15: 77 04 ja 10ea1b <rtems_string_to_unsigned_long+0x73><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
10ea17: 89 33 mov %esi,(%ebx)
return RTEMS_SUCCESSFUL;
10ea19: 31 c0 xor %eax,%eax
}
10ea1b: 8d 65 f4 lea -0xc(%ebp),%esp
10ea1e: 5b pop %ebx
10ea1f: 5e pop %esi
10ea20: 5f pop %edi
10ea21: c9 leave
10ea22: c3 ret
0010e90c <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
10e90c: 55 push %ebp
10e90d: 89 e5 mov %esp,%ebp
10e90f: 57 push %edi
10e910: 56 push %esi
10e911: 53 push %ebx
10e912: 83 ec 2c sub $0x2c,%esp
10e915: 8b 7d 08 mov 0x8(%ebp),%edi
10e918: 8b 5d 0c mov 0xc(%ebp),%ebx
10e91b: 8b 75 10 mov 0x10(%ebp),%esi
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
10e91e: b8 09 00 00 00 mov $0x9,%eax
)
{
unsigned long long result;
char *end;
if ( !n )
10e923: 85 db test %ebx,%ebx
10e925: 74 76 je 10e99d <rtems_string_to_unsigned_long_long+0x91>
return RTEMS_INVALID_ADDRESS;
errno = 0;
10e927: e8 18 2d 00 00 call 111644 <__errno>
10e92c: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
10e932: c7 03 00 00 00 00 movl $0x0,(%ebx)
10e938: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtoull( s, &end, base );
10e93f: 50 push %eax
10e940: ff 75 14 pushl 0x14(%ebp)
10e943: 8d 45 e4 lea -0x1c(%ebp),%eax
10e946: 50 push %eax
10e947: 57 push %edi
10e948: e8 4f 5e 00 00 call 11479c <strtoull>
10e94d: 89 d1 mov %edx,%ecx
10e94f: 89 c2 mov %eax,%edx
if ( endptr )
10e951: 83 c4 10 add $0x10,%esp
10e954: 85 f6 test %esi,%esi
10e956: 74 05 je 10e95d <rtems_string_to_unsigned_long_long+0x51>
*endptr = end;
10e958: 8b 45 e4 mov -0x1c(%ebp),%eax
10e95b: 89 06 mov %eax,(%esi)
if ( end == s )
return RTEMS_NOT_DEFINED;
10e95d: b8 0b 00 00 00 mov $0xb,%eax
result = strtoull( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
10e962: 39 7d e4 cmp %edi,-0x1c(%ebp)
10e965: 74 36 je 10e99d <rtems_string_to_unsigned_long_long+0x91>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e967: 89 55 d4 mov %edx,-0x2c(%ebp)
10e96a: 89 4d d0 mov %ecx,-0x30(%ebp)
10e96d: e8 d2 2c 00 00 call 111644 <__errno>
10e972: 83 38 22 cmpl $0x22,(%eax)
10e975: 8b 55 d4 mov -0x2c(%ebp),%edx
10e978: 8b 4d d0 mov -0x30(%ebp),%ecx
10e97b: 75 19 jne 10e996 <rtems_string_to_unsigned_long_long+0x8a>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
10e97d: 89 d6 mov %edx,%esi
10e97f: 89 cf mov %ecx,%edi
10e981: 83 c6 ff add $0xffffffff,%esi
10e984: 83 d7 ff adc $0xffffffff,%edi
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e987: 83 ff ff cmp $0xffffffff,%edi
10e98a: 72 0a jb 10e996 <rtems_string_to_unsigned_long_long+0x8a><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
10e98c: b8 0a 00 00 00 mov $0xa,%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
10e991: 83 fe fd cmp $0xfffffffd,%esi
10e994: 77 07 ja 10e99d <rtems_string_to_unsigned_long_long+0x91><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
10e996: 89 13 mov %edx,(%ebx)
10e998: 89 4b 04 mov %ecx,0x4(%ebx)
return RTEMS_SUCCESSFUL;
10e99b: 31 c0 xor %eax,%eax
}
10e99d: 8d 65 f4 lea -0xc(%ebp),%esp
10e9a0: 5b pop %ebx
10e9a1: 5e pop %esi
10e9a2: 5f pop %edi
10e9a3: c9 leave
10e9a4: c3 ret
001066cc <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
1066cc: 55 push %ebp
1066cd: 89 e5 mov %esp,%ebp
1066cf: 57 push %edi
1066d0: 56 push %esi
1066d1: 53 push %ebx
1066d2: 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(
1066d8: 31 c0 xor %eax,%eax
1066da: 83 c9 ff or $0xffffffff,%ecx
1066dd: 8b 7d 08 mov 0x8(%ebp),%edi
1066e0: f2 ae repnz scas %es:(%edi),%al
1066e2: f7 d1 not %ecx
1066e4: 49 dec %ecx
1066e5: 6a 00 push $0x0
1066e7: 8d 45 d0 lea -0x30(%ebp),%eax
1066ea: 50 push %eax
1066eb: 6a 00 push $0x0
1066ed: 51 push %ecx
1066ee: ff 75 08 pushl 0x8(%ebp)
1066f1: e8 d4 09 00 00 call 1070ca <rtems_filesystem_evaluate_path>
1066f6: 89 85 54 fe ff ff mov %eax,-0x1ac(%ebp)
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
1066fc: 83 c4 20 add $0x20,%esp
1066ff: 85 c0 test %eax,%eax
106701: 0f 85 d9 01 00 00 jne 1068e0 <rtems_tarfs_load+0x214>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
106707: 8b 45 dc mov -0x24(%ebp),%eax
10670a: 31 f6 xor %esi,%esi
10670c: 3d 84 3f 12 00 cmp $0x123f84,%eax
106711: 74 1b je 10672e <rtems_tarfs_load+0x62>
106713: 3d 6c 49 12 00 cmp $0x12496c,%eax
106718: 0f 85 c2 01 00 00 jne 1068e0 <rtems_tarfs_load+0x214><== ALWAYS TAKEN
10671e: 8b b5 54 fe ff ff mov -0x1ac(%ebp),%esi <== NOT EXECUTED
106724: eb 08 jmp 10672e <rtems_tarfs_load+0x62> <== NOT EXECUTED
106726: 8b b5 50 fe ff ff mov -0x1b0(%ebp),%esi
10672c: eb 18 jmp 106746 <rtems_tarfs_load+0x7a>
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
10672e: 8d 45 bc lea -0x44(%ebp),%eax
106731: 89 85 34 fe ff ff mov %eax,-0x1cc(%ebp)
106737: 8d 55 d0 lea -0x30(%ebp),%edx
10673a: 89 95 30 fe ff ff mov %edx,-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);
106740: 8d 9d 58 fe ff ff lea -0x1a8(%ebp),%ebx
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
106746: 8d 86 00 02 00 00 lea 0x200(%esi),%eax
10674c: 89 85 50 fe ff ff mov %eax,-0x1b0(%ebp)
106752: 8b 55 10 mov 0x10(%ebp),%edx
106755: 39 d0 cmp %edx,%eax
106757: 0f 87 8d 01 00 00 ja 1068ea <rtems_tarfs_load+0x21e><== NEVER TAKEN
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
10675d: 03 75 0c add 0xc(%ebp),%esi
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
106760: 8d 86 01 01 00 00 lea 0x101(%esi),%eax
106766: 52 push %edx
106767: 6a 05 push $0x5
106769: 68 cc 3f 12 00 push $0x123fcc
10676e: 50 push %eax
10676f: e8 d8 ea 00 00 call 11524c <strncmp>
106774: 83 c4 10 add $0x10,%esp
106777: 85 c0 test %eax,%eax
106779: 0f 85 6b 01 00 00 jne 1068ea <rtems_tarfs_load+0x21e>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
10677f: 50 push %eax
106780: 6a 63 push $0x63
106782: 56 push %esi
106783: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax
106789: 50 push %eax
10678a: e8 4d eb 00 00 call 1152dc <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
10678f: c6 45 bb 00 movb $0x0,-0x45(%ebp)
linkflag = hdr_ptr[156];
106793: 8a 96 9c 00 00 00 mov 0x9c(%esi),%dl
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
106799: 59 pop %ecx
10679a: 5f pop %edi
10679b: 6a 08 push $0x8
10679d: 8d 46 64 lea 0x64(%esi),%eax
1067a0: 50 push %eax
1067a1: 88 95 44 fe ff ff mov %dl,-0x1bc(%ebp)
1067a7: e8 40 6e 00 00 call 10d5ec <_rtems_octal2ulong>
1067ac: 89 85 48 fe ff ff mov %eax,-0x1b8(%ebp)
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
1067b2: 5f pop %edi
1067b3: 58 pop %eax
1067b4: 6a 0c push $0xc
1067b6: 8d 46 7c lea 0x7c(%esi),%eax
1067b9: 50 push %eax
1067ba: e8 2d 6e 00 00 call 10d5ec <_rtems_octal2ulong>
1067bf: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp)
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
1067c5: 5a pop %edx
1067c6: 59 pop %ecx
1067c7: 6a 08 push $0x8
1067c9: 8d 86 94 00 00 00 lea 0x94(%esi),%eax
1067cf: 50 push %eax
1067d0: e8 17 6e 00 00 call 10d5ec <_rtems_octal2ulong>
1067d5: 89 c7 mov %eax,%edi
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
1067d7: 89 34 24 mov %esi,(%esp)
1067da: e8 3b 6e 00 00 call 10d61a <_rtems_tar_header_checksum>
1067df: 83 c4 10 add $0x10,%esp
1067e2: 39 f8 cmp %edi,%eax
1067e4: 8a 95 44 fe ff ff mov -0x1bc(%ebp),%dl
1067ea: 0f 85 fa 00 00 00 jne 1068ea <rtems_tarfs_load+0x21e><== 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) {
1067f0: 80 fa 35 cmp $0x35,%dl
1067f3: 75 57 jne 10684c <rtems_tarfs_load+0x180>
strcpy(full_filename, mountpoint);
1067f5: 50 push %eax
1067f6: 50 push %eax
1067f7: ff 75 08 pushl 0x8(%ebp)
1067fa: 53 push %ebx
1067fb: e8 e4 e6 00 00 call 114ee4 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
106800: 31 c0 xor %eax,%eax
106802: 83 c9 ff or $0xffffffff,%ecx
106805: 89 df mov %ebx,%edi
106807: f2 ae repnz scas %es:(%edi),%al
106809: f7 d1 not %ecx
10680b: 83 c4 10 add $0x10,%esp
10680e: 80 bc 0d 56 fe ff ff cmpb $0x2f,-0x1aa(%ebp,%ecx,1)
106815: 2f
106816: 74 10 je 106828 <rtems_tarfs_load+0x15c><== ALWAYS TAKEN
strcat(full_filename, "/");
106818: 57 push %edi <== NOT EXECUTED
106819: 57 push %edi <== NOT EXECUTED
10681a: 68 99 ff 11 00 push $0x11ff99 <== NOT EXECUTED
10681f: 53 push %ebx <== NOT EXECUTED
106820: e8 0b e5 00 00 call 114d30 <strcat> <== NOT EXECUTED
106825: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
strcat(full_filename, filename);
106828: 56 push %esi
106829: 56 push %esi
10682a: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
106830: 52 push %edx
106831: 53 push %ebx
106832: e8 f9 e4 00 00 call 114d30 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
106837: 5a pop %edx
106838: 59 pop %ecx
106839: 68 ff 01 00 00 push $0x1ff
10683e: 53 push %ebx
10683f: e8 58 0f 00 00 call 10779c <mkdir>
106844: 83 c4 10 add $0x10,%esp
106847: e9 da fe ff ff jmp 106726 <rtems_tarfs_load+0x5a>
* 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) {
10684c: 80 fa 30 cmp $0x30,%dl
10684f: 0f 85 d1 fe ff ff jne 106726 <rtems_tarfs_load+0x5a>
const char *name;
loc = root_loc;
106855: b9 05 00 00 00 mov $0x5,%ecx
10685a: 8b bd 34 fe ff ff mov -0x1cc(%ebp),%edi
106860: 8b b5 30 fe ff ff mov -0x1d0(%ebp),%esi
106866: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
106868: 50 push %eax
106869: 8d 45 e4 lea -0x1c(%ebp),%eax
10686c: 50 push %eax
10686d: 8d 55 bc lea -0x44(%ebp),%edx
106870: 52 push %edx
106871: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax
106877: 50 push %eax
106878: e8 9b 78 00 00 call 10e118 <IMFS_evaluate_for_make>
10687d: 83 c4 10 add $0x10,%esp
106880: 85 c0 test %eax,%eax
106882: 75 41 jne 1068c5 <rtems_tarfs_load+0x1f9><== NEVER TAKEN
node = IMFS_create_node(
106884: 83 ec 0c sub $0xc,%esp
106887: 6a 00 push $0x0
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
106889: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax
10688f: 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(
106894: 80 cc 80 or $0x80,%ah
106897: 50 push %eax
106898: ff 75 e4 pushl -0x1c(%ebp)
10689b: 6a 06 push $0x6
10689d: 8d 55 bc lea -0x44(%ebp),%edx
1068a0: 52 push %edx
1068a1: e8 65 73 00 00 call 10dc0b <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;
1068a6: 8b 95 4c fe ff ff mov -0x1b4(%ebp),%edx
1068ac: 89 50 50 mov %edx,0x50(%eax)
1068af: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = &tar_image[offset];
1068b6: 8b 55 0c mov 0xc(%ebp),%edx
1068b9: 03 95 50 fe ff ff add -0x1b0(%ebp),%edx
1068bf: 89 50 58 mov %edx,0x58(%eax)
1068c2: 83 c4 20 add $0x20,%esp
}
nblocks = (((file_size) + 511) & ~511) / 512;
1068c5: 8b 85 4c fe ff ff mov -0x1b4(%ebp),%eax
1068cb: 05 ff 01 00 00 add $0x1ff,%eax
offset += 512 * nblocks;
1068d0: 25 00 fe ff ff and $0xfffffe00,%eax
1068d5: 01 85 50 fe ff ff add %eax,-0x1b0(%ebp)
1068db: e9 46 fe ff ff jmp 106726 <rtems_tarfs_load+0x5a>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
return -1;
1068e0: c7 85 54 fe ff ff ff movl $0xffffffff,-0x1ac(%ebp)
1068e7: ff ff ff
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
1068ea: 8b 85 54 fe ff ff mov -0x1ac(%ebp),%eax
1068f0: 8d 65 f4 lea -0xc(%ebp),%esp
1068f3: 5b pop %ebx
1068f4: 5e pop %esi
1068f5: 5f pop %edi
1068f6: c9 leave
1068f7: c3 ret
00110850 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
110850: 55 push %ebp
110851: 89 e5 mov %esp,%ebp
110853: 57 push %edi
110854: 56 push %esi
110855: 53 push %ebx
110856: 83 ec 1c sub $0x1c,%esp
110859: 8b 4d 10 mov 0x10(%ebp),%ecx
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
11085c: b8 09 00 00 00 mov $0x9,%eax
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
110861: 85 c9 test %ecx,%ecx
110863: 0f 84 fb 00 00 00 je 110964 <rtems_task_mode+0x114>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
110869: 8b 35 08 48 12 00 mov 0x124808,%esi
api = executing->API_Extensions[ THREAD_API_RTEMS ];
11086f: 8b 9e e8 00 00 00 mov 0xe8(%esi),%ebx
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
110875: 80 7e 74 01 cmpb $0x1,0x74(%esi)
110879: 19 ff sbb %edi,%edi
11087b: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
110881: 83 7e 7c 00 cmpl $0x0,0x7c(%esi)
110885: 74 06 je 11088d <rtems_task_mode+0x3d>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
110887: 81 cf 00 02 00 00 or $0x200,%edi
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
11088d: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
110891: 19 d2 sbb %edx,%edx
110893: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= _ISR_Get_level();
110899: 89 55 e4 mov %edx,-0x1c(%ebp)
11089c: 89 4d e0 mov %ecx,-0x20(%ebp)
11089f: e8 f1 bf ff ff call 10c895 <_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;
1108a4: 8b 55 e4 mov -0x1c(%ebp),%edx
1108a7: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
1108a9: 09 f8 or %edi,%eax
1108ab: 8b 4d e0 mov -0x20(%ebp),%ecx
1108ae: 89 01 mov %eax,(%ecx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
1108b0: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
1108b7: 74 0b je 1108c4 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
1108b9: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp)
1108c0: 0f 94 46 74 sete 0x74(%esi)
if ( mask & RTEMS_TIMESLICE_MASK ) {
1108c4: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
1108cb: 74 21 je 1108ee <rtems_task_mode+0x9e>
if ( _Modes_Is_timeslice(mode_set) ) {
1108cd: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
1108d4: 74 11 je 1108e7 <rtems_task_mode+0x97>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
1108d6: c7 46 7c 01 00 00 00 movl $0x1,0x7c(%esi)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
1108dd: a1 b8 42 12 00 mov 0x1242b8,%eax
1108e2: 89 46 78 mov %eax,0x78(%esi)
1108e5: eb 07 jmp 1108ee <rtems_task_mode+0x9e>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
1108e7: c7 46 7c 00 00 00 00 movl $0x0,0x7c(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
1108ee: f6 45 0c 01 testb $0x1,0xc(%ebp)
1108f2: 74 0a je 1108fe <rtems_task_mode+0xae>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
1108f4: f6 45 08 01 testb $0x1,0x8(%ebp)
1108f8: 74 03 je 1108fd <rtems_task_mode+0xad>
1108fa: fa cli
1108fb: eb 01 jmp 1108fe <rtems_task_mode+0xae>
1108fd: fb sti
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
1108fe: 31 c9 xor %ecx,%ecx
if ( mask & RTEMS_ASR_MASK ) {
110900: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
110907: 74 2a je 110933 <rtems_task_mode+0xe3>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
110909: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp)
110910: 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 ) {
110913: 3a 43 08 cmp 0x8(%ebx),%al
110916: 74 1b je 110933 <rtems_task_mode+0xe3>
asr->is_enabled = is_asr_enabled;
110918: 88 43 08 mov %al,0x8(%ebx)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
11091b: 9c pushf
11091c: fa cli
11091d: 58 pop %eax
_signals = information->signals_pending;
11091e: 8b 53 18 mov 0x18(%ebx),%edx
information->signals_pending = information->signals_posted;
110921: 8b 4b 14 mov 0x14(%ebx),%ecx
110924: 89 4b 18 mov %ecx,0x18(%ebx)
information->signals_posted = _signals;
110927: 89 53 14 mov %edx,0x14(%ebx)
_ISR_Enable( _level );
11092a: 50 push %eax
11092b: 9d popf
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
11092c: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
110930: 0f 95 c1 setne %cl
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
110933: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
110935: 83 3d 3c 44 12 00 03 cmpl $0x3,0x12443c
11093c: 75 26 jne 110964 <rtems_task_mode+0x114>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
11093e: 8b 15 08 48 12 00 mov 0x124808,%edx
if ( are_signals_pending ||
110944: 84 c9 test %cl,%cl
110946: 75 0e jne 110956 <rtems_task_mode+0x106>
110948: 3b 15 0c 48 12 00 cmp 0x12480c,%edx
11094e: 74 14 je 110964 <rtems_task_mode+0x114>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
110950: 80 7a 74 00 cmpb $0x0,0x74(%edx)
110954: 74 0e je 110964 <rtems_task_mode+0x114> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
110956: c6 05 14 48 12 00 01 movb $0x1,0x124814
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
11095d: e8 e2 ab ff ff call 10b544 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
110962: 31 c0 xor %eax,%eax
}
110964: 83 c4 1c add $0x1c,%esp
110967: 5b pop %ebx
110968: 5e pop %esi
110969: 5f pop %edi
11096a: c9 leave
11096b: c3 ret
0010d300 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10d300: 55 push %ebp
10d301: 89 e5 mov %esp,%ebp
10d303: 56 push %esi
10d304: 53 push %ebx
10d305: 83 ec 10 sub $0x10,%esp
10d308: 8b 5d 0c mov 0xc(%ebp),%ebx
10d30b: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10d30e: 85 db test %ebx,%ebx
10d310: 74 10 je 10d322 <rtems_task_set_priority+0x22>
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 ) );
10d312: 0f b6 15 24 42 12 00 movzbl 0x124224,%edx
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10d319: b8 13 00 00 00 mov $0x13,%eax
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10d31e: 39 d3 cmp %edx,%ebx
10d320: 77 52 ja 10d374 <rtems_task_set_priority+0x74>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10d322: b8 09 00 00 00 mov $0x9,%eax
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10d327: 85 f6 test %esi,%esi
10d329: 74 49 je 10d374 <rtems_task_set_priority+0x74>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10d32b: 51 push %ecx
10d32c: 51 push %ecx
10d32d: 8d 45 f4 lea -0xc(%ebp),%eax
10d330: 50 push %eax
10d331: ff 75 08 pushl 0x8(%ebp)
10d334: e8 67 1d 00 00 call 10f0a0 <_Thread_Get>
switch ( location ) {
10d339: 83 c4 10 add $0x10,%esp
10d33c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10d340: 75 2d jne 10d36f <rtems_task_set_priority+0x6f>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10d342: 8b 50 14 mov 0x14(%eax),%edx
10d345: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10d347: 85 db test %ebx,%ebx
10d349: 74 1b je 10d366 <rtems_task_set_priority+0x66>
the_thread->real_priority = new_priority;
10d34b: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10d34e: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10d352: 74 05 je 10d359 <rtems_task_set_priority+0x59>
10d354: 39 58 14 cmp %ebx,0x14(%eax)
10d357: 76 0d jbe 10d366 <rtems_task_set_priority+0x66><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10d359: 52 push %edx
10d35a: 6a 00 push $0x0
10d35c: 53 push %ebx
10d35d: 50 push %eax
10d35e: e8 45 19 00 00 call 10eca8 <_Thread_Change_priority>
10d363: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10d366: e8 13 1d 00 00 call 10f07e <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d36b: 31 c0 xor %eax,%eax
10d36d: eb 05 jmp 10d374 <rtems_task_set_priority+0x74>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d36f: b8 04 00 00 00 mov $0x4,%eax
}
10d374: 8d 65 f8 lea -0x8(%ebp),%esp
10d377: 5b pop %ebx
10d378: 5e pop %esi
10d379: c9 leave
10d37a: c3 ret
00107b7b <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
107b7b: 55 push %ebp
107b7c: 89 e5 mov %esp,%ebp
107b7e: 56 push %esi
107b7f: 53 push %ebx
107b80: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
107b83: 8b 06 mov (%esi),%eax
107b85: 8b 58 34 mov 0x34(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain(
107b88: 51 push %ecx
107b89: 6a 00 push $0x0
107b8b: 6a 00 push $0x0
107b8d: ff 35 e4 41 12 00 pushl 0x1241e4
107b93: e8 a0 1b 00 00 call 109738 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
107b98: 83 c4 10 add $0x10,%esp
107b9b: 85 c0 test %eax,%eax
107b9d: 0f 85 88 00 00 00 jne 107c2b <rtems_termios_close+0xb0><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
107ba3: 8b 43 08 mov 0x8(%ebx),%eax
107ba6: 48 dec %eax
107ba7: 89 43 08 mov %eax,0x8(%ebx)
107baa: 85 c0 test %eax,%eax
107bac: 0f 85 3e 01 00 00 jne 107cf0 <rtems_termios_close+0x175>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
107bb2: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
107bb8: c1 e0 05 shl $0x5,%eax
107bbb: 8b 80 98 3e 12 00 mov 0x123e98(%eax),%eax
107bc1: 85 c0 test %eax,%eax
107bc3: 74 08 je 107bcd <rtems_termios_close+0x52>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
107bc5: 83 ec 0c sub $0xc,%esp
107bc8: 53 push %ebx
107bc9: ff d0 call *%eax
107bcb: eb 26 jmp 107bf3 <rtems_termios_close+0x78>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
107bcd: 52 push %edx
107bce: 6a 00 push $0x0
107bd0: 6a 00 push $0x0
107bd2: ff 73 18 pushl 0x18(%ebx)
107bd5: e8 5e 1b 00 00 call 109738 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
107bda: 83 c4 10 add $0x10,%esp
107bdd: 85 c0 test %eax,%eax
107bdf: 75 4a jne 107c2b <rtems_termios_close+0xb0><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
107be1: 89 d8 mov %ebx,%eax
107be3: e8 10 fb ff ff call 1076f8 <drainOutput>
rtems_semaphore_release (tty->osem);
107be8: 83 ec 0c sub $0xc,%esp
107beb: ff 73 18 pushl 0x18(%ebx)
107bee: e8 31 1c 00 00 call 109824 <rtems_semaphore_release>
107bf3: 83 c4 10 add $0x10,%esp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
107bf6: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
107bfd: 75 35 jne 107c34 <rtems_termios_close+0xb9>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
107bff: 50 push %eax
107c00: 50 push %eax
107c01: 6a 01 push $0x1
107c03: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
107c09: e8 66 17 00 00 call 109374 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
107c0e: 83 c4 10 add $0x10,%esp
107c11: 85 c0 test %eax,%eax
107c13: 75 16 jne 107c2b <rtems_termios_close+0xb0><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
107c15: 51 push %ecx
107c16: 51 push %ecx
107c17: 6a 01 push $0x1
107c19: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
107c1f: e8 50 17 00 00 call 109374 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
107c24: 83 c4 10 add $0x10,%esp
107c27: 85 c0 test %eax,%eax
107c29: 74 09 je 107c34 <rtems_termios_close+0xb9><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
107c2b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107c2e: 50 push %eax <== NOT EXECUTED
107c2f: e8 d0 20 00 00 call 109d04 <rtems_fatal_error_occurred><== NOT EXECUTED
}
if (tty->device.lastClose)
107c34: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
107c3a: 85 c0 test %eax,%eax
107c3c: 74 0d je 107c4b <rtems_termios_close+0xd0>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
107c3e: 52 push %edx
107c3f: 56 push %esi
107c40: ff 73 10 pushl 0x10(%ebx)
107c43: ff 73 0c pushl 0xc(%ebx)
107c46: ff d0 call *%eax
107c48: 83 c4 10 add $0x10,%esp
if (tty->forw == NULL) {
107c4b: 8b 13 mov (%ebx),%edx
107c4d: 85 d2 test %edx,%edx
107c4f: 8b 43 04 mov 0x4(%ebx),%eax
107c52: 75 11 jne 107c65 <rtems_termios_close+0xea>
rtems_termios_ttyTail = tty->back;
107c54: a3 e8 41 12 00 mov %eax,0x1241e8
if ( rtems_termios_ttyTail != NULL ) {
107c59: 85 c0 test %eax,%eax
107c5b: 74 0b je 107c68 <rtems_termios_close+0xed>
rtems_termios_ttyTail->forw = NULL;
107c5d: c7 00 00 00 00 00 movl $0x0,(%eax)
107c63: eb 03 jmp 107c68 <rtems_termios_close+0xed>
}
} else {
tty->forw->back = tty->back;
107c65: 89 42 04 mov %eax,0x4(%edx)
}
if (tty->back == NULL) {
107c68: 8b 53 04 mov 0x4(%ebx),%edx
107c6b: 85 d2 test %edx,%edx
107c6d: 8b 03 mov (%ebx),%eax
107c6f: 75 12 jne 107c83 <rtems_termios_close+0x108>
rtems_termios_ttyHead = tty->forw;
107c71: a3 ec 41 12 00 mov %eax,0x1241ec
if ( rtems_termios_ttyHead != NULL ) {
107c76: 85 c0 test %eax,%eax
107c78: 74 0b je 107c85 <rtems_termios_close+0x10a>
rtems_termios_ttyHead->back = NULL;
107c7a: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
107c81: eb 02 jmp 107c85 <rtems_termios_close+0x10a>
}
} else {
tty->back->forw = tty->forw;
107c83: 89 02 mov %eax,(%edx)
}
rtems_semaphore_delete (tty->isem);
107c85: 83 ec 0c sub $0xc,%esp
107c88: ff 73 14 pushl 0x14(%ebx)
107c8b: e8 18 1a 00 00 call 1096a8 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
107c90: 59 pop %ecx
107c91: ff 73 18 pushl 0x18(%ebx)
107c94: e8 0f 1a 00 00 call 1096a8 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
107c99: 5a pop %edx
107c9a: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
107ca0: e8 03 1a 00 00 call 1096a8 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
107ca5: 83 c4 10 add $0x10,%esp
107ca8: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
107caf: 74 09 je 107cba <rtems_termios_close+0x13f>
107cb1: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
107cb8: 75 0e jne 107cc8 <rtems_termios_close+0x14d>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
107cba: 83 ec 0c sub $0xc,%esp
107cbd: ff 73 68 pushl 0x68(%ebx)
107cc0: e8 e3 19 00 00 call 1096a8 <rtems_semaphore_delete>
107cc5: 83 c4 10 add $0x10,%esp
free (tty->rawInBuf.theBuf);
107cc8: 83 ec 0c sub $0xc,%esp
107ccb: ff 73 58 pushl 0x58(%ebx)
107cce: e8 c5 ec ff ff call 106998 <free>
free (tty->rawOutBuf.theBuf);
107cd3: 58 pop %eax
107cd4: ff 73 7c pushl 0x7c(%ebx)
107cd7: e8 bc ec ff ff call 106998 <free>
free (tty->cbuf);
107cdc: 5e pop %esi
107cdd: ff 73 1c pushl 0x1c(%ebx)
107ce0: e8 b3 ec ff ff call 106998 <free>
free (tty);
107ce5: 89 1c 24 mov %ebx,(%esp)
107ce8: e8 ab ec ff ff call 106998 <free>
107ced: 83 c4 10 add $0x10,%esp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
107cf0: 83 ec 0c sub $0xc,%esp
107cf3: ff 35 e4 41 12 00 pushl 0x1241e4
107cf9: e8 26 1b 00 00 call 109824 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
107cfe: 31 c0 xor %eax,%eax
107d00: 8d 65 f8 lea -0x8(%ebp),%esp
107d03: 5b pop %ebx
107d04: 5e pop %esi
107d05: c9 leave
107d06: c3 ret
00108eb4 <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)
{
108eb4: 55 push %ebp
108eb5: 89 e5 mov %esp,%ebp
108eb7: 83 ec 08 sub $0x8,%esp
108eba: 8b 45 08 mov 0x8(%ebp),%eax
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
108ebd: 8b 55 0c mov 0xc(%ebp),%edx
108ec0: 01 90 90 00 00 00 add %edx,0x90(%eax)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
108ec6: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
108ecd: 75 1f jne 108eee <rtems_termios_dequeue_characters+0x3a>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
108ecf: 52 push %edx
108ed0: 52 push %edx
108ed1: 6a 02 push $0x2
108ed3: ff b0 c8 00 00 00 pushl 0xc8(%eax)
108ed9: e8 96 04 00 00 call 109374 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
108ede: 83 c4 10 add $0x10,%esp
108ee1: 85 c0 test %eax,%eax
108ee3: 74 30 je 108f15 <rtems_termios_dequeue_characters+0x61><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
108ee5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108ee8: 50 push %eax <== NOT EXECUTED
108ee9: e8 16 0e 00 00 call 109d04 <rtems_fatal_error_occurred><== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
108eee: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax)
108ef5: 75 15 jne 108f0c <rtems_termios_dequeue_characters+0x58>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
108ef7: 8b 15 48 3f 12 00 mov 0x123f48,%edx
108efd: 85 d2 test %edx,%edx
108eff: 74 14 je 108f15 <rtems_termios_dequeue_characters+0x61><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
108f01: 83 ec 0c sub $0xc,%esp
108f04: 50 push %eax
108f05: ff d2 call *%edx
108f07: 83 c4 10 add $0x10,%esp
108f0a: eb 09 jmp 108f15 <rtems_termios_dequeue_characters+0x61>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
108f0c: 89 45 08 mov %eax,0x8(%ebp)
}
108f0f: c9 leave
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
108f10: e9 6d fd ff ff jmp 108c82 <rtems_termios_refill_transmitter>
}
108f15: 31 c0 xor %eax,%eax
108f17: c9 leave
108f18: c3 ret
00108993 <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)
{
108993: 55 push %ebp
108994: 89 e5 mov %esp,%ebp
108996: 57 push %edi
108997: 56 push %esi
108998: 53 push %ebx
108999: 83 ec 2c sub $0x2c,%esp
10899c: 8b 5d 08 mov 0x8(%ebp),%ebx
10899f: 8b 7d 0c mov 0xc(%ebp),%edi
1089a2: 8b 4d 10 mov 0x10(%ebp),%ecx
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) {
1089a5: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
1089ab: c1 e0 05 shl $0x5,%eax
1089ae: 89 ca mov %ecx,%edx
1089b0: 83 b8 a4 3e 12 00 00 cmpl $0x0,0x123ea4(%eax)
1089b7: 75 3b jne 1089f4 <rtems_termios_enqueue_raw_characters+0x61>
1089b9: 89 4d e0 mov %ecx,-0x20(%ebp)
1089bc: c6 45 df 00 movb $0x0,-0x21(%ebp)
1089c0: 31 f6 xor %esi,%esi
/*
* 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);
1089c2: 8d 43 30 lea 0x30(%ebx),%eax
1089c5: 89 45 d4 mov %eax,-0x2c(%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,
1089c8: 8d 53 4a lea 0x4a(%ebx),%edx
1089cb: 89 55 d0 mov %edx,-0x30(%ebp)
1089ce: e9 26 02 00 00 jmp 108bf9 <rtems_termios_enqueue_raw_characters+0x266>
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--) {
c = *buf++;
1089d3: 0f be 0f movsbl (%edi),%ecx
1089d6: 47 inc %edi
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
1089d7: 56 push %esi
1089d8: 56 push %esi
1089d9: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
1089df: c1 e0 05 shl $0x5,%eax
1089e2: 53 push %ebx
1089e3: 51 push %ecx
1089e4: 89 55 cc mov %edx,-0x34(%ebp)
1089e7: ff 90 a4 3e 12 00 call *0x123ea4(%eax)
1089ed: 8b 55 cc mov -0x34(%ebp),%edx
1089f0: 4a dec %edx
1089f1: 83 c4 10 add $0x10,%esp
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--) {
1089f4: 85 d2 test %edx,%edx
1089f6: 75 db jne 1089d3 <rtems_termios_enqueue_raw_characters+0x40>
*/
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;
1089f8: 31 f6 xor %esi,%esi
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
1089fa: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx)
108a01: 0f 85 0d 02 00 00 jne 108c14 <rtems_termios_enqueue_raw_characters+0x281><== NEVER TAKEN
108a07: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
108a0d: 89 d6 mov %edx,%esi
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
108a0f: 85 c0 test %eax,%eax
108a11: 0f 84 fd 01 00 00 je 108c14 <rtems_termios_enqueue_raw_characters+0x281>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
108a17: 51 push %ecx
108a18: 51 push %ecx
108a19: ff b3 e0 00 00 00 pushl 0xe0(%ebx)
108a1f: 8d 53 30 lea 0x30(%ebx),%edx
108a22: 52 push %edx
108a23: ff d0 call *%eax
tty->tty_rcvwakeup = 1;
108a25: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx)
108a2c: 00 00 00
108a2f: e9 dd 01 00 00 jmp 108c11 <rtems_termios_enqueue_raw_characters+0x27e>
}
return 0;
}
while (len--) {
c = *buf++;
108a34: 8a 0f mov (%edi),%cl
108a36: 88 4d de mov %cl,-0x22(%ebp)
108a39: 47 inc %edi
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
108a3a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108a40: f6 c4 02 test $0x2,%ah
108a43: 74 46 je 108a8b <rtems_termios_enqueue_raw_characters+0xf8>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
108a45: 0f be c1 movsbl %cl,%eax
108a48: 0f b6 53 4a movzbl 0x4a(%ebx),%edx
108a4c: 39 d0 cmp %edx,%eax
108a4e: 75 28 jne 108a78 <rtems_termios_enqueue_raw_characters+0xe5>
if (c == tty->termios.c_cc[VSTART]) {
108a50: 0f b6 53 49 movzbl 0x49(%ebx),%edx
108a54: 39 d0 cmp %edx,%eax
108a56: 75 0b jne 108a63 <rtems_termios_enqueue_raw_characters+0xd0><== ALWAYS TAKEN
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
108a58: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108a5e: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
108a61: eb 09 jmp 108a6c <rtems_termios_enqueue_raw_characters+0xd9><== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
108a63: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108a69: 83 c8 10 or $0x10,%eax
108a6c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
* 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)
{
108a72: c6 45 df 01 movb $0x1,-0x21(%ebp)
108a76: eb 19 jmp 108a91 <rtems_termios_enqueue_raw_characters+0xfe>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
108a78: 0f b6 53 49 movzbl 0x49(%ebx),%edx
108a7c: 39 d0 cmp %edx,%eax
108a7e: 75 0b jne 108a8b <rtems_termios_enqueue_raw_characters+0xf8><== ALWAYS TAKEN
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
108a80: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108a86: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
108a89: eb e1 jmp 108a6c <rtems_termios_enqueue_raw_characters+0xd9><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
108a8b: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
108a8f: 74 51 je 108ae2 <rtems_termios_enqueue_raw_characters+0x14f><== ALWAYS TAKEN
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
108a91: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108a97: 83 e0 30 and $0x30,%eax
108a9a: 83 f8 20 cmp $0x20,%eax
108a9d: 0f 85 53 01 00 00 jne 108bf6 <rtems_termios_enqueue_raw_characters+0x263><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
108aa3: 9c pushf <== NOT EXECUTED
108aa4: fa cli <== NOT EXECUTED
108aa5: 8f 45 e4 popl -0x1c(%ebp) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
108aa8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108aae: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
108ab1: 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) {
108ab7: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
108abe: 74 19 je 108ad9 <rtems_termios_enqueue_raw_characters+0x146><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
108ac0: 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)(
108ac6: 52 push %edx <== NOT EXECUTED
108ac7: 6a 01 push $0x1 <== NOT EXECUTED
108ac9: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
108acc: 50 push %eax <== NOT EXECUTED
108acd: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108ad0: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
108ad6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
108ad9: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
108adc: 9d popf <== NOT EXECUTED
108add: e9 14 01 00 00 jmp 108bf6 <rtems_termios_enqueue_raw_characters+0x263><== NOT EXECUTED
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
108ae2: 8b 43 60 mov 0x60(%ebx),%eax
108ae5: 8b 4b 64 mov 0x64(%ebx),%ecx
108ae8: 40 inc %eax
108ae9: 31 d2 xor %edx,%edx
108aeb: f7 f1 div %ecx
108aed: 89 55 e4 mov %edx,-0x1c(%ebp)
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
108af0: 9c pushf
108af1: fa cli
108af2: 8f 45 d8 popl -0x28(%ebp)
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
108af5: 8b 53 5c mov 0x5c(%ebx),%edx
108af8: 8b 43 64 mov 0x64(%ebx),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
108afb: 8b 4b 64 mov 0x64(%ebx),%ecx
}
} 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)
108afe: 29 d0 sub %edx,%eax
108b00: 03 45 e4 add -0x1c(%ebp),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
108b03: 31 d2 xor %edx,%edx
108b05: f7 f1 div %ecx
}
} 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)
108b07: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx
108b0d: 0f 86 98 00 00 00 jbe 108bab <rtems_termios_enqueue_raw_characters+0x218><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
108b13: 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) &&
108b19: a8 01 test $0x1,%al <== NOT EXECUTED
108b1b: 0f 85 8a 00 00 00 jne 108bab <rtems_termios_enqueue_raw_characters+0x218><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
108b21: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108b27: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
108b2a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
108b30: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108b36: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
108b3b: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
108b40: 75 33 jne 108b75 <rtems_termios_enqueue_raw_characters+0x1e2><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
108b42: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108b48: a8 20 test $0x20,%al <== NOT EXECUTED
108b4a: 75 09 jne 108b55 <rtems_termios_enqueue_raw_characters+0x1c2><== NOT EXECUTED
108b4c: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
108b53: 75 56 jne 108bab <rtems_termios_enqueue_raw_characters+0x218><== 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;
108b55: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108b5b: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
108b5e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
108b64: 51 push %ecx <== NOT EXECUTED
108b65: 6a 01 push $0x1 <== NOT EXECUTED
108b67: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
108b6a: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108b6d: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
108b73: eb 33 jmp 108ba8 <rtems_termios_enqueue_raw_characters+0x215><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
108b75: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108b7b: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
108b80: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
108b85: 75 24 jne 108bab <rtems_termios_enqueue_raw_characters+0x218><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
108b87: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108b8d: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
108b90: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
108b96: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED
108b9c: 85 c0 test %eax,%eax <== NOT EXECUTED
108b9e: 74 0b je 108bab <rtems_termios_enqueue_raw_characters+0x218><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
108ba0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108ba3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108ba6: ff d0 call *%eax <== NOT EXECUTED
108ba8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
108bab: ff 75 d8 pushl -0x28(%ebp)
108bae: 9d popf
if (newTail == tty->rawInBuf.Head) {
108baf: 8b 43 5c mov 0x5c(%ebx),%eax
108bb2: 39 45 e4 cmp %eax,-0x1c(%ebp)
108bb5: 75 03 jne 108bba <rtems_termios_enqueue_raw_characters+0x227><== ALWAYS TAKEN
dropped++;
108bb7: 46 inc %esi <== NOT EXECUTED
108bb8: eb 3c jmp 108bf6 <rtems_termios_enqueue_raw_characters+0x263><== NOT EXECUTED
} else {
tty->rawInBuf.theBuf[newTail] = c;
108bba: 8b 43 58 mov 0x58(%ebx),%eax
108bbd: 8a 4d de mov -0x22(%ebp),%cl
108bc0: 8b 55 e4 mov -0x1c(%ebp),%edx
108bc3: 88 0c 10 mov %cl,(%eax,%edx,1)
tty->rawInBuf.Tail = newTail;
108bc6: 89 53 60 mov %edx,0x60(%ebx)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
108bc9: 83 bb e4 00 00 00 00 cmpl $0x0,0xe4(%ebx)
108bd0: 75 24 jne 108bf6 <rtems_termios_enqueue_raw_characters+0x263><== NEVER TAKEN
108bd2: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
108bd8: 85 c0 test %eax,%eax
108bda: 74 1a je 108bf6 <rtems_termios_enqueue_raw_characters+0x263><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
108bdc: 52 push %edx <== NOT EXECUTED
108bdd: 52 push %edx <== NOT EXECUTED
108bde: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
108be4: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
108be7: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
108be9: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
108bf0: 00 00 00
108bf3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108bf6: ff 4d e0 decl -0x20(%ebp)
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
108bf9: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
108bfd: 0f 85 31 fe ff ff jne 108a34 <rtems_termios_enqueue_raw_characters+0xa1>
}
}
}
}
tty->rawInBufDropped += dropped;
108c03: 01 73 78 add %esi,0x78(%ebx)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
108c06: 83 ec 0c sub $0xc,%esp
108c09: ff 73 68 pushl 0x68(%ebx)
108c0c: e8 13 0c 00 00 call 109824 <rtems_semaphore_release>
return dropped;
108c11: 83 c4 10 add $0x10,%esp
}
108c14: 89 f0 mov %esi,%eax
108c16: 8d 65 f4 lea -0xc(%ebp),%esp
108c19: 5b pop %ebx
108c1a: 5e pop %esi
108c1b: 5f pop %edi
108c1c: c9 leave
108c1d: c3 ret
00107d26 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
107d26: 55 push %ebp
107d27: 89 e5 mov %esp,%ebp
107d29: 57 push %edi
107d2a: 56 push %esi
107d2b: 53 push %ebx
107d2c: 83 ec 20 sub $0x20,%esp
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
107d2f: 8b 55 08 mov 0x8(%ebp),%edx
107d32: 8b 02 mov (%edx),%eax
107d34: 8b 58 34 mov 0x34(%eax),%ebx
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
107d37: 8b 72 08 mov 0x8(%edx),%esi
rtems_status_code sc;
args->ioctl_return = 0;
107d3a: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
107d41: 6a 00 push $0x0
107d43: 6a 00 push $0x0
107d45: ff 73 18 pushl 0x18(%ebx)
107d48: e8 eb 19 00 00 call 109738 <rtems_semaphore_obtain>
107d4d: 89 45 e4 mov %eax,-0x1c(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
107d50: 83 c4 10 add $0x10,%esp
107d53: 85 c0 test %eax,%eax
107d55: 74 0b je 107d62 <rtems_termios_ioctl+0x3c><== ALWAYS TAKEN
args->ioctl_return = sc;
107d57: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
107d5a: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED
return sc;
107d5d: e9 05 03 00 00 jmp 108067 <rtems_termios_ioctl+0x341><== NOT EXECUTED
}
switch (args->command) {
107d62: 8b 55 08 mov 0x8(%ebp),%edx
107d65: 8b 42 04 mov 0x4(%edx),%eax
107d68: 83 f8 04 cmp $0x4,%eax
107d6b: 0f 84 4d 02 00 00 je 107fbe <rtems_termios_ioctl+0x298>
107d71: 77 10 ja 107d83 <rtems_termios_ioctl+0x5d>
107d73: 83 f8 02 cmp $0x2,%eax
107d76: 74 77 je 107def <rtems_termios_ioctl+0xc9>
107d78: 0f 87 1e 02 00 00 ja 107f9c <rtems_termios_ioctl+0x276>
107d7e: 48 dec %eax
107d7f: 75 2f jne 107db0 <rtems_termios_ioctl+0x8a><== NEVER TAKEN
107d81: eb 55 jmp 107dd8 <rtems_termios_ioctl+0xb2>
107d83: 3d 7f 66 04 40 cmp $0x4004667f,%eax
107d88: 0f 84 a5 02 00 00 je 108033 <rtems_termios_ioctl+0x30d><== NEVER TAKEN
107d8e: 77 0a ja 107d9a <rtems_termios_ioctl+0x74>
107d90: 83 f8 05 cmp $0x5,%eax
107d93: 75 1b jne 107db0 <rtems_termios_ioctl+0x8a>
107d95: e9 0e 02 00 00 jmp 107fa8 <rtems_termios_ioctl+0x282>
107d9a: 3d 1a 74 04 40 cmp $0x4004741a,%eax
107d9f: 0f 84 7e 02 00 00 je 108023 <rtems_termios_ioctl+0x2fd>
107da5: 3d 1b 74 04 80 cmp $0x8004741b,%eax
107daa: 0f 84 21 02 00 00 je 107fd1 <rtems_termios_ioctl+0x2ab><== ALWAYS TAKEN
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
107db0: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
107db6: c1 e0 05 shl $0x5,%eax
107db9: 8b 80 ac 3e 12 00 mov 0x123eac(%eax),%eax
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
107dbf: c7 45 e4 0a 00 00 00 movl $0xa,-0x1c(%ebp)
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
107dc6: 85 c0 test %eax,%eax
107dc8: 0f 84 82 02 00 00 je 108050 <rtems_termios_ioctl+0x32a><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
107dce: 52 push %edx
107dcf: 52 push %edx
107dd0: ff 75 08 pushl 0x8(%ebp)
107dd3: e9 40 02 00 00 jmp 108018 <rtems_termios_ioctl+0x2f2>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
107dd8: 8b 4d 08 mov 0x8(%ebp),%ecx
107ddb: 8b 41 08 mov 0x8(%ecx),%eax
107dde: 8d 73 30 lea 0x30(%ebx),%esi
107de1: b9 09 00 00 00 mov $0x9,%ecx
107de6: 89 c7 mov %eax,%edi
107de8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
107dea: e9 61 02 00 00 jmp 108050 <rtems_termios_ioctl+0x32a>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
107def: 8b 45 08 mov 0x8(%ebp),%eax
107df2: 8b 70 08 mov 0x8(%eax),%esi
107df5: 8d 7b 30 lea 0x30(%ebx),%edi
107df8: b9 09 00 00 00 mov $0x9,%ecx
107dfd: 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) &&
107dff: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107e05: f6 c4 02 test $0x2,%ah
107e08: 74 57 je 107e61 <rtems_termios_ioctl+0x13b>
107e0a: f6 43 31 04 testb $0x4,0x31(%ebx)
107e0e: 75 51 jne 107e61 <rtems_termios_ioctl+0x13b>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
107e10: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107e16: 25 ef fd ff ff and $0xfffffdef,%eax
107e1b: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
107e21: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107e27: a8 20 test $0x20,%al
107e29: 74 36 je 107e61 <rtems_termios_ioctl+0x13b><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
107e2b: 9c pushf <== NOT EXECUTED
107e2c: fa cli <== NOT EXECUTED
107e2d: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
107e2e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107e34: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
107e37: 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) {
107e3d: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
107e44: 74 19 je 107e5f <rtems_termios_ioctl+0x139><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
107e46: 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)(
107e4c: 57 push %edi <== NOT EXECUTED
107e4d: 6a 01 push $0x1 <== NOT EXECUTED
107e4f: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
107e52: 50 push %eax <== NOT EXECUTED
107e53: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
107e56: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
107e5c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
107e5f: 56 push %esi <== NOT EXECUTED
107e60: 9d popf <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
107e61: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107e67: f6 c4 04 test $0x4,%ah
107e6a: 74 24 je 107e90 <rtems_termios_ioctl+0x16a>
107e6c: f6 43 31 10 testb $0x10,0x31(%ebx)
107e70: 75 1e jne 107e90 <rtems_termios_ioctl+0x16a><== NEVER TAKEN
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
107e72: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107e78: 80 e4 fb and $0xfb,%ah
107e7b: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
107e81: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107e87: 83 e0 fd and $0xfffffffd,%eax
107e8a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
107e90: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107e96: f6 c4 01 test $0x1,%ah
107e99: 74 43 je 107ede <rtems_termios_ioctl+0x1b8><== ALWAYS TAKEN
107e9b: 83 7b 38 00 cmpl $0x0,0x38(%ebx) <== NOT EXECUTED
107e9f: 78 3d js 107ede <rtems_termios_ioctl+0x1b8><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
107ea1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107ea7: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED
107eaa: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
107eb0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107eb6: a8 04 test $0x4,%al <== NOT EXECUTED
107eb8: 74 15 je 107ecf <rtems_termios_ioctl+0x1a9><== NOT EXECUTED
107eba: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
107ec0: 85 c0 test %eax,%eax <== NOT EXECUTED
107ec2: 74 0b je 107ecf <rtems_termios_ioctl+0x1a9><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
107ec4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107ec7: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
107eca: ff d0 call *%eax <== NOT EXECUTED
107ecc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
107ecf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107ed5: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
107ed8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== 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) {
107ede: 83 7b 38 00 cmpl $0x0,0x38(%ebx)
107ee2: 79 0f jns 107ef3 <rtems_termios_ioctl+0x1cd><== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
107ee4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
107eea: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
107eed: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
107ef3: 8b 53 30 mov 0x30(%ebx),%edx
107ef6: f6 c6 10 test $0x10,%dh
107ef9: 74 0f je 107f0a <rtems_termios_ioctl+0x1e4>
tty->flow_ctrl |= FL_MDXOF;
107efb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107f01: 80 cc 04 or $0x4,%ah
107f04: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
107f0a: 80 e6 04 and $0x4,%dh
107f0d: 74 0f je 107f1e <rtems_termios_ioctl+0x1f8>
tty->flow_ctrl |= FL_MDXON;
107f0f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
107f15: 80 cc 02 or $0x2,%ah
107f18: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
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) {
107f1e: f6 43 3c 02 testb $0x2,0x3c(%ebx)
107f22: 75 39 jne 107f5d <rtems_termios_ioctl+0x237>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
107f24: 0f b6 73 46 movzbl 0x46(%ebx),%esi
rtems_clock_get_ticks_per_second() / 10;
107f28: e8 6f 12 00 00 call 10919c <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] *
107f2d: 0f af c6 imul %esi,%eax
rtems_clock_get_ticks_per_second() / 10;
107f30: b9 0a 00 00 00 mov $0xa,%ecx
107f35: 31 d2 xor %edx,%edx
107f37: f7 f1 div %ecx
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] *
107f39: 89 43 54 mov %eax,0x54(%ebx)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
107f3c: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
107f40: 74 15 je 107f57 <rtems_termios_ioctl+0x231>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
107f42: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
107f49: 89 43 70 mov %eax,0x70(%ebx)
if (tty->termios.c_cc[VMIN])
107f4c: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
107f50: 75 19 jne 107f6b <rtems_termios_ioctl+0x245>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
107f52: 89 43 74 mov %eax,0x74(%ebx)
107f55: eb 24 jmp 107f7b <rtems_termios_ioctl+0x255>
} else {
if (tty->termios.c_cc[VMIN]) {
107f57: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
107f5b: 74 17 je 107f74 <rtems_termios_ioctl+0x24e><== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
107f5d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
107f64: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
107f6b: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx)
107f72: eb 07 jmp 107f7b <rtems_termios_ioctl+0x255>
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
107f74: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx)
}
}
}
if (tty->device.setAttributes)
107f7b: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
107f81: 85 c0 test %eax,%eax
107f83: 0f 84 c7 00 00 00 je 108050 <rtems_termios_ioctl+0x32a><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
107f89: 56 push %esi
107f8a: 56 push %esi
107f8b: 8d 53 30 lea 0x30(%ebx),%edx
107f8e: 52 push %edx
107f8f: ff 73 10 pushl 0x10(%ebx)
107f92: ff d0 call *%eax
107f94: 83 c4 10 add $0x10,%esp
107f97: e9 b4 00 00 00 jmp 108050 <rtems_termios_ioctl+0x32a>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
107f9c: 89 d8 mov %ebx,%eax
107f9e: e8 55 f7 ff ff call 1076f8 <drainOutput>
break;
107fa3: e9 a8 00 00 00 jmp 108050 <rtems_termios_ioctl+0x32a>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
107fa8: 8b 06 mov (%esi),%eax
107faa: 8b 56 04 mov 0x4(%esi),%edx
107fad: 89 83 d4 00 00 00 mov %eax,0xd4(%ebx)
107fb3: 89 93 d8 00 00 00 mov %edx,0xd8(%ebx)
break;
107fb9: e9 92 00 00 00 jmp 108050 <rtems_termios_ioctl+0x32a>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
107fbe: 8b 06 mov (%esi),%eax
107fc0: 8b 56 04 mov 0x4(%esi),%edx
107fc3: 89 83 dc 00 00 00 mov %eax,0xdc(%ebx)
107fc9: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx)
break;
107fcf: eb 7f jmp 108050 <rtems_termios_ioctl+0x32a>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
107fd1: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
107fd7: c1 e0 05 shl $0x5,%eax
107fda: 8b 80 98 3e 12 00 mov 0x123e98(%eax),%eax
107fe0: 85 c0 test %eax,%eax
107fe2: 74 0c je 107ff0 <rtems_termios_ioctl+0x2ca>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
107fe4: 83 ec 0c sub $0xc,%esp
107fe7: 53 push %ebx
107fe8: ff d0 call *%eax
107fea: 89 45 e4 mov %eax,-0x1c(%ebp)
107fed: 83 c4 10 add $0x10,%esp
}
tty->t_line=*(int*)(args->buffer);
107ff0: 8b 55 08 mov 0x8(%ebp),%edx
107ff3: 8b 42 08 mov 0x8(%edx),%eax
107ff6: 8b 00 mov (%eax),%eax
107ff8: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
tty->t_sc = NULL; /* ensure that no more valid data */
107ffe: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
108005: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
108008: c1 e0 05 shl $0x5,%eax
10800b: 8b 80 94 3e 12 00 mov 0x123e94(%eax),%eax
108011: 85 c0 test %eax,%eax
108013: 74 3b je 108050 <rtems_termios_ioctl+0x32a>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
108015: 83 ec 0c sub $0xc,%esp
108018: 53 push %ebx
108019: ff d0 call *%eax
10801b: 89 45 e4 mov %eax,-0x1c(%ebp)
10801e: e9 71 ff ff ff jmp 107f94 <rtems_termios_ioctl+0x26e>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
108023: 8b 4d 08 mov 0x8(%ebp),%ecx
108026: 8b 41 08 mov 0x8(%ecx),%eax
108029: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx
10802f: 89 10 mov %edx,(%eax)
break;
108031: eb 1d jmp 108050 <rtems_termios_ioctl+0x32a>
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
108033: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
108036: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
if ( rawnc < 0 )
108039: 29 d0 sub %edx,%eax <== NOT EXECUTED
10803b: 79 05 jns 108042 <rtems_termios_ioctl+0x31c><== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
10803d: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED
108040: 01 d0 add %edx,%eax <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
108042: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
108045: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED
108048: 03 43 20 add 0x20(%ebx),%eax <== NOT EXECUTED
10804b: 2b 43 24 sub 0x24(%ebx),%eax <== NOT EXECUTED
10804e: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
108050: 83 ec 0c sub $0xc,%esp
108053: ff 73 18 pushl 0x18(%ebx)
108056: e8 c9 17 00 00 call 109824 <rtems_semaphore_release>
args->ioctl_return = sc;
10805b: 8b 55 e4 mov -0x1c(%ebp),%edx
10805e: 8b 45 08 mov 0x8(%ebp),%eax
108061: 89 50 0c mov %edx,0xc(%eax)
return sc;
108064: 83 c4 10 add $0x10,%esp
}
108067: 8b 45 e4 mov -0x1c(%ebp),%eax
10806a: 8d 65 f4 lea -0xc(%ebp),%esp
10806d: 5b pop %ebx
10806e: 5e pop %esi
10806f: 5f pop %edi
108070: c9 leave
108071: c3 ret
00107755 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
107755: 55 push %ebp
107756: 89 e5 mov %esp,%ebp
107758: 57 push %edi
107759: 56 push %esi
10775a: 53 push %ebx
10775b: 83 ec 20 sub $0x20,%esp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
10775e: 6a 00 push $0x0
107760: 6a 00 push $0x0
107762: ff 35 e4 41 12 00 pushl 0x1241e4
107768: e8 cb 1f 00 00 call 109738 <rtems_semaphore_obtain>
10776d: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
107770: 83 c4 10 add $0x10,%esp
107773: 85 c0 test %eax,%eax
107775: 0f 85 d3 03 00 00 jne 107b4e <rtems_termios_open+0x3f9><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
10777b: 8b 35 ec 41 12 00 mov 0x1241ec,%esi
107781: 89 f2 mov %esi,%edx
107783: eb 16 jmp 10779b <rtems_termios_open+0x46>
if ((tty->major == major) && (tty->minor == minor))
107785: 8b 45 08 mov 0x8(%ebp),%eax
107788: 39 42 0c cmp %eax,0xc(%edx)
10778b: 75 0c jne 107799 <rtems_termios_open+0x44>
10778d: 8b 4d 0c mov 0xc(%ebp),%ecx
107790: 39 4a 10 cmp %ecx,0x10(%edx)
107793: 0f 84 26 03 00 00 je 107abf <rtems_termios_open+0x36a><== ALWAYS TAKEN
sc = rtems_semaphore_obtain(
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
107799: 8b 12 mov (%edx),%edx
10779b: 85 d2 test %edx,%edx
10779d: 75 e6 jne 107785 <rtems_termios_open+0x30>
10779f: e9 b5 03 00 00 jmp 107b59 <rtems_termios_open+0x404>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
1077a4: 83 ec 0c sub $0xc,%esp
1077a7: eb 30 jmp 1077d9 <rtems_termios_open+0x84>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
1077a9: a1 38 20 12 00 mov 0x122038,%eax
1077ae: 89 42 64 mov %eax,0x64(%edx)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
1077b1: 8b 42 64 mov 0x64(%edx),%eax
1077b4: 83 ec 0c sub $0xc,%esp
1077b7: 50 push %eax
1077b8: 89 55 e0 mov %edx,-0x20(%ebp)
1077bb: e8 74 f4 ff ff call 106c34 <malloc>
1077c0: 89 c7 mov %eax,%edi
1077c2: 8b 55 e0 mov -0x20(%ebp),%edx
1077c5: 89 42 58 mov %eax,0x58(%edx)
if (tty->rawInBuf.theBuf == NULL) {
1077c8: 83 c4 10 add $0x10,%esp
1077cb: 85 c0 test %eax,%eax
1077cd: 75 24 jne 1077f3 <rtems_termios_open+0x9e>
free(tty);
1077cf: 83 ec 0c sub $0xc,%esp
1077d2: 52 push %edx
1077d3: e8 c0 f1 ff ff call 106998 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
1077d8: 5b pop %ebx
1077d9: ff 35 e4 41 12 00 pushl 0x1241e4
1077df: e8 40 20 00 00 call 109824 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
1077e4: 83 c4 10 add $0x10,%esp
1077e7: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp)
1077ee: e9 5b 03 00 00 jmp 107b4e <rtems_termios_open+0x3f9>
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
1077f3: a1 3c 20 12 00 mov 0x12203c,%eax
1077f8: 89 82 88 00 00 00 mov %eax,0x88(%edx)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
1077fe: 8b 82 88 00 00 00 mov 0x88(%edx),%eax
107804: 83 ec 0c sub $0xc,%esp
107807: 50 push %eax
107808: 89 55 e0 mov %edx,-0x20(%ebp)
10780b: e8 24 f4 ff ff call 106c34 <malloc>
107810: 8b 55 e0 mov -0x20(%ebp),%edx
107813: 89 42 7c mov %eax,0x7c(%edx)
if (tty->rawOutBuf.theBuf == NULL) {
107816: 83 c4 10 add $0x10,%esp
107819: 85 c0 test %eax,%eax
10781b: 75 05 jne 107822 <rtems_termios_open+0xcd><== ALWAYS TAKEN
free((void *)(tty->rawInBuf.theBuf));
10781d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107820: eb 2e jmp 107850 <rtems_termios_open+0xfb><== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
107822: 83 ec 0c sub $0xc,%esp
107825: ff 35 34 20 12 00 pushl 0x122034
10782b: 89 55 e0 mov %edx,-0x20(%ebp)
10782e: 89 45 dc mov %eax,-0x24(%ebp)
107831: e8 fe f3 ff ff call 106c34 <malloc>
107836: 8b 55 e0 mov -0x20(%ebp),%edx
107839: 89 42 1c mov %eax,0x1c(%edx)
if (tty->cbuf == NULL) {
10783c: 83 c4 10 add $0x10,%esp
10783f: 85 c0 test %eax,%eax
107841: 8b 4d dc mov -0x24(%ebp),%ecx
107844: 75 19 jne 10785f <rtems_termios_open+0x10a>
free((void *)(tty->rawOutBuf.theBuf));
107846: 83 ec 0c sub $0xc,%esp
107849: 51 push %ecx
10784a: e8 49 f1 ff ff call 106998 <free>
free((void *)(tty->rawInBuf.theBuf));
10784f: 59 pop %ecx
107850: 57 push %edi
107851: e8 42 f1 ff ff call 106998 <free>
free(tty);
107856: 5a pop %edx
107857: 8b 55 e0 mov -0x20(%ebp),%edx
10785a: e9 73 ff ff ff jmp 1077d2 <rtems_termios_open+0x7d>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
10785f: c7 82 d4 00 00 00 00 movl $0x0,0xd4(%edx)
107866: 00 00 00
tty->tty_snd.sw_arg = NULL;
107869: c7 82 d8 00 00 00 00 movl $0x0,0xd8(%edx)
107870: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
107873: c7 82 dc 00 00 00 00 movl $0x0,0xdc(%edx)
10787a: 00 00 00
tty->tty_rcv.sw_arg = NULL;
10787d: c7 82 e0 00 00 00 00 movl $0x0,0xe0(%edx)
107884: 00 00 00
tty->tty_rcvwakeup = 0;
107887: c7 82 e4 00 00 00 00 movl $0x0,0xe4(%edx)
10788e: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
107891: 89 32 mov %esi,(%edx)
tty->back = NULL;
107893: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
if (rtems_termios_ttyHead != NULL)
10789a: 85 f6 test %esi,%esi
10789c: 74 03 je 1078a1 <rtems_termios_open+0x14c>
rtems_termios_ttyHead->back = tty;
10789e: 89 56 04 mov %edx,0x4(%esi)
rtems_termios_ttyHead = tty;
1078a1: 89 1d ec 41 12 00 mov %ebx,0x1241ec
if (rtems_termios_ttyTail == NULL)
1078a7: 83 3d e8 41 12 00 00 cmpl $0x0,0x1241e8
1078ae: 75 06 jne 1078b6 <rtems_termios_open+0x161>
rtems_termios_ttyTail = tty;
1078b0: 89 1d e8 41 12 00 mov %ebx,0x1241e8
tty->minor = minor;
1078b6: 8b 45 0c mov 0xc(%ebp),%eax
1078b9: 89 43 10 mov %eax,0x10(%ebx)
tty->major = major;
1078bc: 8b 4d 08 mov 0x8(%ebp),%ecx
1078bf: 89 4b 0c mov %ecx,0xc(%ebx)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
1078c2: 83 ec 0c sub $0xc,%esp
1078c5: 8d 43 14 lea 0x14(%ebx),%eax
1078c8: 50 push %eax
1078c9: 6a 00 push $0x0
1078cb: 6a 54 push $0x54
1078cd: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'i', c),
1078cf: 0f be 05 40 20 12 00 movsbl 0x122040,%eax
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
1078d6: 0d 00 69 52 54 or $0x54526900,%eax
1078db: 50 push %eax
1078dc: 89 55 e0 mov %edx,-0x20(%ebp)
1078df: e8 2c 1c 00 00 call 109510 <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)
1078e4: 83 c4 20 add $0x20,%esp
1078e7: 85 c0 test %eax,%eax
1078e9: 8b 55 e0 mov -0x20(%ebp),%edx
1078ec: 0f 85 42 02 00 00 jne 107b34 <rtems_termios_open+0x3df>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1078f2: 83 ec 0c sub $0xc,%esp
1078f5: 8d 43 18 lea 0x18(%ebx),%eax
1078f8: 50 push %eax
1078f9: 6a 00 push $0x0
1078fb: 6a 54 push $0x54
1078fd: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'o', c),
1078ff: 0f be 05 40 20 12 00 movsbl 0x122040,%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 (
107906: 0d 00 6f 52 54 or $0x54526f00,%eax
10790b: 50 push %eax
10790c: 89 55 e0 mov %edx,-0x20(%ebp)
10790f: e8 fc 1b 00 00 call 109510 <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)
107914: 83 c4 20 add $0x20,%esp
107917: 85 c0 test %eax,%eax
107919: 8b 55 e0 mov -0x20(%ebp),%edx
10791c: 0f 85 12 02 00 00 jne 107b34 <rtems_termios_open+0x3df>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
107922: 83 ec 0c sub $0xc,%esp
107925: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax
10792b: 50 push %eax
10792c: 6a 00 push $0x0
10792e: 6a 20 push $0x20
107930: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'x', c),
107932: 0f be 05 40 20 12 00 movsbl 0x122040,%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 (
107939: 0d 00 78 52 54 or $0x54527800,%eax
10793e: 50 push %eax
10793f: 89 55 e0 mov %edx,-0x20(%ebp)
107942: e8 c9 1b 00 00 call 109510 <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)
107947: 83 c4 20 add $0x20,%esp
10794a: 85 c0 test %eax,%eax
10794c: 8b 55 e0 mov -0x20(%ebp),%edx
10794f: 0f 85 df 01 00 00 jne 107b34 <rtems_termios_open+0x3df>
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
107955: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
10795c: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
10795f: 8d bb 98 00 00 00 lea 0x98(%ebx),%edi
107965: b9 08 00 00 00 mov $0x8,%ecx
10796a: 8b 75 14 mov 0x14(%ebp),%esi
10796d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10796f: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
107976: 75 74 jne 1079ec <rtems_termios_open+0x297>
sc = rtems_task_create (
107978: 50 push %eax
107979: 50 push %eax
10797a: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax
107980: 50 push %eax
107981: 6a 00 push $0x0
107983: 68 00 05 00 00 push $0x500
107988: 68 00 04 00 00 push $0x400
10798d: 6a 0a push $0xa
rtems_build_name ('T', 'x', 'T', c),
10798f: 0f be 05 40 20 12 00 movsbl 0x122040,%eax
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
107996: 0d 00 54 78 54 or $0x54785400,%eax
10799b: 50 push %eax
10799c: 89 55 e0 mov %edx,-0x20(%ebp)
10799f: e8 10 1f 00 00 call 1098b4 <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)
1079a4: 83 c4 20 add $0x20,%esp
1079a7: 85 c0 test %eax,%eax
1079a9: 8b 55 e0 mov -0x20(%ebp),%edx
1079ac: 0f 85 82 01 00 00 jne 107b34 <rtems_termios_open+0x3df><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
1079b2: 57 push %edi
1079b3: 57 push %edi
1079b4: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax
1079ba: 50 push %eax
1079bb: 6a 00 push $0x0
1079bd: 68 00 05 00 00 push $0x500
1079c2: 68 00 04 00 00 push $0x400
1079c7: 6a 09 push $0x9
rtems_build_name ('R', 'x', 'T', c),
1079c9: 0f be 05 40 20 12 00 movsbl 0x122040,%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 (
1079d0: 0d 00 54 78 52 or $0x52785400,%eax
1079d5: 50 push %eax
1079d6: 89 55 e0 mov %edx,-0x20(%ebp)
1079d9: e8 d6 1e 00 00 call 1098b4 <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)
1079de: 83 c4 20 add $0x20,%esp
1079e1: 85 c0 test %eax,%eax
1079e3: 8b 55 e0 mov -0x20(%ebp),%edx
1079e6: 0f 85 48 01 00 00 jne 107b34 <rtems_termios_open+0x3df><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
1079ec: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
1079f3: 74 09 je 1079fe <rtems_termios_open+0x2a9>
1079f5: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1079fc: 75 30 jne 107a2e <rtems_termios_open+0x2d9>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
1079fe: 83 ec 0c sub $0xc,%esp
107a01: 8d 43 68 lea 0x68(%ebx),%eax
107a04: 50 push %eax
107a05: 6a 00 push $0x0
107a07: 6a 24 push $0x24
107a09: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'r', c),
107a0b: 0f be 05 40 20 12 00 movsbl 0x122040,%eax
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
107a12: 0d 00 72 52 54 or $0x54527200,%eax
107a17: 50 push %eax
107a18: 89 55 e0 mov %edx,-0x20(%ebp)
107a1b: e8 f0 1a 00 00 call 109510 <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)
107a20: 83 c4 20 add $0x20,%esp
107a23: 85 c0 test %eax,%eax
107a25: 8b 55 e0 mov -0x20(%ebp),%edx
107a28: 0f 85 06 01 00 00 jne 107b34 <rtems_termios_open+0x3df>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
107a2e: c7 43 30 02 25 00 00 movl $0x2502,0x30(%ebx)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
107a35: c7 43 34 05 18 00 00 movl $0x1805,0x34(%ebx)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
107a3c: c7 43 38 bd 08 00 00 movl $0x8bd,0x38(%ebx)
tty->termios.c_lflag =
107a43: c7 43 3c 3b 82 00 00 movl $0x823b,0x3c(%ebx)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
107a4a: c6 43 41 03 movb $0x3,0x41(%ebx)
tty->termios.c_cc[VQUIT] = '\034';
107a4e: c6 43 42 1c movb $0x1c,0x42(%ebx)
tty->termios.c_cc[VERASE] = '\177';
107a52: c6 43 43 7f movb $0x7f,0x43(%ebx)
tty->termios.c_cc[VKILL] = '\025';
107a56: c6 43 44 15 movb $0x15,0x44(%ebx)
tty->termios.c_cc[VEOF] = '\004';
107a5a: c6 43 45 04 movb $0x4,0x45(%ebx)
tty->termios.c_cc[VEOL] = '\000';
107a5e: c6 43 4c 00 movb $0x0,0x4c(%ebx)
tty->termios.c_cc[VEOL2] = '\000';
107a62: c6 43 51 00 movb $0x0,0x51(%ebx)
tty->termios.c_cc[VSTART] = '\021';
107a66: c6 43 49 11 movb $0x11,0x49(%ebx)
tty->termios.c_cc[VSTOP] = '\023';
107a6a: c6 43 4a 13 movb $0x13,0x4a(%ebx)
tty->termios.c_cc[VSUSP] = '\032';
107a6e: c6 43 4b 1a movb $0x1a,0x4b(%ebx)
tty->termios.c_cc[VREPRINT] = '\022';
107a72: c6 43 4d 12 movb $0x12,0x4d(%ebx)
tty->termios.c_cc[VDISCARD] = '\017';
107a76: c6 43 4e 0f movb $0xf,0x4e(%ebx)
tty->termios.c_cc[VWERASE] = '\027';
107a7a: c6 43 4f 17 movb $0x17,0x4f(%ebx)
tty->termios.c_cc[VLNEXT] = '\026';
107a7e: c6 43 50 16 movb $0x16,0x50(%ebx)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
107a82: c7 83 b8 00 00 00 00 movl $0x0,0xb8(%ebx)
107a89: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
107a8c: 8b 43 64 mov 0x64(%ebx),%eax
107a8f: d1 e8 shr %eax
107a91: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
tty->highwater = tty->rawInBuf.Size * 3/4;
107a97: 8b 43 64 mov 0x64(%ebx),%eax
107a9a: 8d 04 40 lea (%eax,%eax,2),%eax
107a9d: c1 e8 02 shr $0x2,%eax
107aa0: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx)
/*
* Bump name characer
*/
if (c++ == 'z')
107aa6: a0 40 20 12 00 mov 0x122040,%al
107aab: 8d 48 01 lea 0x1(%eax),%ecx
107aae: 88 0d 40 20 12 00 mov %cl,0x122040
107ab4: 3c 7a cmp $0x7a,%al
107ab6: 75 07 jne 107abf <rtems_termios_open+0x36a>
c = 'a';
107ab8: c6 05 40 20 12 00 61 movb $0x61,0x122040
}
args->iop->data1 = tty;
107abf: 8b 4d 10 mov 0x10(%ebp),%ecx
107ac2: 8b 01 mov (%ecx),%eax
107ac4: 89 50 34 mov %edx,0x34(%eax)
if (!tty->refcount++) {
107ac7: 8b 42 08 mov 0x8(%edx),%eax
107aca: 8d 48 01 lea 0x1(%eax),%ecx
107acd: 89 4a 08 mov %ecx,0x8(%edx)
107ad0: 85 c0 test %eax,%eax
107ad2: 75 69 jne 107b3d <rtems_termios_open+0x3e8>
if (tty->device.firstOpen)
107ad4: 8b 82 98 00 00 00 mov 0x98(%edx),%eax
107ada: 85 c0 test %eax,%eax
107adc: 74 15 je 107af3 <rtems_termios_open+0x39e>
(*tty->device.firstOpen)(major, minor, arg);
107ade: 56 push %esi
107adf: ff 75 10 pushl 0x10(%ebp)
107ae2: ff 75 0c pushl 0xc(%ebp)
107ae5: ff 75 08 pushl 0x8(%ebp)
107ae8: 89 55 e0 mov %edx,-0x20(%ebp)
107aeb: ff d0 call *%eax
107aed: 83 c4 10 add $0x10,%esp
107af0: 8b 55 e0 mov -0x20(%ebp),%edx
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
107af3: 83 ba b4 00 00 00 02 cmpl $0x2,0xb4(%edx)
107afa: 75 41 jne 107b3d <rtems_termios_open+0x3e8>
sc = rtems_task_start(
107afc: 53 push %ebx
107afd: 52 push %edx
107afe: 68 1e 8c 10 00 push $0x108c1e
107b03: ff b2 c4 00 00 00 pushl 0xc4(%edx)
107b09: 89 55 e0 mov %edx,-0x20(%ebp)
107b0c: e8 17 20 00 00 call 109b28 <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
107b11: 83 c4 10 add $0x10,%esp
107b14: 85 c0 test %eax,%eax
107b16: 8b 55 e0 mov -0x20(%ebp),%edx
107b19: 75 19 jne 107b34 <rtems_termios_open+0x3df><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
107b1b: 51 push %ecx
107b1c: 52 push %edx
107b1d: 68 50 8e 10 00 push $0x108e50
107b22: ff b2 c8 00 00 00 pushl 0xc8(%edx)
107b28: e8 fb 1f 00 00 call 109b28 <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
107b2d: 83 c4 10 add $0x10,%esp
107b30: 85 c0 test %eax,%eax
107b32: 74 09 je 107b3d <rtems_termios_open+0x3e8><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
107b34: 83 ec 0c sub $0xc,%esp
107b37: 50 push %eax
107b38: e8 c7 21 00 00 call 109d04 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
107b3d: 83 ec 0c sub $0xc,%esp
107b40: ff 35 e4 41 12 00 pushl 0x1241e4
107b46: e8 d9 1c 00 00 call 109824 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
107b4b: 83 c4 10 add $0x10,%esp
}
107b4e: 8b 45 e4 mov -0x1c(%ebp),%eax
107b51: 8d 65 f4 lea -0xc(%ebp),%esp
107b54: 5b pop %ebx
107b55: 5e pop %esi
107b56: 5f pop %edi
107b57: c9 leave
107b58: c3 ret
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
107b59: 52 push %edx
107b5a: 52 push %edx
107b5b: 68 e8 00 00 00 push $0xe8
107b60: 6a 01 push $0x1
107b62: e8 c5 ec ff ff call 10682c <calloc>
107b67: 89 c2 mov %eax,%edx
107b69: 89 c3 mov %eax,%ebx
if (tty == NULL) {
107b6b: 83 c4 10 add $0x10,%esp
107b6e: 85 c0 test %eax,%eax
107b70: 0f 85 33 fc ff ff jne 1077a9 <rtems_termios_open+0x54>
107b76: e9 29 fc ff ff jmp 1077a4 <rtems_termios_open+0x4f>
00108072 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
108072: 55 push %ebp
108073: 89 e5 mov %esp,%ebp
108075: 57 push %edi
108076: 56 push %esi
108077: 53 push %ebx
108078: 83 ec 3c sub $0x3c,%esp
10807b: 8b 45 08 mov 0x8(%ebp),%eax
10807e: 8b 75 0c mov 0xc(%ebp),%esi
108081: 8b 5d 10 mov 0x10(%ebp),%ebx
const unsigned char *buf = _buf;
108084: 89 c7 mov %eax,%edi
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
108086: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
10808d: 75 1b jne 1080aa <rtems_termios_puts+0x38>
(*tty->device.write)(tty->minor, (void *)buf, len);
10808f: 89 75 10 mov %esi,0x10(%ebp)
108092: 89 45 0c mov %eax,0xc(%ebp)
108095: 8b 43 10 mov 0x10(%ebx),%eax
108098: 89 45 08 mov %eax,0x8(%ebp)
10809b: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
1080a1: 8d 65 f4 lea -0xc(%ebp),%esp
1080a4: 5b pop %ebx
1080a5: 5e pop %esi
1080a6: 5f pop %edi
1080a7: 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);
1080a8: ff e0 jmp *%eax
return;
}
newHead = tty->rawOutBuf.Head;
1080aa: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
1080b0: 89 45 e4 mov %eax,-0x1c(%ebp)
while (len) {
1080b3: e9 ca 00 00 00 jmp 108182 <rtems_termios_puts+0x110>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
1080b8: 8b 45 e4 mov -0x1c(%ebp),%eax
1080bb: 40 inc %eax
1080bc: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
1080c2: 31 d2 xor %edx,%edx
1080c4: f7 f1 div %ecx
1080c6: 89 55 c4 mov %edx,-0x3c(%ebp)
1080c9: 89 55 e4 mov %edx,-0x1c(%ebp)
rtems_interrupt_disable (level);
1080cc: 9c pushf
1080cd: fa cli
1080ce: 8f 45 d4 popl -0x2c(%ebp)
1080d1: 8b 55 d4 mov -0x2c(%ebp),%edx
1080d4: 8b 4d c4 mov -0x3c(%ebp),%ecx
while (newHead == tty->rawOutBuf.Tail) {
1080d7: eb 35 jmp 10810e <rtems_termios_puts+0x9c>
tty->rawOutBufState = rob_wait;
1080d9: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
1080e0: 00 00 00
rtems_interrupt_enable (level);
1080e3: 52 push %edx
1080e4: 9d popf
sc = rtems_semaphore_obtain(
1080e5: 50 push %eax
1080e6: 6a 00 push $0x0
1080e8: 6a 00 push $0x0
1080ea: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
1080f0: 89 4d e0 mov %ecx,-0x20(%ebp)
1080f3: e8 40 16 00 00 call 109738 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1080f8: 83 c4 10 add $0x10,%esp
1080fb: 85 c0 test %eax,%eax
1080fd: 8b 4d e0 mov -0x20(%ebp),%ecx
108100: 74 09 je 10810b <rtems_termios_puts+0x99><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
108102: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108105: 50 push %eax <== NOT EXECUTED
108106: e8 f9 1b 00 00 call 109d04 <rtems_fatal_error_occurred><== NOT EXECUTED
rtems_interrupt_disable (level);
10810b: 9c pushf
10810c: fa cli
10810d: 5a pop %edx
* 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) {
10810e: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
108114: 39 c1 cmp %eax,%ecx
108116: 74 c1 je 1080d9 <rtems_termios_puts+0x67>
108118: 89 55 d4 mov %edx,-0x2c(%ebp)
10811b: 89 4d c4 mov %ecx,-0x3c(%ebp)
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++;
10811e: 8b 8b 80 00 00 00 mov 0x80(%ebx),%ecx
108124: 8a 07 mov (%edi),%al
108126: 8b 53 7c mov 0x7c(%ebx),%edx
108129: 88 04 0a mov %al,(%edx,%ecx,1)
10812c: 47 inc %edi
tty->rawOutBuf.Head = newHead;
10812d: 8b 4d c4 mov -0x3c(%ebp),%ecx
108130: 89 8b 80 00 00 00 mov %ecx,0x80(%ebx)
if (tty->rawOutBufState == rob_idle) {
108136: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx)
10813d: 75 3e jne 10817d <rtems_termios_puts+0x10b>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
10813f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108145: a8 10 test $0x10,%al
108147: 75 1b jne 108164 <rtems_termios_puts+0xf2><== NEVER TAKEN
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
108149: 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,
10814f: 51 push %ecx
108150: 6a 01 push $0x1
108152: 03 43 7c add 0x7c(%ebx),%eax
108155: 50 push %eax
108156: ff 73 10 pushl 0x10(%ebx)
108159: ff 93 a4 00 00 00 call *0xa4(%ebx)
10815f: 83 c4 10 add $0x10,%esp
108162: eb 0f jmp 108173 <rtems_termios_puts+0x101>
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
108164: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10816a: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
10816d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
108173: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
10817a: 00 00 00
}
rtems_interrupt_enable (level);
10817d: ff 75 d4 pushl -0x2c(%ebp)
108180: 9d popf
len--;
108181: 4e dec %esi
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
108182: 85 f6 test %esi,%esi
108184: 0f 85 2e ff ff ff jne 1080b8 <rtems_termios_puts+0x46>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
10818a: 8d 65 f4 lea -0xc(%ebp),%esp
10818d: 5b pop %ebx
10818e: 5e pop %esi
10818f: 5f pop %edi
108190: c9 leave
108191: c3 ret
00108699 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
108699: 55 push %ebp
10869a: 89 e5 mov %esp,%ebp
10869c: 57 push %edi
10869d: 56 push %esi
10869e: 53 push %ebx
10869f: 83 ec 40 sub $0x40,%esp
1086a2: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1086a5: 8b 06 mov (%esi),%eax
1086a7: 8b 58 34 mov 0x34(%eax),%ebx
uint32_t count = args->count;
1086aa: 8b 46 10 mov 0x10(%esi),%eax
1086ad: 89 45 e4 mov %eax,-0x1c(%ebp)
char *buffer = args->buffer;
1086b0: 8b 46 0c mov 0xc(%esi),%eax
1086b3: 89 45 e0 mov %eax,-0x20(%ebp)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
1086b6: 6a 00 push $0x0
1086b8: 6a 00 push $0x0
1086ba: ff 73 14 pushl 0x14(%ebx)
1086bd: e8 76 10 00 00 call 109738 <rtems_semaphore_obtain>
1086c2: 89 45 dc mov %eax,-0x24(%ebp)
if (sc != RTEMS_SUCCESSFUL)
1086c5: 83 c4 10 add $0x10,%esp
1086c8: 85 c0 test %eax,%eax
1086ca: 0f 85 9d 02 00 00 jne 10896d <rtems_termios_read+0x2d4><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
1086d0: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
1086d6: c1 e0 05 shl $0x5,%eax
1086d9: 8b 80 9c 3e 12 00 mov 0x123e9c(%eax),%eax
1086df: 85 c0 test %eax,%eax
1086e1: 74 19 je 1086fc <rtems_termios_read+0x63>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
1086e3: 57 push %edi
1086e4: 57 push %edi
1086e5: 56 push %esi
1086e6: 53 push %ebx
1086e7: ff d0 call *%eax
1086e9: 89 45 dc mov %eax,-0x24(%ebp)
tty->tty_rcvwakeup = 0;
1086ec: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
1086f3: 00 00 00
rtems_semaphore_release (tty->isem);
1086f6: 59 pop %ecx
1086f7: e9 66 02 00 00 jmp 108962 <rtems_termios_read+0x2c9>
return sc;
}
if (tty->cindex == tty->ccount) {
1086fc: 8b 43 20 mov 0x20(%ebx),%eax
1086ff: 39 43 24 cmp %eax,0x24(%ebx)
108702: 0f 85 2d 02 00 00 jne 108935 <rtems_termios_read+0x29c><== NEVER TAKEN
tty->cindex = tty->ccount = 0;
108708: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
10870f: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
tty->read_start_column = tty->column;
108716: 8b 43 28 mov 0x28(%ebx),%eax
108719: 89 43 2c mov %eax,0x2c(%ebx)
if (tty->device.pollRead != NULL &&
10871c: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
108723: 0f 84 c4 00 00 00 je 1087ed <rtems_termios_read+0x154>
108729: 83 bb b4 00 00 00 00 cmpl $0x0,0xb4(%ebx)
108730: 0f 85 b7 00 00 00 jne 1087ed <rtems_termios_read+0x154>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
108736: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10873a: 74 35 je 108771 <rtems_termios_read+0xd8>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10873c: 83 ec 0c sub $0xc,%esp
10873f: ff 73 10 pushl 0x10(%ebx)
108742: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
108748: 83 c4 10 add $0x10,%esp
10874b: 85 c0 test %eax,%eax
10874d: 79 0f jns 10875e <rtems_termios_read+0xc5>
rtems_task_wake_after (1);
10874f: 83 ec 0c sub $0xc,%esp
108752: 6a 01 push $0x1
108754: e8 33 14 00 00 call 109b8c <rtems_task_wake_after>
108759: 83 c4 10 add $0x10,%esp
10875c: eb de jmp 10873c <rtems_termios_read+0xa3>
} else {
if (siproc (n, tty))
10875e: 0f b6 c0 movzbl %al,%eax
108761: 89 da mov %ebx,%edx
108763: e8 38 fe ff ff call 1085a0 <siproc>
108768: 85 c0 test %eax,%eax
10876a: 74 d0 je 10873c <rtems_termios_read+0xa3>
10876c: e9 c4 01 00 00 jmp 108935 <rtems_termios_read+0x29c>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
108771: e8 3a 0a 00 00 call 1091b0 <rtems_clock_get_ticks_since_boot>
108776: 89 c7 mov %eax,%edi
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
108778: 83 ec 0c sub $0xc,%esp
10877b: ff 73 10 pushl 0x10(%ebx)
10877e: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
108784: 83 c4 10 add $0x10,%esp
108787: 85 c0 test %eax,%eax
108789: 79 3d jns 1087c8 <rtems_termios_read+0x12f>
if (tty->termios.c_cc[VMIN]) {
10878b: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
10878f: 74 0e je 10879f <rtems_termios_read+0x106><== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
108791: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
108795: 74 22 je 1087b9 <rtems_termios_read+0x120><== NEVER TAKEN
108797: 83 7b 20 00 cmpl $0x0,0x20(%ebx)
10879b: 74 1c je 1087b9 <rtems_termios_read+0x120>
10879d: eb 0a jmp 1087a9 <rtems_termios_read+0x110>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
10879f: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
1087a3: 0f 84 8c 01 00 00 je 108935 <rtems_termios_read+0x29c><== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
1087a9: e8 02 0a 00 00 call 1091b0 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
1087ae: 29 f8 sub %edi,%eax
1087b0: 3b 43 54 cmp 0x54(%ebx),%eax
1087b3: 0f 87 7c 01 00 00 ja 108935 <rtems_termios_read+0x29c>
break;
}
}
rtems_task_wake_after (1);
1087b9: 83 ec 0c sub $0xc,%esp
1087bc: 6a 01 push $0x1
1087be: e8 c9 13 00 00 call 109b8c <rtems_task_wake_after>
1087c3: 83 c4 10 add $0x10,%esp
1087c6: eb b0 jmp 108778 <rtems_termios_read+0xdf>
} else {
siproc (n, tty);
1087c8: 0f b6 c0 movzbl %al,%eax
1087cb: 89 da mov %ebx,%edx
1087cd: e8 ce fd ff ff call 1085a0 <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
1087d2: 8a 43 47 mov 0x47(%ebx),%al
1087d5: 0f b6 d0 movzbl %al,%edx
1087d8: 39 53 20 cmp %edx,0x20(%ebx)
1087db: 0f 8d 54 01 00 00 jge 108935 <rtems_termios_read+0x29c><== NEVER TAKEN
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
1087e1: 84 c0 test %al,%al
1087e3: 74 93 je 108778 <rtems_termios_read+0xdf><== NEVER TAKEN
1087e5: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
1087e9: 74 8d je 108778 <rtems_termios_read+0xdf><== NEVER TAKEN
1087eb: eb 84 jmp 108771 <rtems_termios_read+0xd8>
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
1087ed: 8b 53 74 mov 0x74(%ebx),%edx
rtems_status_code sc;
int wait = (int)1;
1087f0: bf 01 00 00 00 mov $0x1,%edi
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)(
1087f5: 8d 43 49 lea 0x49(%ebx),%eax
1087f8: 89 45 d0 mov %eax,-0x30(%ebp)
1087fb: e9 e6 00 00 00 jmp 1088e6 <rtems_termios_read+0x24d>
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
108800: 8b 43 5c mov 0x5c(%ebx),%eax
108803: 8b 4b 64 mov 0x64(%ebx),%ecx
108806: 40 inc %eax
108807: 31 d2 xor %edx,%edx
108809: f7 f1 div %ecx
c = tty->rawInBuf.theBuf[newHead];
10880b: 8b 43 58 mov 0x58(%ebx),%eax
10880e: 8a 04 10 mov (%eax,%edx,1),%al
108811: 88 45 db mov %al,-0x25(%ebp)
tty->rawInBuf.Head = newHead;
108814: 89 53 5c mov %edx,0x5c(%ebx)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
108817: 8b 43 60 mov 0x60(%ebx),%eax
10881a: 89 45 c4 mov %eax,-0x3c(%ebp)
10881d: 8b 4b 64 mov 0x64(%ebx),%ecx
% tty->rawInBuf.Size)
108820: 8b 43 64 mov 0x64(%ebx),%eax
108823: 89 45 d4 mov %eax,-0x2c(%ebp)
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)
108826: 8b 45 c4 mov -0x3c(%ebp),%eax
108829: 8d 04 01 lea (%ecx,%eax,1),%eax
10882c: 29 d0 sub %edx,%eax
% tty->rawInBuf.Size)
10882e: 31 d2 xor %edx,%edx
108830: f7 75 d4 divl -0x2c(%ebp)
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)
108833: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx
108839: 73 74 jae 1088af <rtems_termios_read+0x216><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
10883b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108841: 83 e0 fe and $0xfffffffe,%eax
108844: 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))
10884a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108850: 25 02 02 00 00 and $0x202,%eax
108855: 3d 02 02 00 00 cmp $0x202,%eax
10885a: 75 24 jne 108880 <rtems_termios_read+0x1e7><== ALWAYS TAKEN
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
10885c: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) <== NOT EXECUTED
108863: 74 0a je 10886f <rtems_termios_read+0x1d6><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
108865: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10886b: a8 20 test $0x20,%al <== NOT EXECUTED
10886d: 74 11 je 108880 <rtems_termios_read+0x1e7><== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
10886f: 52 push %edx <== NOT EXECUTED
108870: 6a 01 push $0x1 <== NOT EXECUTED
108872: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
108875: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108878: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10887e: eb 2c jmp 1088ac <rtems_termios_read+0x213><== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
108880: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108886: f6 c4 01 test $0x1,%ah
108889: 74 24 je 1088af <rtems_termios_read+0x216><== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
10888b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108891: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
108894: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
10889a: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
1088a0: 85 c0 test %eax,%eax <== NOT EXECUTED
1088a2: 74 0b je 1088af <rtems_termios_read+0x216><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
1088a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1088a7: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1088aa: ff d0 call *%eax <== NOT EXECUTED
1088ac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
1088af: f6 43 3c 02 testb $0x2,0x3c(%ebx)
1088b3: 74 12 je 1088c7 <rtems_termios_read+0x22e><== NEVER TAKEN
if (siproc (c, tty))
1088b5: 0f b6 45 db movzbl -0x25(%ebp),%eax
1088b9: 89 da mov %ebx,%edx
1088bb: e8 e0 fc ff ff call 1085a0 <siproc>
wait = 0;
1088c0: 85 c0 test %eax,%eax
1088c2: 0f 94 c0 sete %al
1088c5: eb 15 jmp 1088dc <rtems_termios_read+0x243>
} else {
siproc (c, tty);
1088c7: 0f b6 45 db movzbl -0x25(%ebp),%eax <== NOT EXECUTED
1088cb: 89 da mov %ebx,%edx <== NOT EXECUTED
1088cd: e8 ce fc ff ff call 1085a0 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
1088d2: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED
wait = 0;
1088d6: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
1088d9: 0f 9c c0 setl %al <== NOT EXECUTED
1088dc: 0f b6 c0 movzbl %al,%eax
1088df: f7 d8 neg %eax
1088e1: 21 c7 and %eax,%edi
}
timeout = tty->rawInBufSemaphoreTimeout;
1088e3: 8b 53 70 mov 0x70(%ebx),%edx
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
1088e6: 8b 4b 5c mov 0x5c(%ebx),%ecx
1088e9: 8b 43 60 mov 0x60(%ebx),%eax
1088ec: 39 c1 cmp %eax,%ecx
1088ee: 74 0f je 1088ff <rtems_termios_read+0x266>
(tty->ccount < (CBUFSIZE-1))) {
1088f0: a1 34 20 12 00 mov 0x122034,%eax
1088f5: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
1088f6: 39 43 20 cmp %eax,0x20(%ebx)
1088f9: 0f 8c 01 ff ff ff jl 108800 <rtems_termios_read+0x167><== ALWAYS TAKEN
}
/*
* Wait for characters
*/
if ( wait ) {
1088ff: 85 ff test %edi,%edi
108901: 74 32 je 108935 <rtems_termios_read+0x29c>
sc = rtems_semaphore_obtain(
108903: 50 push %eax
108904: 52 push %edx
108905: ff 73 6c pushl 0x6c(%ebx)
108908: ff 73 68 pushl 0x68(%ebx)
10890b: 89 55 cc mov %edx,-0x34(%ebp)
10890e: e8 25 0e 00 00 call 109738 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
108913: 83 c4 10 add $0x10,%esp
108916: 85 c0 test %eax,%eax
108918: 8b 55 cc mov -0x34(%ebp),%edx
10891b: 74 c9 je 1088e6 <rtems_termios_read+0x24d><== ALWAYS TAKEN
10891d: eb 16 jmp 108935 <rtems_termios_read+0x29c><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
10891f: 8b 7b 1c mov 0x1c(%ebx),%edi
108922: 8b 45 e4 mov -0x1c(%ebp),%eax
108925: 8a 04 07 mov (%edi,%eax,1),%al
108928: 88 01 mov %al,(%ecx)
10892a: 41 inc %ecx
10892b: 8b 45 e4 mov -0x1c(%ebp),%eax
10892e: 40 inc %eax
10892f: 89 43 24 mov %eax,0x24(%ebx)
count--;
108932: 4a dec %edx
108933: eb 06 jmp 10893b <rtems_termios_read+0x2a2>
108935: 8b 55 e4 mov -0x1c(%ebp),%edx
108938: 8b 4d e0 mov -0x20(%ebp),%ecx
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10893b: 85 d2 test %edx,%edx
10893d: 74 0b je 10894a <rtems_termios_read+0x2b1>
10893f: 8b 43 24 mov 0x24(%ebx),%eax
108942: 89 45 e4 mov %eax,-0x1c(%ebp)
108945: 3b 43 20 cmp 0x20(%ebx),%eax
108948: 7c d5 jl 10891f <rtems_termios_read+0x286>
10894a: 89 55 e4 mov %edx,-0x1c(%ebp)
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
10894d: 8b 46 10 mov 0x10(%esi),%eax
108950: 29 d0 sub %edx,%eax
108952: 89 46 18 mov %eax,0x18(%esi)
tty->tty_rcvwakeup = 0;
108955: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10895c: 00 00 00
rtems_semaphore_release (tty->isem);
10895f: 83 ec 0c sub $0xc,%esp
108962: ff 73 14 pushl 0x14(%ebx)
108965: e8 ba 0e 00 00 call 109824 <rtems_semaphore_release>
return sc;
10896a: 83 c4 10 add $0x10,%esp
}
10896d: 8b 45 dc mov -0x24(%ebp),%eax
108970: 8d 65 f4 lea -0xc(%ebp),%esp
108973: 5b pop %ebx
108974: 5e pop %esi
108975: 5f pop %edi
108976: c9 leave
108977: c3 ret
00108c82 <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)
{
108c82: 55 push %ebp
108c83: 89 e5 mov %esp,%ebp
108c85: 57 push %edi
108c86: 56 push %esi
108c87: 53 push %ebx
108c88: 83 ec 0c sub $0xc,%esp
108c8b: 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))
108c8e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108c94: 25 03 04 00 00 and $0x403,%eax
108c99: 3d 01 04 00 00 cmp $0x401,%eax
108c9e: 75 2c jne 108ccc <rtems_termios_refill_transmitter+0x4a><== ALWAYS TAKEN
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
108ca0: 57 push %edi <== NOT EXECUTED
108ca1: 6a 01 push $0x1 <== NOT EXECUTED
108ca3: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
108ca6: 50 push %eax <== NOT EXECUTED
108ca7: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108caa: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
108cb0: 9c pushf <== NOT EXECUTED
108cb1: fa cli <== NOT EXECUTED
108cb2: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
108cb3: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
108cb9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108cbf: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
108cc2: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
108cc8: 52 push %edx <== NOT EXECUTED
108cc9: 9d popf <== NOT EXECUTED
108cca: eb 38 jmp 108d04 <rtems_termios_refill_transmitter+0x82><== NOT EXECUTED
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
108ccc: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108cd2: 83 e0 03 and $0x3,%eax
108cd5: 83 f8 02 cmp $0x2,%eax
108cd8: 75 37 jne 108d11 <rtems_termios_refill_transmitter+0x8f><== ALWAYS TAKEN
* 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);
108cda: 56 push %esi <== NOT EXECUTED
108cdb: 6a 01 push $0x1 <== NOT EXECUTED
108cdd: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
108ce0: 50 push %eax <== NOT EXECUTED
108ce1: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108ce4: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
108cea: 9c pushf <== NOT EXECUTED
108ceb: fa cli <== NOT EXECUTED
108cec: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
108ced: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
108cf3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108cf9: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
108cfc: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
108d02: 52 push %edx <== NOT EXECUTED
108d03: 9d popf <== NOT EXECUTED
108d04: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend = 1;
108d07: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
108d0c: e9 35 01 00 00 jmp 108e46 <rtems_termios_refill_transmitter+0x1c4><== NOT EXECUTED
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
108d11: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
108d17: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
108d1d: 39 c2 cmp %eax,%edx
108d1f: 75 25 jne 108d46 <rtems_termios_refill_transmitter+0xc4>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
108d21: 31 f6 xor %esi,%esi
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
108d23: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
108d2a: 0f 85 16 01 00 00 jne 108e46 <rtems_termios_refill_transmitter+0x1c4><== ALWAYS TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
108d30: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108d33: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED
108d39: e8 e6 0a 00 00 call 109824 <rtems_semaphore_release><== NOT EXECUTED
108d3e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108d41: e9 00 01 00 00 jmp 108e46 <rtems_termios_refill_transmitter+0x1c4><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
108d46: 9c pushf
108d47: fa cli
108d48: 58 pop %eax
len = tty->t_dqlen;
108d49: 8b bb 90 00 00 00 mov 0x90(%ebx),%edi
tty->t_dqlen = 0;
108d4f: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
108d56: 00 00 00
rtems_interrupt_enable(level);
108d59: 50 push %eax
108d5a: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
108d5b: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
108d61: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
108d67: 8d 04 07 lea (%edi,%eax,1),%eax
108d6a: 31 d2 xor %edx,%edx
108d6c: f7 f1 div %ecx
108d6e: 89 d7 mov %edx,%edi
tty->rawOutBuf.Tail = newTail;
108d70: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
108d76: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
108d7d: 75 11 jne 108d90 <rtems_termios_refill_transmitter+0x10e>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
108d7f: 83 ec 0c sub $0xc,%esp
108d82: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
108d88: e8 97 0a 00 00 call 109824 <rtems_semaphore_release>
108d8d: 83 c4 10 add $0x10,%esp
}
if (newTail == tty->rawOutBuf.Head) {
108d90: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
108d96: 39 c7 cmp %eax,%edi
108d98: 75 2a jne 108dc4 <rtems_termios_refill_transmitter+0x142>
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
108d9a: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
108da1: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
108da4: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
108daa: 31 f6 xor %esi,%esi
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
108dac: 85 c0 test %eax,%eax
108dae: 0f 84 8c 00 00 00 je 108e40 <rtems_termios_refill_transmitter+0x1be><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
108db4: 51 push %ecx <== NOT EXECUTED
108db5: 51 push %ecx <== NOT EXECUTED
108db6: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED
108dbc: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
108dbf: 52 push %edx <== NOT EXECUTED
108dc0: ff d0 call *%eax <== NOT EXECUTED
108dc2: eb 79 jmp 108e3d <rtems_termios_refill_transmitter+0x1bb><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
108dc4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108dca: 25 10 02 00 00 and $0x210,%eax
108dcf: 3d 10 02 00 00 cmp $0x210,%eax
108dd4: 75 22 jne 108df8 <rtems_termios_refill_transmitter+0x176><== ALWAYS TAKEN
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
108dd6: 9c pushf <== NOT EXECUTED
108dd7: fa cli <== NOT EXECUTED
108dd8: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
108dd9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108ddf: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
108de2: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
108de8: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
108def: 00 00 00
rtems_interrupt_enable(level);
108df2: 52 push %edx <== NOT EXECUTED
108df3: 9d popf <== NOT EXECUTED
nToSend = 0;
108df4: 31 f6 xor %esi,%esi <== NOT EXECUTED
108df6: eb 48 jmp 108e40 <rtems_termios_refill_transmitter+0x1be><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
108df8: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
108dfe: 39 c7 cmp %eax,%edi
108e00: 76 08 jbe 108e0a <rtems_termios_refill_transmitter+0x188>
nToSend = tty->rawOutBuf.Size - newTail;
108e02: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi
108e08: eb 06 jmp 108e10 <rtems_termios_refill_transmitter+0x18e>
else
nToSend = tty->rawOutBuf.Head - newTail;
108e0a: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi
108e10: 29 fe sub %edi,%esi
/* 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)) {
108e12: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108e18: f6 c4 06 test $0x6,%ah
108e1b: 74 05 je 108e22 <rtems_termios_refill_transmitter+0x1a0>
nToSend = 1;
108e1d: be 01 00 00 00 mov $0x1,%esi
}
tty->rawOutBufState = rob_busy; /*apm*/
108e22: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
108e29: 00 00 00
(*tty->device.write)(
108e2c: 52 push %edx
108e2d: 56 push %esi
108e2e: 8b 43 7c mov 0x7c(%ebx),%eax
108e31: 01 f8 add %edi,%eax
108e33: 50 push %eax
108e34: ff 73 10 pushl 0x10(%ebx)
108e37: ff 93 a4 00 00 00 call *0xa4(%ebx)
108e3d: 83 c4 10 add $0x10,%esp
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
108e40: 89 bb 84 00 00 00 mov %edi,0x84(%ebx)
}
return nToSend;
}
108e46: 89 f0 mov %esi,%eax
108e48: 8d 65 f4 lea -0xc(%ebp),%esp
108e4b: 5b pop %ebx
108e4c: 5e pop %esi
108e4d: 5f pop %edi
108e4e: c9 leave
108e4f: c3 ret
00108c1e <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
108c1e: 55 push %ebp
108c1f: 89 e5 mov %esp,%ebp
108c21: 57 push %edi
108c22: 56 push %esi
108c23: 53 push %ebx
108c24: 83 ec 1c sub $0x1c,%esp
108c27: 8b 5d 08 mov 0x8(%ebp),%ebx
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
108c2a: 8d 7d e0 lea -0x20(%ebp),%edi
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
108c2d: 8d 75 e7 lea -0x19(%ebp),%esi
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
108c30: 57 push %edi
108c31: 6a 00 push $0x0
108c33: 6a 02 push $0x2
108c35: 6a 03 push $0x3
108c37: e8 d8 05 00 00 call 109214 <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) {
108c3c: 83 c4 10 add $0x10,%esp
108c3f: f6 45 e0 01 testb $0x1,-0x20(%ebp)
108c43: 74 17 je 108c5c <rtems_termios_rxdaemon+0x3e><== ALWAYS TAKEN
tty->rxTaskId = 0;
108c45: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
108c4c: 00 00 00
rtems_task_delete(RTEMS_SELF);
108c4f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108c52: 6a 00 push $0x0 <== NOT EXECUTED
108c54: e8 93 0d 00 00 call 1099ec <rtems_task_delete> <== NOT EXECUTED
108c59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
108c5c: 83 ec 0c sub $0xc,%esp
108c5f: ff 73 10 pushl 0x10(%ebx)
108c62: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (c != EOF) {
108c68: 83 c4 10 add $0x10,%esp
108c6b: 83 f8 ff cmp $0xffffffff,%eax
108c6e: 74 c0 je 108c30 <rtems_termios_rxdaemon+0x12>
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
108c70: 88 45 e7 mov %al,-0x19(%ebp)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
108c73: 50 push %eax
108c74: 6a 01 push $0x1
108c76: 56 push %esi
108c77: 53 push %ebx
108c78: e8 16 fd ff ff call 108993 <rtems_termios_enqueue_raw_characters>
108c7d: 83 c4 10 add $0x10,%esp
108c80: eb ae jmp 108c30 <rtems_termios_rxdaemon+0x12>
00108e50 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
108e50: 55 push %ebp
108e51: 89 e5 mov %esp,%ebp
108e53: 56 push %esi
108e54: 53 push %ebx
108e55: 83 ec 10 sub $0x10,%esp
108e58: 8b 5d 08 mov 0x8(%ebp),%ebx
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
108e5b: 8d 75 f4 lea -0xc(%ebp),%esi
108e5e: 56 push %esi
108e5f: 6a 00 push $0x0
108e61: 6a 02 push $0x2
108e63: 6a 03 push $0x3
108e65: e8 aa 03 00 00 call 109214 <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) {
108e6a: 83 c4 10 add $0x10,%esp
108e6d: f6 45 f4 01 testb $0x1,-0xc(%ebp)
108e71: 74 17 je 108e8a <rtems_termios_txdaemon+0x3a><== ALWAYS TAKEN
tty->txTaskId = 0;
108e73: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
108e7a: 00 00 00
rtems_task_delete(RTEMS_SELF);
108e7d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108e80: 6a 00 push $0x0 <== NOT EXECUTED
108e82: e8 65 0b 00 00 call 1099ec <rtems_task_delete> <== NOT EXECUTED
108e87: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
108e8a: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
108e90: c1 e0 05 shl $0x5,%eax
108e93: 8b 80 a8 3e 12 00 mov 0x123ea8(%eax),%eax
108e99: 85 c0 test %eax,%eax
108e9b: 74 09 je 108ea6 <rtems_termios_txdaemon+0x56><== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
108e9d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108ea0: 53 push %ebx <== NOT EXECUTED
108ea1: ff d0 call *%eax <== NOT EXECUTED
108ea3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
108ea6: 83 ec 0c sub $0xc,%esp
108ea9: 53 push %ebx
108eaa: e8 d3 fd ff ff call 108c82 <rtems_termios_refill_transmitter>
}
108eaf: 83 c4 10 add $0x10,%esp
108eb2: eb aa jmp 108e5e <rtems_termios_txdaemon+0xe>
001085f2 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
1085f2: 55 push %ebp
1085f3: 89 e5 mov %esp,%ebp
1085f5: 57 push %edi
1085f6: 56 push %esi
1085f7: 53 push %ebx
1085f8: 83 ec 20 sub $0x20,%esp
1085fb: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1085fe: 8b 03 mov (%ebx),%eax
108600: 8b 70 34 mov 0x34(%eax),%esi
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108603: 6a 00 push $0x0
108605: 6a 00 push $0x0
108607: ff 76 18 pushl 0x18(%esi)
10860a: e8 29 11 00 00 call 109738 <rtems_semaphore_obtain>
10860f: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL)
108611: 83 c4 10 add $0x10,%esp
108614: 85 c0 test %eax,%eax
108616: 75 77 jne 10868f <rtems_termios_write+0x9d><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
108618: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
10861e: c1 e0 05 shl $0x5,%eax
108621: 8b 80 a0 3e 12 00 mov 0x123ea0(%eax),%eax
108627: 85 c0 test %eax,%eax
108629: 74 0b je 108636 <rtems_termios_write+0x44>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
10862b: 57 push %edi
10862c: 57 push %edi
10862d: 53 push %ebx
10862e: 56 push %esi
10862f: ff d0 call *%eax
108631: 89 c7 mov %eax,%edi
rtems_semaphore_release (tty->osem);
108633: 5b pop %ebx
108634: eb 4e jmp 108684 <rtems_termios_write+0x92>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
108636: f6 46 34 01 testb $0x1,0x34(%esi)
10863a: 74 2f je 10866b <rtems_termios_write+0x79><== NEVER TAKEN
uint32_t count = args->count;
10863c: 8b 4b 10 mov 0x10(%ebx),%ecx
char *buffer = args->buffer;
10863f: 8b 43 0c mov 0xc(%ebx),%eax
108642: 89 45 e4 mov %eax,-0x1c(%ebp)
while (count--)
108645: eb 18 jmp 10865f <rtems_termios_write+0x6d>
oproc (*buffer++, tty);
108647: 8b 55 e4 mov -0x1c(%ebp),%edx
10864a: 0f b6 02 movzbl (%edx),%eax
10864d: 42 inc %edx
10864e: 89 55 e4 mov %edx,-0x1c(%ebp)
108651: 89 f2 mov %esi,%edx
108653: 89 4d e0 mov %ecx,-0x20(%ebp)
108656: e8 37 fb ff ff call 108192 <oproc>
10865b: 8b 4d e0 mov -0x20(%ebp),%ecx
10865e: 49 dec %ecx
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
10865f: 85 c9 test %ecx,%ecx
108661: 75 e4 jne 108647 <rtems_termios_write+0x55>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
108663: 8b 43 10 mov 0x10(%ebx),%eax
108666: 89 43 18 mov %eax,0x18(%ebx)
108669: eb 16 jmp 108681 <rtems_termios_write+0x8f>
} else {
rtems_termios_puts (args->buffer, args->count, tty);
10866b: 51 push %ecx <== NOT EXECUTED
10866c: 56 push %esi <== NOT EXECUTED
10866d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108670: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
108673: e8 fa f9 ff ff call 108072 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
108678: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10867b: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED
10867e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
108681: 83 ec 0c sub $0xc,%esp
108684: ff 76 18 pushl 0x18(%esi)
108687: e8 98 11 00 00 call 109824 <rtems_semaphore_release>
return sc;
10868c: 83 c4 10 add $0x10,%esp
}
10868f: 89 f8 mov %edi,%eax
108691: 8d 65 f4 lea -0xc(%ebp),%esp
108694: 5b pop %ebx
108695: 5e pop %esi
108696: 5f pop %edi
108697: c9 leave
108698: c3 ret
00115aac <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
115aac: 55 push %ebp
115aad: 89 e5 mov %esp,%ebp
115aaf: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
115ab2: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
115ab5: 50 push %eax
115ab6: ff 75 08 pushl 0x8(%ebp)
115ab9: 68 fc df 13 00 push $0x13dffc
115abe: e8 49 27 00 00 call 11820c <_Objects_Get>
switch ( location ) {
115ac3: 83 c4 10 add $0x10,%esp
115ac6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115aca: 75 1e jne 115aea <rtems_timer_cancel+0x3e>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
115acc: 83 78 38 04 cmpl $0x4,0x38(%eax)
115ad0: 74 0f je 115ae1 <rtems_timer_cancel+0x35><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
115ad2: 83 ec 0c sub $0xc,%esp
115ad5: 83 c0 10 add $0x10,%eax
115ad8: 50 push %eax
115ad9: e8 0e 41 00 00 call 119bec <_Watchdog_Remove>
115ade: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
115ae1: e8 d8 31 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115ae6: 31 c0 xor %eax,%eax
115ae8: eb 05 jmp 115aef <rtems_timer_cancel+0x43>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115aea: b8 04 00 00 00 mov $0x4,%eax
}
115aef: c9 leave
115af0: c3 ret
00115f0c <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
115f0c: 55 push %ebp
115f0d: 89 e5 mov %esp,%ebp
115f0f: 57 push %edi
115f10: 56 push %esi
115f11: 53 push %ebx
115f12: 83 ec 1c sub $0x1c,%esp
115f15: 8b 7d 0c mov 0xc(%ebp),%edi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
115f18: 8b 35 3c e0 13 00 mov 0x13e03c,%esi
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
115f1e: bb 0e 00 00 00 mov $0xe,%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
115f23: 85 f6 test %esi,%esi
115f25: 0f 84 b1 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
115f2b: b3 0b mov $0xb,%bl
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
115f2d: 80 3d c8 d6 13 00 00 cmpb $0x0,0x13d6c8
115f34: 0f 84 a2 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
115f3a: b3 09 mov $0x9,%bl
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
115f3c: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
115f40: 0f 84 96 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
115f46: 83 ec 0c sub $0xc,%esp
115f49: 57 push %edi
115f4a: e8 b5 d6 ff ff call 113604 <_TOD_Validate>
115f4f: 83 c4 10 add $0x10,%esp
return RTEMS_INVALID_CLOCK;
115f52: b3 14 mov $0x14,%bl
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
115f54: 84 c0 test %al,%al
115f56: 0f 84 80 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
115f5c: 83 ec 0c sub $0xc,%esp
115f5f: 57 push %edi
115f60: e8 37 d6 ff ff call 11359c <_TOD_To_seconds>
115f65: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
115f67: 83 c4 10 add $0x10,%esp
115f6a: 3b 05 40 d7 13 00 cmp 0x13d740,%eax
115f70: 76 6a jbe 115fdc <rtems_timer_server_fire_when+0xd0>
115f72: 51 push %ecx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
115f73: 8d 45 e4 lea -0x1c(%ebp),%eax
115f76: 50 push %eax
115f77: ff 75 08 pushl 0x8(%ebp)
115f7a: 68 fc df 13 00 push $0x13dffc
115f7f: e8 88 22 00 00 call 11820c <_Objects_Get>
115f84: 89 c3 mov %eax,%ebx
switch ( location ) {
115f86: 83 c4 10 add $0x10,%esp
115f89: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
115f8d: 75 48 jne 115fd7 <rtems_timer_server_fire_when+0xcb>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
115f8f: 83 ec 0c sub $0xc,%esp
115f92: 8d 40 10 lea 0x10(%eax),%eax
115f95: 50 push %eax
115f96: e8 51 3c 00 00 call 119bec <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
115f9b: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
115fa2: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_watchdog->routine = routine;
115fa9: 8b 45 10 mov 0x10(%ebp),%eax
115fac: 89 43 2c mov %eax,0x2c(%ebx)
the_watchdog->id = id;
115faf: 8b 45 08 mov 0x8(%ebp),%eax
115fb2: 89 43 30 mov %eax,0x30(%ebx)
the_watchdog->user_data = user_data;
115fb5: 8b 45 14 mov 0x14(%ebp),%eax
115fb8: 89 43 34 mov %eax,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
115fbb: 2b 3d 40 d7 13 00 sub 0x13d740,%edi
115fc1: 89 7b 1c mov %edi,0x1c(%ebx)
(*timer_server->schedule_operation)( timer_server, the_timer );
115fc4: 58 pop %eax
115fc5: 5a pop %edx
115fc6: 53 push %ebx
115fc7: 56 push %esi
115fc8: ff 56 04 call *0x4(%esi)
_Thread_Enable_dispatch();
115fcb: e8 ee 2c 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115fd0: 83 c4 10 add $0x10,%esp
115fd3: 31 db xor %ebx,%ebx
115fd5: eb 05 jmp 115fdc <rtems_timer_server_fire_when+0xd0>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115fd7: bb 04 00 00 00 mov $0x4,%ebx
}
115fdc: 89 d8 mov %ebx,%eax
115fde: 8d 65 f4 lea -0xc(%ebp),%esp
115fe1: 5b pop %ebx
115fe2: 5e pop %esi
115fe3: 5f pop %edi
115fe4: c9 leave
115fe5: c3 ret
0010a79d <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
10a79d: 55 push %ebp
10a79e: 89 e5 mov %esp,%ebp
10a7a0: 57 push %edi
10a7a1: 56 push %esi
10a7a2: 53 push %ebx
10a7a3: 83 ec 1c sub $0x1c,%esp
10a7a6: 89 c3 mov %eax,%ebx
10a7a8: 89 55 e4 mov %edx,-0x1c(%ebp)
10a7ab: 89 4d e0 mov %ecx,-0x20(%ebp)
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
10a7ae: a9 00 00 00 20 test $0x20000000,%eax
10a7b3: 74 2c je 10a7e1 <rtems_verror+0x44>
if (rtems_panic_in_progress++)
10a7b5: a1 f0 a2 12 00 mov 0x12a2f0,%eax
10a7ba: 8d 50 01 lea 0x1(%eax),%edx
10a7bd: 89 15 f0 a2 12 00 mov %edx,0x12a2f0
10a7c3: 85 c0 test %eax,%eax
10a7c5: 74 0b je 10a7d2 <rtems_verror+0x35> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10a7c7: a1 38 a4 12 00 mov 0x12a438,%eax <== NOT EXECUTED
10a7cc: 40 inc %eax <== NOT EXECUTED
10a7cd: a3 38 a4 12 00 mov %eax,0x12a438 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
10a7d2: 31 f6 xor %esi,%esi
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
10a7d4: 83 3d f0 a2 12 00 02 cmpl $0x2,0x12a2f0
10a7db: 0f 8f da 00 00 00 jg 10a8bb <rtems_verror+0x11e> <== NEVER TAKEN
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
10a7e1: 83 ec 0c sub $0xc,%esp
10a7e4: a1 80 81 12 00 mov 0x128180,%eax
10a7e9: ff 70 08 pushl 0x8(%eax)
10a7ec: e8 b3 b0 00 00 call 1158a4 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
10a7f1: 89 df mov %ebx,%edi
10a7f3: 81 e7 ff ff ff 8f and $0x8fffffff,%edi
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
10a7f9: 83 c4 10 add $0x10,%esp
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
10a7fc: 31 f6 xor %esi,%esi
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
10a7fe: 81 e3 00 00 00 40 and $0x40000000,%ebx
10a804: 74 07 je 10a80d <rtems_verror+0x70>
local_errno = errno;
10a806: e8 01 ad 00 00 call 11550c <__errno>
10a80b: 8b 30 mov (%eax),%esi
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
10a80d: 53 push %ebx
10a80e: ff 75 e0 pushl -0x20(%ebp)
10a811: ff 75 e4 pushl -0x1c(%ebp)
10a814: a1 80 81 12 00 mov 0x128180,%eax
10a819: ff 70 0c pushl 0xc(%eax)
10a81c: e8 23 16 01 00 call 11be44 <vfprintf>
10a821: 89 c3 mov %eax,%ebx
if (status)
10a823: 83 c4 10 add $0x10,%esp
10a826: 85 ff test %edi,%edi
10a828: 74 24 je 10a84e <rtems_verror+0xb1>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
10a82a: 83 ec 0c sub $0xc,%esp
10a82d: 57 push %edi
10a82e: e8 55 ff ff ff call 10a788 <rtems_status_text>
10a833: 83 c4 0c add $0xc,%esp
10a836: 50 push %eax
10a837: 68 67 3e 12 00 push $0x123e67
10a83c: a1 80 81 12 00 mov 0x128180,%eax
10a841: ff 70 0c pushl 0xc(%eax)
10a844: e8 4f b4 00 00 call 115c98 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
10a849: 01 c3 add %eax,%ebx
10a84b: 83 c4 10 add $0x10,%esp
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
10a84e: 83 fe 00 cmp $0x0,%esi
10a851: 74 40 je 10a893 <rtems_verror+0xf6>
if ((local_errno > 0) && *strerror(local_errno))
10a853: 7e 25 jle 10a87a <rtems_verror+0xdd>
10a855: 83 ec 0c sub $0xc,%esp
10a858: 56 push %esi
10a859: e8 de bc 00 00 call 11653c <strerror>
10a85e: 83 c4 10 add $0x10,%esp
10a861: 80 38 00 cmpb $0x0,(%eax)
10a864: 74 14 je 10a87a <rtems_verror+0xdd> <== NEVER TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
10a866: 83 ec 0c sub $0xc,%esp
10a869: 56 push %esi
10a86a: e8 cd bc 00 00 call 11653c <strerror>
10a86f: 83 c4 0c add $0xc,%esp
10a872: 50 push %eax
10a873: 68 75 3e 12 00 push $0x123e75
10a878: eb 07 jmp 10a881 <rtems_verror+0xe4>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
10a87a: 51 push %ecx
10a87b: 56 push %esi
10a87c: 68 82 3e 12 00 push $0x123e82
10a881: a1 80 81 12 00 mov 0x128180,%eax
10a886: ff 70 0c pushl 0xc(%eax)
10a889: e8 0a b4 00 00 call 115c98 <fprintf>
10a88e: 01 c3 add %eax,%ebx
10a890: 83 c4 10 add $0x10,%esp
}
chars_written += fprintf(stderr, "\n");
10a893: 52 push %edx
10a894: 52 push %edx
10a895: 68 e4 45 12 00 push $0x1245e4
10a89a: a1 80 81 12 00 mov 0x128180,%eax
10a89f: ff 70 0c pushl 0xc(%eax)
10a8a2: e8 f1 b3 00 00 call 115c98 <fprintf>
10a8a7: 8d 34 18 lea (%eax,%ebx,1),%esi
(void) fflush(stderr);
10a8aa: 58 pop %eax
10a8ab: a1 80 81 12 00 mov 0x128180,%eax
10a8b0: ff 70 0c pushl 0xc(%eax)
10a8b3: e8 ec af 00 00 call 1158a4 <fflush>
return chars_written;
10a8b8: 83 c4 10 add $0x10,%esp
}
10a8bb: 89 f0 mov %esi,%eax
10a8bd: 8d 65 f4 lea -0xc(%ebp),%esp
10a8c0: 5b pop %ebx
10a8c1: 5e pop %esi
10a8c2: 5f pop %edi
10a8c3: c9 leave
10a8c4: c3 ret
00106f80 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
106f80: 55 push %ebp
106f81: 89 e5 mov %esp,%ebp
106f83: 57 push %edi
106f84: 56 push %esi
106f85: 53 push %ebx
106f86: 83 ec 3c sub $0x3c,%esp
106f89: 89 c3 mov %eax,%ebx
106f8b: 89 55 e0 mov %edx,-0x20(%ebp)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
106f8e: 31 f6 xor %esi,%esi
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
106f90: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp)
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
106f97: 31 ff xor %edi,%edi
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
106f99: 89 7d c4 mov %edi,-0x3c(%ebp)
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
106f9c: 8b 43 04 mov 0x4(%ebx),%eax
106f9f: 48 dec %eax
106fa0: 89 43 04 mov %eax,0x4(%ebx)
106fa3: 85 c0 test %eax,%eax
106fa5: 79 15 jns 106fbc <scanInt+0x3c> <== ALWAYS TAKEN
106fa7: 50 push %eax <== NOT EXECUTED
106fa8: 50 push %eax <== NOT EXECUTED
106fa9: 53 push %ebx <== NOT EXECUTED
106faa: ff 35 20 41 12 00 pushl 0x124120 <== NOT EXECUTED
106fb0: e8 5f c4 00 00 call 113414 <__srget_r> <== NOT EXECUTED
106fb5: 89 c1 mov %eax,%ecx <== NOT EXECUTED
106fb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106fba: eb 08 jmp 106fc4 <scanInt+0x44> <== NOT EXECUTED
106fbc: 8b 03 mov (%ebx),%eax
106fbe: 0f b6 08 movzbl (%eax),%ecx
106fc1: 40 inc %eax
106fc2: 89 03 mov %eax,(%ebx)
if (c == ':')
106fc4: 83 f9 3a cmp $0x3a,%ecx
106fc7: 74 4a je 107013 <scanInt+0x93>
break;
if (sign == 0) {
106fc9: 85 f6 test %esi,%esi
106fcb: 75 11 jne 106fde <scanInt+0x5e>
if (c == '-') {
sign = -1;
limit++;
continue;
}
sign = 1;
106fcd: 66 be 01 00 mov $0x1,%si
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
106fd1: 83 f9 2d cmp $0x2d,%ecx
106fd4: 75 08 jne 106fde <scanInt+0x5e>
sign = -1;
limit++;
106fd6: ff 45 e4 incl -0x1c(%ebp)
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
106fd9: 83 ce ff or $0xffffffff,%esi
limit++;
continue;
106fdc: eb be jmp 106f9c <scanInt+0x1c>
}
sign = 1;
}
if (!isdigit(c))
106fde: a1 00 41 12 00 mov 0x124100,%eax
106fe3: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1)
106fe8: 74 41 je 10702b <scanInt+0xab>
return 0;
d = c - '0';
if ((i > (limit / 10))
106fea: 8b 45 e4 mov -0x1c(%ebp),%eax
106fed: bf 0a 00 00 00 mov $0xa,%edi
106ff2: 31 d2 xor %edx,%edx
106ff4: f7 f7 div %edi
106ff6: 89 55 d4 mov %edx,-0x2c(%ebp)
106ff9: 39 45 c4 cmp %eax,-0x3c(%ebp)
106ffc: 77 2d ja 10702b <scanInt+0xab>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
106ffe: 83 e9 30 sub $0x30,%ecx
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
107001: 39 45 c4 cmp %eax,-0x3c(%ebp)
107004: 75 04 jne 10700a <scanInt+0x8a>
107006: 39 d1 cmp %edx,%ecx
107008: 77 21 ja 10702b <scanInt+0xab> <== ALWAYS TAKEN
return 0;
i = i * 10 + d;
10700a: 6b 7d c4 0a imul $0xa,-0x3c(%ebp),%edi
10700e: 8d 3c 39 lea (%ecx,%edi,1),%edi
107011: eb 86 jmp 106f99 <scanInt+0x19>
107013: 8b 7d c4 mov -0x3c(%ebp),%edi
}
if (sign == 0)
return 0;
107016: 31 c0 xor %eax,%eax
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
107018: 85 f6 test %esi,%esi
10701a: 74 11 je 10702d <scanInt+0xad> <== NEVER TAKEN
return 0;
*val = i * sign;
10701c: 0f af f7 imul %edi,%esi
10701f: 8b 45 e0 mov -0x20(%ebp),%eax
107022: 89 30 mov %esi,(%eax)
return 1;
107024: b8 01 00 00 00 mov $0x1,%eax
107029: eb 02 jmp 10702d <scanInt+0xad>
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
10702b: 31 c0 xor %eax,%eax
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
10702d: 8d 65 f4 lea -0xc(%ebp),%esp
107030: 5b pop %ebx
107031: 5e pop %esi
107032: 5f pop %edi
107033: c9 leave
107034: c3 ret
001070c0 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
1070c0: 55 push %ebp
1070c1: 89 e5 mov %esp,%ebp
1070c3: 57 push %edi
1070c4: 56 push %esi
1070c5: 53 push %ebx
1070c6: 83 ec 34 sub $0x34,%esp
1070c9: 89 c7 mov %eax,%edi
1070cb: 89 d3 mov %edx,%ebx
1070cd: 89 4d d4 mov %ecx,-0x2c(%ebp)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
1070d0: 6a 00 push $0x0
1070d2: 8d 45 08 lea 0x8(%ebp),%eax
1070d5: 50 push %eax
1070d6: 8d 4d d4 lea -0x2c(%ebp),%ecx
1070d9: 89 f8 mov %edi,%eax
1070db: e8 55 ff ff ff call 107035 <scanString>
1070e0: 83 c4 10 add $0x10,%esp
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
1070e3: 31 f6 xor %esi,%esi
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
1070e5: 85 c0 test %eax,%eax
1070e7: 0f 84 c2 00 00 00 je 1071af <scangr+0xef>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
1070ed: 50 push %eax
1070ee: 50 push %eax
1070ef: 8d 53 04 lea 0x4(%ebx),%edx
1070f2: 6a 00 push $0x0
1070f4: 8d 45 08 lea 0x8(%ebp),%eax
1070f7: 50 push %eax
1070f8: 8d 4d d4 lea -0x2c(%ebp),%ecx
1070fb: 89 f8 mov %edi,%eax
1070fd: e8 33 ff ff ff call 107035 <scanString>
107102: 83 c4 10 add $0x10,%esp
107105: 85 c0 test %eax,%eax
107107: 0f 84 a2 00 00 00 je 1071af <scangr+0xef> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
10710d: 8d 55 e4 lea -0x1c(%ebp),%edx
107110: 89 f8 mov %edi,%eax
107112: e8 69 fe ff ff call 106f80 <scanInt>
107117: 85 c0 test %eax,%eax
107119: 0f 84 90 00 00 00 je 1071af <scangr+0xef> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
10711f: 51 push %ecx
107120: 51 push %ecx
107121: 8d 55 e0 lea -0x20(%ebp),%edx
107124: 6a 01 push $0x1
107126: 8d 45 08 lea 0x8(%ebp),%eax
107129: 50 push %eax
10712a: 8d 4d d4 lea -0x2c(%ebp),%ecx
10712d: 89 f8 mov %edi,%eax
10712f: e8 01 ff ff ff call 107035 <scanString>
107134: 83 c4 10 add $0x10,%esp
107137: 85 c0 test %eax,%eax
107139: 74 74 je 1071af <scangr+0xef> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
10713b: 8b 45 e4 mov -0x1c(%ebp),%eax
10713e: 66 89 43 08 mov %ax,0x8(%ebx)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107142: 8b 4d e0 mov -0x20(%ebp),%ecx
107145: 89 ca mov %ecx,%edx
107147: b8 01 00 00 00 mov $0x1,%eax
10714c: 89 c6 mov %eax,%esi
10714e: eb 0b jmp 10715b <scangr+0x9b>
if(*cp == ',')
memcount++;
107150: 3c 2c cmp $0x2c,%al
107152: 0f 94 c0 sete %al
107155: 0f b6 c0 movzbl %al,%eax
107158: 01 c6 add %eax,%esi
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
10715a: 42 inc %edx
10715b: 8a 02 mov (%edx),%al
10715d: 84 c0 test %al,%al
10715f: 75 ef jne 107150 <scangr+0x90>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
107161: 8d 04 b5 13 00 00 00 lea 0x13(,%esi,4),%eax
return 0;
107168: 31 f6 xor %esi,%esi
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
10716a: 39 45 08 cmp %eax,0x8(%ebp)
10716d: 72 40 jb 1071af <scangr+0xef> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
10716f: 8b 45 d4 mov -0x2c(%ebp),%eax
107172: 83 c0 0f add $0xf,%eax
107175: 83 e0 f0 and $0xfffffff0,%eax
107178: 89 43 0c mov %eax,0xc(%ebx)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
10717b: 89 08 mov %ecx,(%eax)
}
/*
* Extract a single group record from the database
*/
static int scangr(
10717d: 8b 45 e0 mov -0x20(%ebp),%eax
107180: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107181: ba 01 00 00 00 mov $0x1,%edx
107186: eb 11 jmp 107199 <scangr+0xd9>
if(*cp == ',') {
107188: 80 f9 2c cmp $0x2c,%cl
10718b: 75 0b jne 107198 <scangr+0xd8>
*cp = '\0';
10718d: c6 40 ff 00 movb $0x0,-0x1(%eax)
grp->gr_mem[memcount++] = cp + 1;
107191: 8b 4b 0c mov 0xc(%ebx),%ecx
107194: 89 04 91 mov %eax,(%ecx,%edx,4)
107197: 42 inc %edx
107198: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
107199: 8a 48 ff mov -0x1(%eax),%cl
10719c: 84 c9 test %cl,%cl
10719e: 75 e8 jne 107188 <scangr+0xc8>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
1071a0: 8b 43 0c mov 0xc(%ebx),%eax
1071a3: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
return 1;
1071aa: be 01 00 00 00 mov $0x1,%esi
}
1071af: 89 f0 mov %esi,%eax
1071b1: 8d 65 f4 lea -0xc(%ebp),%esp
1071b4: 5b pop %ebx
1071b5: 5e pop %esi
1071b6: 5f pop %edi
1071b7: c9 leave
1071b8: c3 ret
001071b9 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
1071b9: 55 push %ebp
1071ba: 89 e5 mov %esp,%ebp
1071bc: 57 push %edi
1071bd: 56 push %esi
1071be: 53 push %ebx
1071bf: 83 ec 34 sub $0x34,%esp
1071c2: 89 c6 mov %eax,%esi
1071c4: 89 d3 mov %edx,%ebx
1071c6: 89 4d d4 mov %ecx,-0x2c(%ebp)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
1071c9: 8d 7d d4 lea -0x2c(%ebp),%edi
1071cc: 6a 00 push $0x0
1071ce: 8d 45 08 lea 0x8(%ebp),%eax
1071d1: 50 push %eax
1071d2: 89 f9 mov %edi,%ecx
1071d4: 89 f0 mov %esi,%eax
1071d6: e8 5a fe ff ff call 107035 <scanString>
1071db: 83 c4 10 add $0x10,%esp
|| !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;
1071de: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
1071e5: 85 c0 test %eax,%eax
1071e7: 0f 84 c4 00 00 00 je 1072b1 <scanpw+0xf8>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
1071ed: 51 push %ecx
1071ee: 51 push %ecx
1071ef: 8d 53 04 lea 0x4(%ebx),%edx
1071f2: 6a 00 push $0x0
1071f4: 8d 45 08 lea 0x8(%ebp),%eax
1071f7: 50 push %eax
1071f8: 89 f9 mov %edi,%ecx
1071fa: 89 f0 mov %esi,%eax
1071fc: e8 34 fe ff ff call 107035 <scanString>
107201: 83 c4 10 add $0x10,%esp
107204: 85 c0 test %eax,%eax
107206: 0f 84 a5 00 00 00 je 1072b1 <scanpw+0xf8> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
10720c: 8d 55 e4 lea -0x1c(%ebp),%edx
10720f: 89 f0 mov %esi,%eax
107211: e8 6a fd ff ff call 106f80 <scanInt>
107216: 85 c0 test %eax,%eax
107218: 0f 84 93 00 00 00 je 1072b1 <scanpw+0xf8>
|| !scanInt(fp, &pwgid)
10721e: 8d 55 e0 lea -0x20(%ebp),%edx
107221: 89 f0 mov %esi,%eax
107223: e8 58 fd ff ff call 106f80 <scanInt>
107228: 85 c0 test %eax,%eax
10722a: 0f 84 81 00 00 00 je 1072b1 <scanpw+0xf8>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
107230: 52 push %edx
107231: 52 push %edx
107232: 8d 53 0c lea 0xc(%ebx),%edx
107235: 6a 00 push $0x0
107237: 8d 45 08 lea 0x8(%ebp),%eax
10723a: 50 push %eax
10723b: 89 f9 mov %edi,%ecx
10723d: 89 f0 mov %esi,%eax
10723f: e8 f1 fd ff ff call 107035 <scanString>
107244: 83 c4 10 add $0x10,%esp
107247: 85 c0 test %eax,%eax
107249: 74 66 je 1072b1 <scanpw+0xf8> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
10724b: 50 push %eax
10724c: 50 push %eax
10724d: 8d 53 10 lea 0x10(%ebx),%edx
107250: 6a 00 push $0x0
107252: 8d 45 08 lea 0x8(%ebp),%eax
107255: 50 push %eax
107256: 89 f9 mov %edi,%ecx
107258: 89 f0 mov %esi,%eax
10725a: e8 d6 fd ff ff call 107035 <scanString>
10725f: 83 c4 10 add $0x10,%esp
107262: 85 c0 test %eax,%eax
107264: 74 4b je 1072b1 <scanpw+0xf8> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
107266: 51 push %ecx
107267: 51 push %ecx
107268: 8d 53 14 lea 0x14(%ebx),%edx
10726b: 6a 00 push $0x0
10726d: 8d 45 08 lea 0x8(%ebp),%eax
107270: 50 push %eax
107271: 89 f9 mov %edi,%ecx
107273: 89 f0 mov %esi,%eax
107275: e8 bb fd ff ff call 107035 <scanString>
10727a: 83 c4 10 add $0x10,%esp
10727d: 85 c0 test %eax,%eax
10727f: 74 30 je 1072b1 <scanpw+0xf8> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
107281: 52 push %edx
107282: 52 push %edx
107283: 8d 53 18 lea 0x18(%ebx),%edx
107286: 6a 01 push $0x1
107288: 8d 45 08 lea 0x8(%ebp),%eax
10728b: 50 push %eax
10728c: 89 f9 mov %edi,%ecx
10728e: 89 f0 mov %esi,%eax
107290: e8 a0 fd ff ff call 107035 <scanString>
107295: 83 c4 10 add $0x10,%esp
107298: 85 c0 test %eax,%eax
10729a: 74 15 je 1072b1 <scanpw+0xf8>
return 0;
pwd->pw_uid = pwuid;
10729c: 8b 45 e4 mov -0x1c(%ebp),%eax
10729f: 66 89 43 08 mov %ax,0x8(%ebx)
pwd->pw_gid = pwgid;
1072a3: 8b 45 e0 mov -0x20(%ebp),%eax
1072a6: 66 89 43 0a mov %ax,0xa(%ebx)
return 1;
1072aa: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp)
}
1072b1: 8b 45 d0 mov -0x30(%ebp),%eax
1072b4: 8d 65 f4 lea -0xc(%ebp),%esp
1072b7: 5b pop %ebx
1072b8: 5e pop %esi
1072b9: 5f pop %edi
1072ba: c9 leave
1072bb: c3 ret
00109f68 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
109f68: 55 push %ebp
109f69: 89 e5 mov %esp,%ebp
109f6b: 83 ec 08 sub $0x8,%esp
109f6e: 8b 4d 08 mov 0x8(%ebp),%ecx
switch ( policy ) {
109f71: 83 f9 04 cmp $0x4,%ecx
109f74: 77 0b ja 109f81 <sched_get_priority_max+0x19>
109f76: b8 01 00 00 00 mov $0x1,%eax
109f7b: d3 e0 shl %cl,%eax
109f7d: a8 17 test $0x17,%al
109f7f: 75 10 jne 109f91 <sched_get_priority_max+0x29><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
109f81: e8 fe 78 00 00 call 111884 <__errno>
109f86: c7 00 16 00 00 00 movl $0x16,(%eax)
109f8c: 83 c8 ff or $0xffffffff,%eax
109f8f: eb 08 jmp 109f99 <sched_get_priority_max+0x31>
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
109f91: 0f b6 05 48 12 12 00 movzbl 0x121248,%eax
109f98: 48 dec %eax
}
109f99: c9 leave
109f9a: c3 ret
00109f9c <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
109f9c: 55 push %ebp
109f9d: 89 e5 mov %esp,%ebp
109f9f: 83 ec 08 sub $0x8,%esp
109fa2: 8b 4d 08 mov 0x8(%ebp),%ecx
switch ( policy ) {
109fa5: 83 f9 04 cmp $0x4,%ecx
109fa8: 77 11 ja 109fbb <sched_get_priority_min+0x1f>
109faa: ba 01 00 00 00 mov $0x1,%edx
109faf: d3 e2 shl %cl,%edx
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
109fb1: b8 01 00 00 00 mov $0x1,%eax
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
109fb6: 80 e2 17 and $0x17,%dl
109fb9: 75 0e jne 109fc9 <sched_get_priority_min+0x2d><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
109fbb: e8 c4 78 00 00 call 111884 <__errno>
109fc0: c7 00 16 00 00 00 movl $0x16,(%eax)
109fc6: 83 c8 ff or $0xffffffff,%eax
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
109fc9: c9 leave
109fca: c3 ret
00109fcc <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
109fcc: 55 push %ebp
109fcd: 89 e5 mov %esp,%ebp
109fcf: 56 push %esi
109fd0: 53 push %ebx
109fd1: 8b 75 08 mov 0x8(%ebp),%esi
109fd4: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
109fd7: 85 f6 test %esi,%esi
109fd9: 74 16 je 109ff1 <sched_rr_get_interval+0x25><== NEVER TAKEN
109fdb: e8 90 d0 ff ff call 107070 <getpid>
109fe0: 39 c6 cmp %eax,%esi
109fe2: 74 0d je 109ff1 <sched_rr_get_interval+0x25>
rtems_set_errno_and_return_minus_one( ESRCH );
109fe4: e8 9b 78 00 00 call 111884 <__errno>
109fe9: c7 00 03 00 00 00 movl $0x3,(%eax)
109fef: eb 0f jmp 10a000 <sched_rr_get_interval+0x34>
if ( !interval )
109ff1: 85 db test %ebx,%ebx
109ff3: 75 10 jne 10a005 <sched_rr_get_interval+0x39><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
109ff5: e8 8a 78 00 00 call 111884 <__errno>
109ffa: c7 00 16 00 00 00 movl $0x16,(%eax)
10a000: 83 c8 ff or $0xffffffff,%eax
10a003: eb 13 jmp 10a018 <sched_rr_get_interval+0x4c>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10a005: 50 push %eax
10a006: 50 push %eax
10a007: 53 push %ebx
10a008: ff 35 a8 52 12 00 pushl 0x1252a8
10a00e: e8 b1 2e 00 00 call 10cec4 <_Timespec_From_ticks>
return 0;
10a013: 83 c4 10 add $0x10,%esp
10a016: 31 c0 xor %eax,%eax
}
10a018: 8d 65 f8 lea -0x8(%ebp),%esp
10a01b: 5b pop %ebx
10a01c: 5e pop %esi
10a01d: c9 leave
10a01e: c3 ret
0010c6b8 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10c6b8: 55 push %ebp
10c6b9: 89 e5 mov %esp,%ebp
10c6bb: 57 push %edi
10c6bc: 56 push %esi
10c6bd: 53 push %ebx
10c6be: 83 ec 2c sub $0x2c,%esp
10c6c1: 8b 75 08 mov 0x8(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c6c4: a1 cc a4 12 00 mov 0x12a4cc,%eax
10c6c9: 40 inc %eax
10c6ca: a3 cc a4 12 00 mov %eax,0x12a4cc
va_list arg;
mode_t mode;
unsigned int value = 0;
10c6cf: 31 ff xor %edi,%edi
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10c6d1: 8b 45 0c mov 0xc(%ebp),%eax
10c6d4: 25 00 02 00 00 and $0x200,%eax
10c6d9: 89 45 d4 mov %eax,-0x2c(%ebp)
10c6dc: 74 03 je 10c6e1 <sem_open+0x29>
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
10c6de: 8b 7d 14 mov 0x14(%ebp),%edi
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
10c6e1: 52 push %edx
10c6e2: 52 push %edx
10c6e3: 8d 45 e4 lea -0x1c(%ebp),%eax
10c6e6: 50 push %eax
10c6e7: 56 push %esi
10c6e8: e8 83 59 00 00 call 112070 <_POSIX_Semaphore_Name_to_id>
10c6ed: 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 ) {
10c6ef: 83 c4 10 add $0x10,%esp
10c6f2: 85 c0 test %eax,%eax
10c6f4: 74 19 je 10c70f <sem_open+0x57>
/*
* 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) ) ) {
10c6f6: 83 f8 02 cmp $0x2,%eax
10c6f9: 75 06 jne 10c701 <sem_open+0x49> <== NEVER TAKEN
10c6fb: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10c6ff: 75 59 jne 10c75a <sem_open+0xa2>
_Thread_Enable_dispatch();
10c701: e8 34 26 00 00 call 10ed3a <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10c706: e8 95 84 00 00 call 114ba0 <__errno>
10c70b: 89 18 mov %ebx,(%eax)
10c70d: eb 1f jmp 10c72e <sem_open+0x76>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10c70f: 8b 45 0c mov 0xc(%ebp),%eax
10c712: 25 00 0a 00 00 and $0xa00,%eax
10c717: 3d 00 0a 00 00 cmp $0xa00,%eax
10c71c: 75 15 jne 10c733 <sem_open+0x7b>
_Thread_Enable_dispatch();
10c71e: e8 17 26 00 00 call 10ed3a <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10c723: e8 78 84 00 00 call 114ba0 <__errno>
10c728: c7 00 11 00 00 00 movl $0x11,(%eax)
10c72e: 83 c8 ff or $0xffffffff,%eax
10c731: eb 4a jmp 10c77d <sem_open+0xc5>
10c733: 50 push %eax
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
10c734: 8d 45 dc lea -0x24(%ebp),%eax
10c737: 50 push %eax
10c738: ff 75 e4 pushl -0x1c(%ebp)
10c73b: 68 6c a7 12 00 push $0x12a76c
10c740: e8 3b 1b 00 00 call 10e280 <_Objects_Get>
10c745: 89 45 e0 mov %eax,-0x20(%ebp)
the_semaphore->open_count += 1;
10c748: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10c74b: e8 ea 25 00 00 call 10ed3a <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10c750: e8 e5 25 00 00 call 10ed3a <_Thread_Enable_dispatch>
goto return_id;
10c755: 83 c4 10 add $0x10,%esp
10c758: eb 1d jmp 10c777 <sem_open+0xbf>
/*
* 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(
10c75a: 8d 45 e0 lea -0x20(%ebp),%eax
10c75d: 50 push %eax
10c75e: 57 push %edi
10c75f: 6a 00 push $0x0
10c761: 56 push %esi
10c762: e8 d5 57 00 00 call 111f3c <_POSIX_Semaphore_Create_support>
10c767: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10c769: e8 cc 25 00 00 call 10ed3a <_Thread_Enable_dispatch>
if ( status == -1 )
10c76e: 83 c4 10 add $0x10,%esp
return SEM_FAILED;
10c771: 83 c8 ff or $0xffffffff,%eax
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
if ( status == -1 )
10c774: 43 inc %ebx
10c775: 74 06 je 10c77d <sem_open+0xc5>
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;
10c777: 8b 45 e0 mov -0x20(%ebp),%eax
10c77a: 83 c0 08 add $0x8,%eax
#endif
return id;
}
10c77d: 8d 65 f4 lea -0xc(%ebp),%esp
10c780: 5b pop %ebx
10c781: 5e pop %esi
10c782: 5f pop %edi
10c783: c9 leave
10c784: c3 ret
00109e50 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
109e50: 55 push %ebp
109e51: 89 e5 mov %esp,%ebp
109e53: 57 push %edi
109e54: 56 push %esi
109e55: 53 push %ebx
109e56: 83 ec 1c sub $0x1c,%esp
109e59: 8b 5d 08 mov 0x8(%ebp),%ebx
109e5c: 8b 55 0c mov 0xc(%ebp),%edx
109e5f: 8b 45 10 mov 0x10(%ebp),%eax
ISR_Level level;
if ( oact )
109e62: 85 c0 test %eax,%eax
109e64: 74 12 je 109e78 <sigaction+0x28>
*oact = _POSIX_signals_Vectors[ sig ];
109e66: 6b f3 0c imul $0xc,%ebx,%esi
109e69: 81 c6 7c 68 12 00 add $0x12687c,%esi
109e6f: b9 03 00 00 00 mov $0x3,%ecx
109e74: 89 c7 mov %eax,%edi
109e76: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
109e78: 85 db test %ebx,%ebx
109e7a: 74 0d je 109e89 <sigaction+0x39>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
109e7c: 8d 43 ff lea -0x1(%ebx),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
109e7f: 83 f8 1f cmp $0x1f,%eax
109e82: 77 05 ja 109e89 <sigaction+0x39>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
109e84: 83 fb 09 cmp $0x9,%ebx
109e87: 75 10 jne 109e99 <sigaction+0x49>
rtems_set_errno_and_return_minus_one( EINVAL );
109e89: e8 8a 7c 00 00 call 111b18 <__errno>
109e8e: c7 00 16 00 00 00 movl $0x16,(%eax)
109e94: 83 c8 ff or $0xffffffff,%eax
109e97: eb 57 jmp 109ef0 <sigaction+0xa0>
* 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;
109e99: 31 c0 xor %eax,%eax
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
109e9b: 85 d2 test %edx,%edx
109e9d: 74 51 je 109ef0 <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 );
109e9f: 9c pushf
109ea0: fa cli
109ea1: 8f 45 e4 popl -0x1c(%ebp)
if ( act->sa_handler == SIG_DFL ) {
109ea4: 83 7a 08 00 cmpl $0x0,0x8(%edx)
109ea8: 75 1a jne 109ec4 <sigaction+0x74>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
109eaa: 6b f3 0c imul $0xc,%ebx,%esi
109ead: 8d 86 7c 68 12 00 lea 0x12687c(%esi),%eax
109eb3: 81 c6 64 0c 12 00 add $0x120c64,%esi
109eb9: b9 03 00 00 00 mov $0x3,%ecx
109ebe: 89 c7 mov %eax,%edi
109ec0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
109ec2: eb 26 jmp 109eea <sigaction+0x9a>
} else {
_POSIX_signals_Clear_process_signals( sig );
109ec4: 83 ec 0c sub $0xc,%esp
109ec7: 53 push %ebx
109ec8: 89 55 e0 mov %edx,-0x20(%ebp)
109ecb: e8 7c 4e 00 00 call 10ed4c <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
109ed0: 6b db 0c imul $0xc,%ebx,%ebx
109ed3: 81 c3 7c 68 12 00 add $0x12687c,%ebx
109ed9: b9 03 00 00 00 mov $0x3,%ecx
109ede: 8b 55 e0 mov -0x20(%ebp),%edx
109ee1: 89 df mov %ebx,%edi
109ee3: 89 d6 mov %edx,%esi
109ee5: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
109ee7: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
109eea: ff 75 e4 pushl -0x1c(%ebp)
109eed: 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;
109eee: 31 c0 xor %eax,%eax
}
109ef0: 8d 65 f4 lea -0xc(%ebp),%esp
109ef3: 5b pop %ebx
109ef4: 5e pop %esi
109ef5: 5f pop %edi
109ef6: c9 leave
109ef7: c3 ret
0010a217 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10a217: 55 push %ebp
10a218: 89 e5 mov %esp,%ebp
10a21a: 57 push %edi
10a21b: 56 push %esi
10a21c: 53 push %ebx
10a21d: 83 ec 3c sub $0x3c,%esp
10a220: 8b 75 08 mov 0x8(%ebp),%esi
10a223: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10a226: 85 f6 test %esi,%esi
10a228: 74 24 je 10a24e <sigtimedwait+0x37>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10a22a: 85 db test %ebx,%ebx
10a22c: 74 30 je 10a25e <sigtimedwait+0x47>
if ( !_Timespec_Is_valid( timeout ) )
10a22e: 83 ec 0c sub $0xc,%esp
10a231: 53 push %ebx
10a232: e8 55 2f 00 00 call 10d18c <_Timespec_Is_valid>
10a237: 83 c4 10 add $0x10,%esp
10a23a: 84 c0 test %al,%al
10a23c: 74 10 je 10a24e <sigtimedwait+0x37>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10a23e: 83 ec 0c sub $0xc,%esp
10a241: 53 push %ebx
10a242: e8 9d 2f 00 00 call 10d1e4 <_Timespec_To_ticks>
if ( !interval )
10a247: 83 c4 10 add $0x10,%esp
10a24a: 85 c0 test %eax,%eax
10a24c: 75 12 jne 10a260 <sigtimedwait+0x49> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
10a24e: e8 6d 7e 00 00 call 1120c0 <__errno>
10a253: c7 00 16 00 00 00 movl $0x16,(%eax)
10a259: e9 39 01 00 00 jmp 10a397 <sigtimedwait+0x180>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
10a25e: 31 c0 xor %eax,%eax
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10a260: 8b 7d 0c mov 0xc(%ebp),%edi
10a263: 85 ff test %edi,%edi
10a265: 75 03 jne 10a26a <sigtimedwait+0x53>
10a267: 8d 7d dc lea -0x24(%ebp),%edi
the_thread = _Thread_Executing;
10a26a: 8b 15 48 78 12 00 mov 0x127848,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10a270: 8b 8a ec 00 00 00 mov 0xec(%edx),%ecx
10a276: 89 4d d4 mov %ecx,-0x2c(%ebp)
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10a279: 9c pushf
10a27a: fa cli
10a27b: 8f 45 d0 popl -0x30(%ebp)
if ( *set & api->signals_pending ) {
10a27e: 8b 1e mov (%esi),%ebx
10a280: 89 5d c4 mov %ebx,-0x3c(%ebp)
10a283: 8b 5d d4 mov -0x2c(%ebp),%ebx
10a286: 8b 8b d4 00 00 00 mov 0xd4(%ebx),%ecx
10a28c: 85 4d c4 test %ecx,-0x3c(%ebp)
10a28f: 74 32 je 10a2c3 <sigtimedwait+0xac>
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
10a291: 83 ec 0c sub $0xc,%esp
10a294: 51 push %ecx
10a295: e8 3e ff ff ff call 10a1d8 <_POSIX_signals_Get_lowest>
10a29a: 89 07 mov %eax,(%edi)
_POSIX_signals_Clear_signals(
10a29c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10a2a3: 6a 00 push $0x0
10a2a5: 57 push %edi
10a2a6: 50 push %eax
10a2a7: 53 push %ebx
10a2a8: e8 eb 50 00 00 call 10f398 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10a2ad: ff 75 d0 pushl -0x30(%ebp)
10a2b0: 9d popf
the_info->si_code = SI_USER;
10a2b1: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi)
the_info->si_value.sival_int = 0;
10a2b8: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return the_info->si_signo;
10a2bf: 8b 1f mov (%edi),%ebx
10a2c1: eb 3d jmp 10a300 <sigtimedwait+0xe9>
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10a2c3: 8b 0d 70 7a 12 00 mov 0x127a70,%ecx
10a2c9: 85 4d c4 test %ecx,-0x3c(%ebp)
10a2cc: 74 3a je 10a308 <sigtimedwait+0xf1>
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
10a2ce: 83 ec 0c sub $0xc,%esp
10a2d1: 51 push %ecx
10a2d2: e8 01 ff ff ff call 10a1d8 <_POSIX_signals_Get_lowest>
10a2d7: 89 c3 mov %eax,%ebx
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10a2d9: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10a2e0: 6a 01 push $0x1
10a2e2: 57 push %edi
10a2e3: 50 push %eax
10a2e4: ff 75 d4 pushl -0x2c(%ebp)
10a2e7: e8 ac 50 00 00 call 10f398 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10a2ec: ff 75 d0 pushl -0x30(%ebp)
10a2ef: 9d popf
the_info->si_signo = signo;
10a2f0: 89 1f mov %ebx,(%edi)
the_info->si_code = SI_USER;
10a2f2: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi)
the_info->si_value.sival_int = 0;
10a2f9: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return signo;
10a300: 83 c4 20 add $0x20,%esp
10a303: e9 92 00 00 00 jmp 10a39a <sigtimedwait+0x183>
}
the_info->si_signo = -1;
10a308: c7 07 ff ff ff ff movl $0xffffffff,(%edi)
10a30e: 8b 0d 24 73 12 00 mov 0x127324,%ecx
10a314: 41 inc %ecx
10a315: 89 0d 24 73 12 00 mov %ecx,0x127324
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10a31b: c7 42 44 08 7a 12 00 movl $0x127a08,0x44(%edx)
the_thread->Wait.return_code = EINTR;
10a322: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
the_thread->Wait.option = *set;
10a329: 8b 0e mov (%esi),%ecx
10a32b: 89 4a 30 mov %ecx,0x30(%edx)
the_thread->Wait.return_argument = the_info;
10a32e: 89 7a 28 mov %edi,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;
10a331: c7 05 38 7a 12 00 01 movl $0x1,0x127a38
10a338: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10a33b: ff 75 d0 pushl -0x30(%ebp)
10a33e: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10a33f: 52 push %edx
10a340: 68 08 cf 10 00 push $0x10cf08
10a345: 50 push %eax
10a346: 68 08 7a 12 00 push $0x127a08
10a34b: e8 dc 28 00 00 call 10cc2c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10a350: e8 8d 24 00 00 call 10c7e2 <_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 );
10a355: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10a35c: 6a 00 push $0x0
10a35e: 57 push %edi
10a35f: ff 37 pushl (%edi)
10a361: ff 75 d4 pushl -0x2c(%ebp)
10a364: e8 2f 50 00 00 call 10f398 <_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)
10a369: 83 c4 20 add $0x20,%esp
10a36c: a1 48 78 12 00 mov 0x127848,%eax
10a371: 83 78 34 04 cmpl $0x4,0x34(%eax)
10a375: 75 10 jne 10a387 <sigtimedwait+0x170>
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
10a377: 8b 1f mov (%edi),%ebx
10a379: 8d 4b ff lea -0x1(%ebx),%ecx
10a37c: b8 01 00 00 00 mov $0x1,%eax
10a381: d3 e0 shl %cl,%eax
10a383: 85 06 test %eax,(%esi)
10a385: 75 13 jne 10a39a <sigtimedwait+0x183>
errno = _Thread_Executing->Wait.return_code;
10a387: e8 34 7d 00 00 call 1120c0 <__errno>
10a38c: 8b 15 48 78 12 00 mov 0x127848,%edx
10a392: 8b 52 34 mov 0x34(%edx),%edx
10a395: 89 10 mov %edx,(%eax)
return -1;
10a397: 83 cb ff or $0xffffffff,%ebx
}
return the_info->si_signo;
}
10a39a: 89 d8 mov %ebx,%eax
10a39c: 8d 65 f4 lea -0xc(%ebp),%esp
10a39f: 5b pop %ebx
10a3a0: 5e pop %esi
10a3a1: 5f pop %edi
10a3a2: c9 leave
10a3a3: c3 ret
0010c028 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10c028: 55 push %ebp
10c029: 89 e5 mov %esp,%ebp
10c02b: 53 push %ebx
10c02c: 83 ec 08 sub $0x8,%esp
10c02f: 8b 5d 0c mov 0xc(%ebp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10c032: 6a 00 push $0x0
10c034: 6a 00 push $0x0
10c036: ff 75 08 pushl 0x8(%ebp)
10c039: e8 45 fe ff ff call 10be83 <sigtimedwait>
10c03e: 89 c2 mov %eax,%edx
if ( status != -1 ) {
10c040: 83 c4 10 add $0x10,%esp
10c043: 83 f8 ff cmp $0xffffffff,%eax
10c046: 74 0a je 10c052 <sigwait+0x2a>
if ( sig )
*sig = status;
return 0;
10c048: 31 c0 xor %eax,%eax
int status;
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
10c04a: 85 db test %ebx,%ebx
10c04c: 74 0b je 10c059 <sigwait+0x31> <== NEVER TAKEN
*sig = status;
10c04e: 89 13 mov %edx,(%ebx)
10c050: eb 07 jmp 10c059 <sigwait+0x31>
return 0;
}
return errno;
10c052: e8 21 78 00 00 call 113878 <__errno>
10c057: 8b 00 mov (%eax),%eax
}
10c059: 8b 5d fc mov -0x4(%ebp),%ebx
10c05c: c9 leave
10c05d: c3 ret
001085a0 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
1085a0: 55 push %ebp
1085a1: 89 e5 mov %esp,%ebp
1085a3: 56 push %esi
1085a4: 53 push %ebx
1085a5: 89 d3 mov %edx,%ebx
1085a7: 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)) {
1085a9: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx)
1085b0: 74 30 je 1085e2 <siproc+0x42> <== NEVER TAKEN
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
1085b2: 52 push %edx
1085b3: 6a 00 push $0x0
1085b5: 6a 00 push $0x0
1085b7: ff 73 18 pushl 0x18(%ebx)
1085ba: e8 79 11 00 00 call 109738 <rtems_semaphore_obtain>
i = iproc (c, tty);
1085bf: 89 f2 mov %esi,%edx
1085c1: 0f b6 c2 movzbl %dl,%eax
1085c4: 89 da mov %ebx,%edx
1085c6: e8 b5 fe ff ff call 108480 <iproc>
1085cb: 89 c6 mov %eax,%esi
rtems_semaphore_release (tty->osem);
1085cd: 58 pop %eax
1085ce: ff 73 18 pushl 0x18(%ebx)
1085d1: e8 4e 12 00 00 call 109824 <rtems_semaphore_release>
1085d6: 83 c4 10 add $0x10,%esp
}
else {
i = iproc (c, tty);
}
return i;
}
1085d9: 89 f0 mov %esi,%eax
1085db: 8d 65 f8 lea -0x8(%ebp),%esp
1085de: 5b pop %ebx
1085df: 5e pop %esi
1085e0: c9 leave
1085e1: c3 ret
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
1085e2: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
1085e5: 89 da mov %ebx,%edx <== NOT EXECUTED
}
return i;
}
1085e7: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1085ea: 5b pop %ebx <== NOT EXECUTED
1085eb: 5e pop %esi <== NOT EXECUTED
1085ec: 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);
1085ed: e9 8e fe ff ff jmp 108480 <iproc> <== NOT EXECUTED
00109774 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
109774: 55 push %ebp
109775: 89 e5 mov %esp,%ebp
109777: 57 push %edi
109778: 56 push %esi
109779: 53 push %ebx
10977a: 83 ec 38 sub $0x38,%esp
10977d: 8b 55 08 mov 0x8(%ebp),%edx
109780: 8b 75 0c mov 0xc(%ebp),%esi
* 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 ) )
109783: 31 c0 xor %eax,%eax
109785: 83 c9 ff or $0xffffffff,%ecx
109788: 89 d7 mov %edx,%edi
10978a: f2 ae repnz scas %es:(%edi),%al
10978c: f7 d1 not %ecx
10978e: 49 dec %ecx
10978f: 6a 01 push $0x1
109791: 8d 5d d4 lea -0x2c(%ebp),%ebx
109794: 53 push %ebx
109795: 6a 00 push $0x0
109797: 51 push %ecx
109798: 52 push %edx
109799: e8 04 ee ff ff call 1085a2 <rtems_filesystem_evaluate_path>
10979e: 83 c4 20 add $0x20,%esp
return -1;
1097a1: 83 cf ff or $0xffffffff,%edi
* 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 ) )
1097a4: 85 c0 test %eax,%eax
1097a6: 75 26 jne 1097ce <statvfs+0x5a> <== NEVER TAKEN
return -1;
mt_entry = loc.mt_entry;
1097a8: 8b 55 e4 mov -0x1c(%ebp),%edx
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
1097ab: b9 0e 00 00 00 mov $0xe,%ecx
1097b0: 89 f7 mov %esi,%edi
1097b2: f3 ab rep stos %eax,%es:(%edi)
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
1097b4: 50 push %eax
1097b5: 50 push %eax
1097b6: 8b 42 28 mov 0x28(%edx),%eax
1097b9: 56 push %esi
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;
1097ba: 83 c2 1c add $0x1c,%edx
memset (sb, 0, sizeof (struct statvfs));
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
1097bd: 52 push %edx
1097be: ff 50 44 call *0x44(%eax)
1097c1: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &loc );
1097c3: 89 1c 24 mov %ebx,(%esp)
1097c6: e8 95 ee ff ff call 108660 <rtems_filesystem_freenode>
return result;
1097cb: 83 c4 10 add $0x10,%esp
}
1097ce: 89 f8 mov %edi,%eax
1097d0: 8d 65 f4 lea -0xc(%ebp),%esp
1097d3: 5b pop %ebx
1097d4: 5e pop %esi
1097d5: 5f pop %edi
1097d6: c9 leave
1097d7: c3 ret
001085dc <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
1085dc: 55 push %ebp
1085dd: 89 e5 mov %esp,%ebp
1085df: 53 push %ebx
1085e0: 83 ec 04 sub $0x4,%esp
1085e3: 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;
1085e6: 8b 88 e4 00 00 00 mov 0xe4(%eax),%ecx
if ( this_reent ) {
1085ec: 85 c9 test %ecx,%ecx
1085ee: 74 32 je 108622 <sync_per_thread+0x46> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
1085f0: 8b 15 08 68 12 00 mov 0x126808,%edx
1085f6: 8b 9a e4 00 00 00 mov 0xe4(%edx),%ebx
_Thread_Executing->libc_reent = this_reent;
1085fc: 89 8a e4 00 00 00 mov %ecx,0xe4(%edx)
_fwalk (t->libc_reent, sync_wrapper);
108602: 52 push %edx
108603: 52 push %edx
108604: 68 27 86 10 00 push $0x108627
108609: ff b0 e4 00 00 00 pushl 0xe4(%eax)
10860f: e8 f0 a3 00 00 call 112a04 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
108614: a1 08 68 12 00 mov 0x126808,%eax
108619: 89 98 e4 00 00 00 mov %ebx,0xe4(%eax)
10861f: 83 c4 10 add $0x10,%esp
}
}
108622: 8b 5d fc mov -0x4(%ebp),%ebx
108625: c9 leave
108626: c3 ret
0010e6a8 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
10e6a8: 55 push %ebp
10e6a9: 89 e5 mov %esp,%ebp
10e6ab: 56 push %esi
10e6ac: 53 push %ebx
10e6ad: 8b 5d 08 mov 0x8(%ebp),%ebx
10e6b0: 8b 45 0c mov 0xc(%ebp),%eax
10e6b3: 8b 75 10 mov 0x10(%ebp),%esi
switch (opt) {
10e6b6: 85 c0 test %eax,%eax
10e6b8: 74 22 je 10e6dc <tcsetattr+0x34>
10e6ba: 48 dec %eax
10e6bb: 74 0d je 10e6ca <tcsetattr+0x22>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10e6bd: e8 be 34 00 00 call 111b80 <__errno>
10e6c2: c7 00 86 00 00 00 movl $0x86,(%eax)
10e6c8: eb 2a jmp 10e6f4 <tcsetattr+0x4c>
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
10e6ca: 50 push %eax
10e6cb: 6a 00 push $0x0
10e6cd: 6a 03 push $0x3
10e6cf: 53 push %ebx
10e6d0: e8 f3 fc ff ff call 10e3c8 <ioctl>
10e6d5: 83 c4 10 add $0x10,%esp
10e6d8: 85 c0 test %eax,%eax
10e6da: 78 18 js 10e6f4 <tcsetattr+0x4c> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
10e6dc: 89 75 10 mov %esi,0x10(%ebp)
10e6df: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp)
10e6e6: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10e6e9: 8d 65 f8 lea -0x8(%ebp),%esp
10e6ec: 5b pop %ebx
10e6ed: 5e pop %esi
10e6ee: c9 leave
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
10e6ef: e9 d4 fc ff ff jmp 10e3c8 <ioctl>
}
}
10e6f4: 83 c8 ff or $0xffffffff,%eax
10e6f7: 8d 65 f8 lea -0x8(%ebp),%esp
10e6fa: 5b pop %ebx
10e6fb: 5e pop %esi
10e6fc: c9 leave
10e6fd: c3 ret
001096a4 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
1096a4: 55 push %ebp
1096a5: 89 e5 mov %esp,%ebp
1096a7: 56 push %esi
1096a8: 53 push %ebx
1096a9: 8b 5d 0c mov 0xc(%ebp),%ebx
1096ac: 8b 75 10 mov 0x10(%ebp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
1096af: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
1096b3: 75 1d jne 1096d2 <timer_create+0x2e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
1096b5: 85 f6 test %esi,%esi
1096b7: 74 19 je 1096d2 <timer_create+0x2e>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
1096b9: 85 db test %ebx,%ebx
1096bb: 74 22 je 1096df <timer_create+0x3b>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
1096bd: 8b 03 mov (%ebx),%eax
1096bf: 48 dec %eax
1096c0: 83 f8 01 cmp $0x1,%eax
1096c3: 77 0d ja 1096d2 <timer_create+0x2e> <== 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 )
1096c5: 8b 43 04 mov 0x4(%ebx),%eax
1096c8: 85 c0 test %eax,%eax
1096ca: 74 06 je 1096d2 <timer_create+0x2e> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
1096cc: 48 dec %eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
1096cd: 83 f8 1f cmp $0x1f,%eax
1096d0: 76 0d jbe 1096df <timer_create+0x3b> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
1096d2: e8 c9 81 00 00 call 1118a0 <__errno>
1096d7: c7 00 16 00 00 00 movl $0x16,(%eax)
1096dd: eb 2f jmp 10970e <timer_create+0x6a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1096df: a1 38 63 12 00 mov 0x126338,%eax
1096e4: 40 inc %eax
1096e5: a3 38 63 12 00 mov %eax,0x126338
* 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 );
1096ea: 83 ec 0c sub $0xc,%esp
1096ed: 68 18 66 12 00 push $0x126618
1096f2: e8 d9 19 00 00 call 10b0d0 <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
1096f7: 83 c4 10 add $0x10,%esp
1096fa: 85 c0 test %eax,%eax
1096fc: 75 18 jne 109716 <timer_create+0x72>
_Thread_Enable_dispatch();
1096fe: e8 3f 28 00 00 call 10bf42 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
109703: e8 98 81 00 00 call 1118a0 <__errno>
109708: c7 00 0b 00 00 00 movl $0xb,(%eax)
10970e: 83 c8 ff or $0xffffffff,%eax
109711: e9 83 00 00 00 jmp 109799 <timer_create+0xf5>
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
109716: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10971a: 8b 15 5c 68 12 00 mov 0x12685c,%edx
109720: 8b 52 08 mov 0x8(%edx),%edx
109723: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
109726: 85 db test %ebx,%ebx
109728: 74 11 je 10973b <timer_create+0x97>
ptimer->inf.sigev_notify = evp->sigev_notify;
10972a: 8b 13 mov (%ebx),%edx
10972c: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
10972f: 8b 53 04 mov 0x4(%ebx),%edx
109732: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
109735: 8b 53 08 mov 0x8(%ebx),%edx
109738: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
10973b: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
109742: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
109749: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
109750: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
109757: 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;
10975e: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
109765: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10976c: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
109773: 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 ),
10977a: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10977d: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
109780: 8b 0d 34 66 12 00 mov 0x126634,%ecx
109786: 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;
109789: 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;
109790: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
109792: e8 ab 27 00 00 call 10bf42 <_Thread_Enable_dispatch>
return 0;
109797: 31 c0 xor %eax,%eax
}
109799: 8d 65 f8 lea -0x8(%ebp),%esp
10979c: 5b pop %ebx
10979d: 5e pop %esi
10979e: c9 leave
10979f: c3 ret
001097a0 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
1097a0: 55 push %ebp
1097a1: 89 e5 mov %esp,%ebp
1097a3: 57 push %edi
1097a4: 56 push %esi
1097a5: 53 push %ebx
1097a6: 83 ec 2c sub $0x2c,%esp
1097a9: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
1097ac: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
1097b0: 0f 84 58 01 00 00 je 10990e <timer_settime+0x16e> <== 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) ) ) {
1097b6: 83 ec 0c sub $0xc,%esp
1097b9: 8b 45 10 mov 0x10(%ebp),%eax
1097bc: 83 c0 08 add $0x8,%eax
1097bf: 50 push %eax
1097c0: e8 4b 31 00 00 call 10c910 <_Timespec_Is_valid>
1097c5: 83 c4 10 add $0x10,%esp
1097c8: 84 c0 test %al,%al
1097ca: 0f 84 3e 01 00 00 je 10990e <timer_settime+0x16e>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
1097d0: 83 ec 0c sub $0xc,%esp
1097d3: ff 75 10 pushl 0x10(%ebp)
1097d6: e8 35 31 00 00 call 10c910 <_Timespec_Is_valid>
1097db: 83 c4 10 add $0x10,%esp
1097de: 84 c0 test %al,%al
1097e0: 0f 84 28 01 00 00 je 10990e <timer_settime+0x16e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
1097e6: 85 db test %ebx,%ebx
1097e8: 74 09 je 1097f3 <timer_settime+0x53>
1097ea: 83 fb 04 cmp $0x4,%ebx
1097ed: 0f 85 1b 01 00 00 jne 10990e <timer_settime+0x16e>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
1097f3: 8d 7d cc lea -0x34(%ebp),%edi
1097f6: b9 04 00 00 00 mov $0x4,%ecx
1097fb: 8b 75 10 mov 0x10(%ebp),%esi
1097fe: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
109800: 83 fb 04 cmp $0x4,%ebx
109803: 75 2f jne 109834 <timer_settime+0x94>
struct timespec now;
_TOD_Get( &now );
109805: 83 ec 0c sub $0xc,%esp
109808: 8d 5d dc lea -0x24(%ebp),%ebx
10980b: 53 push %ebx
10980c: e8 17 14 00 00 call 10ac28 <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
109811: 59 pop %ecx
109812: 5e pop %esi
109813: 8d 75 d4 lea -0x2c(%ebp),%esi
109816: 56 push %esi
109817: 53 push %ebx
109818: e8 cf 30 00 00 call 10c8ec <_Timespec_Greater_than>
10981d: 83 c4 10 add $0x10,%esp
109820: 84 c0 test %al,%al
109822: 0f 85 e6 00 00 00 jne 10990e <timer_settime+0x16e>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
109828: 52 push %edx
109829: 56 push %esi
10982a: 56 push %esi
10982b: 53 push %ebx
10982c: e8 03 31 00 00 call 10c934 <_Timespec_Subtract>
109831: 83 c4 10 add $0x10,%esp
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
109834: 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 );
109835: 8d 45 e4 lea -0x1c(%ebp),%eax
109838: 50 push %eax
109839: ff 75 08 pushl 0x8(%ebp)
10983c: 68 18 66 12 00 push $0x126618
109841: e8 b6 1c 00 00 call 10b4fc <_Objects_Get>
109846: 89 c3 mov %eax,%ebx
switch ( location ) {
109848: 83 c4 10 add $0x10,%esp
10984b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10984f: 0f 85 b9 00 00 00 jne 10990e <timer_settime+0x16e>
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 ) {
109855: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
109859: 75 3b jne 109896 <timer_settime+0xf6>
10985b: 83 7d d8 00 cmpl $0x0,-0x28(%ebp)
10985f: 75 35 jne 109896 <timer_settime+0xf6>
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
109861: 83 ec 0c sub $0xc,%esp
109864: 8d 40 10 lea 0x10(%eax),%eax
109867: 50 push %eax
109868: e8 93 34 00 00 call 10cd00 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
10986d: 83 c4 10 add $0x10,%esp
109870: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
109874: 74 0d je 109883 <timer_settime+0xe3>
*ovalue = ptimer->timer_data;
109876: 8d 73 54 lea 0x54(%ebx),%esi
109879: b9 04 00 00 00 mov $0x4,%ecx
10987e: 8b 7d 14 mov 0x14(%ebp),%edi
109881: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
109883: 8d 7b 54 lea 0x54(%ebx),%edi
109886: 8d 75 cc lea -0x34(%ebp),%esi
109889: b9 04 00 00 00 mov $0x4,%ecx
10988e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
109890: c6 43 3c 04 movb $0x4,0x3c(%ebx)
109894: eb 35 jmp 1098cb <timer_settime+0x12b>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
109896: 83 ec 0c sub $0xc,%esp
109899: ff 75 10 pushl 0x10(%ebp)
10989c: e8 c7 30 00 00 call 10c968 <_Timespec_To_ticks>
1098a1: 89 43 64 mov %eax,0x64(%ebx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
1098a4: 8d 45 d4 lea -0x2c(%ebp),%eax
1098a7: 89 04 24 mov %eax,(%esp)
1098aa: e8 b9 30 00 00 call 10c968 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
1098af: 89 1c 24 mov %ebx,(%esp)
1098b2: 68 24 99 10 00 push $0x109924
1098b7: ff 73 08 pushl 0x8(%ebx)
1098ba: 50 push %eax
1098bb: 8d 43 10 lea 0x10(%ebx),%eax
1098be: 50 push %eax
1098bf: e8 48 57 00 00 call 10f00c <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
1098c4: 83 c4 20 add $0x20,%esp
1098c7: 84 c0 test %al,%al
1098c9: 75 07 jne 1098d2 <timer_settime+0x132>
_Thread_Enable_dispatch();
1098cb: e8 72 26 00 00 call 10bf42 <_Thread_Enable_dispatch>
1098d0: eb 38 jmp 10990a <timer_settime+0x16a>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
1098d2: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
1098d6: 74 0d je 1098e5 <timer_settime+0x145>
*ovalue = ptimer->timer_data;
1098d8: 8d 73 54 lea 0x54(%ebx),%esi
1098db: b9 04 00 00 00 mov $0x4,%ecx
1098e0: 8b 7d 14 mov 0x14(%ebp),%edi
1098e3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
1098e5: 8d 7b 54 lea 0x54(%ebx),%edi
1098e8: 8d 75 cc lea -0x34(%ebp),%esi
1098eb: b9 04 00 00 00 mov $0x4,%ecx
1098f0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
1098f2: c6 43 3c 03 movb $0x3,0x3c(%ebx)
_TOD_Get( &ptimer->time );
1098f6: 83 ec 0c sub $0xc,%esp
1098f9: 83 c3 6c add $0x6c,%ebx
1098fc: 53 push %ebx
1098fd: e8 26 13 00 00 call 10ac28 <_TOD_Get>
_Thread_Enable_dispatch();
109902: e8 3b 26 00 00 call 10bf42 <_Thread_Enable_dispatch>
return 0;
109907: 83 c4 10 add $0x10,%esp
10990a: 31 c0 xor %eax,%eax
10990c: eb 0e jmp 10991c <timer_settime+0x17c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10990e: e8 8d 7f 00 00 call 1118a0 <__errno>
109913: c7 00 16 00 00 00 movl $0x16,(%eax)
109919: 83 c8 ff or $0xffffffff,%eax
}
10991c: 8d 65 f4 lea -0xc(%ebp),%esp
10991f: 5b pop %ebx
109920: 5e pop %esi
109921: 5f pop %edi
109922: c9 leave
109923: c3 ret
001095e0 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
1095e0: 55 push %ebp
1095e1: 89 e5 mov %esp,%ebp
1095e3: 57 push %edi
1095e4: 56 push %esi
1095e5: 53 push %ebx
1095e6: 83 ec 1c sub $0x1c,%esp
1095e9: 8b 75 08 mov 0x8(%ebp),%esi
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
1095ec: 83 3d 20 6c 12 00 00 cmpl $0x0,0x126c20
1095f3: 75 2c jne 109621 <ualarm+0x41>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1095f5: c7 05 0c 6c 12 00 00 movl $0x0,0x126c0c
1095fc: 00 00 00
the_watchdog->routine = routine;
1095ff: c7 05 20 6c 12 00 a8 movl $0x1095a8,0x126c20
109606: 95 10 00
the_watchdog->id = id;
109609: c7 05 24 6c 12 00 00 movl $0x0,0x126c24
109610: 00 00 00
the_watchdog->user_data = user_data;
109613: c7 05 28 6c 12 00 00 movl $0x0,0x126c28
10961a: 00 00 00
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10961d: 31 db xor %ebx,%ebx
10961f: eb 4f jmp 109670 <ualarm+0x90>
if ( !the_timer->routine ) {
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
109621: 83 ec 0c sub $0xc,%esp
109624: 68 04 6c 12 00 push $0x126c04
109629: e8 ba 32 00 00 call 10c8e8 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
10962e: 83 e8 02 sub $0x2,%eax
109631: 83 c4 10 add $0x10,%esp
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
109634: 31 db xor %ebx,%ebx
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
109636: 83 f8 01 cmp $0x1,%eax
109639: 77 35 ja 109670 <ualarm+0x90> <== NEVER TAKEN
* 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);
10963b: a1 18 6c 12 00 mov 0x126c18,%eax
109640: 03 05 10 6c 12 00 add 0x126c10,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
109646: 57 push %edi
109647: 57 push %edi
109648: 8d 55 e0 lea -0x20(%ebp),%edx
10964b: 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);
10964c: 2b 05 1c 6c 12 00 sub 0x126c1c,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
109652: 50 push %eax
109653: e8 30 2e 00 00 call 10c488 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
109658: 69 4d e0 40 42 0f 00 imul $0xf4240,-0x20(%ebp),%ecx
remaining += tp.tv_nsec / 1000;
10965f: 8b 45 e4 mov -0x1c(%ebp),%eax
109662: bf e8 03 00 00 mov $0x3e8,%edi
109667: 99 cltd
109668: f7 ff idiv %edi
10966a: 8d 1c 08 lea (%eax,%ecx,1),%ebx
10966d: 83 c4 10 add $0x10,%esp
/*
* 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 ) {
109670: 85 f6 test %esi,%esi
109672: 74 44 je 1096b8 <ualarm+0xd8>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
109674: b9 40 42 0f 00 mov $0xf4240,%ecx
109679: 89 f0 mov %esi,%eax
10967b: 31 d2 xor %edx,%edx
10967d: f7 f1 div %ecx
10967f: 89 45 e0 mov %eax,-0x20(%ebp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
109682: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx
109688: 89 55 e4 mov %edx,-0x1c(%ebp)
ticks = _Timespec_To_ticks( &tp );
10968b: 83 ec 0c sub $0xc,%esp
10968e: 8d 75 e0 lea -0x20(%ebp),%esi
109691: 56 push %esi
109692: e8 4d 2e 00 00 call 10c4e4 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
109697: 89 34 24 mov %esi,(%esp)
10969a: e8 45 2e 00 00 call 10c4e4 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10969f: a3 10 6c 12 00 mov %eax,0x126c10
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
1096a4: 59 pop %ecx
1096a5: 5e pop %esi
1096a6: 68 04 6c 12 00 push $0x126c04
1096ab: 68 f4 63 12 00 push $0x1263f4
1096b0: e8 13 31 00 00 call 10c7c8 <_Watchdog_Insert>
1096b5: 83 c4 10 add $0x10,%esp
}
return remaining;
}
1096b8: 89 d8 mov %ebx,%eax
1096ba: 8d 65 f4 lea -0xc(%ebp),%esp
1096bd: 5b pop %ebx
1096be: 5e pop %esi
1096bf: 5f pop %edi
1096c0: c9 leave
1096c1: c3 ret
00109d4c <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
109d4c: 55 push %ebp
109d4d: 89 e5 mov %esp,%ebp
109d4f: 57 push %edi
109d50: 56 push %esi
109d51: 53 push %ebx
109d52: 83 ec 58 sub $0x58,%esp
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
109d55: ff 75 08 pushl 0x8(%ebp)
109d58: e8 f6 d8 ff ff call 107653 <rtems_filesystem_dirname>
109d5d: 89 45 b4 mov %eax,-0x4c(%ebp)
if ( parentpathlen == 0 )
109d60: 83 c4 10 add $0x10,%esp
109d63: 85 c0 test %eax,%eax
109d65: 8d 45 d0 lea -0x30(%ebp),%eax
109d68: 75 15 jne 109d7f <unlink+0x33>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
109d6a: 51 push %ecx
109d6b: 50 push %eax
109d6c: 8d 45 e4 lea -0x1c(%ebp),%eax
109d6f: 50 push %eax
109d70: ff 75 08 pushl 0x8(%ebp)
109d73: e8 d4 e6 ff ff call 10844c <rtems_filesystem_get_start_loc>
109d78: 83 c4 10 add $0x10,%esp
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
109d7b: 31 db xor %ebx,%ebx
109d7d: eb 25 jmp 109da4 <unlink+0x58>
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
109d7f: 83 ec 0c sub $0xc,%esp
109d82: 6a 00 push $0x0
109d84: 50 push %eax
109d85: 6a 02 push $0x2
109d87: ff 75 b4 pushl -0x4c(%ebp)
109d8a: ff 75 08 pushl 0x8(%ebp)
109d8d: e8 80 d8 ff ff call 107612 <rtems_filesystem_evaluate_path>
109d92: 89 c2 mov %eax,%edx
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
109d94: 83 c4 20 add $0x20,%esp
return -1;
109d97: 83 c8 ff or $0xffffffff,%eax
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
109d9a: 85 d2 test %edx,%edx
109d9c: 0f 85 d6 00 00 00 jne 109e78 <unlink+0x12c> <== NEVER TAKEN
return -1;
free_parentloc = true;
109da2: b3 01 mov $0x1,%bl
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
109da4: 8d 7d bc lea -0x44(%ebp),%edi
109da7: 8d 75 d0 lea -0x30(%ebp),%esi
109daa: b9 05 00 00 00 mov $0x5,%ecx
109daf: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = path + parentpathlen;
109db1: 8b 75 08 mov 0x8(%ebp),%esi
109db4: 03 75 b4 add -0x4c(%ebp),%esi
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
109db7: 83 c9 ff or $0xffffffff,%ecx
109dba: 89 f7 mov %esi,%edi
109dbc: 31 c0 xor %eax,%eax
109dbe: f2 ae repnz scas %es:(%edi),%al
109dc0: f7 d1 not %ecx
109dc2: 49 dec %ecx
109dc3: 52 push %edx
109dc4: 52 push %edx
109dc5: 51 push %ecx
109dc6: 56 push %esi
109dc7: e8 c6 d8 ff ff call 107692 <rtems_filesystem_prefix_separators>
109dcc: 01 c6 add %eax,%esi
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
109dce: 83 c9 ff or $0xffffffff,%ecx
109dd1: 89 f7 mov %esi,%edi
109dd3: 31 c0 xor %eax,%eax
109dd5: f2 ae repnz scas %es:(%edi),%al
109dd7: f7 d1 not %ecx
109dd9: 49 dec %ecx
109dda: c7 04 24 00 00 00 00 movl $0x0,(%esp)
109de1: 8d 7d bc lea -0x44(%ebp),%edi
109de4: 57 push %edi
109de5: 6a 00 push $0x0
109de7: 51 push %ecx
109de8: 56 push %esi
109de9: e8 c6 d7 ff ff call 1075b4 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
109dee: 83 c4 20 add $0x20,%esp
109df1: 85 c0 test %eax,%eax
109df3: 74 13 je 109e08 <unlink+0xbc>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
109df5: 83 c8 ff or $0xffffffff,%eax
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 )
109df8: 84 db test %bl,%bl
109dfa: 74 7c je 109e78 <unlink+0x12c> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
109dfc: 83 ec 0c sub $0xc,%esp
109dff: 8d 55 d0 lea -0x30(%ebp),%edx
109e02: 52 push %edx
109e03: 89 45 b0 mov %eax,-0x50(%ebp)
109e06: eb 65 jmp 109e6d <unlink+0x121>
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
109e08: 83 ec 0c sub $0xc,%esp
109e0b: 57 push %edi
109e0c: 8b 45 c8 mov -0x38(%ebp),%eax
109e0f: ff 50 10 call *0x10(%eax)
109e12: 83 c4 10 add $0x10,%esp
109e15: 48 dec %eax
109e16: 75 2f jne 109e47 <unlink+0xfb>
rtems_filesystem_freenode( &loc );
109e18: 83 ec 0c sub $0xc,%esp
109e1b: 57 push %edi
109e1c: e8 af d8 ff ff call 1076d0 <rtems_filesystem_freenode>
if ( free_parentloc )
109e21: 83 c4 10 add $0x10,%esp
109e24: 84 db test %bl,%bl
109e26: 74 0f je 109e37 <unlink+0xeb>
rtems_filesystem_freenode( &parentloc );
109e28: 83 ec 0c sub $0xc,%esp
109e2b: 8d 45 d0 lea -0x30(%ebp),%eax
109e2e: 50 push %eax
109e2f: e8 9c d8 ff ff call 1076d0 <rtems_filesystem_freenode>
109e34: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EISDIR );
109e37: e8 48 a5 00 00 call 114384 <__errno>
109e3c: c7 00 15 00 00 00 movl $0x15,(%eax)
109e42: 83 c8 ff or $0xffffffff,%eax
109e45: eb 31 jmp 109e78 <unlink+0x12c>
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
109e47: 50 push %eax
109e48: 50 push %eax
109e49: 57 push %edi
109e4a: 8d 75 d0 lea -0x30(%ebp),%esi
109e4d: 56 push %esi
109e4e: 8b 45 c8 mov -0x38(%ebp),%eax
109e51: ff 50 0c call *0xc(%eax)
rtems_filesystem_freenode( &loc );
109e54: 89 3c 24 mov %edi,(%esp)
109e57: 89 45 b0 mov %eax,-0x50(%ebp)
109e5a: e8 71 d8 ff ff call 1076d0 <rtems_filesystem_freenode>
if ( free_parentloc )
109e5f: 83 c4 10 add $0x10,%esp
109e62: 84 db test %bl,%bl
109e64: 8b 45 b0 mov -0x50(%ebp),%eax
109e67: 74 0f je 109e78 <unlink+0x12c>
rtems_filesystem_freenode( &parentloc );
109e69: 83 ec 0c sub $0xc,%esp
109e6c: 56 push %esi
109e6d: e8 5e d8 ff ff call 1076d0 <rtems_filesystem_freenode>
109e72: 83 c4 10 add $0x10,%esp
109e75: 8b 45 b0 mov -0x50(%ebp),%eax
return result;
}
109e78: 8d 65 f4 lea -0xc(%ebp),%esp
109e7b: 5b pop %ebx
109e7c: 5e pop %esi
109e7d: 5f pop %edi
109e7e: c9 leave
109e7f: c3 ret
00109fa9 <unmount>:
*/
int unmount(
const char *path
)
{
109fa9: 55 push %ebp
109faa: 89 e5 mov %esp,%ebp
109fac: 57 push %edi
109fad: 56 push %esi
109fae: 53 push %ebx
109faf: 83 ec 38 sub $0x38,%esp
109fb2: 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 ) )
109fb5: 83 cb ff or $0xffffffff,%ebx
109fb8: 31 c0 xor %eax,%eax
109fba: 89 d9 mov %ebx,%ecx
109fbc: 89 d7 mov %edx,%edi
109fbe: f2 ae repnz scas %es:(%edi),%al
109fc0: f7 d1 not %ecx
109fc2: 49 dec %ecx
109fc3: 6a 01 push $0x1
109fc5: 8d 7d d4 lea -0x2c(%ebp),%edi
109fc8: 57 push %edi
109fc9: 6a 00 push $0x0
109fcb: 51 push %ecx
109fcc: 52 push %edx
109fcd: e8 c4 d5 ff ff call 107596 <rtems_filesystem_evaluate_path>
109fd2: 83 c4 20 add $0x20,%esp
109fd5: 85 c0 test %eax,%eax
109fd7: 0f 85 f2 00 00 00 jne 10a0cf <unmount+0x126> <== NEVER TAKEN
return -1;
mt_entry = loc.mt_entry;
109fdd: 8b 75 e4 mov -0x1c(%ebp),%esi
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
109fe0: 8b 45 d4 mov -0x2c(%ebp),%eax
109fe3: 39 46 1c cmp %eax,0x1c(%esi)
109fe6: 74 1c je 10a004 <unmount+0x5b>
rtems_filesystem_freenode( &loc );
109fe8: 83 ec 0c sub $0xc,%esp
109feb: 57 push %edi
109fec: e8 63 d6 ff ff call 107654 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
109ff1: e8 06 7c 00 00 call 111bfc <__errno>
109ff6: c7 00 0d 00 00 00 movl $0xd,(%eax)
109ffc: 83 c4 10 add $0x10,%esp
109fff: e9 cb 00 00 00 jmp 10a0cf <unmount+0x126>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
10a004: 83 ec 0c sub $0xc,%esp
10a007: 57 push %edi
10a008: e8 47 d6 ff ff call 107654 <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 )
10a00d: 83 c4 10 add $0x10,%esp
10a010: a1 d0 50 12 00 mov 0x1250d0,%eax
10a015: 39 70 14 cmp %esi,0x14(%eax)
10a018: 74 25 je 10a03f <unmount+0x96>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
10a01a: 51 push %ecx
10a01b: 51 push %ecx
10a01c: ff 76 2c pushl 0x2c(%esi)
10a01f: 68 98 9f 10 00 push $0x109f98
10a024: e8 44 dd ff ff call 107d6d <rtems_filesystem_mount_iterate>
10a029: 83 c4 10 add $0x10,%esp
10a02c: 84 c0 test %al,%al
10a02e: 75 0f jne 10a03f <unmount+0x96>
* 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 )
10a030: 83 ec 0c sub $0xc,%esp
10a033: 56 push %esi
10a034: e8 03 d9 ff ff call 10793c <rtems_libio_is_open_files_in_fs>
10a039: 83 c4 10 add $0x10,%esp
10a03c: 48 dec %eax
10a03d: 75 10 jne 10a04f <unmount+0xa6>
rtems_set_errno_and_return_minus_one( EBUSY );
10a03f: e8 b8 7b 00 00 call 111bfc <__errno>
10a044: c7 00 10 00 00 00 movl $0x10,(%eax)
10a04a: e9 80 00 00 00 jmp 10a0cf <unmount+0x126>
* 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 )
10a04f: 83 ec 0c sub $0xc,%esp
10a052: 8b 46 14 mov 0x14(%esi),%eax
10a055: 56 push %esi
10a056: ff 50 28 call *0x28(%eax)
10a059: 83 c4 10 add $0x10,%esp
return -1;
10a05c: 83 ca ff or $0xffffffff,%edx
* 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 )
10a05f: 85 c0 test %eax,%eax
10a061: 75 6f jne 10a0d2 <unmount+0x129> <== NEVER TAKEN
* 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){
10a063: 83 ec 0c sub $0xc,%esp
10a066: 8b 46 28 mov 0x28(%esi),%eax
10a069: 56 push %esi
10a06a: ff 50 2c call *0x2c(%eax)
10a06d: 83 c4 10 add $0x10,%esp
10a070: 85 c0 test %eax,%eax
10a072: 74 1d je 10a091 <unmount+0xe8> <== ALWAYS TAKEN
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
10a074: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a077: 8b 46 14 mov 0x14(%esi),%eax <== NOT EXECUTED
10a07a: 56 push %esi <== NOT EXECUTED
10a07b: ff 50 20 call *0x20(%eax) <== NOT EXECUTED
10a07e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
return -1;
10a081: 89 da mov %ebx,%edx <== NOT EXECUTED
* 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 )
10a083: 85 c0 test %eax,%eax <== NOT EXECUTED
10a085: 74 4b je 10a0d2 <unmount+0x129> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
10a087: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a08a: 6a 00 push $0x0 <== NOT EXECUTED
10a08c: e8 ef 0d 00 00 call 10ae80 <rtems_fatal_error_occurred><== NOT EXECUTED
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 );
10a091: 52 push %edx
10a092: 6a 00 push $0x0
10a094: 6a 00 push $0x0
10a096: ff 35 e8 72 12 00 pushl 0x1272e8
10a09c: e8 57 08 00 00 call 10a8f8 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10a0a1: 89 34 24 mov %esi,(%esp)
10a0a4: e8 a7 10 00 00 call 10b150 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10a0a9: 58 pop %eax
10a0aa: ff 35 e8 72 12 00 pushl 0x1272e8
10a0b0: e8 2f 09 00 00 call 10a9e4 <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;
10a0b5: 8d 46 08 lea 0x8(%esi),%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 );
10a0b8: 89 04 24 mov %eax,(%esp)
10a0bb: e8 94 d5 ff ff call 107654 <rtems_filesystem_freenode>
free( mt_entry );
10a0c0: 89 34 24 mov %esi,(%esp)
10a0c3: e8 a0 d5 ff ff call 107668 <free>
return 0;
10a0c8: 83 c4 10 add $0x10,%esp
10a0cb: 31 d2 xor %edx,%edx
10a0cd: eb 03 jmp 10a0d2 <unmount+0x129>
* 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 ) )
return -1;
10a0cf: 83 ca ff or $0xffffffff,%edx
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10a0d2: 89 d0 mov %edx,%eax
10a0d4: 8d 65 f4 lea -0xc(%ebp),%esp
10a0d7: 5b pop %ebx
10a0d8: 5e pop %esi
10a0d9: 5f pop %edi
10a0da: c9 leave
10a0db: c3 ret
0011ceac <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
11ceac: 55 push %ebp
11cead: 89 e5 mov %esp,%ebp
11ceaf: 56 push %esi
11ceb0: 53 push %ebx
11ceb1: 8b 5d 08 mov 0x8(%ebp),%ebx
11ceb4: 8b 55 0c mov 0xc(%ebp),%edx
11ceb7: 8b 4d 10 mov 0x10(%ebp),%ecx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11ceba: 3b 1d 44 01 12 00 cmp 0x120144,%ebx
11cec0: 73 14 jae 11ced6 <write+0x2a>
iop = rtems_libio_iop( fd );
11cec2: 6b db 38 imul $0x38,%ebx,%ebx
11cec5: 03 1d a0 41 12 00 add 0x1241a0,%ebx
rtems_libio_check_is_open( iop );
11cecb: 8b 73 14 mov 0x14(%ebx),%esi
11cece: f7 c6 00 01 00 00 test $0x100,%esi
11ced4: 75 0d jne 11cee3 <write+0x37>
11ced6: e8 09 3e ff ff call 110ce4 <__errno>
11cedb: c7 00 09 00 00 00 movl $0x9,(%eax)
11cee1: eb 1a jmp 11cefd <write+0x51>
rtems_libio_check_buffer( buffer );
11cee3: 85 d2 test %edx,%edx
11cee5: 74 0b je 11cef2 <write+0x46> <== NEVER TAKEN
rtems_libio_check_count( count );
11cee7: 31 c0 xor %eax,%eax
11cee9: 85 c9 test %ecx,%ecx
11ceeb: 74 31 je 11cf1e <write+0x72>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
11ceed: 83 e6 04 and $0x4,%esi
11cef0: 75 10 jne 11cf02 <write+0x56>
11cef2: e8 ed 3d ff ff call 110ce4 <__errno>
11cef7: c7 00 16 00 00 00 movl $0x16,(%eax)
11cefd: 83 c8 ff or $0xffffffff,%eax
11cf00: eb 1c jmp 11cf1e <write+0x72>
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
11cf02: 50 push %eax
11cf03: 8b 43 20 mov 0x20(%ebx),%eax
11cf06: 51 push %ecx
11cf07: 52 push %edx
11cf08: 53 push %ebx
11cf09: ff 50 0c call *0xc(%eax)
if ( rc > 0 )
11cf0c: 83 c4 10 add $0x10,%esp
11cf0f: 85 c0 test %eax,%eax
11cf11: 7e 0b jle 11cf1e <write+0x72>
iop->offset += rc;
11cf13: 89 c1 mov %eax,%ecx
11cf15: c1 f9 1f sar $0x1f,%ecx
11cf18: 01 43 0c add %eax,0xc(%ebx)
11cf1b: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11cf1e: 8d 65 f8 lea -0x8(%ebp),%esp
11cf21: 5b pop %ebx
11cf22: 5e pop %esi
11cf23: c9 leave
11cf24: c3 ret
00109fc0 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
109fc0: 55 push %ebp
109fc1: 89 e5 mov %esp,%ebp
109fc3: 57 push %edi
109fc4: 56 push %esi
109fc5: 53 push %ebx
109fc6: 83 ec 1c sub $0x1c,%esp
109fc9: 8b 75 08 mov 0x8(%ebp),%esi
109fcc: 8b 7d 0c mov 0xc(%ebp),%edi
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
109fcf: 3b 35 44 21 12 00 cmp 0x122144,%esi
109fd5: 73 11 jae 109fe8 <writev+0x28>
iop = rtems_libio_iop( fd );
109fd7: 6b f6 38 imul $0x38,%esi,%esi
109fda: 03 35 a0 61 12 00 add 0x1261a0,%esi
rtems_libio_check_is_open( iop );
109fe0: 8b 46 14 mov 0x14(%esi),%eax
109fe3: f6 c4 01 test $0x1,%ah
109fe6: 75 10 jne 109ff8 <writev+0x38>
109fe8: e8 33 78 00 00 call 111820 <__errno>
109fed: c7 00 09 00 00 00 movl $0x9,(%eax)
109ff3: e9 ad 00 00 00 jmp 10a0a5 <writev+0xe5>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
109ff8: a8 04 test $0x4,%al
109ffa: 74 42 je 10a03e <writev+0x7e> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
109ffc: 85 ff test %edi,%edi
109ffe: 74 3e je 10a03e <writev+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
10a000: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10a004: 7e 38 jle 10a03e <writev+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10a006: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp)
10a00d: 7f 2f jg 10a03e <writev+0x7e> <== NEVER TAKEN
10a00f: b2 01 mov $0x1,%dl
10a011: 31 c0 xor %eax,%eax
10a013: 31 c9 xor %ecx,%ecx
10a015: eb 02 jmp 10a019 <writev+0x59>
if ( iov[v].iov_len )
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
10a017: 89 d9 mov %ebx,%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 )
10a019: 83 3c c7 00 cmpl $0x0,(%edi,%eax,8)
10a01d: 74 1f je 10a03e <writev+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
10a01f: 83 7c c7 04 00 cmpl $0x0,0x4(%edi,%eax,8)
10a024: 0f 94 c3 sete %bl
10a027: f7 db neg %ebx
10a029: 21 da and %ebx,%edx
/* check for wrap */
old = total;
total += iov[v].iov_len;
10a02b: 8b 5c c7 04 mov 0x4(%edi,%eax,8),%ebx
10a02f: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
if ( total < old || total > SSIZE_MAX )
10a032: 81 fb ff 7f 00 00 cmp $0x7fff,%ebx
10a038: 7f 04 jg 10a03e <writev+0x7e> <== NEVER TAKEN
10a03a: 39 cb cmp %ecx,%ebx
10a03c: 7d 0d jge 10a04b <writev+0x8b>
rtems_set_errno_and_return_minus_one( EINVAL );
10a03e: e8 dd 77 00 00 call 111820 <__errno>
10a043: c7 00 16 00 00 00 movl $0x16,(%eax)
10a049: eb 5a jmp 10a0a5 <writev+0xe5>
* 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++ ) {
10a04b: 40 inc %eax
10a04c: 3b 45 10 cmp 0x10(%ebp),%eax
10a04f: 7c c6 jl 10a017 <writev+0x57>
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
10a051: 31 db xor %ebx,%ebx
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10a053: 84 d2 test %dl,%dl
10a055: 75 51 jne 10a0a8 <writev+0xe8>
10a057: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%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 )
10a05e: 8b 55 e4 mov -0x1c(%ebp),%edx
10a061: 8b 44 d7 04 mov 0x4(%edi,%edx,8),%eax
10a065: 85 c0 test %eax,%eax
10a067: 74 2f je 10a098 <writev+0xd8> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
10a069: 52 push %edx
10a06a: 8b 56 20 mov 0x20(%esi),%edx
10a06d: 50 push %eax
10a06e: 8b 45 e4 mov -0x1c(%ebp),%eax
10a071: ff 34 c7 pushl (%edi,%eax,8)
10a074: 56 push %esi
10a075: ff 52 0c call *0xc(%edx)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
10a078: 83 c4 10 add $0x10,%esp
10a07b: 83 f8 00 cmp $0x0,%eax
10a07e: 7c 25 jl 10a0a5 <writev+0xe5> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
10a080: 74 0d je 10a08f <writev+0xcf> <== NEVER TAKEN
iop->offset += bytes;
10a082: 89 c1 mov %eax,%ecx
10a084: c1 f9 1f sar $0x1f,%ecx
10a087: 01 46 0c add %eax,0xc(%esi)
10a08a: 11 4e 10 adc %ecx,0x10(%esi)
total += bytes;
10a08d: 01 c3 add %eax,%ebx
}
if (bytes != iov[ v ].iov_len)
10a08f: 8b 55 e4 mov -0x1c(%ebp),%edx
10a092: 3b 44 d7 04 cmp 0x4(%edi,%edx,8),%eax
10a096: 75 10 jne 10a0a8 <writev+0xe8> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
10a098: ff 45 e4 incl -0x1c(%ebp)
10a09b: 8b 45 10 mov 0x10(%ebp),%eax
10a09e: 39 45 e4 cmp %eax,-0x1c(%ebp)
10a0a1: 7c bb jl 10a05e <writev+0x9e>
10a0a3: eb 03 jmp 10a0a8 <writev+0xe8>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
10a0a5: 83 cb ff or $0xffffffff,%ebx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10a0a8: 89 d8 mov %ebx,%eax
10a0aa: 8d 65 f4 lea -0xc(%ebp),%esp
10a0ad: 5b pop %ebx
10a0ae: 5e pop %esi
10a0af: 5f pop %edi
10a0b0: c9 leave
10a0b1: c3 ret