Type + union highlights the usage better than union + type. Less
packed structure is likely not an issue, since pools are few.

Signed-off-by: Petri Savolainen <[email protected]>
---
 include/odp/api/pool.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h
index f8555cc..50eaed7 100644
--- a/include/odp/api/pool.h
+++ b/include/odp/api/pool.h
@@ -45,6 +45,9 @@ extern "C" {
  * Used to communicate pool creation options.
  */
 typedef struct odp_pool_param_t {
+       /** Pool type */
+       int type;
+
        union {
                struct {
                        /** Number of buffers in the pool */
@@ -80,9 +83,6 @@ typedef struct odp_pool_param_t {
                        uint32_t num;
                } tmo;
        };
-
-       /** Pool type */
-       int type;
 } odp_pool_param_t;
 
 /** Packet pool*/
-- 
2.3.5

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to