mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
posix/lio_listio: corrected addition of system event
Previously the system event used by lio_listio was manually added to
event.h and not using rtems-central. This patch corrects that and renames
the event to make it clearer.
Some related dead code has also been removed.
(cherry picked from commit cabc8c3a78)
Co-authored-by: alessandronardin <ale.daluch@gmail.com>
This commit is contained in:
@@ -315,12 +315,6 @@ rtems_aio_request *init_read_req( struct aiocb* aiocbp );
|
|||||||
*/
|
*/
|
||||||
void rtems_aio_completed_list_op( listcb *listcbp );
|
void rtems_aio_completed_list_op( listcb *listcbp );
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief generates event at list completion to end wait in lio_listio().
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void lio_notify_end_wait( union sigval attr );
|
|
||||||
|
|
||||||
#ifdef RTEMS_DEBUG
|
#ifdef RTEMS_DEBUG
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|||||||
@@ -435,11 +435,38 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
typedef uint32_t rtems_event_set;
|
typedef uint32_t rtems_event_set;
|
||||||
|
|
||||||
|
/* Generated from spec:/rtems/event/if/system-lio-list-completed */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This event set constant represents the reserved system event
|
||||||
|
* internally used to notify list completion when lio_listio is called using
|
||||||
|
* LIO_WAIT.
|
||||||
|
*
|
||||||
|
* @par Constraints
|
||||||
|
* @parblock
|
||||||
|
* The following constraints apply to this constant:
|
||||||
|
*
|
||||||
|
* * The constant is not included in the pre-qualified feature set of RTEMS.
|
||||||
|
* Applications which are restricted to only use interfaces of the
|
||||||
|
* pre-qualified feature set of RTEMS shall not use the constant.
|
||||||
|
* @endparblock
|
||||||
|
*/
|
||||||
|
#define RTEMS_EVENT_SYSTEM_LIO_LIST_COMPLETED RTEMS_EVENT_28
|
||||||
|
|
||||||
/* Generated from spec:/rtems/event/if/system-network-close */
|
/* Generated from spec:/rtems/event/if/system-network-close */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This event set constant represents the reserved system event for a
|
* @brief This event set constant represents the reserved system event for a
|
||||||
* network socket close.
|
* network socket close.
|
||||||
|
*
|
||||||
|
* @par Constraints
|
||||||
|
* @parblock
|
||||||
|
* The following constraints apply to this constant:
|
||||||
|
*
|
||||||
|
* * The constant is not included in the pre-qualified feature set of RTEMS.
|
||||||
|
* Applications which are restricted to only use interfaces of the
|
||||||
|
* pre-qualified feature set of RTEMS shall not use the constant.
|
||||||
|
* @endparblock
|
||||||
*/
|
*/
|
||||||
#define RTEMS_EVENT_SYSTEM_NETWORK_CLOSE RTEMS_EVENT_26
|
#define RTEMS_EVENT_SYSTEM_NETWORK_CLOSE RTEMS_EVENT_26
|
||||||
|
|
||||||
@@ -448,6 +475,15 @@ typedef uint32_t rtems_event_set;
|
|||||||
/**
|
/**
|
||||||
* @brief This event set constant represents the reserved system event for a
|
* @brief This event set constant represents the reserved system event for a
|
||||||
* network socket buffer wait usage.
|
* network socket buffer wait usage.
|
||||||
|
*
|
||||||
|
* @par Constraints
|
||||||
|
* @parblock
|
||||||
|
* The following constraints apply to this constant:
|
||||||
|
*
|
||||||
|
* * The constant is not included in the pre-qualified feature set of RTEMS.
|
||||||
|
* Applications which are restricted to only use interfaces of the
|
||||||
|
* pre-qualified feature set of RTEMS shall not use the constant.
|
||||||
|
* @endparblock
|
||||||
*/
|
*/
|
||||||
#define RTEMS_EVENT_SYSTEM_NETWORK_SBWAIT RTEMS_EVENT_24
|
#define RTEMS_EVENT_SYSTEM_NETWORK_SBWAIT RTEMS_EVENT_24
|
||||||
|
|
||||||
@@ -456,6 +492,15 @@ typedef uint32_t rtems_event_set;
|
|||||||
/**
|
/**
|
||||||
* @brief This event set constant represents the reserved system event for a
|
* @brief This event set constant represents the reserved system event for a
|
||||||
* network socket sleep.
|
* network socket sleep.
|
||||||
|
*
|
||||||
|
* @par Constraints
|
||||||
|
* @parblock
|
||||||
|
* The following constraints apply to this constant:
|
||||||
|
*
|
||||||
|
* * The constant is not included in the pre-qualified feature set of RTEMS.
|
||||||
|
* Applications which are restricted to only use interfaces of the
|
||||||
|
* pre-qualified feature set of RTEMS shall not use the constant.
|
||||||
|
* @endparblock
|
||||||
*/
|
*/
|
||||||
#define RTEMS_EVENT_SYSTEM_NETWORK_SOSLEEP RTEMS_EVENT_25
|
#define RTEMS_EVENT_SYSTEM_NETWORK_SOSLEEP RTEMS_EVENT_25
|
||||||
|
|
||||||
@@ -533,20 +578,32 @@ rtems_status_code rtems_event_system_send(
|
|||||||
/**
|
/**
|
||||||
* @brief This event set constant represents the reserved system event for
|
* @brief This event set constant represents the reserved system event for
|
||||||
* server thread usage, for example the timer or interrupt server.
|
* server thread usage, for example the timer or interrupt server.
|
||||||
|
*
|
||||||
|
* @par Constraints
|
||||||
|
* @parblock
|
||||||
|
* The following constraints apply to this constant:
|
||||||
|
*
|
||||||
|
* * The constant is not included in the pre-qualified feature set of RTEMS.
|
||||||
|
* Applications which are restricted to only use interfaces of the
|
||||||
|
* pre-qualified feature set of RTEMS shall not use the constant.
|
||||||
|
* @endparblock
|
||||||
*/
|
*/
|
||||||
#define RTEMS_EVENT_SYSTEM_SERVER RTEMS_EVENT_30
|
#define RTEMS_EVENT_SYSTEM_SERVER RTEMS_EVENT_30
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This event set constant represents the reserved system event for
|
|
||||||
* aio list completion, used when lio_listio is called using LIO_WAIT.
|
|
||||||
*/
|
|
||||||
#define RTEMS_EVENT_SYSTEM_AIO_LIST RTEMS_EVENT_28
|
|
||||||
|
|
||||||
/* Generated from spec:/rtems/event/if/system-server-resume */
|
/* Generated from spec:/rtems/event/if/system-server-resume */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This event set constant represents the reserved system event to
|
* @brief This event set constant represents the reserved system event to
|
||||||
* resume a server thread, for example the timer or interrupt server.
|
* resume a server thread, for example the timer or interrupt server.
|
||||||
|
*
|
||||||
|
* @par Constraints
|
||||||
|
* @parblock
|
||||||
|
* The following constraints apply to this constant:
|
||||||
|
*
|
||||||
|
* * The constant is not included in the pre-qualified feature set of RTEMS.
|
||||||
|
* Applications which are restricted to only use interfaces of the
|
||||||
|
* pre-qualified feature set of RTEMS shall not use the constant.
|
||||||
|
* @endparblock
|
||||||
*/
|
*/
|
||||||
#define RTEMS_EVENT_SYSTEM_SERVER_RESUME RTEMS_EVENT_29
|
#define RTEMS_EVENT_SYSTEM_SERVER_RESUME RTEMS_EVENT_29
|
||||||
|
|
||||||
@@ -555,6 +612,15 @@ rtems_status_code rtems_event_system_send(
|
|||||||
/**
|
/**
|
||||||
* @brief This event set constant represents the reserved system event for
|
* @brief This event set constant represents the reserved system event for
|
||||||
* transient usage.
|
* transient usage.
|
||||||
|
*
|
||||||
|
* @par Constraints
|
||||||
|
* @parblock
|
||||||
|
* The following constraints apply to this constant:
|
||||||
|
*
|
||||||
|
* * The constant is not included in the pre-qualified feature set of RTEMS.
|
||||||
|
* Applications which are restricted to only use interfaces of the
|
||||||
|
* pre-qualified feature set of RTEMS shall not use the constant.
|
||||||
|
* @endparblock
|
||||||
*/
|
*/
|
||||||
#define RTEMS_EVENT_SYSTEM_TRANSIENT RTEMS_EVENT_31
|
#define RTEMS_EVENT_SYSTEM_TRANSIENT RTEMS_EVENT_31
|
||||||
|
|
||||||
@@ -567,6 +633,10 @@ rtems_status_code rtems_event_system_send(
|
|||||||
* @parblock
|
* @parblock
|
||||||
* The following constraints apply to this directive:
|
* The following constraints apply to this directive:
|
||||||
*
|
*
|
||||||
|
* * The directive is not included in the pre-qualified feature set of RTEMS.
|
||||||
|
* Applications which are restricted to only use interfaces of the
|
||||||
|
* pre-qualified feature set of RTEMS shall not use the directive.
|
||||||
|
*
|
||||||
* * The directive may be called from within device driver initialization
|
* * The directive may be called from within device driver initialization
|
||||||
* context.
|
* context.
|
||||||
*
|
*
|
||||||
@@ -600,6 +670,10 @@ static inline void rtems_event_transient_clear( void )
|
|||||||
* @parblock
|
* @parblock
|
||||||
* The following constraints apply to this directive:
|
* The following constraints apply to this directive:
|
||||||
*
|
*
|
||||||
|
* * The directive is not included in the pre-qualified feature set of RTEMS.
|
||||||
|
* Applications which are restricted to only use interfaces of the
|
||||||
|
* pre-qualified feature set of RTEMS shall not use the directive.
|
||||||
|
*
|
||||||
* * The directive may be called from within device driver initialization
|
* * The directive may be called from within device driver initialization
|
||||||
* context.
|
* context.
|
||||||
*
|
*
|
||||||
@@ -634,6 +708,10 @@ static inline rtems_status_code rtems_event_transient_receive(
|
|||||||
* @parblock
|
* @parblock
|
||||||
* The following constraints apply to this directive:
|
* The following constraints apply to this directive:
|
||||||
*
|
*
|
||||||
|
* * The directive is not included in the pre-qualified feature set of RTEMS.
|
||||||
|
* Applications which are restricted to only use interfaces of the
|
||||||
|
* pre-qualified feature set of RTEMS shall not use the directive.
|
||||||
|
*
|
||||||
* * The directive may be called from within interrupt context.
|
* * The directive may be called from within interrupt context.
|
||||||
*
|
*
|
||||||
* * The directive may be called from within device driver initialization
|
* * The directive may be called from within device driver initialization
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ void rtems_aio_completed_list_op( listcb *listcbp )
|
|||||||
case AIO_LIO_EVENT:
|
case AIO_LIO_EVENT:
|
||||||
rtems_event_system_send(
|
rtems_event_system_send(
|
||||||
listcbp->lio_notification.task_id,
|
listcbp->lio_notification.task_id,
|
||||||
RTEMS_EVENT_SYSTEM_AIO_LIST
|
RTEMS_EVENT_SYSTEM_LIO_LIST_COMPLETED
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -821,10 +821,3 @@ static void rtems_aio_handle_helper( rtems_aio_request *req )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void lio_notify_end_wait( union sigval attr ){
|
|
||||||
rtems_id id = attr.sival_int;
|
|
||||||
rtems_event_set event_in = RTEMS_EVENT_SYSTEM_AIO_LIST;
|
|
||||||
|
|
||||||
rtems_event_system_send( id, event_in );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ int lio_listio(
|
|||||||
} else if ( mode == LIO_WAIT ) {
|
} else if ( mode == LIO_WAIT ) {
|
||||||
rtems_event_set event_out;
|
rtems_event_set event_out;
|
||||||
rtems_event_system_receive(
|
rtems_event_system_receive(
|
||||||
RTEMS_EVENT_SYSTEM_AIO_LIST,
|
RTEMS_EVENT_SYSTEM_LIO_LIST_COMPLETED,
|
||||||
RTEMS_DEFAULT_OPTIONS,
|
RTEMS_DEFAULT_OPTIONS,
|
||||||
RTEMS_NO_TIMEOUT,
|
RTEMS_NO_TIMEOUT,
|
||||||
&event_out
|
&event_out
|
||||||
|
|||||||
Reference in New Issue
Block a user