posix/aio: modified insertion of sync requests

now sync requests are appended at the end of the appropriate queue

Closes #5176
This commit is contained in:
alessandronardin
2024-12-11 09:49:07 +01:00
parent 1c9d74cfac
commit ab7f9193eb

View File

@@ -393,6 +393,11 @@ static void rtems_aio_insert_prio(
AIO_printf( "First in chain \n" ); AIO_printf( "First in chain \n" );
rtems_chain_prepend( chain, &req->next_prio ); rtems_chain_prepend( chain, &req->next_prio );
} else { } else {
if ( req->op_type == AIO_OP_SYNC ) {
AIO_printf( "Sync request. Append to end of chain \n" );
rtems_chain_append( chain, &req->next_prio );
} else {
AIO_printf( "Add by priority \n" ); AIO_printf( "Add by priority \n" );
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
@@ -407,6 +412,7 @@ static void rtems_aio_insert_prio(
rtems_chain_insert( node->previous, &req->next_prio ); rtems_chain_insert( node->previous, &req->next_prio );
} }
} }
}
void rtems_aio_remove_fd( rtems_aio_request_chain *r_chain ) void rtems_aio_remove_fd( rtems_aio_request_chain *r_chain )
{ {