diff options
author | Petri Savolainen <petri.savolainen@linaro.org> | 2017-12-12 15:52:38 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-02-26 12:37:21 +0300 |
commit | 856dd6637318c8d47e3a3b6360e6541ac1c45e4d (patch) | |
tree | 0edf53fff72587f2314ef3059a8a1495f93864a4 /include | |
parent | a7e69e8f29fdd87011c85c79a7eb925758958555 (diff) |
api: queue: block-free capabilities
Lock-free and wait-free implementations may differ a lot from
the default (blocking) implementation. Thus the maximum number
of queues and queue sizes may be more limited. Non-blocking enum
is not needed anymore as capability, since number of queues may
be zero for LF/WF when not implemented.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/odp/api/spec/queue.h | 74 |
1 files changed, 60 insertions, 14 deletions
diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index f83dea9f4..d5a0fe3eb 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -159,35 +159,81 @@ typedef struct odp_queue_capability_t { /** Plain queue capabilities */ struct { - /** Maximum number of plain queues of the default size. */ + /** Maximum number of plain (ODP_BLOCKING) queues of the + * default size. */ uint32_t max_num; - /** Maximum number of events a plain queue can store - * simultaneously. The value of zero means that plain + /** Maximum number of events a plain (ODP_BLOCKING) queue can + * store simultaneously. The value of zero means that plain * queues do not have a size limit, but a single queue can * store all available events. */ uint32_t max_size; - /** The strongest guarantee of block freedom that is supported - * for plain queues. */ - odp_nonblocking_t nonblocking; + /** Lock-free (ODP_NONBLOCKING_LF) implementation capabilities. + * The specification is the same as for the blocking + * implementation. */ + struct { + /** Maximum number of queues. Lock-free queues are not + * supported when zero. */ + uint32_t max_num; + + /** Maximum queue size */ + uint32_t max_size; + + } lockfree; + + /** Wait-free (ODP_NONBLOCKING_WF) implementation capabilities. + * The specification is the same as for the blocking + * implementation. */ + struct { + /** Maximum number of queues. Wait-free queues are not + * supported when zero. */ + uint32_t max_num; + + /** Maximum queue size */ + uint32_t max_size; + + } waitfree; } plain; /** Scheduled queue capabilities */ struct { - /** Maximum number of scheduled queues of the default size. */ + /** Maximum number of scheduled (ODP_BLOCKING) queues of the + * default size. */ uint32_t max_num; - /** Maximum number of events a scheduled queue can store - * simultaneously. The value of zero means that scheduled - * queues do not have a size limit, but a single queue can - * store all available events. */ + /** Maximum number of events a scheduled (ODP_BLOCKING) queue + * can store simultaneously. The value of zero means that + * scheduled queues do not have a size limit, but a single + * queue can store all available events. */ uint32_t max_size; - /** The strongest guarantee of block freedom that is supported - * for scheduled queues. */ - odp_nonblocking_t nonblocking; + /** Lock-free (ODP_NONBLOCKING_LF) implementation capabilities. + * The specification is the same as for the blocking + * implementation. */ + struct { + /** Maximum number of queues. Lock-free queues are not + * supported when zero. */ + uint32_t max_num; + + /** Maximum queue size */ + uint32_t max_size; + + } lockfree; + + /** Wait-free (ODP_NONBLOCKING_WF) implementation capabilities. + * The specification is the same as for the blocking + * implementation. */ + struct { + /** Maximum number of queues. Wait-free queues are not + * supported when zero. */ + uint32_t max_num; + + /** Maximum queue size */ + uint32_t max_size; + + } waitfree; } sched; |