diff options
author | Matias Elo <matias.elo@nokia.com> | 2023-04-25 10:38:30 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2023-06-09 17:54:51 +0300 |
commit | dc21ee4f37ea5d7b33923b8e66ebc31e63678934 (patch) | |
tree | 6a026445f0ed16b67527aab9386634e2eadeb74e /include | |
parent | f33339fbd1e28f44555f84cc01f4e34b956a7c51 (diff) |
api: event: add function for reading event user area address
Add odp_event_user_area() function which returns a pointer to the user area
associated with the event. If the event does not have user area, NULL is
returned.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/odp/api/spec/event.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/odp/api/spec/event.h b/include/odp/api/spec/event.h index c36d9cef1..9dc614329 100644 --- a/include/odp/api/spec/event.h +++ b/include/odp/api/spec/event.h @@ -1,5 +1,5 @@ /* Copyright (c) 2015-2018, Linaro Limited - * Copyright (c) 2022, Nokia + * Copyright (c) 2022-2023, Nokia * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -80,6 +80,20 @@ int odp_event_type_multi(const odp_event_t event[], int num, odp_event_type_t *type); /** + * Event user area + * + * Returns pointer to the user area associated with the event. This maps to the + * user area of underlying event type (e.g. odp_packet_user_area() for packets). + * If the event does not have user area, NULL is returned. + * + * @param event Event handle + * + * @return Pointer to the user area of the event + * @retval NULL The event does not have user area + */ +void *odp_event_user_area(odp_event_t event); + +/** * Filter and convert packet events * * Checks event type of all input events, converts all packet events and outputs |