@@ -164,35 +164,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;
@@ -150,9 +150,7 @@ static int queue_capability(odp_queue_capability_t *capa)
capa->max_sched_groups = sched_fn->num_grps();
capa->sched_prios = odp_schedule_num_prio();
capa->plain.max_num = capa->max_queues;
- capa->plain.nonblocking = ODP_BLOCKING;
capa->sched.max_num = capa->max_queues;
- capa->sched.nonblocking = ODP_BLOCKING;
return 0;
}
@@ -315,10 +315,8 @@ static int queue_capability(odp_queue_capability_t *capa)
capa->sched_prios = odp_schedule_num_prio();
capa->plain.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES;
capa->plain.max_size = 0;
- capa->plain.nonblocking = ODP_BLOCKING;
capa->sched.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES;
capa->sched.max_size = 0;
- capa->sched.nonblocking = ODP_BLOCKING;
return 0;
}
@@ -69,8 +69,6 @@ void queue_test_capa(void)
CU_ASSERT(capa.sched_prios != 0);
CU_ASSERT(capa.plain.max_num != 0);
CU_ASSERT(capa.sched.max_num != 0);
- CU_ASSERT(capa.plain.nonblocking >= ODP_BLOCKING);
- CU_ASSERT(capa.sched.nonblocking >= ODP_BLOCKING);
min = capa.plain.max_num;
if (min > capa.sched.max_num)