diff --git a/dataflow_cpp/include/embb/dataflow/internal/select.h b/dataflow_cpp/include/embb/dataflow/internal/select.h index e2c03c0..7744ca1 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/select.h +++ b/dataflow_cpp/include/embb/dataflow/internal/select.h @@ -27,6 +27,7 @@ #ifndef EMBB_DATAFLOW_INTERNAL_SELECT_H_ #define EMBB_DATAFLOW_INTERNAL_SELECT_H_ +#include #include #include #include diff --git a/dataflow_cpp/include/embb/dataflow/internal/switch.h b/dataflow_cpp/include/embb/dataflow/internal/switch.h index 6cd2df2..242e357 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/switch.h +++ b/dataflow_cpp/include/embb/dataflow/internal/switch.h @@ -27,6 +27,7 @@ #ifndef EMBB_DATAFLOW_INTERNAL_SWITCH_H_ #define EMBB_DATAFLOW_INTERNAL_SWITCH_H_ +#include #include #include #include diff --git a/mtapi_c/src/embb_mtapi_id_pool_t.c b/mtapi_c/src/embb_mtapi_id_pool_t.c index 9ee047d..87dca32 100644 --- a/mtapi_c/src/embb_mtapi_id_pool_t.c +++ b/mtapi_c/src/embb_mtapi_id_pool_t.c @@ -42,7 +42,7 @@ void embb_mtapi_id_pool_initialize( for (ii = 1; ii < capacity; ii++) { that->id_buffer[ii] = ii; } - that->ids_availabe = capacity - 1; + that->ids_available = capacity - 1; that->put_id_position = 0; that->get_id_position = 1; embb_mtapi_spinlock_initialize(&that->lock); @@ -50,7 +50,7 @@ void embb_mtapi_id_pool_initialize( void embb_mtapi_id_pool_finalize(embb_mtapi_id_pool_t * that) { that->capacity = 0; - that->ids_availabe = 0; + that->ids_available = 0; that->get_id_position = 0; that->put_id_position = 0; embb_mtapi_alloc_deallocate(that->id_buffer); @@ -64,9 +64,9 @@ mtapi_uint_t embb_mtapi_id_pool_allocate(embb_mtapi_id_pool_t * that) { assert(MTAPI_NULL != that); if (embb_mtapi_spinlock_acquire(&that->lock)) { - if (0 < that->ids_availabe) { + if (0 < that->ids_available) { /* take away one id */ - that->ids_availabe--; + that->ids_available--; /* acquire position to fetch id from */ mtapi_uint_t id_position = that->get_id_position; @@ -93,7 +93,7 @@ void embb_mtapi_id_pool_deallocate( assert(MTAPI_NULL != that); if (embb_mtapi_spinlock_acquire(&that->lock)) { - if (that->capacity > that->ids_availabe) { + if (that->capacity > that->ids_available) { /* acquire position to put id to */ mtapi_uint_t id_position = that->put_id_position; that->put_id_position++; @@ -105,7 +105,7 @@ void embb_mtapi_id_pool_deallocate( that->id_buffer[id_position] = id; /* make it available */ - that->ids_availabe++; + that->ids_available++; } embb_mtapi_spinlock_release(&that->lock); } else { diff --git a/mtapi_c/src/embb_mtapi_id_pool_t.h b/mtapi_c/src/embb_mtapi_id_pool_t.h index 71a5e87..ec1bd7b 100644 --- a/mtapi_c/src/embb_mtapi_id_pool_t.h +++ b/mtapi_c/src/embb_mtapi_id_pool_t.h @@ -48,7 +48,7 @@ extern "C" { struct embb_mtapi_id_pool_struct { mtapi_uint_t capacity; mtapi_uint_t *id_buffer; - mtapi_uint_t ids_availabe; + mtapi_uint_t ids_available; mtapi_uint_t get_id_position; mtapi_uint_t put_id_position; embb_mtapi_spinlock_t lock;